parent
6f9989adae
commit
afd602128d
6 changed files with 228 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
baseurl = "/"
|
||||
# languageCode = "ru-ru"
|
||||
languageCode = "ru-ru"
|
||||
theme = "hugo-theme-terminal"
|
||||
paginate = 5
|
||||
DefaultContentLanguage = "ru"
|
||||
|
@ -48,7 +48,7 @@ DefaultContentLanguage = "ru"
|
|||
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
|
||||
# updatedDatePrefix = "Обновлено/updated"
|
||||
# updatedDatePrefix = "Обновлено"
|
||||
|
||||
# set all headings to their default size (depending on browser settings)
|
||||
oneHeadingSize = false # default
|
||||
|
|
66
layouts/_default/index.html
Normal file
66
layouts/_default/index.html
Normal 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>
|
||||
{{ 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 }}
|
56
layouts/_default/list.html
Normal file
56
layouts/_default/list.html
Normal 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>
|
||||
{{ 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 }}
|
57
layouts/_default/term.html
Normal file
57
layouts/_default/term.html
Normal 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>
|
||||
{{ 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 }}
|
27
layouts/partials/footer.html
Normal file
27
layouts/partials/footer.html
Normal 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> <a href="https://git.sadium.cyou/SadmL/sadium">Исходный код</a> ::</span>
|
||||
<span><a href="/tos">Условия использования</a> ::</span>
|
||||
<!-- <span> <a href="/posts/index.xml">RSS</a> ::</span> -->
|
||||
<span> {{ 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" . }}
|
||||
|
||||
|
20
layouts/partials/mobile-menu.html
Normal file
20
layouts/partials/mobile-menu.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<ul class="menu menu--mobile">
|
||||
<li class="menu__trigger">Меню ▾</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>
|
Loading…
Reference in a new issue