diff options
author | Óscar Nájera <hi@oscarnajera.com> | 2022-01-01 21:03:20 +0100 |
---|---|---|
committer | Óscar Nájera <hi@oscarnajera.com> | 2022-01-01 21:03:20 +0100 |
commit | 113d4e53416ddf42212da6f217670bdc6f0c9dd8 (patch) | |
tree | 7e9bcd4a2a274e45da5538fe67c525dfb36680de /layouts/_default/single.html | |
parent | e34ded01904b07456a48cf28f1a5a2d2d77a0be7 (diff) | |
download | hugo-minimalist-theme-113d4e53416ddf42212da6f217670bdc6f0c9dd8.tar.gz hugo-minimalist-theme-113d4e53416ddf42212da6f217670bdc6f0c9dd8.tar.bz2 hugo-minimalist-theme-113d4e53416ddf42212da6f217670bdc6f0c9dd8.zip |
Import new minimalist design
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r-- | layouts/_default/single.html | 93 |
1 files changed, 32 insertions, 61 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6007308..3d75915 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,71 +1,42 @@ {{ define "main" }} -<article> - <div id="post-header-cover" class="bg-center cover bg-black-30" - {{ with .Params.cover }} - style="background-image:url({{ . }})" - {{ end }} > - <header class="dt pa2 mw6 center post-header white"> - <h1 class="f1 lh-title"> - {{ .Title }}</h1> - - {{ if not (eq .Params.showMeta false) }} - <div class="f4 tracked mb3">{{ .Date.Format "Mon, Jan 2, 2006" }}</div> - {{ partial "meta.html" . }} +<article class="mw7 center ph2"> + <header> + <h2 class="baskerville f2 lh-title mv3"> + {{ .Title }} + </h2> + + {{ with .Params.subtitle }} + <h3 class="f3 baskerville mv3">{{ . }}</h3> + {{end}} + + {{ if isset .Params "image" }} + {{ $image := resources.Get .Params.image }} + {{ $image := $image.Fill (default "400x400" .Params.image_size) }} + <div class="relative"> + <img src="{{ $image.RelPermalink }}" class="db center" alt= "{{ .Title }}"> + {{ with .Params.caption }} + <a href="{{ .url }}" class="link near-white absolute bottom-0 right-0 pa2 bg-black-30 br2"> + {{ .text }} + </a> {{ end }} - </header> - </div> - - <div id="content" class="bg-near-white"> - <div class="mw7 center lh-copy pv4 ph2 black-70"> - {{ .Content }} </div> + {{end}} - <footer class="mw7 center ph3 pb2 bt bb cf b--black-50"> - {{ with .Params.tags }} - <div class="fl-ns w-50-ns mb2"> - - <h5 class="f5 ttu black-60"><i class="fa fa-lg fa-tags"></i> Tagged in</h5> - {{ range . }} - <a class="f5 link br1 ph3 pv2 blue dib hover-bg-light-blue hover-white ba" - href="{{ $.Site.LanguagePrefix }}/tags/{{ . | urlize }}/">{{ . }}</a> - {{ end }} - </div> - {{ end }} - - <div class="fl-ns w-50-ns mb2"> - <h5 class="f5 ttu black-60"><i class="fa fa-lg fa-share-alt"></i> Share in Social Networks</h5> - {{ range .Site.Params.sharingOptions }} - <a class="f4 link br1 ph3 pv2 blue dib hover-bg-light-blue hover-white ba" target="new" href="{{ printf .url $.Permalink }}"> - <i class="fa {{ .icon }}"></i> - </a> - {{ end }} - </div> - </footer> + {{ if isset .Params "metadata" }} + {{ partial "metadata.html" . }} + {{ end }} - <!-- Pagination Actions for posts --> - {{ if not (eq .Params.showActions false) }} - <div class="mv3 tc"> - {{ with .NextInSection }} - <a href="{{ .RelPermalink }}" class="dib f4 link br1 ma1 pa2 blue hover-bg-light-blue hover-white ba"> - <i class="fa fa-angle-left"></i> Newer <br/> - {{ .Title }} - </a> - {{ end}} - {{ with .PrevInSection }} - <a href="{{ .RelPermalink }}" class="dib f4 link br1 ma1 pa2 blue hover-bg-light-blue hover-white ba"> - Older <i class="fa fa-angle-right"></i> <br/> - {{ .Title }} - </a> - {{ end}} - </div> - {{ end}} + </header> - {{ if not (eq .Params.comments false) }} - <div class="mw7 center mv4 pa2"> - {{ template "_internal/disqus.html" . }} - </div> - {{ end }} + <div class="main-content sans-serif f5 f4-ns lh-copy baskerville"> +{{ .Content }} </div> </article> +<div class="sans-serif f5 f4-ns lh-copy pv2"> +{{ if isset .Params "metadata" }} +{{ partial "author_card" . }} +{{ end }} +{{ partial "post_pager" . }} +</div> {{ end }} |