diff options
author | Roger Gonzalez <roger@rogs.me> | 2023-01-08 22:12:24 -0300 |
---|---|---|
committer | Roger Gonzalez <roger@rogs.me> | 2023-01-08 22:12:24 -0300 |
commit | b15ab4adb837e43409e5e3cf3a40a83ef4dbf62f (patch) | |
tree | 3b7d7e5dc84aabc839dd1d9174c4593cbd6b2f82 /themes/hugo-whisper-theme/layouts/_default |
Initial commit
Diffstat (limited to 'themes/hugo-whisper-theme/layouts/_default')
4 files changed, 108 insertions, 0 deletions
diff --git a/themes/hugo-whisper-theme/layouts/_default/baseof.html b/themes/hugo-whisper-theme/layouts/_default/baseof.html new file mode 100644 index 0000000..79eede4 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/_default/baseof.html @@ -0,0 +1,73 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <title>{{ block "title" . }}{{ .Title }} - {{ .Site.Title }}{{ end }}</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> + {{ block "meta_tags" . }}{{end}} + <link rel="icon" href="{{ "favicon.png" | absURL}}"> + + {{ if .Site.IsServer }} + {{ $style := resources.Get "scss/style.scss" | toCSS (dict "targetPath" "css/style.css" "enableSourceMap" true) }} + <link rel="stylesheet" href="{{ ($style).RelPermalink }}"> + {{ else }} + {{ $style := resources.Get "scss/style.scss" | toCSS (dict "targetPath" "css/style.css" "enableSourceMap" false) }} + <link rel="stylesheet" href="{{ ($style | minify | fingerprint).RelPermalink }}"> + {{ end }} + + {{ block "header_css" . }}{{ end }} + +</head> + +<body class='page {{ block "body_classes" . }}{{ end }}'> + {{ partial "main-menu-mobile.html" . }} + <div class="wrapper"> + {{ partial "header.html" . }} + + {{ $displaySidebar := false }} + {{ range .Site.Params.mainSections }} + {{ if eq $.Section . }} + {{ $displaySidebar = true }} + {{ end }} + {{ end }} + + {{ if $displaySidebar }} + <div class="container pt-2 pt-md-6 pb-3 pb-md-6"> + <div class="row"> + <div class="col-12 col-md-3 mb-3"> + <div class="sidebar"> + {{ partial "sidebar.html" . }} + </div> + </div> + <div class="col-12 col-md-9"> + {{ block "main" . }} + {{ end }} + </div> + </div> + </div> + {{ else }} + {{ block "main" . }} + {{ end }} + {{ end}} + </div> + + {{ partial "sub-footer.html" . }} + + {{ $scripts := resources.Get "js/scripts.js" }} + + {{ block "footer_js" . }} + {{ end }} + + {{ if .Site.IsServer }} + <script type="text/javascript" src="{{ $scripts.RelPermalink }}"></script> + {{ else }} + <script type="text/javascript" src="{{ ($scripts | minify | fingerprint).RelPermalink }}"></script> + {{ end }} + + {{ partial "google-analytics.html" . }} + +</body> + +</html> diff --git a/themes/hugo-whisper-theme/layouts/_default/list.html b/themes/hugo-whisper-theme/layouts/_default/list.html new file mode 100644 index 0000000..180e5ad --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/_default/list.html @@ -0,0 +1,17 @@ +{{ define "header_css" }}{{ end }} +{{ define "body_classes" }}page-default-list{{ end }} +{{ define "header_classes" }}{{ end }} + +{{ define "main" }} + +<span class="overview">Overview</span> +<h1 class="title">{{ .Title }}</h1> +<div class="content"> + {{ .Content }} +</div> + +{{ range.Pages }} +{{ .Render "summary" }} +{{ end }} + +{{ end }}
\ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/_default/single.html b/themes/hugo-whisper-theme/layouts/_default/single.html new file mode 100644 index 0000000..67d1129 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/_default/single.html @@ -0,0 +1,11 @@ +{{ define "header_css" }}{{ end }} +{{ define "body_classes" }}page-default-single{{ end }} +{{ define "header_classes" }}{{ end }} + +{{ define "main" }} +<h1 class="title">{{.Title}}</h1> +<div class="content {{if .Site.Params.enable_anchor_link}}{{ "anchor-link-enabled" }}{{ end }}"> + {{.Content}} +</div> +</div> +{{ end }}
\ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/_default/summary.html b/themes/hugo-whisper-theme/layouts/_default/summary.html new file mode 100644 index 0000000..1231103 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/_default/summary.html @@ -0,0 +1,7 @@ +<div class="summary mb-2"> + {{ if .Params.image }} + <img alt="{{ .Title }}" src="{{ .Params.image }}" /> + {{ end}} + <h2 class="title-summary"><a href="{{ .Permalink }}">{{ .Title }}</a></h2> + <p>{{ .Summary }}</p> +</div> |