Added param submitted to control display of author and date on posts.
This commit is contained in:
parent
c0b9480f7c
commit
a0e3be452c
6 changed files with 14 additions and 15 deletions
|
|
@ -1,12 +1,11 @@
|
|||
<article class="{{ with .Section }}section-{{ . | urlize }}{{ end }} full-view">
|
||||
<header>
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
||||
<p class="submitted">
|
||||
{{ with $.Param "author" }}<span class="author">{{ . }}</span> – {{ end -}}
|
||||
<span class="created-date">{{ .Date.Format "2 January, 2006" }}</span>
|
||||
</p>
|
||||
<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>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,10 +7,7 @@
|
|||
<h1>{{ .Title }}</h1>
|
||||
<article class="{{ with .Section }}section-{{ . | urlize }}{{ end }} single-view">
|
||||
<header>
|
||||
<p class="submitted">
|
||||
{{ with $.Param "author" }}<span class="author">{{ . }}</span> – {{ end -}}
|
||||
<span class="created-date">{{ .Date.Format "2 January, 2006" }}</span>
|
||||
</p>
|
||||
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
|
||||
</header>
|
||||
<div>
|
||||
{{ .Content }}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
<article class="{{ with .Section }}section-{{ . | urlize }}{{ end }} list-view">
|
||||
<header>
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a><h2>
|
||||
<p class="submitted">
|
||||
{{ with $.Param "author" }}<span class="author">{{ . }}</span> – {{ end -}}
|
||||
<span class="created-date">{{ .Date.Format "2 January, 2006" }}</span>
|
||||
</p>
|
||||
<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>
|
||||
{{ .Summary }}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{{ $domain := .Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+)/?" "$2" }}
|
||||
<form class="search-form" method="get" action="https://duckduckgo.com/">
|
||||
<input type="search" name="q" class="search-text" placeholder="Search this site…" title="Enter the terms you wish to search for." size="{{ $.Param "searchSize" | default "20" }}" maxlength="128">
|
||||
<input type="search" name="q" class="search-text" placeholder="Search" title="Enter the terms you wish to search for." size="{{ $.Param "searchSize" | default "20" }}" maxlength="128">
|
||||
<input type="hidden" name="sites" value="{{ $domain }}">
|
||||
<input type="submit" value="DuckDuckGo Search" class="hidden">
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,14 @@
|
|||
<aside class="layout-3col__right-sidebar" role="complementary">
|
||||
{{ range $section, $taxonomy := .Site.Sections -}}
|
||||
{{ if ne $section "" -}}
|
||||
<section>
|
||||
<h4 class="menu"><a class="{{ if eq $currentSection $section }}active{{ end }}" href="/{{ urlize $section }}">{{ humanize $section }}</a></h4>
|
||||
<ul class="menu">
|
||||
{{ range $taxonomy.Pages -}}
|
||||
<li><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</aside>
|
||||
|
|
|
|||
4
layouts/partials/submitted.html
Normal file
4
layouts/partials/submitted.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<p class="submitted">
|
||||
{{ with $.Param "author" }}<span class="author">{{ . }}</span> – {{ end -}}
|
||||
<span class="created-date">{{ .Date.Format "2 January, 2006" }}</span>
|
||||
</p>
|
||||
Loading…
Reference in a new issue