This commit is contained in:
Brandon Rozek 2020-02-16 16:54:11 -05:00
commit d63dee8bf4
10 changed files with 61 additions and 29 deletions

View file

@ -1,4 +1,5 @@
{{ define "main"}}
<h1>{{ .Title }}</h1>
{{ partial "header.html" . }}
<!-- search box -->
<div id="searchBox">
@ -7,6 +8,14 @@
</div>
<!-- search results -->
<div id="searchResults"></div>
<!-- tags -->
<div id="tags">
<ul>
{{ range .Site.Taxonomies.tags.ByCount }}
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }} ({{ .Count }})</a></li>
{{ end }}
</ul>
</div>
<!-- contents -->
<div id="contentsList">
{{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}}

View file

@ -3,6 +3,7 @@
"ref": "{{ $page.Permalink }}",
"title": {{ $page.Title | jsonify }},
"section": "{{ $page.Section }}",
"tags": {{ $page.Params.tags | jsonify }},
"date" : {{ $page.Date.Format "2006.01.02" | jsonify }},
"body": {{ $page.Plain | jsonify }}
}

View file

@ -1,6 +1,20 @@
{{ define "main"}}
<h1 class='title'>{{ .Title }}</h1>
{{ partial "header.html" . }}
<!-- date -->
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
<!-- tags -->
<div id="tags">
<ul>
{{ range .Param "tags" }}
{{ $name := . }}
{{ with $.Site.GetPage (printf "/tags/%s" ($name | urlize)) }}
<li><a href="{{ .Permalink }}">{{ $name }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
<!-- content -->
<div id="contentBody">
{{ .Content }}

View file

@ -0,0 +1,13 @@
{{ define "main"}}
<h1>{{ .Title }}</h1>
{{ partial "header.html" . }}
<!-- tags -->
<div id="tags">
<ul>
{{ range .Site.Taxonomies.tags.ByCount }}
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }} ({{ .Count }})</a></li>
{{ end }}
</ul>
</div>
{{ partial "footer.html" . }}
{{ end }}

View file

@ -15,7 +15,7 @@
</header>
<!-- description -->
<p>
{{ .Site.Params.description }}
{{ .Site.Params.description | safeHTML }}
</p>
<!-- navigation -->
<nav>

View file

@ -9,7 +9,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="{{ .Site.Author }}" />
<meta name="author" content="{{ .Site.Params.Author }}" />
<link rel="shortcut icon" type="image/x-icon" href="/img/{{ .Site.Params.favicon }}">
<!-- css -->

View file

@ -2,7 +2,7 @@
<!-- avator -->
<div class="avatar">
<img class="avatarMask" src="{{ .Site.BaseURL }}/img/{{ .Site.Params.avatar }}">
<a href="{{ .Site.BaseURL }}"><img src="{{ .Site.BaseURL }}/img/avatar-border.svg" }}></a>
<a href="{{ .Site.BaseURL }}"><img src="{{ .Site.BaseURL }}/img/avatar-border.svg"></a>
</div>
<!-- author -->
<h2><a class="author" href="{{ .Site.BaseURL }}">{{ .Site.Params.Author }}</a></h2>