diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-10-01 14:32:43 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-10-01 14:32:43 +0200 |
commit | 9ccf652c00457e46eaf46fc4cb8f6d0ee582c5ef (patch) | |
tree | b02c0a9a15de80acb3661163d469da41cd6aa8c3 /themes/hugo-whisper-theme/layouts | |
download | rfid-9ccf652c00457e46eaf46fc4cb8f6d0ee582c5ef.tar.gz rfid-9ccf652c00457e46eaf46fc4cb8f6d0ee582c5ef.zip |
Initial commit
Diffstat (limited to 'themes/hugo-whisper-theme/layouts')
12 files changed, 243 insertions, 0 deletions
diff --git a/themes/hugo-whisper-theme/layouts/404.html b/themes/hugo-whisper-theme/layouts/404.html new file mode 100644 index 0000000..b8d4c59 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/404.html @@ -0,0 +1,13 @@ +{{ define "header_css" }}{{ end }} +{{ define "body_classes" }}{{ end }} +{{ define "header_classes" }}{{ end }} + +{{ define "main" }} +<div class="container pt-4 pt-10"> + <div class="row justify-content-center"> + <div class="col-12 col-md-9"> + <h1>404 Page Not Found</h1> + </div> + </div> +</div> +{{ end }}
\ No newline at end of file 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..650a098 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/_default/baseof.html @@ -0,0 +1,71 @@ +<!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 }} + +</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> diff --git a/themes/hugo-whisper-theme/layouts/index.html b/themes/hugo-whisper-theme/layouts/index.html new file mode 100644 index 0000000..8730992 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/index.html @@ -0,0 +1,59 @@ +{{ define "title" }}{{ .Site.Title }}{{ end}} +{{ define "header_css" }}{{ end }} +{{ define "body_classes" }}page-home{{ end }} +{{ define "header_classes" }}{{ end }} + +{{ define "meta_tags" }} +<meta name="description" content="{{ .Site.Params.homepage_meta_tags.meta_description }}" /> +<meta property="og:title" content="{{ .Site.Params.homepage_meta_tags.meta_og_title }}" /> +<meta property="og:type" content="{{ .Site.Params.homepage_meta_tags.meta_og_type }}" /> +<meta property="og:url" content="{{ .Site.Params.homepage_meta_tags.meta_og_url }}" /> +<meta property="og:image" content="{{ .Site.Params.homepage_meta_tags.meta_og_image }}" /> +<meta property="og:description" content="{{ .Site.Params.homepage_meta_tags.meta_og_description }}" /> +<meta name="twitter:card" content="{{ .Site.Params.homepage_meta_tags.meta_twitter_card }}" /> +<meta name="twitter:site" content="{{ .Site.Params.homepage_meta_tags.meta_twitter_site }}" /> +<meta name="twitter:creator" content="{{ .Site.Params.homepage_meta_tags.meta_twitter_creator }}" /> +{{ end }} + +{{ define "main" }} +<div class="strip"> + <div class="container pt-4 pb-16"> + <div class="row"> + <div class="col-12"> + <h1 class="title">{{ .Title | default .Site.Title }}</h1> + <div class="content"> + {{ if .Content }} + {{ .Content }} + {{ else }} + <p>{{ .Site.Params.homepage_intro }}</p> + {{ end }} + </div> + <a class="button button-primary mb-2" href="{{ .Site.Params.homepage_button_link | relURL }}"> + {{ .Site.Params.homepage_button_text }} + </a> + </div> + </div> + </div> +</div> + +{{ if .Site.Params.homepage_image }} +<div class="strip"> + <div class="container pt-4 pb-4"> + <div class="row justify-content-center"> + <div class="col-12 col-md-10"> + <div class="terminal"> + <img src="{{ .Site.Params.homepage_image | relURL}}" /> + </div> +{{ if .Site.Params.homepage_creds }} + <p> {{ .Site.Params.homepage_creds | safeHTML}} +{{ end }} + </div> + </div> + </div> +</div> +{{ end }} + +{{ end }} + +{{ define "footer_js" }} +{{ end }} diff --git a/themes/hugo-whisper-theme/layouts/partials/hamburger.html b/themes/hugo-whisper-theme/layouts/partials/hamburger.html new file mode 100644 index 0000000..a6d7de9 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/hamburger.html @@ -0,0 +1,5 @@ +<button id="toggle-main-menu-mobile" class="hamburger hamburger--slider" type="button"> + <span class="hamburger-box"> + <span class="hamburger-inner"></span> + </span> +</button>
\ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/partials/header.html b/themes/hugo-whisper-theme/layouts/partials/header.html new file mode 100644 index 0000000..5f2c1f3 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/header.html @@ -0,0 +1,12 @@ +<div class='header'> + <div class="container"> + <div class="logo"> + <a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ .Site.Params.logo.standard | relURL }}" /></a> + </div> + <div class="logo-mobile"> + <a href="{{ .Site.BaseURL }}"><img alt="Logo" src="{{ .Site.Params.logo.mobile | relURL }}" /></a> + </div> + {{ partial "main-menu.html" . }} + {{ partial "hamburger.html" . }} + </div> +</div> diff --git a/themes/hugo-whisper-theme/layouts/partials/main-menu-mobile.html b/themes/hugo-whisper-theme/layouts/partials/main-menu-mobile.html new file mode 100644 index 0000000..5211ea7 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/main-menu-mobile.html @@ -0,0 +1,12 @@ +<div id="main-menu-mobile" class="main-menu-mobile"> + <ul> + {{ $currentPage := . }} + {{ range .Site.Menus.main }} + <li class="menu-item-{{ .Name | lower }}{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"> + <a href="{{ .URL }}"> + <span>{{ .Name }}</span> + </a> + </li> + {{end}} + </ul> +</div>
\ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/partials/main-menu.html b/themes/hugo-whisper-theme/layouts/partials/main-menu.html new file mode 100644 index 0000000..7ea303c --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/main-menu.html @@ -0,0 +1,12 @@ +<div id="main-menu" class="main-menu"> + <ul> + {{ $currentPage := . }} + {{ range .Site.Menus.main }} + <li class="menu-item-{{ .Name | lower }}{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"> + <a href="{{ .URL }}"> + <span>{{ .Name }}</span> + </a> + </li> + {{end}} + </ul> +</div>
\ No newline at end of file diff --git a/themes/hugo-whisper-theme/layouts/partials/sidebar.html b/themes/hugo-whisper-theme/layouts/partials/sidebar.html new file mode 100644 index 0000000..dd1404d --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/sidebar.html @@ -0,0 +1,11 @@ +{{$currentNode := .}} +<div class="docs-menu"> + <h4>{{ .Section | humanize }}</h4> + <ul> + {{ range where .Site.RegularPages "Section" .Section }} + <li class="{{ if eq .File.UniqueID $currentNode.File.UniqueID }}active {{ end }}"> + <a href="{{ .Permalink }}">{{ .Title }}</a> + </li> + {{ end }} + </ul> +</div> diff --git a/themes/hugo-whisper-theme/layouts/partials/sub-footer.html b/themes/hugo-whisper-theme/layouts/partials/sub-footer.html new file mode 100644 index 0000000..b9c51a9 --- /dev/null +++ b/themes/hugo-whisper-theme/layouts/partials/sub-footer.html @@ -0,0 +1,13 @@ +<div class="sub-footer"> + <div class="container"> + <div class="row"> + <div class="col-12"> + <div class="sub-footer-inner"> + <!--<ul> + <li class="zerostatic"><a href="https://www.zerostatic.io">www.zerostatic.io</a></li> + </ul>--> + </div> + </div> + </div> + </div> +</div> |