diff options
Diffstat (limited to 'backend/templates')
| -rw-r--r-- | backend/templates/404.html | 20 | ||||
| -rw-r--r-- | backend/templates/base.html | 47 | ||||
| -rw-r--r-- | backend/templates/components.html | 41 | ||||
| -rw-r--r-- | backend/templates/home.html | 10 | ||||
| -rw-r--r-- | backend/templates/home_log.html | 4 | ||||
| -rw-r--r-- | backend/templates/log.html | 16 | ||||
| -rw-r--r-- | backend/templates/simple.html | 4 |
7 files changed, 70 insertions, 72 deletions
diff --git a/backend/templates/404.html b/backend/templates/404.html index 0655652..e0bca68 100644 --- a/backend/templates/404.html +++ b/backend/templates/404.html @@ -1,15 +1,11 @@ {{ define "body" }} <main id="content"> - <h1>Oh non, je crois que tu t'es perdu :(</h1> - <p> - Tu as des liens en haut pour retrouver ton chemin :3 - </p> - <p> - Si tu penses que c'est un bug, hésite pas à ouvrir une issue sur - <a href="https://github.com/anhgelus/small-web/issues">GitHub</a> :D - </p> - <p> - (enfin, sauf si tu as un compte sur ma forge, mais ça m'étonnerait...) - </p> + <h1>Oh non, je crois que tu t'es perdu :(</h1> + <p>Tu as des liens en haut pour retrouver ton chemin :3</p> + <p> + Si tu penses que c'est un bug, hésite pas à ouvrir une issue sur + <a href="https://github.com/anhgelus/small-web/issues">GitHub</a> :D + </p> + <p>(enfin, sauf si tu as un compte sur ma forge, mais ça m'étonnerait...)</p> </main> -{{ end }}
\ No newline at end of file +{{ end }} diff --git a/backend/templates/base.html b/backend/templates/base.html index 5e6982b..86e2f58 100644 --- a/backend/templates/base.html +++ b/backend/templates/base.html @@ -1,11 +1,12 @@ <!doctype html> <html lang="fr" prefix="og: https://ogp.me/ns/article#"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>{{ .Title }}</title> - {{ $styles := asset "styles.css" }}<link rel="stylesheet" href="{{ $styles.Src }}" integrity="{{ $styles.Checksum }}"> - <link rel="shortcut icon" href="{{ static .Logo.Favicon }}"> + {{ $styles := asset "styles.css" }} + <link rel="stylesheet" href="{{ $styles.Src }}" integrity="{{ $styles.Checksum }}" /> + <link rel="shortcut icon" href="{{ static .Logo.Favicon }}" /> <meta property="description" content="{{ .PageDescription }}" /> <!-- Open Graph --> <meta property="og:title" content="{{ .Title }}" /> @@ -15,7 +16,9 @@ <meta property="og:description" content="{{ .PageDescription }}" /> <meta property="og:local" content="fr_FR" /> <meta property="og:site_name" content="{{ .Name }}" /> - {{ if ne .PubDate "" }}<meta property="article:published_time" content="{{ .PubDate }}">{{ end }} + {{ if ne .PubDate "" }} + <meta property="article:published_time" content="{{ .PubDate }}" /> + {{ end }} <!-- Twitter --> <meta name="twitter:card" content="summary_large_image" /> <meta property="twitter:domain" content="{{ .Domain }}" /> @@ -23,18 +26,22 @@ <meta name="twitter:title" content="{{ .Title }}" /> <meta name="twitter:description" content="{{ .PageDescription }}" /> <meta name="twitter:image" content="{{ fullStatic .Image }}" /> -</head> -<body hx-push-url="true"> -<header> - <img src="{{ static .Logo.Header }}" alt="Logo"> - <nav>{{ range .Links }}{{ .Render }}{{end}}</nav> -</header> -{{ template "body" . }} -<footer> - <p>© 2025 - Anhgelus Morthuuzh</p> - <p id="quote">« {{ .Quote }} »</p> - <p><a href="/legal">Mentions légales</a>, <a href="https://git.anhgelus.world/anhgelus/small-web" target="_blank" rel="noreferrer">code source</a>.</p> -</footer> -{{ $script := asset "index.js" }}<script src="{{ $script.Src }}" integrity="{{ $script.Checksum }}" defer></script> -</body> + </head> + <body hx-push-url="true"> + <header> + <img src="{{ static .Logo.Header }}" alt="Logo" /> + <nav>{{ range .Links }}{{ .Render }}{{end}}</nav> + </header> + {{ template "body" . }} + <footer> + <p>© 2025 - Anhgelus Morthuuzh</p> + <p id="quote">« {{ .Quote }} »</p> + <p> + <a href="/legal">Mentions légales</a>, + <a href="https://git.anhgelus.world/anhgelus/small-web" target="_blank" rel="noreferrer">code source</a>. + </p> + </footer> + {{ $script := asset "index.js" }} + <script src="{{ $script.Src }}" integrity="{{ $script.Checksum }}" defer></script> + </body> </html> diff --git a/backend/templates/components.html b/backend/templates/components.html index 2b43579..da133a6 100644 --- a/backend/templates/components.html +++ b/backend/templates/components.html @@ -1,23 +1,26 @@ {{define "logs_display"}} <article> - {{ range .Logs }} - <article> - <h2><a href="/logs/{{ .Slug }}">{{ .LogTitle }}</a></h2> - <figure> - <a href="/logs/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}"></a> - <figcaption>{{ .Img.Legend }}</figcaption> - </figure> - <p>{{ .Description }}</p> - </article> - {{ end }} - {{ if ne .PagesNumber 1 }} - <div class="pagination"> - <nav> - {{ if ne .CurrentPage 1 }}<a href="?page={{ before .CurrentPage }}">Précédent</a>{{else}}<p></p>{{end}} - <p>{{ .CurrentPage }}/{{ .PagesNumber }}</p> - {{ if ne .CurrentPage .PagesNumber }}<a href="?page={{ next .CurrentPage }}">Suivant</a>{{else}}<p></p>{{end}} - </nav> - </div> - {{ end }} + {{ range .Logs }} + <article> + <h2><a href="/logs/{{ .Slug }}">{{ .LogTitle }}</a></h2> + <figure> + <a href="/logs/{{ .Slug }}"><img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}" /></a> + <figcaption>{{ .Img.Legend }}</figcaption> + </figure> + <p>{{ .Description }}</p> + </article> + {{ end }} {{ if ne .PagesNumber 1 }} + <div class="pagination"> + <nav> + {{ if ne .CurrentPage 1 }}<a href="?page={{ before .CurrentPage }}">Précédent</a>{{else}} + <p></p> + {{end}} + <p>{{ .CurrentPage }}/{{ .PagesNumber }}</p> + {{ if ne .CurrentPage .PagesNumber }}<a href="?page={{ next .CurrentPage }}">Suivant</a>{{else}} + <p></p> + {{end}} + </nav> + </div> + {{ end }} </article> {{end}} diff --git a/backend/templates/home.html b/backend/templates/home.html index c570845..7a76e48 100644 --- a/backend/templates/home.html +++ b/backend/templates/home.html @@ -1,11 +1,9 @@ {{define "body"}} <main id="content"> -<div class="introduction"> + <div class="introduction"> <h1>logs</h1> - <p> - {{ .PageDescription }} - </p> -</div> -{{ template "logs_display" . }} + <p>{{ .PageDescription }}</p> + </div> + {{ template "logs_display" . }} </main> {{end}} diff --git a/backend/templates/home_log.html b/backend/templates/home_log.html index c57272c..485661c 100644 --- a/backend/templates/home_log.html +++ b/backend/templates/home_log.html @@ -1,5 +1,3 @@ {{define "body"}} -<main id="content"> -{{ template "logs_display" . }} -</main> +<main id="content">{{ template "logs_display" . }}</main> {{end}} diff --git a/backend/templates/log.html b/backend/templates/log.html index 1dcf1bc..75e0a42 100644 --- a/backend/templates/log.html +++ b/backend/templates/log.html @@ -1,13 +1,11 @@ {{define "body"}} <article id="content"> - <h1>{{ .LogTitle }}</h1> - <p> - {{ .Description }} - </p> - <figure> - <img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}" class="large"> - <figcaption>{{ .Img.Legend }}</figcaption> - </figure> - {{ .Content }} + <h1>{{ .LogTitle }}</h1> + <p>{{ .Description }}</p> + <figure> + <img src="{{ static .Img.Src }}" alt="{{ .Img.Alt }}" class="large" /> + <figcaption>{{ .Img.Legend }}</figcaption> + </figure> + {{ .Content }} </article> {{end}} diff --git a/backend/templates/simple.html b/backend/templates/simple.html index 7b4f6d3..94721df 100644 --- a/backend/templates/simple.html +++ b/backend/templates/simple.html @@ -1,5 +1,3 @@ {{ define "body" }} -<main id="content"> -{{ .Content }} -</main> +<main id="content">{{ .Content }}</main> {{ end }} |
