forked from markus/AMPERION_Webpage
SEOOptimierungenAlex07092025
This commit is contained in:
parent
6828c3f835
commit
b7f8f2ac5e
34 changed files with 4426 additions and 253 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{{ define "main" }}
|
||||
|
||||
{{ partial "breadcrumbs.html" . }}
|
||||
{{ partial "page-title.html" . }}
|
||||
|
||||
<!-- checking blog -->
|
||||
|
|
@ -9,17 +9,29 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
|
||||
{{ $paginator := .Paginate .Data.Pages -}}
|
||||
{{ range $paginator.Pages -}}
|
||||
<div class="post">
|
||||
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
||||
<div class="post-media post-thumb">
|
||||
{{ if isset .Params "image" -}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img src="{{ .Params.image | relURL }}" alt="{{ .Title }}">
|
||||
{{ with .Params.image -}}
|
||||
<a href="{{ $.RelPermalink }}" rel="bookmark">
|
||||
{{ partial "img.html" (dict
|
||||
"src" .
|
||||
"alt" $.Title
|
||||
"class" "img-responsive"
|
||||
"loading" "lazy"
|
||||
"page" $
|
||||
) }}
|
||||
</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
<h3 class="post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
|
||||
<h3 class="post-title" itemprop="headline">
|
||||
<a href="{{ .RelPermalink }}" rel="bookmark">{{ .Title }}</a>
|
||||
</h3>
|
||||
|
||||
<div class="post-meta">
|
||||
<ul>
|
||||
<li><i class="fas fa-calendar-week"></i> {{ time.Format ":date_long" .PublishDate }}</li>
|
||||
|
|
@ -33,11 +45,12 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="post-content">
|
||||
<p>{{ .Summary }}</p>
|
||||
<a href="{{ .RelPermalink }}" class="btn btn-main">{{ i18n "read_more" }}</a>
|
||||
<p itemprop="description">{{ .Summary }}</p>
|
||||
<a href="{{ .RelPermalink }}" class="btn btn-main" rel="bookmark">{{ i18n "read_more" }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{{- end }}
|
||||
|
||||
<!-- pagination -->
|
||||
|
|
@ -47,61 +60,55 @@
|
|||
{{ $lower_limit := (add $adjacent_links 1) -}}
|
||||
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) -}}
|
||||
{{ if gt $paginator.TotalPages 1 -}}
|
||||
<nav class="text-center">
|
||||
<nav class="text-center" aria-label="Blog pagination">
|
||||
<ul class="pagination post-pagination">
|
||||
<!-- Previous page. -->
|
||||
{{ if $paginator.HasPrev -}}
|
||||
<li>
|
||||
<a href="{{ $paginator.Prev.URL }}" class="page-link">{{ i18n "page_prev" }}</a>
|
||||
<a href="{{ $paginator.Prev.URL }}" class="page-link" rel="prev">{{ i18n "page_prev" }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
<!-- Page numbers. -->
|
||||
{{ range $paginator.Pagers -}}
|
||||
{{ $page_number_flag := false -}}
|
||||
<!-- Advanced page numbers. -->
|
||||
{{ if gt $paginator.TotalPages $max_links -}}
|
||||
<!-- Lower limit pages. -->
|
||||
<!-- If the user is on a page which is in the lower limit. -->
|
||||
{{ if le $paginator.PageNumber $lower_limit -}}
|
||||
<!-- If the current loop page is less than max_links. -->
|
||||
{{ if le .PageNumber $max_links -}}
|
||||
{{ $page_number_flag = true -}}
|
||||
{{ end -}}
|
||||
<!-- Upper limit pages. -->
|
||||
<!-- If the user is on a page which is in the upper limit. -->
|
||||
{{ else if ge $paginator.PageNumber $upper_limit -}}
|
||||
<!-- If the current loop page is greater than total pages minus $max_links -->
|
||||
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) -}}
|
||||
{{ $page_number_flag = true -}}
|
||||
{{ end -}}
|
||||
<!-- Middle pages. -->
|
||||
{{ else -}}
|
||||
{{ if and (ge .PageNumber (sub $paginator.PageNumber $adjacent_links)) (le .PageNumber (add $paginator.PageNumber $adjacent_links)) -}}
|
||||
{{ $page_number_flag = true -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
<!-- Simple page numbers. -->
|
||||
{{ else -}}
|
||||
{{ $page_number_flag = true -}}
|
||||
{{ end -}}
|
||||
<!-- Output page numbers. -->
|
||||
{{ if eq $page_number_flag true -}}
|
||||
<li class="{{ if eq . $paginator }} active {{ end }}">
|
||||
<a href="{{ .URL }}">
|
||||
{{ .PageNumber }}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{ $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 }}
|
||||
{{- end }}
|
||||
|
||||
<!-- Next page. -->
|
||||
{{ if $paginator.HasNext -}}
|
||||
<li>
|
||||
<a href="{{ $paginator.Next.URL }}">{{ i18n "page_next" }}</a>
|
||||
<a href="{{ $paginator.Next.URL }}" rel="next">{{ i18n "page_next" }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{- end }}
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{{ partial "blog-sidebar.html" . }}
|
||||
|
|
@ -112,7 +119,7 @@
|
|||
|
||||
<!-- regular page -->
|
||||
{{ else -}}
|
||||
{{ .Render "default" }}
|
||||
{{ .Render "default" }}
|
||||
{{- end }}
|
||||
<!-- /regular page -->
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue