mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2025-10-09 18:21:15 +00:00
Pulp modifications as shown at brandonrozek.com
This commit is contained in:
parent
997422cd16
commit
74b08eaf7a
10 changed files with 82 additions and 17 deletions
7
layouts/blog/baseof.html
Normal file
7
layouts/blog/baseof.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</body>
|
||||
</html>
|
30
layouts/blog/list.html
Normal file
30
layouts/blog/list.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{{ define "main"}}
|
||||
{{ 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>
|
||||
<!-- 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 }}
|
||||
</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 }}
|
9
layouts/blog/list.json
Normal file
9
layouts/blog/list.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
[{{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }}
|
||||
{
|
||||
"ref": "{{ $page.Permalink }}",
|
||||
"title": {{ $page.Title | jsonify }},
|
||||
"section": "{{ $page.Section }}",
|
||||
"date" : {{ $page.Date.Format "2006.01.02" | jsonify }},
|
||||
"body": {{ $page.Plain | jsonify }}
|
||||
}
|
||||
{{ end }}]
|
12
layouts/blog/single.html
Normal file
12
layouts/blog/single.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ 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>
|
||||
<!-- content -->
|
||||
<div id="contentBody">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue