Added param submitted to control display of author and date on posts.

This commit is contained in:
Fredrik Jonsson 2017-05-18 14:05:07 +02:00
commit a0e3be452c
3 changed files with 14 additions and 15 deletions

View file

@ -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>

View file

@ -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>

View 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>