2025-06-06 18:12:46 +02:00
|
|
|
{{ define "main" }}
|
2025-09-08 01:15:11 +02:00
|
|
|
{{ partial "breadcrumbs.html" . }}
|
2025-06-06 18:12:46 +02:00
|
|
|
{{ partial "page-title.html" . }}
|
|
|
|
|
|
|
|
|
|
<!-- checking blog -->
|
|
|
|
|
{{ if or (eq .Section "post") (eq .Section "posts") (eq .Section "blog") (eq .Section "blogs") (eq .Section "news") (eq .Section "categories") (eq .Section "tags") }}
|
|
|
|
|
|
|
|
|
|
<div class="page-wrapper">
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-8">
|
2025-09-08 01:15:11 +02:00
|
|
|
|
2025-06-06 18:12:46 +02:00
|
|
|
{{ $paginator := .Paginate .Data.Pages -}}
|
|
|
|
|
{{ range $paginator.Pages -}}
|
2025-09-08 01:15:11 +02:00
|
|
|
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
2025-06-06 18:12:46 +02:00
|
|
|
<div class="post-media post-thumb">
|
2025-09-08 01:15:11 +02:00
|
|
|
{{ with .Params.image -}}
|
|
|
|
|
<a href="{{ $.RelPermalink }}" rel="bookmark">
|
|
|
|
|
{{ partial "img.html" (dict
|
|
|
|
|
"src" .
|
|
|
|
|
"alt" $.Title
|
|
|
|
|
"class" "img-responsive"
|
|
|
|
|
"loading" "lazy"
|
|
|
|
|
"page" $
|
|
|
|
|
) }}
|
2025-06-06 18:12:46 +02:00
|
|
|
</a>
|
2025-09-08 01:15:11 +02:00
|
|
|
{{- end }}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="post-title" itemprop="headline">
|
|
|
|
|
<a href="{{ .RelPermalink }}" rel="bookmark">{{ .Title }}</a>
|
|
|
|
|
</h3>
|
|
|
|
|
|
2025-06-06 18:12:46 +02:00
|
|
|
<div class="post-meta">
|
|
|
|
|
<ul>
|
|
|
|
|
<li><i class="fas fa-calendar-week"></i> {{ time.Format ":date_long" .PublishDate }}</li>
|
|
|
|
|
<li><i class="fas fa-user"></i>
|
|
|
|
|
{{ i18n "posted_by" }}
|
|
|
|
|
{{ $authors := slice }}{{ if reflect.IsSlice .Params.author }}{{ $authors = .Params.author }}{{ else }}{{ $authors = (slice .Params.author) }}{{ end -}}
|
|
|
|
|
{{ range $index, $elements := $authors }}{{ if ne $index 0 }}, {{ end }}<a class="text-primary" href="{{ `author/` | relLangURL }}{{ . | urlize }}">{{ . }}</a>{{ end }}
|
|
|
|
|
</li>
|
|
|
|
|
<li><i class="fas fa-tags"></i>
|
|
|
|
|
{{ range $index, $elements:= .Params.tags }}{{ if ne $index 0 }}, {{ end }}<a href="{{ `tags/` | relLangURL }}{{ . | urlize }}">{{ . }}</a>{{ end }}
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2025-09-08 01:15:11 +02:00
|
|
|
|
2025-06-06 18:12:46 +02:00
|
|
|
<div class="post-content">
|
2025-09-08 01:15:11 +02:00
|
|
|
<p itemprop="description">{{ .Summary }}</p>
|
|
|
|
|
<a href="{{ .RelPermalink }}" class="btn btn-main" rel="bookmark">{{ i18n "read_more" }}</a>
|
2025-06-06 18:12:46 +02:00
|
|
|
</div>
|
2025-09-08 01:15:11 +02:00
|
|
|
</article>
|
2025-06-06 18:12:46 +02:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
|
|
<!-- pagination -->
|
|
|
|
|
{{ $paginator := .Paginator -}}
|
|
|
|
|
{{ $adjacent_links := 2 -}}
|
|
|
|
|
{{ $max_links := (add (mul $adjacent_links 2) 1) -}}
|
|
|
|
|
{{ $lower_limit := (add $adjacent_links 1) -}}
|
|
|
|
|
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) -}}
|
|
|
|
|
{{ if gt $paginator.TotalPages 1 -}}
|
2025-09-08 01:15:11 +02:00
|
|
|
<nav class="text-center" aria-label="Blog pagination">
|
2025-06-06 18:12:46 +02:00
|
|
|
<ul class="pagination post-pagination">
|
|
|
|
|
<!-- Previous page. -->
|
|
|
|
|
{{ if $paginator.HasPrev -}}
|
|
|
|
|
<li>
|
2025-09-08 01:15:11 +02:00
|
|
|
<a href="{{ $paginator.Prev.URL }}" class="page-link" rel="prev">{{ i18n "page_prev" }}</a>
|
2025-06-06 18:12:46 +02:00
|
|
|
</li>
|
|
|
|
|
{{- end }}
|
2025-09-08 01:15:11 +02:00
|
|
|
|
2025-06-06 18:12:46 +02:00
|
|
|
<!-- Page numbers. -->
|
|
|
|
|
{{ range $paginator.Pagers -}}
|
2025-09-08 01:15:11 +02:00
|
|
|
{{ $page_number_flag := false -}}
|
|
|
|
|
{{ if gt $paginator.TotalPages $max_links -}}
|
|
|
|
|
{{ if le $paginator.PageNumber $lower_limit -}}
|
|
|
|
|
{{ if le .PageNumber $max_links -}}
|
|
|
|
|
{{ $page_number_flag = true -}}
|
|
|
|
|
{{ end -}}
|
|
|
|
|
{{ else if ge $paginator.PageNumber $upper_limit -}}
|
|
|
|
|
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) -}}
|
|
|
|
|
{{ $page_number_flag = true -}}
|
|
|
|
|
{{ end -}}
|
|
|
|
|
{{ else -}}
|
|
|
|
|
{{ if and (ge .PageNumber (sub $paginator.PageNumber $adjacent_links)) (le .PageNumber (add $paginator.PageNumber $adjacent_links)) -}}
|
|
|
|
|
{{ $page_number_flag = true -}}
|
|
|
|
|
{{ end -}}
|
|
|
|
|
{{ end -}}
|
|
|
|
|
{{ else -}}
|
|
|
|
|
{{ $page_number_flag = true -}}
|
|
|
|
|
{{ end -}}
|
|
|
|
|
|
|
|
|
|
{{ if eq $page_number_flag true -}}
|
|
|
|
|
<li class="{{ if eq . $paginator }} active {{ end }}">
|
|
|
|
|
<a href="{{ .URL }}" {{ if eq . $paginator }}aria-current="page"{{ end }}>
|
|
|
|
|
{{ .PageNumber }}
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{- end }}
|
2025-06-06 18:12:46 +02:00
|
|
|
{{- end }}
|
2025-09-08 01:15:11 +02:00
|
|
|
|
2025-06-06 18:12:46 +02:00
|
|
|
<!-- Next page. -->
|
|
|
|
|
{{ if $paginator.HasNext -}}
|
|
|
|
|
<li>
|
2025-09-08 01:15:11 +02:00
|
|
|
<a href="{{ $paginator.Next.URL }}" rel="next">{{ i18n "page_next" }}</a>
|
2025-06-06 18:12:46 +02:00
|
|
|
</li>
|
|
|
|
|
{{- end }}
|
|
|
|
|
</ul>
|
|
|
|
|
</nav>
|
|
|
|
|
{{- end }}
|
2025-09-08 01:15:11 +02:00
|
|
|
|
2025-06-06 18:12:46 +02:00
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
|
{{ partial "blog-sidebar.html" . }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- regular page -->
|
|
|
|
|
{{ else -}}
|
2025-09-08 01:15:11 +02:00
|
|
|
{{ .Render "default" }}
|
2025-06-06 18:12:46 +02:00
|
|
|
{{- end }}
|
|
|
|
|
<!-- /regular page -->
|
|
|
|
|
|
|
|
|
|
{{ end }}
|