cupper-hugo-theme/layouts/post/single.html
lucasradaelli 8984ca9d6a
Custom css and localization support (#28)
* Adds i18n support for theme

* Adds a way for sites to have custom css.

This change adds a param to the theme (called customCss), which allows sites to
provide extra css under static/, so that they don't need to copy the theme's css
whole file.

If no custom css is in the params, this change is NOP.
2020-06-01 13:47:51 -05:00

47 lines
1.4 KiB
HTML

{{ define "main" }}
<main id="main">
<h1>
<svg class="bookmark-icon" aria-hidden="true" viewBox="0 0 40 50" focusable="false">
<use xlink:href="#bookmark"></use>
</svg>
{{ .Title }}
</h1>
<div class="date">
{{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }}
{{ $publishDate := .PublishDate }}
<strong aria-hidden="true">{{ T "publish_date" }} </strong>{{ $publishDate.Format $dateFormat }}
{{ with .Lastmod }}
{{ if gt . $publishDate }}
<br>
<strong aria-hidden="true">{{ T "last_updated" }} </strong>{{ .Format $dateFormat }}
{{ end }}
{{ end }}
</div>
{{ with .Params.tags }}
<div class="tags">
<strong aria-hidden="true">{{ T "tags" }} </strong>
<ul aria-label="{{ T "aria_label_tags" }}">
{{ range . }}
<li>
<svg class="tag-icon" aria-hidden="true" viewBox="0 0 177.16535 177.16535" focusable="false">
<use xlink:href="#tag"></use>
</svg>
{{ $href := print ("tags/" | absLangURL) (. | urlize) "/" }}
<a href="{{ $href }}">{{ . }}</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
{{ if ne .Params.toc false }}
{{ partial "toc" . }}
{{ end }}
{{ .Content }}
</main>
{{ partial "disqus.html" . }}
{{ end }}