This commit is contained in:
GZod01 2024-05-17 20:35:54 +02:00
parent d860e3d987
commit c8008a4f20
208 changed files with 8919 additions and 146 deletions

View file

@ -3,7 +3,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/locale/{{ .Lang }}.min.js" integrity="sha512-RAt2+PIRwJiyjWpzvvhKAG2LEdPpQhTgWfbEkFDCo8wC4rFYh5GQzJBVIFDswwaEDEYX16GEE/4fpeDNr7OIZw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<div class="articles-list transition-parent">
{{ $allposts := (where site.RegularPages "Section" "=" "blog")}}
{{ $allposts = $allposts.ByDate }}
{{ $allposts = $allposts.ByDate.Reverse }}
{{ $context := (page.GetPage "/blog")}}
{{ if (eq (len $allposts) 0) }}
<div
@ -36,7 +36,7 @@
<span id=from-now data-date="{{ $article.Date.Format "20060102" }}"></span>
</div>
<p class="article-description">
{{ $article.Description }}
{{ $article.Description | safeHTML }}
</p>
</div>
</article>

View file

@ -28,7 +28,7 @@
</div>
<div class="footer-description">
{{ .Site.Params.footer_description }}
{{ .Site.Params.description }}
</div>
</div>
</div>
@ -86,31 +86,7 @@
{{ partial "svg" "github" }}
</a>
</div>
<div
id="h"
class="footer-locale">
{{ $nextlangcode := .Language.Params.nextlang }}
{{ $nextlang := . }}
{{ range .Translations }}
{{ if (eq .Lang $nextlangcode) }}
{{ $nextlang = . }}
{{ end }}
{{ end }}
<a
class="button button-primary"
href="{{ $nextlang.Permalink }}"
>
<div class="button-icon">
<i class="fa fas fa-flag"></i>
</div>
<div
class="link button-text">
<span>
{{ $nextlang.Language.LanguageName }}
</span>
</div>
</a>
</div>
{{ partial "locales-list.html" }}
</div>
</div>
</div>

View file

@ -1,8 +1,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{- $description := partialCached "data/description" . .RelPermalink -}}
<meta name="description" content="{{ $description }}">
<meta name="description" content="{{ if page.Description }}{{ page.Description }}{{ else }}{{ site.Params.description }}{{ end }}">
{{- with .Site.Params.author -}}
<meta name="author" content="{{ . }}">

View file

@ -28,60 +28,16 @@
</div>
</div>
<div class="header-nav">
{{ range .Site.Menus.main.ByWeight }}
<div class="header-nav-item">
<a
href="/"
class="link">
Home
</a>
</div>
<div class="header-nav-item">
<a
href="/blog"
class="link">Blog</a>
</div>
<div class="header-nav-item">
<a
href="/about"
class="link">About</a>
</div>
<div class="header-nav-item">
<a
href="/contact-us"
class="link">Contact</a>
</div>
<div class="header-nav-item">
<a
href="/donate"
class="link link-primary">Donate</a>
href="{{ .URL }}"
class="link{{ if .Params.customClass }} {{ .Params.customClass }}{{ end }}">{{ .Title }}</a>
</div>
{{ end }}
</div>
<div class="header-locale-container">
<div
id="h"
class="footer-locale">
{{ $nextlangcode := .Language.Params.nextlang }}
{{ $nextlang := . }}
{{ range .Translations }}
{{ if (eq .Lang $nextlangcode) }}
{{ $nextlang = . }}
{{ end }}
{{ end }}
<a
class="button button-primary"
href="{{ $nextlang.Permalink }}"
>
<div class="button-icon">
<i class="fa fas fa-flag"></i>
</div>
<div
class="link button-text">
<span>
{{ $nextlang.Language.LanguageName }}
</span>
</div>
</a>
</div>
{{ partial "locales-list.html" }}
</div>
</div>
</div>

View file

@ -0,0 +1,31 @@
<div
id="h"
class="footer-locale">
{{ $nextlangcode := page.Language.Params.nextlang }}
{{ $nextlang := page }}
{{ $nextlangurl := (strings.ReplaceRE "(/en|/fr)/(.*)" "$2" page.RelPermalink)}}
{{ $nextlangurl := (printf "/%s%s" $nextlangcode $nextlangurl)}}
{{ $nextlangpage := (page.GetPage $nextlangurl) }}
{{ with $nextlangpage }}
{{ $nextlang = . }}
{{ end }}
{{ range page.Translations }}
{{ if (eq .Lang $nextlangcode) }}
{{ $nextlang = . }}
{{ end }}
{{ end }}
<a
class="button button-primary"
href="{{ $nextlang.Permalink }}"
>
<div class="button-icon">
<i class="fa fas fa-flag"></i>
</div>
<div
class="link button-text">
<span>
{{ $nextlang.Language.LanguageName }}
</span>
</div>
</a>
</div>

View file

@ -1,8 +1,5 @@
{{- $title := partialCached "data/title" . .RelPermalink -}}
{{- $description := partialCached "data/description" . .RelPermalink -}}
<meta property='og:title' content='{{ $title }}'>
<meta property='og:description' content='{{ $description }}'>
<meta property='og:title' content='{{ if page.Title }}{{ page.Title }}{{ else }}{{ site.Title }}{{ end }}'>
<meta property='og:description' content='{{ if page.Description }}{{ page.Description }}{{ else }}{{ site.Params.description }}{{ end }}'>
<meta property='og:url' content='{{ .Permalink }}'>
<meta property='og:site_name' content='{{ .Site.Title }}'>
<meta property='og:type' content='