mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-09 10:50:34 -05:00
Updated blog layout
This commit is contained in:
parent
4f7e08f5ac
commit
297ec66033
4 changed files with 8 additions and 36 deletions
|
@ -1,39 +1,9 @@
|
|||
{{ define "main"}}
|
||||
<h1 class='title'>{{ .Title }}</h1>
|
||||
{{ partial "header.html" . }}
|
||||
<!-- search box -->
|
||||
<div id="searchBox">
|
||||
<input type="text" id="searchBoxInput" placeholder="Search..." />
|
||||
<img id="searchBoxIcon" src="{{ .Site.BaseURL }}/img/search.png" />
|
||||
</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"}}
|
||||
{{ range $index, $value := .Pages.GroupByDate $listPageDateFormat }}
|
||||
{{ if (ne $index 0) }}
|
||||
<hr class="separator">
|
||||
{{ end }}
|
||||
<p class="date">{{ .Key }}</p>
|
||||
{{ range .Pages }}
|
||||
<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!-- content -->
|
||||
<div id="contentBody">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
{{ $jquery := resources.Get "js/jquery-3.3.1.min.js" }}
|
||||
{{ $mark := resources.Get "js/jquery.mark.es6.min.js" }}
|
||||
{{ $lunr := resources.Get "js/lunr.js" }}
|
||||
{{ $search := resources.Get "js/search.js" }}
|
||||
{{ $js := slice $jquery $mark $lunr $search | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint }}
|
||||
<script src="{{ $js.Permalink }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -5,6 +5,7 @@
|
|||
<!-- date -->
|
||||
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
||||
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
|
||||
{{ end }}
|
||||
<!-- tags -->
|
||||
<div id="tags">
|
||||
<ul>
|
||||
|
@ -16,7 +17,6 @@
|
|||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- content -->
|
||||
<div id="contentBody">
|
||||
{{ .Content }}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
{{ $jquery := resources.Get "js/jquery-3.3.1.min.js" }}
|
||||
{{ $jquery := resources.Get "js/jquery-3.5.1.min.js" }}
|
||||
{{ $mark := resources.Get "js/jquery.mark.es6.min.js" }}
|
||||
{{ $lunr := resources.Get "js/lunr.js" }}
|
||||
{{ $search := resources.Get "js/search.js" }}
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
<h1 class='title'>{{ .Title }}</h1>
|
||||
{{ partial "header.html" . }}
|
||||
<!-- date -->
|
||||
{{ if not .Date.IsZero }}
|
||||
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
||||
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
|
||||
{{ end }}
|
||||
<!-- tags -->
|
||||
<div id="tags">
|
||||
<ul>
|
||||
|
|
Loading…
Reference in a new issue