forked from mirror/Mainroad
Compare commits
14 commits
Author | SHA1 | Date | |
---|---|---|---|
62e4d67a2c | |||
e630cd345e | |||
95435da932 | |||
b426cf7ef8 | |||
|
4a7681cfbf | ||
eedc854866 | |||
c9416f8704 | |||
a43e43d93a | |||
940af9ad63 | |||
22c0ad3373 | |||
fcdb7fcf34 | |||
7f5a9c1460 | |||
24897d20c1 | |||
74930df90d |
13 changed files with 48 additions and 33 deletions
assets
layouts
|
@ -1101,7 +1101,6 @@ textarea {
|
|||
/* Search widget */
|
||||
.widget-search__form {
|
||||
padding: 16px 24px;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.widget-search__submit[type=submit] {
|
||||
|
|
|
@ -20,9 +20,11 @@
|
|||
</div>
|
||||
{{ block "footer" . }}{{ partial "footer.html" . }}{{ end }}
|
||||
</div>
|
||||
<script async defer src="{{ "js/menu.js" | relURL }}"></script>
|
||||
{{ $menuScript := resources.Get "js/menu.js" | resources.Minify -}}
|
||||
<script async defer src="{{ $menuScript.RelPermalink }}"></script>
|
||||
{{ range .Site.Params.customJS -}}
|
||||
<script src="{{ . | relURL }}"></script>
|
||||
{{ $customScript := resources.Get . | resources.Minify -}}
|
||||
<script async defer src="{{ $customScript.RelPermalink }}"></script>
|
||||
{{- end }}
|
||||
{{- partial "mathjax.html" . -}}
|
||||
</body>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
{{- end }}
|
||||
</article>
|
||||
</main>
|
||||
{{ partial "authorbox.html" . }}
|
||||
{{ partial "pager.html" . }}
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
|
@ -6,7 +6,11 @@
|
|||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{ $paginator := (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections).ByDate.Reverse (.Site.Params.pagerSizeIndex | default 5))}}
|
||||
{{ $pages := .Site.RegularPages }}
|
||||
{{ range .Site.Home.Translations }}
|
||||
{{ $pages = $pages | lang.Merge .Site.RegularPages }}
|
||||
{{ end }}
|
||||
{{ $paginator := (.Paginate (where $pages "Type" "in" .Site.Params.mainSections).ByDate.Reverse (.Site.Params.pagerSizeIndex | default 5))}}
|
||||
{{ range $paginator.Pages }}
|
||||
{{- .Render "summary" }}
|
||||
{{ end }}
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
{{ partial "footer_links.html" . }}
|
||||
<div class="footer__copyright">
|
||||
© {{ now.Format "2006" }} {{ .Site.Params.copyright | default .Site.Title }}.
|
||||
<span class="footer__copyright-credits">{{ T "footer_credits" | safeHTML }}</span>
|
||||
</div>
|
||||
{{ if site.Params.show_version -}}
|
||||
<div class="footer__version">
|
||||
ref: {{ site.Params.tag }} • commit: <a href="https://git.it-syndikat.org/IT-Syndikat/website/commit/{{ site.Params.commit }}" target="_blank">{{ strings.Substr site.Params.commit 0 10 }}</a>
|
||||
</div>
|
||||
{{ end -}}
|
||||
</div>
|
||||
</footer>
|
|
@ -2,7 +2,7 @@
|
|||
<div class="footer__links">
|
||||
{{ range $key, $value := . }}
|
||||
{{- if ne $key 0 }} | {{ end -}}
|
||||
<a class="footer__link" href="{{ $value.URL }}">{{ $value.Name }}</a>
|
||||
<a class="footer__link" href="{{ $value.URL }}" {{- if not .Page }} target="_blank"{{ end }}>{{ i18n $value.Identifier | default $value.Name}}</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
{{- partial "head/seo.html" . -}}
|
||||
|
||||
{{- partial "head/gfonts.html" . -}}
|
||||
|
||||
{{- partial "head/stylesheet.html" . -}}
|
||||
|
||||
{{- $server := "" }}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Params.Description }}{{ end }}">
|
||||
<meta name="keywords" content="{{ if .IsHome }}{{ delimit .Site.Params.keywords "," }}{{ else if .Params.tags }}{{ delimit .Params.tags "," }}{{ end }}">
|
||||
{{ with .Params.robotsdisallow }}<meta name="robots" content="noindex, nofollow, noarchive">{{ end }}
|
||||
|
||||
{{- if .Site.Params.opengraph }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{{ $style := resources.Get "css/style.css" | resources.ExecuteAsTemplate "css/style.css" . -}}
|
||||
{{ $style := resources.Get "css/style.css" | resources.ExecuteAsTemplate "css/style.css" . | resources.Minify -}}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
{{ $v2Styles := resources.Get "css/v2-styles.css" | resources.ExecuteAsTemplate "css/v2-styles.css" . -}}
|
||||
<link rel="stylesheet" href="{{ $v2Styles.RelPermalink }}">
|
||||
{{ range .Site.Params.customCSS -}}
|
||||
<link rel="stylesheet" href="{{ . | relURL }}">
|
||||
{{- end }}
|
||||
{{ $customStyle := resources.Get . | resources.Minify -}}
|
||||
<link rel="stylesheet" href="{{ $customStyle.RelPermalink }}">
|
||||
{{- end }}
|
|
@ -1,6 +1,7 @@
|
|||
{{- $logoTitle := .Site.Params.logo.title | default .Site.Title -}}
|
||||
{{- $logoSubtitle := .Site.Params.logo.subtitle | default .Site.Params.subtitle -}}
|
||||
{{- $logoImage := .Site.Params.logo.image -}}
|
||||
{{- $logoDesc := .Site.Params.logo.desc -}}
|
||||
|
||||
{{- if or $logoTitle $logoImage }}
|
||||
{{/* Defined when logo is mixed (image + text) */}}
|
||||
|
@ -10,7 +11,7 @@
|
|||
<a class="logo__link" href="{{ "" | relLangURL }}"{{ with $logoTitle }} title="{{ . }}"{{ end }} rel="home">
|
||||
{{ with $logoImage -}}
|
||||
<div class="logo__item logo__imagebox">
|
||||
<img class="logo__img" src="{{ . | relURL }}">
|
||||
<img class="logo__img" {{ with $logoDesc }}alt="{{ . }}"{{ end }} src="{{ . | relURL }}">
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ with $logoTitle -}}
|
||||
|
|
|
@ -1,24 +1,29 @@
|
|||
{{- if .Site.Menus.main }}
|
||||
<nav class="menu">
|
||||
<button class="menu__btn" aria-haspopup="true" aria-expanded="false" tabindex="0">
|
||||
<span class="menu__btn-title" tabindex="-1">{{ T "menu_label" }}</span>
|
||||
</button>
|
||||
<ul class="menu__list">
|
||||
{{- $currentNode := . }}
|
||||
{{- range .Site.Menus.main }}
|
||||
{{- if .Name }}
|
||||
<li class="menu__item{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} menu__item--active{{ end }}">
|
||||
<a class="menu__link" href="{{ .URL }}">
|
||||
{{ if .Pre }}
|
||||
{{ readFile (printf "static%s" .Pre) | safeHTML }}
|
||||
{{ end }}
|
||||
<span class="menu__text">{{ .Name }}</span>
|
||||
{{ .Post }}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
<button class="menu__btn" aria-haspopup="true" aria-expanded="false" tabindex="0">
|
||||
<span class="menu__btn-title" tabindex="-1">
|
||||
{{ partial "widgets/nixie.html" (T "menu_label") }}
|
||||
</span>
|
||||
</button>
|
||||
<ul class="menu__list">
|
||||
{{- $currentNode := . }}
|
||||
{{- range .Site.Menus.main }}
|
||||
{{- if .Name }}
|
||||
<li class="menu__item{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} menu__item--active{{ end }}">
|
||||
<a class="menu__link" href="{{ .URL }}" {{- if not .Page }} target="_blank"{{ end }}>
|
||||
{{ if .Pre }}
|
||||
{{ readFile (printf "static%s" .Pre) | safeHTML }}
|
||||
{{ end }}
|
||||
<span class="menu__text">{{ i18n .Identifier | default .Name}}</span>
|
||||
{{ .Post }}
|
||||
</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<li class="menu-status">
|
||||
{{ partial "widgets/nixie.html" }}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{{ else -}}
|
||||
<div class="divider"></div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<ul class="widget__list">
|
||||
{{ range .Site.Menus.side }}
|
||||
<li class="widget__item">
|
||||
<a class="widget__link" href="{{ .URL }}">{{ .Name }}</a>
|
||||
<a class="widget__link" target="_blank" href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Reference in a new issue