diff options
| author | leo <azuminha1@gmail.co> | 2025-10-16 20:02:39 -0300 |
|---|---|---|
| committer | leo <azuminha1@gmail.co> | 2025-10-16 20:02:39 -0300 |
| commit | 8e7996214af853803c4dd04534b1f5646b0ac1c5 (patch) | |
| tree | 14a30d462b47b54d41613347782da6e48b71d082 /themes/hugo-classic/layouts/partials | |
first
Diffstat (limited to 'themes/hugo-classic/layouts/partials')
4 files changed, 83 insertions, 0 deletions
diff --git a/themes/hugo-classic/layouts/partials/foot_custom.html b/themes/hugo-classic/layouts/partials/foot_custom.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/themes/hugo-classic/layouts/partials/foot_custom.html diff --git a/themes/hugo-classic/layouts/partials/footer.html b/themes/hugo-classic/layouts/partials/footer.html new file mode 100644 index 0000000..494ce73 --- /dev/null +++ b/themes/hugo-classic/layouts/partials/footer.html @@ -0,0 +1,35 @@ + <footer> + {{ partial "foot_custom.html" . }} + <!-- Automagically centers images. Original Author Yihui Xie: https://yihui.name --> + <script> + (function() { + function center_el(tagName) { + var tags = document.getElementsByTagName(tagName), i, tag; + for (i = 0; i < tags.length; i++) { + tag = tags[i]; + var parent = tag.parentElement; + // center an image if it is the only element of its parent + if (parent.childNodes.length === 1) { + // if there is a link on image, check grandparent + if (parent.nodeName === 'A') { + parent = parent.parentElement; + if (parent.childNodes.length != 1) continue; + } + if (parent.nodeName === 'P') parent.style.textAlign = 'center'; + } + } + } + var tagNames = ['img', 'embed', 'object']; + for (var i = 0; i < tagNames.length; i++) { + center_el(tagNames[i]); + } + })(); + </script> + + {{ with .Site.Params.footer }} + <hr/> + {{ . | markdownify }} + {{ end }} + </footer> + </body> +</html> diff --git a/themes/hugo-classic/layouts/partials/head_custom.html b/themes/hugo-classic/layouts/partials/head_custom.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/themes/hugo-classic/layouts/partials/head_custom.html diff --git a/themes/hugo-classic/layouts/partials/header.html b/themes/hugo-classic/layouts/partials/header.html new file mode 100644 index 0000000..855f593 --- /dev/null +++ b/themes/hugo-classic/layouts/partials/header.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html lang="{{ .Site.LanguageCode }}"> + <head> + + <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png"> + <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png"> + <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png"> + <link rel="manifest" href="/images/site.webmanifest"> + + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.Description }}{{ end }}"> + <title>{{ .Title }} | {{ .Site.Title }}</title> + <link rel="stylesheet" href="{{ "/css/style.css" | relURL }}" /> + <link rel="stylesheet" href="{{ "/css/fonts.css" | relURL }}" /> + {{ range .Site.Params.custom_css -}} + <link rel="stylesheet" href="{{ . | absURL }}"> + {{- end }} + {{ partial "head_custom.html" . }} + </head> + + <body> + <header> + <nav> + <ul> + {{ $title := lower .Title }} + {{ $section := lower .Section }} + <li class="pull-left {{ if .IsHome }}current{{ end }}"> + <a href="{{ .Site.BaseURL }}">~/{{ lower .Site.Title}}</a> + </li> + {{ range .Site.Menus.main }} + {{ $name := lower .Name }} + <li class="pull-left {{ if eq $name $title }}current{{ else if eq $section $name }}current{{ else if eq $title (pluralize $name) }}current{{ end }}"> + <a href="{{ .URL }}">~/{{ lower .Name }}</a> + </li> + {{end}} + + {{ range .Site.Menus.feed }} + {{ $name := lower .Name}} + <li class="pull-right"> + <a href="{{ .URL }}">~/{{ lower .Name}}</a> + </li> + {{end}} + + </ul> + </nav> + </header> + |
