Index page more configurable using site config file
This commit is contained in:
parent
9a2399575c
commit
cf3d0db173
|
@ -1,18 +1,27 @@
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.contact }}
|
||||||
<h2>Contact</h2>
|
<h2>Contact</h2>
|
||||||
email: <span class="emailaddr">christoffer (at) guava.space</span>
|
{{ range $label, $value := .Site.Params.contact }}
|
||||||
<br>
|
{{ $label }}: <span class="monospace">{{ $value }}</span>
|
||||||
|
<br>
|
||||||
<h2>Writings</h2>
|
{{ end }}
|
||||||
<ul>
|
{{ end }}
|
||||||
{{ range first 10 .Data.Pages }}
|
|
||||||
|
<h2>Writings</h2>
|
||||||
|
<ul>
|
||||||
|
{{ range first .Site.Params.frontPagePosts .Data.Pages }}
|
||||||
{{ if eq .Type "post" }}
|
{{ if eq .Type "post" }}
|
||||||
<li><a href="{{ .Permalink }}">{{ .Title }} ({{ .Date.Format "Jan 2, 2006" }})</a></li>
|
<li><a href="{{ .Permalink }}">{{ .Title }}
|
||||||
|
{{ if .Site.Params.frontShowDatesOnPosts }} ({{ .Date.Format "Jan 2, 2006" }}){{ end }}
|
||||||
|
</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
{{ if gt (len (where (where .Site.Pages "Type" "post") "Kind" "page")) .Site.Params.frontPagePosts }}
|
||||||
|
<a href="{{ .Site.BaseURL }}/post/">List of all writings</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<h2>Pages</h2>
|
<h2>Pages</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Data.Pages }}
|
{{ range .Data.Pages }}
|
||||||
|
@ -21,13 +30,14 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>Where to find me on the internet</h2>
|
{{ if .Site.Params.sites }}
|
||||||
|
<h2>Where to find me on the internet</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{.Site.BaseURL}}">Right here!</a></li>
|
{{ range .Site.Params.sites }}
|
||||||
<li><a href="https://keybase.io/kipari">Keybase</a></li>
|
<li><a href="{{ .link }}">{{ .label }}</a></li>
|
||||||
<li><a href="http://mango.thedevcave.net/christoffermadsen">GitLab (mango)</a></li>
|
{{ end }}
|
||||||
<li><a href="https://www.flickr.com/photos/62108810@N04/">Flickr</a></li>
|
|
||||||
<li><a href="#">WCD (RIP)</a>, <a href="#">PTP</a>, <a href="#">BTN</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
|
@ -59,7 +59,7 @@ ul.covers {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emailaddr {
|
.monospace {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,4 +74,4 @@ td {
|
||||||
|
|
||||||
th {
|
th {
|
||||||
border-bottom: 1px solid #aaa;
|
border-bottom: 1px solid #aaa;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user