From df3d7d5734855f72b72bdb18bbf9e3599dec0156 Mon Sep 17 00:00:00 2001 From: Nantha Sorubakanthan Date: Sun, 21 Sep 2025 17:32:32 +0200 Subject: first commit --- layouts/404.html | 13 +++++++++ layouts/_default/_markup/render-image.html | 1 + layouts/_default/baseof.html | 20 ++++++++++++++ layouts/_default/home.html | 3 ++ layouts/_default/list.html | 11 ++++++++ layouts/_default/single.html | 3 ++ layouts/index.xml | 44 ++++++++++++++++++++++++++++++ layouts/partials/buttons.html | 13 +++++++++ layouts/partials/footer.html | 17 ++++++++++++ layouts/partials/head.html | 23 ++++++++++++++++ layouts/partials/header.html | 3 ++ layouts/shortcodes/article-list.html | 6 ++++ 12 files changed, 157 insertions(+) create mode 100644 layouts/404.html create mode 100755 layouts/_default/_markup/render-image.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/home.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.xml create mode 100644 layouts/partials/buttons.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/shortcodes/article-list.html (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..737d495 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,13 @@ + + + + + {{ partial "head.html" . }} + + + +

404

+

Tu t'es perdu(e) ? Reviens à la page d'accueil.

+ + + diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html new file mode 100755 index 0000000..0a338b6 --- /dev/null +++ b/layouts/_default/_markup/render-image.html @@ -0,0 +1 @@ +{{ . | safeHTML }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..add4e17 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,20 @@ + + + + + {{ partial "head.html" . }} + + + +
+ {{ partial "header.html" . }} +
+
+ {{ block "main" . }}{{ end }} +
+ + + + diff --git a/layouts/_default/home.html b/layouts/_default/home.html new file mode 100644 index 0000000..9983b08 --- /dev/null +++ b/layouts/_default/home.html @@ -0,0 +1,3 @@ +{{ define "main" }} +{{ .Content }} +{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..a3eb9d3 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,11 @@ +{{ define "main" }} +{{ .Content }} + +
+ +
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..366e181 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,3 @@ +{{ define "main" }} +{{- .Content }} +{{ end }} diff --git a/layouts/index.xml b/layouts/index.xml new file mode 100644 index 0000000..3af797c --- /dev/null +++ b/layouts/index.xml @@ -0,0 +1,44 @@ +{{- $authorEmail := .Site.Params.email }} + +{{- $authorName := .Site.Params.name }} + +{{- $pctx := . }} +{{- if .IsHome }}{{ $pctx = .Site }}{{ end }} +{{- $pages := slice }} +{{- if or $.IsHome $.IsSection }} +{{- $pages = $pctx.RegularPages }} +{{- else }} +{{- $pages = $pctx.Pages }} +{{- end }} +{{- $limit := .Site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = $pages | first $limit }} +{{- end }} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + {{ .Site.Title }} + {{ $authorEmail }} ({{ $authorName }}) + Hugo + {{ site.Language.LanguageCode }}{{ with $authorEmail }} + {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} + {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages }} + + {{ .Title }}{{ $title := .Title }} + {{ .Permalink }} + {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{ .Permalink }} + {{- $emailprompt := "" }} + {{- with .Site.Params.links.email }}{{ $emailprompt = printf "← Reply-To" . $title }}{{ end }} + {{ ((printf "%s%s" .Content $emailprompt) | transform.XMLEscape) | safeHTML }} + + {{- end }} + + diff --git a/layouts/partials/buttons.html b/layouts/partials/buttons.html new file mode 100644 index 0000000..7eab99d --- /dev/null +++ b/layouts/partials/buttons.html @@ -0,0 +1,13 @@ +
+ Logo de mon site + Rss Feed logo + BAN PORN + Codeberg logo + GitHub logo + +
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..18bc220 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,17 @@ +{{- $isregular := (in .Site.RegularPages .Page) -}} + +{{- if $isregular }} +{{- $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} +{{ if .IsHome }}{{ else }} +
+

Revenir à l'accueil

{{ end }} + +
+{{- end -}} + +
+ diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..477643d --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,23 @@ + + +{{ with .Params.css }} + +{{- else -}} + +{{- with .Section }} + +{{- end }} +{{- end }} +{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }} + + + + + + +{{- $images := .Page.Resources.ByType "image" }} +{{- with index $images 0 }} +{{- $processed := .Resize "600x" }} +{{- $processed := $processed.Crop "512x512" }} + +{{- end -}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..96f7542 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,3 @@ +

{{ if .IsHome }}{{ site.Title }}

{{ else }}{{ .Title }} +{{ end -}} +
diff --git a/layouts/shortcodes/article-list.html b/layouts/shortcodes/article-list.html new file mode 100644 index 0000000..755b229 --- /dev/null +++ b/layouts/shortcodes/article-list.html @@ -0,0 +1,6 @@ + -- cgit v1.2.3