mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-21 15:56:29 -05:00
New layout type "feed"
This commit is contained in:
parent
dbf02ca97d
commit
29decd270e
2 changed files with 58 additions and 0 deletions
|
@ -77,6 +77,7 @@ footer {
|
||||||
/* Top page */
|
/* Top page */
|
||||||
#profileContainer {
|
#profileContainer {
|
||||||
min-height: calc(100vh - 100px);
|
min-height: calc(100vh - 100px);
|
||||||
|
/* max-width: 600px; */
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -204,6 +205,23 @@ nav li {
|
||||||
border: solid 1px #c9c9c9;
|
border: solid 1px #c9c9c9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#feedList {
|
||||||
|
text-align: left;
|
||||||
|
max-width: 800px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#feedList h2 {
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#feedList .date {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
border-bottom: 1px solid #c9c9c9;
|
||||||
|
}
|
||||||
|
|
||||||
/* Page */
|
/* Page */
|
||||||
#contentBody {
|
#contentBody {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
|
|
40
layouts/feed/list.html
Normal file
40
layouts/feed/list.html
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{{ define "main"}}
|
||||||
|
<h1 class='title p-name'>{{ .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>
|
||||||
|
<!-- contents -->
|
||||||
|
<div id="feedList">
|
||||||
|
{{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}}
|
||||||
|
{{ range $index, $value := .Pages.GroupByDate $listPageDateFormat }}
|
||||||
|
{{ range .Pages }}
|
||||||
|
<article class="h-entry">
|
||||||
|
<h2 class='title p-name'>{{ .Title }}</h2>
|
||||||
|
<!-- date -->
|
||||||
|
{{ if not .Date.IsZero }}
|
||||||
|
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
||||||
|
<p class="date"><time class="dt-published" datetime='{{ .Date.Format "2006-01-02T15:04:05Z0700" }}'>{{ .Date.Format $singlePageDateFormat }}</time></p>
|
||||||
|
<a style="display: none" class="u-url" href="{{ .Permalink }}"></a>
|
||||||
|
{{ end }}
|
||||||
|
<div id="contentBody" class="e-content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
{{ $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" }}
|
||||||
|
<script src="{{ $jquery.Permalink }}"></script>
|
||||||
|
<script src="{{ $mark.Permalink }}"></script>
|
||||||
|
<script src="{{ $lunr.Permalink }}"></script>
|
||||||
|
<script src="{{ $search.Permalink }}"></script>
|
||||||
|
{{ end }}
|
Loading…
Reference in a new issue