27
0
Fork 1
forked from mirror/Mainroad

Compare commits

...
Sign in to create a new pull request.

14 commits

Author SHA1 Message Date
62e4d67a2c Remove authorbox from post pages 2025-02-18 21:06:40 +00:00
e630cd345e logo: allow specifying alt text 2025-02-18 21:04:08 +00:00
95435da932 extend footer with commit and ref 2025-02-18 21:04:08 +00:00
b426cf7ef8 extend head with keywords and norobots stuff 2025-02-18 21:04:08 +00:00
qnpati
4a7681cfbf nixies 2025-02-18 20:35:18 +00:00
eedc854866 implement multilang 2025-02-18 20:35:18 +00:00
c9416f8704 minify js 2025-02-18 20:35:18 +00:00
a43e43d93a open side menu links in new tab 2025-02-18 20:35:18 +00:00
940af9ad63 minify stylesheets 2025-02-18 20:35:18 +00:00
22c0ad3373 Add external link feature
Menu entries to internal pages have access to the .Page method, so use
that to discriminate.
2025-02-18 20:25:11 +00:00
fcdb7fcf34 Slight color tweaks 2025-02-18 20:24:48 +00:00
7f5a9c1460 Drop footer credits 2025-02-18 20:24:48 +00:00
24897d20c1 Remove CDN garbage 2025-02-18 20:24:48 +00:00
74930df90d retab menu.html 2025-02-18 20:24:45 +00:00
13 changed files with 48 additions and 33 deletions

View file

@ -1101,7 +1101,6 @@ textarea {
/* Search widget */
.widget-search__form {
padding: 16px 24px;
background: #f5f5f5;
}
.widget-search__submit[type=submit] {

View file

@ -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>

View file

@ -22,7 +22,6 @@
{{- end }}
</article>
</main>
{{ partial "authorbox.html" . }}
{{ partial "pager.html" . }}
{{ partial "comments.html" . }}
{{ end }}

View file

@ -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 }}

View file

@ -3,7 +3,11 @@
{{ partial "footer_links.html" . }}
<div class="footer__copyright">
&copy; {{ 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>

View file

@ -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 }}

View file

@ -5,8 +5,6 @@
{{- partial "head/seo.html" . -}}
{{- partial "head/gfonts.html" . -}}
{{- partial "head/stylesheet.html" . -}}
{{- $server := "" }}

View file

@ -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" . }}

View file

@ -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 }}

View file

@ -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 -}}

View file

@ -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>

View file

@ -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>