diff options
author | Oscar Najera <hi@oscarnajera.com> | 2023-11-09 17:49:48 +0100 |
---|---|---|
committer | Oscar Najera <hi@oscarnajera.com> | 2023-11-09 17:49:48 +0100 |
commit | b5d749c64f0b96bbbb70a623693e8091abc37e82 (patch) | |
tree | 8b728388f88dee6590514801acab91afcb18b2f4 /layouts | |
parent | 4a826ff2748eafdbf63dd0547706ed7dc7ed3d76 (diff) | |
download | hugo-minimalist-theme-b5d749c64f0b96bbbb70a623693e8091abc37e82.tar.gz hugo-minimalist-theme-b5d749c64f0b96bbbb70a623693e8091abc37e82.tar.bz2 hugo-minimalist-theme-b5d749c64f0b96bbbb70a623693e8091abc37e82.zip |
Format and styling
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/header.html | 46 | ||||
-rw-r--r-- | layouts/partials/metadata.html | 16 | ||||
-rw-r--r-- | layouts/partials/post.html | 2 |
3 files changed, 35 insertions, 29 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index c0418b2..0d777ca 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,27 +1,33 @@ <nav class="header w-100 w3-theme-d3 w3-theme-border z-2 cf"> <div class="mw7 center pl2"> - <a href="{{ site.BaseURL }}" class="db fl link"> + <a href="{{ site.BaseURL }}" class="db fl link"> + {{ with resources.Get .Site.Params.logo }} + <img + height="{{ site.Params.logo_height }}" + class="v-btm" + src="{{ .Permalink }}" + alt="{{ site.Title }}" + /> + {{ end }} - {{ with resources.Get .Site.Params.logo }} - <img height="{{ site.Params.logo_height }}" class="v-btm" src="{{ .Permalink }}" alt="{{ site.Title }}"> - {{ end }} - <span class="near-white pl2 pt0 f2 berkshire-swash"> - {{ .Site.Title }} - </span> - </a> - <input class="menu-btn dn" type="checkbox" id= "menu-btn"> - <label class="fr dn-ns ma2 pa3 menu-icon" for="menu-btn"> - <span class="navicon bg-near-white"></span> - </label> - <ul class="ma0 pa0 list overflow-hidden avenir"> + <span class="near-white pl2 pt0 f2 berkshire-swash"> + {{ .Site.Title }} + </span> + </a> + <input class="menu-btn dn" type="checkbox" id="menu-btn" /> + <label class="fr dn-ns ma2 pa3 menu-icon" for="menu-btn"> + <span class="navicon bg-near-white"></span> + </label> + <ul class="ma0 pa0 list overflow-hidden avenir"> {{ range .Site.Menus.main }} - <li class="fl-ns w3-hover-theme"> - <a class="db f6 pa3 link near-white" - href="{{ .URL }}">{{ .Name | safeHTML }} - </a> - </li> + <li class="fl-ns w3-hover-theme"> + <a class="db f6 pa3 link near-white" href="{{ .PageRef }}"> + {{ .Pre }} + {{- .Name | safeHTML -}} + </a> + </li> {{ end }} - </ul> -</div> + </ul> + </div> </nav> diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index 7756667..b2136bc 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -1,6 +1,6 @@ {{ $dateTime := .PublishDate.Format "2006-01-02" }} {{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }} -<p class="f6 lh-copy mv0 ph4 pv2"> +<div class="f6 lh-copy mv0 ph4 pv2"> By {{ with .Params.author }} <span class="author"> — {{ delimit . ", " }} </span> @@ -27,9 +27,9 @@ <i class="fas fa-tags"></i> </a> {{ range . }} - <a class="link underline color-inherit" href="{{ .RelPermalink }}" - >{{ .Title }}</a - > + <a class="link underline color-inherit" href="{{ .RelPermalink }}"> + {{- .Title -}} + </a> {{ end }} {{ end }} @@ -39,9 +39,9 @@ <i class="fas fa-folder-open"></i> </a> {{ range . }} - <a class="link underline color-inherit" href="{{ .RelPermalink }}" - >{{ .Title }}</a - > + <a class="link underline color-inherit" href="{{ .RelPermalink }}"> + {{- .Title -}} + </a> {{ end }} {{ end }} -</p> +</div> diff --git a/layouts/partials/post.html b/layouts/partials/post.html index ef9f03e..1542235 100644 --- a/layouts/partials/post.html +++ b/layouts/partials/post.html @@ -1,6 +1,6 @@ <article class="pv2 bt bb b--black-10"> {{ partial "meta_links.html" . }} - <a class="db no-underline dim near-black" href="{{ .RelPermalink }}"> + <a class="db link dim near-black" href="{{ .RelPermalink }}"> <div class="cf"> {{ $image := "" }} {{ if (.Resources.ByType "image").GetMatch "featured*" }} |