Initial commit

This commit is contained in:
Kirchik
2025-08-02 11:45:16 +02:00
parent a6a820aba2
commit a0ba937a46
1078 changed files with 7800 additions and 1115 deletions
@@ -1,17 +1,30 @@
<!-- Featured Post -->
{{ $data := .siteData }}
{{ range .firstpost }}
{{ if .Params.pinned }}
<section class="posts">
<article>
<header>
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</header>
{{ if .Params.image }}
<a href="{{ .Permalink }}" class="image main"><img src="{{ .Params.image | relURL }}" alt="" /></a>
{{ end }}
</article>
</section>
{{ else if not .Params.pinned }}
<article class="post featured">
<header class="major">
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ if .Description }}
<p>{{ .Description }}</p>
<p class="featured-description">{{ .Description }}</p>
{{ else }}
<p>{{ .Summary }}</p>
<p class="featured-description">{{ .Summary }}</p>
{{ end }}
</header>
{{ if .Params.image }}
<a href="{{ .Permalink }}" class="image main"><img src="{{ .Params.image | relURL }}" alt="" /></a>
<a href="{{ .Permalink }}" class="image main featured-image"><img src="{{ .Params.image | relURL }}" alt="" /></a>
{{ end }}
</article>
{{ end }}
{{ end }}
@@ -4,13 +4,13 @@
{{ range .posts.Pages }}
<article>
<header>
{{ if not .Date.IsZero }}
<span class="date">{{ .Date.Format (.Site.Params.DateFormat | default "January 2, 2006") }}</span>
{{ if and (not .Date.IsZero) (not .Params.pinned) }}
<span class="date">{{ partial "format-date-ru.html" .Date }}</span>
{{ end }}
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</header>
{{ if .Params.image }}
<a href="{{ .Permalink }}" class="image fit"><img src="{{ .Params.image | relURL }}" alt="" /></a>
<a href="{{ .Permalink }}" class="image main"><img src="{{ .Params.image | relURL }}" alt="" /></a>
{{ end }}
{{ if .Description }}
<p>{{ .Description }}</p>
@@ -42,57 +42,12 @@
</li>
{{ end }}
<!-- Page numbers. -->
{{ range $paginator.Pagers }}
{{ $outer.Scratch.Set "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 }}
{{ $outer.Scratch.Set "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) }}
{{ $outer.Scratch.Set "page_number_flag" true }}
{{ end }}
<!-- Middle pages. -->
{{ else }}
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
{{ $outer.Scratch.Set "page_number_flag" true }}
{{ end }}
{{ end }}
<!-- Simple page numbers. -->
{{ else }}
{{ $outer.Scratch.Set "page_number_flag" true }}
{{ end }}
<!-- Output page numbers. -->
{{ if eq ($outer.Scratch.Get "page_number_flag") true }}
<li>
<a href="{{ .URL }}" class="page{{ if eq . $paginator }} active{{ end }}">
{{ .PageNumber }}
</a>
</li>
{{ end }}
{{ end }}
<!-- Информация о страницах для десктопа -->
<li class="page-info desktop-only">
<span class="current-page">{{ $paginator.PageNumber }}</span>
<span class="separator">из</span>
<span class="total-pages">{{ $paginator.TotalPages }}</span>
</li>
<!-- Next page. -->
{{ if $paginator.HasNext }}