diff options
| author | Nantha Sorubakanthan <nantha@mielota.com> | 2025-10-18 16:45:59 +0200 |
|---|---|---|
| committer | Nantha Sorubakanthan <nantha@mielota.com> | 2025-10-18 16:45:59 +0200 |
| commit | a4106b2b0e2bd73bda5a7ecc22659c0920d56ade (patch) | |
| tree | 53e0d59313a5fbc194683eaab665bca6dea120c5 /layouts | |
| parent | c14820f8431dd5ad2ba14de0ed70d40d148d7310 (diff) | |
rework website
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_default/_markup/render-heading.html | 4 | ||||
| -rw-r--r-- | layouts/_default/baseof.html | 40 | ||||
| -rw-r--r-- | layouts/partials/buttons.html | 8 | ||||
| -rw-r--r-- | layouts/partials/footer.html | 17 | ||||
| -rw-r--r-- | layouts/partials/head.html | 16 | ||||
| -rw-r--r-- | layouts/partials/header.html | 3 | ||||
| -rw-r--r-- | layouts/shortcodes/article-list.html | 2 |
7 files changed, 41 insertions, 49 deletions
diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..60e75b7 --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,4 @@ +<h{{.Level}} {{with .Attributes.class}}class="{{.}}" {{end}}> + <!--Note to myself : If I want something to precede my titles, put something in the ""--> + <small>{{strings.Repeat (sub .Level 1) ""}}</small>{{.Text | safeHTML}} +</h{{.Level}}> diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index add4e17..6f4f5b0 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,19 +1,51 @@ <!DOCTYPE html> -<html lang="{{ or site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}"> +<html lang="{{ or site.Language.LanguageCode }}"> <head> - {{ partial "head.html" . }} + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width"> + <link rel="stylesheet" type="text/css" href="/style.css?v=1.0.2"> + <title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}</title> + <meta name="author" content="{{ .Site.Params.email }} ({{ .Site.Params.name }})"> + <meta name="description" content="{{- plainify (chomp .Summary) -}}"> + <meta property="og:title" content="{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}" /> + <meta property="og:description" content="{{- plainify (chomp .Summary) -}}" /> + <meta property="og:url" content="{{ .Permalink}}" /> + {{ $images := .Page.Resources.ByType "image" }} + {{ with index $images 0 }} + {{ $processed := .Resize "600x" }} + {{ $processed := $processed.Crop "512x512" }} + <meta property="og:image" content="{{ $processed.RelPermalink }}" /> + {{ end }} </head> <body> <header> - {{ partial "header.html" . }} + <h1>{{ if .IsHome }}{{ site.Title }}</h1>{{ else }}{{ .Title }}</h1> + {{ end }} + <br> </header> <main> {{ block "main" . }}{{ end }} </main> <footer> - {{ partial "footer.html" . }} + <hr> + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ if .IsHome }} + <nav style="display: flex;justify-content: space-around;"> + <a href="/stuff">stuff</a> + <a href="https://codeberg.org/mielota">codeberg</a> + <a href="/banporn">banporn</a> + </nav> + {{ else }} + <div style="display: flex;justify-content: space-between;"> + <p><a href="{{ path.Dir .Path }}">Return</a></p> + {{ $isregular := (in .Site.RegularPages .Page) -}} + {{ if $isregular }} + <time datetime="{{ $dateMachine }}">{{ .Date.Format "02 January 2006" }}</time> + {{ end }} + </div> + {{ end }} </footer> </body> diff --git a/layouts/partials/buttons.html b/layouts/partials/buttons.html deleted file mode 100644 index beb7d9e..0000000 --- a/layouts/partials/buttons.html +++ /dev/null @@ -1,8 +0,0 @@ -<div class="buttons"> - <a href="/banporn/"><img src="/assets/banporn.png" alt="BAN PORN" - title="BAN PORN"></a> - <a href="https://codeberg.org/mielota"><img src="/assets/codeberg.png" alt="Codeberg logo" - title="Codeberg"></a> - <a href="/"><img src="/favicon.ico" alt="Logo de mon site" - title="Page Web de Mielota" width="31" height="31"></a> -</div> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html deleted file mode 100644 index 08aa27c..0000000 --- a/layouts/partials/footer.html +++ /dev/null @@ -1,17 +0,0 @@ -{{- $isregular := (in .Site.RegularPages .Page) -}} - -{{- if $isregular }} -{{- $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} -{{ if .IsHome }}{{ else }} -<div class="finaline"> - <p class="no-print"><a href="{{ path.Dir .Path }}">Return</a></p>{{ end }} - <time datetime="{{ $dateMachine }}">{{ .Date.Format "02/01/2006" }}</time> -</div> -{{- end -}} - -<hr> -<nav> - {{- $title := .Title -}} - <p> - {{ partial "buttons.html" . }} -</nav> diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index c2e3597..0000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,16 +0,0 @@ -<meta charset="utf-8"> -<meta name="viewport" content="width=device-width"> -<link rel="stylesheet" type="text/css" href="/style.css?v=1.0.1"> -<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}</title> -<meta name="author" content="{{ .Site.Params.email }} ({{ .Site.Params.name }})"> -<meta name="description" content="{{- plainify (chomp .Summary) -}}"> -<!-- OpenGraph specification --> -<meta property="og:title" content="{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}" /> -<meta property="og:description" content="{{- plainify (chomp .Summary) -}}" /> -<meta property="og:url" content="{{ .Permalink}}" /> -{{- $images := .Page.Resources.ByType "image" }} -{{- with index $images 0 }} -{{- $processed := .Resize "600x" }} -{{- $processed := $processed.Crop "512x512" }} -<meta property="og:image" content="{{ $processed.RelPermalink }}" /> -{{- end -}}
\ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html deleted file mode 100644 index a26436e..0000000 --- a/layouts/partials/header.html +++ /dev/null @@ -1,3 +0,0 @@ -<h1>{{ if .IsHome }}{{ site.Title }}</h1>{{ else }}{{ .Title }}</h1> -{{ end -}} -<br> diff --git a/layouts/shortcodes/article-list.html b/layouts/shortcodes/article-list.html index 9f245dc..338643c 100644 --- a/layouts/shortcodes/article-list.html +++ b/layouts/shortcodes/article-list.html @@ -3,4 +3,4 @@ <li>{{ .Date.Format "02/01/06" }} - <a href="{{ .RelPermalink }}">{{ .Title }}</a></li> {{- end }} </ul> -<a href="{{ .Get "category" }}">See more...</a> +<a href='{{ .Get "category" }}'>See more...</a> |
