Reorganize partials

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-08-14 17:27:01 +03:00
parent 39779cdc88
commit 2200d995ce
21 changed files with 56 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
{{ partial "image/index.html" (dict
"path" .Destination
{{ partial "components/image/index.html" (dict
"src" .Destination
"caption" .Text
"alt" .Title
)

View File

@@ -1,41 +1,14 @@
<!doctype html>
<html lang="{{- .Site.LanguageCode -}}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
{{ partial "components/head/index.html" . }}
<title>
{{- if .IsHome -}}
{{ .Site.Title }}
{{- else -}}
{{ .Site.Title }} &middot;
{{ .Title }}
{{- end -}}
</title>
{{ with .Site.Params.description }}
<meta name="description" content="{{- . -}}" />
{{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1" />
{{ partial "head/bots.html" . }}
{{ partial "head/rss.html" . }}
{{ partial "head/opengraph.html" . }}
{{ partial "head/twitter.html" . }}
{{ partial "head/js.html" . }}
{{ partial "head/css.html" . }}
</head>
<body>
{{ partial "header.html" . }}
{{ partial "components/header.html" . }}
{{ block "main" . }}
{{ end }}
{{ partial "footer.html" . }}
{{ partial "components/footer.html" . }}
</body>
</html>

View File

@@ -2,7 +2,7 @@
{{ $withMeta := default true .Params.withMeta }}
<main class="{{- if $withMeta -}}with-meta{{- end -}}">
{{ if $withMeta }}
{{ partial "list/meta.html" . }}
{{ partial "components/list/meta.html" . }}
{{ end }}
<div class="content">
{{ partial "posts/list.html" . }}

View File

@@ -1,6 +1,6 @@
{{ define "main" }}
<main>
{{ partial "posts/hero.html" . }}
{{ partial "components/hero/default.html" . }}
<div class="content">
{{ .Content }}
</div>