Implemented tags partial, wrap dates in time tag with datatime attribute. Added class content to content. Add title classes.

This commit is contained in:
Fredrik Jonsson 2017-05-21 23:39:15 +02:00
commit f1f3cb4dd5
4 changed files with 7 additions and 6 deletions

View file

@ -1,9 +1,9 @@
<article class="{{ with .Section }}section-{{ . | urlize }}{{ end }} full-view">
<header>
<h2 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
<h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
</header>
<div>
<div class="content">
{{ .Content }}
</div>
</article>

View file

@ -1 +1 @@
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> – {{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}</li>
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> – <time class="modified-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}</time></li>

View file

@ -4,12 +4,13 @@
{{ define "main" -}}
<main class="{{ if $.Param "sidebar" | default true }}layout-3col__left-content{{ else }}layout-3col__full{{ end }}" role="main">
<h1>{{ .Title }}</h1>
<h1 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}">{{ .Title }}</h1>
<article class="{{ with .Section }}section-{{ . | urlize }}{{ end }} single-view">
<header>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
{{ if .Params.tags }}{{ partial "tags.html" . -}}{{ end }}
</header>
<div>
<div class="content">
{{ .Content }}
</div>
</article>

View file

@ -3,7 +3,7 @@
<h2 class="title {{ if $.Param "submitted" | default false }}title-submitted{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
</header>
<div>
<div class="content">
{{ .Summary }}
<p class="read-more"><a class="read-more" href="{{ .Permalink }}">Read the rest of this posting</a></p>
</div>