Настроечки
All checks were successful
/ site (push) Successful in 0s

This commit is contained in:
Артём 2024-06-17 18:41:58 +03:00
parent 6f9989adae
commit afd602128d
No known key found for this signature in database
GPG key ID: EEFBB39006B28920
6 changed files with 228 additions and 2 deletions

View file

@ -1,5 +1,5 @@
baseurl = "/" baseurl = "/"
# languageCode = "ru-ru" languageCode = "ru-ru"
theme = "hugo-theme-terminal" theme = "hugo-theme-terminal"
paginate = 5 paginate = 5
DefaultContentLanguage = "ru" DefaultContentLanguage = "ru"
@ -48,7 +48,7 @@ DefaultContentLanguage = "ru"
favicon = "/img/favicon.svg" favicon = "/img/favicon.svg"
# Provide a string as a prefix for the last update date. By default, it looks like this: 2020-xx-xx [Updated: 2020-xx-xx] :: Author # Provide a string as a prefix for the last update date. By default, it looks like this: 2020-xx-xx [Updated: 2020-xx-xx] :: Author
# updatedDatePrefix = "Обновлено/updated" # updatedDatePrefix = "Обновлено"
# set all headings to their default size (depending on browser settings) # set all headings to their default size (depending on browser settings)
oneHeadingSize = false # default oneHeadingSize = false # default

View file

@ -0,0 +1,66 @@
{{ define "main" }}
{{ if .Content }}
<div class="index-content {{ if .Params.framed -}}framed{{- end -}}">
{{ .Content }}
</div>
{{ end }}
<div class="posts">
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
{{ $PageContext := . }}
{{ if .IsHome }}
{{ $PageContext = .Site }}
{{ end }}
{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
{{ range $paginator.Pages }}
<article class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{ .Date | time.Format ":date_medium" }}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{ . }}</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}

View file

@ -0,0 +1,56 @@
{{ define "main" }}
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<div class="posts">
{{ range .Paginator.Pages }}
<article class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{ .Date | time.Format ":date_medium" }}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{- . -}}</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}

View file

@ -0,0 +1,57 @@
{{ define "main" }}
<h1>Posts for: #{{ .Title }}</h1>
{{ with .Content }}
<div class="index-content">
{{ . }}
</div>
{{ end }}
<div class="posts">
{{ range .Paginator.Pages }}
<article class="post on-list">
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</h1>
<div class="post-meta">
{{- if .Date -}}
<time class="post-date">
{{ .Date | time.Format ":date_medium" }}
</time>
{{- end -}}
{{- with .Params.Author -}}
<span class="post-author">{{- . -}}</span>
{{- end -}}
</div>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
{{- . -}}
</a>&nbsp;
{{ end }}
</span>
{{ end }}
{{ partial "cover.html" . }}
<div class="post-content">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if not .Params.showFullContent }}
<div>
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
</div>
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}

View file

@ -0,0 +1,27 @@
<footer class="footer">
<div class="footer__inner">
{{ if $.Site.Copyright }}
<div class="copyright copyright--user">
<span>{{ $.Site.Copyright | safeHTML }}</span>
{{ else }}
<div class="copyright">
<span>&nbsp;<a href="https://git.sadium.cyou/SadmL/sadium">Исходный код</a> ::</span>
<span><a href="/tos">Условия использования</a> ::</span>
<!-- <span>&nbsp;<a href="/posts/index.xml">RSS</a> ::</span> -->
<span>&nbsp;{{ now.Year }}</span>
{{ end }}
</div>
</div>
</footer>
{{ $menu := resources.Get "js/menu.js" | js.Build }}
{{ $prism := resources.Get "js/prism.js" | js.Build }}
{{ $bundle := slice $menu $prism | resources.Concat "bundle.js" | resources.Minify }}
<script type="text/javascript" src="{{ $bundle.RelPermalink }}"></script>
<!-- Extended footer section-->
{{ partial "extended_footer.html" . }}

View file

@ -0,0 +1,20 @@
<ul class="menu menu--mobile">
<li class="menu__trigger">Меню&nbsp;</li>
<li>
<ul class="menu__dropdown">
{{ range $.Site.Menus.main }}
{{ if not .HasChildren }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
{{ end }}
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
<hr />
{{ range $.Site.Home.AllTranslations }}
<li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{ end }}
{{ end }}
</ul>
</li>
</ul>