mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-12-23 22:09:44 +01:00
mainly cosmetic changes to the code
This commit is contained in:
parent
eb95b736e4
commit
6760f0cb6b
4 changed files with 170 additions and 165 deletions
|
@ -2,17 +2,18 @@
|
||||||
|
|
||||||
<div id="layout" class="pure-g">
|
<div id="layout" class="pure-g">
|
||||||
<article class="pure-u-1">
|
<article class="pure-u-1">
|
||||||
|
|
||||||
{{ partial "brand.html" . }}
|
{{ partial "brand.html" . }}
|
||||||
{{ partial "content.header.html" . }}
|
|
||||||
<section class="list-page">
|
{{ partial "content.header.html" . }}
|
||||||
{{ range .Data.Pages.GroupByDate "2006" }}
|
|
||||||
<details open>
|
<section class="list-page">
|
||||||
<summary class="year">{{ .Key }} ({{ len .Pages }})</summary>
|
{{ range .Data.Pages.GroupByDate "2006" }}
|
||||||
|
<ul>
|
||||||
|
<li class="year">{{ .Key }} ({{ len .Pages }})</li>
|
||||||
{{ range .Pages.GroupByDate "January" }}
|
{{ range .Pages.GroupByDate "January" }}
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>{{ .Key }} ({{ len .Pages }})</li>
|
||||||
<details open>
|
|
||||||
<summary>{{ .Key }} ({{ len .Pages }})</summary>
|
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
@ -21,14 +22,15 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</details>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</details>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div id="layout" class="pure-g">
|
<div id="layout" class="pure-g">
|
||||||
<article class="pure-u-1">
|
<article class="pure-u-1">
|
||||||
{{ partial "brand.html" . }}
|
{{ partial "brand.html" . }}
|
||||||
{{ range where .Site.RegularPages "Type" "post"}}
|
{{ with .Content }}
|
||||||
|
<section>
|
||||||
|
{{ . }}
|
||||||
|
</section>
|
||||||
|
{{ end }}
|
||||||
|
{{ range where .Site.RegularPages "Type" "posts" }}
|
||||||
|
|
||||||
<h1 class="content-title">
|
<h2 class="content-title">
|
||||||
{{ if .IsNode }}
|
{{ if .IsNode }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title}}</a>
|
<a href="{{ .Permalink }}">{{ .Title}}</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@ -12,14 +17,10 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<p>{{ truncate 140 .Summary }}</p>
|
||||||
<p>{{ truncate 120 .Summary }}</p>
|
|
||||||
{{/* {{ if .Truncated }} */}}
|
|
||||||
<p><a href="{{ .RelPermalink }}">Read On →</a></p>
|
|
||||||
{{/* {{ end }} */}}
|
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -1,16 +1,18 @@
|
||||||
<section>
|
<section>
|
||||||
|
|
||||||
<h1 class="content-title">
|
<h1 class="content-title">
|
||||||
{{ if .IsNode }}
|
{{ if .IsNode }}
|
||||||
<a href="{{ .Permalink }}">{{ .Title}}</a>
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} :: Draft {{end}}</a>
|
<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} :: Draft {{end}}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</h1>
|
</h1>
|
||||||
{{ if .IsPage }}
|
|
||||||
|
{{ if .IsPage }}
|
||||||
{{ if .Params.subtitle }}
|
{{ if .Params.subtitle }}
|
||||||
<p class=subtitle>{{ .Params.subtitle }}</p>
|
<p class=subtitle>{{ .Params.subtitle }}</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or (eq .Type "post") (.Params.meta) }}
|
{{ if or (eq .Type "post") (.Params.meta) }}
|
||||||
<span class="content-meta">
|
<span class="content-meta">
|
||||||
{{ if .Params.author }}
|
{{ if .Params.author }}
|
||||||
|
@ -18,7 +20,6 @@
|
||||||
{{ .Params.author }}</span> <br>
|
{{ .Params.author }}</span> <br>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
{{ if not .Params.hidedate }}
|
{{ if not .Params.hidedate }}
|
||||||
<i class="fa fa-calendar"></i>
|
<i class="fa fa-calendar"></i>
|
||||||
{{ .Date.Format "Jan 2, 2006" }}
|
{{ .Date.Format "Jan 2, 2006" }}
|
||||||
|
@ -38,5 +39,6 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
</section>
|
</section>
|
|
@ -1,20 +1,19 @@
|
||||||
<footer class="page-footer">
|
<footer class="page-footer">
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="previous-post" style="display:inline-block;">
|
<div class="previous-post" style="display:inline-block;">
|
||||||
{{ if .PrevPage }}
|
{{ if .PrevPage }}
|
||||||
<a class="link-reverse" href="{{ .PrevPage.Permalink }}?ref=footer">« {{ .PrevPage.Title | truncate 50 "..."}}</a>
|
<a class="link-reverse" href="{{ .PrevPage.Permalink }}?ref=footer">« {{ .PrevPage.Title | truncate 50 "..."}}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="next-post", style="display:inline-block;float:right;">
|
<div class="next-post", style="display:inline-block;float:right;">
|
||||||
{{ if .NextPage }}
|
{{ if .NextPage }}
|
||||||
<a class="link-reverse" href="{{ .NextPage.Permalink }}?ref=footer">{{ .NextPage.Title | truncate 50 "..." }} »</a>
|
<a class="link-reverse" href="{{ .NextPage.Permalink }}?ref=footer">{{ .NextPage.Title | truncate 50 "..." }} »</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="page-footer-menu">
|
|
||||||
|
|
||||||
|
<ul class="page-footer-menu">
|
||||||
{{/* SOCIALS */}}
|
{{/* SOCIALS */}}
|
||||||
{{ if isset .Site.Params "twitter" }}
|
{{ if isset .Site.Params "twitter" }}
|
||||||
<li><a href="https://twitter.com/{{.Site.Params.twitter}}"><i class='fab fa-twitter fa-lg'></i></a></li>
|
<li><a href="https://twitter.com/{{.Site.Params.twitter}}"><i class='fab fa-twitter fa-lg'></i></a></li>
|
||||||
|
@ -67,17 +66,17 @@
|
||||||
{{ range .Site.Menus.footer }}
|
{{ range .Site.Menus.footer }}
|
||||||
<li><a href="{{.URL}}">{{.Pre }} {{ .Name }}</a></li>
|
<li><a href="{{.URL}}">{{.Pre }} {{ .Name }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{{ if .Site.Params.showPoweredBy}}
|
{{ if .Site.Params.showPoweredBy}}
|
||||||
<p>
|
<p>
|
||||||
Powered by <a href="https://gohugo.io">Hugo</a> and the
|
Powered by <a href="https://gohugo.io">Hugo</a> and the
|
||||||
<a href="https://github.com/slashformotion/hugo-tufte">Tufte theme</a>.
|
<a href="https://github.com/loikein/hugo-tufte">Tufte theme</a>.
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="copyright">
|
<div class="copyright">
|
||||||
<p>
|
<p>
|
||||||
{{ with .Site.Params.copyright }}
|
{{ with .Site.Params.copyright }}
|
||||||
{{ . | safeHTML }}
|
{{ . | safeHTML }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@ -85,6 +84,7 @@
|
||||||
{{ with .Site.Params.copyrightHolder }}{{ . }}{{end}}.
|
{{ with .Site.Params.copyrightHolder }}{{ . }}{{end}}.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
{{end}}
|
{{end}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in a new issue