mirror of
https://github.com/loikein/hugo-tufte.git
synced 2025-08-12 05:42:44 +02:00
Initial commit.
This commit is contained in:
commit
b3a2e36507
50 changed files with 2152 additions and 0 deletions
layouts
10
layouts/404.html
Normal file
10
layouts/404.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ partial "subheader.html" . }}
|
||||
|
||||
<section id="main">
|
||||
<div>
|
||||
<h1 id="title">{{ .Title }}</h1>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ partial "footer.html" . }}
|
43
layouts/_default/list.html
Normal file
43
layouts/_default/list.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<body>
|
||||
<div id="layout" class="pure-g">
|
||||
<div class="content content-column pure-u-1 pure=u-md-4-5">
|
||||
{{ partial "brand.html" . }}
|
||||
|
||||
<h1 class="content-title-mini">{{ .Title }}</h1>
|
||||
|
||||
{{ range .Data.Pages.GroupByDate "2006" }}
|
||||
<details open>
|
||||
<summary>{{ .Key }} ({{ len .Pages }})</summary>
|
||||
|
||||
{{ range .Pages.GroupByDate "January" }}
|
||||
<div class="list-page">
|
||||
<ul>
|
||||
<li>
|
||||
<details open>
|
||||
<summary>{{ .Key }} ({{ len .Pages }})</summary>
|
||||
{{ range .Pages }}
|
||||
<ul>
|
||||
<li>
|
||||
<span class="list-date">{{ .Date.Format "Jan 2" }} ·</span>
|
||||
<a href="{{ .RelPermalink }}">{{.Title}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
</details>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
</details>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
21
layouts/_default/paginate.list.html
Normal file
21
layouts/_default/paginate.list.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{{ .Title }}
|
||||
<!-- {{ template "_internal/pagination.html" }} -->
|
||||
Hello this is a list of content.
|
||||
{{ .TableOfContents }}
|
||||
|
||||
{{ $paginator := .Paginate ( (.Data.Pages.GroupByDate "2006") ) }}
|
||||
|
||||
<ul>
|
||||
<li>PageNumber: {{ $paginator.PageNumber }}</li>
|
||||
<li>URL: {{ $paginator.URL}}</li>
|
||||
<li>Pages: {{ $paginator.Pages }}</li>
|
||||
<li>TotalPages: {{ $paginator.TotalPages }}</li>
|
||||
</ul>
|
||||
|
||||
{{ range $paginator.PageGroups }}
|
||||
<h2>{{ .Key }}</h2>
|
||||
{{ range .Pages }}
|
||||
<br/>
|
||||
<a href="{{ .RelPermalink }}">{{.Title}}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
23
layouts/_default/single.html
Normal file
23
layouts/_default/single.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<body>
|
||||
<div id="layout" class="pure-g">
|
||||
<div class="content content-column pure-u-1 pure-u-md-4-5">
|
||||
{{ partial "brand.html" . }}
|
||||
{{ partial "content.header.html" . }}
|
||||
{{ if .Params.toc }}
|
||||
<div class="toc">
|
||||
<h1>Contents</h1>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ .Content }}
|
||||
|
||||
{{ partial "disqus.html" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "body.includes.html" . }}
|
||||
</body>
|
||||
</html>
|
1
layouts/_default/summary.html
Normal file
1
layouts/_default/summary.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{ .Summary }}
|
60
layouts/_default/terms.html
Normal file
60
layouts/_default/terms.html
Normal file
|
@ -0,0 +1,60 @@
|
|||
{{ partial "header.html" . }}
|
||||
|
||||
<body>
|
||||
|
||||
<div id="layout" class="pure-g">
|
||||
<div class="content content-column pure-u-1 pure-u-md-4-5">
|
||||
{{ partial "brand.html" . }}
|
||||
|
||||
<h1 class="content-title-mini">{{ .Title }}</h1>
|
||||
{{ $data := .Data }}
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-sm-1-2">
|
||||
<h2 class="list-title">By Frequency</h2>
|
||||
<table class="pure-table pure-table-horizontal pure-table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Term</th>
|
||||
<th>Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</tbody>
|
||||
{{ range $key, $value := .Data.Terms.ByCount }}
|
||||
<tr>
|
||||
<td><a href="{{ $data.Plural }}/{{ $value.Name| urlize }}">
|
||||
{{ $value.Name}}
|
||||
</a></td>
|
||||
<td>{{ $value.Count }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1 pure-u-sm-1-2">
|
||||
<h2 class="list-title">Alphabetically</h2>
|
||||
<table class="pure-table pure-table-horizontal pure-table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Term</th>
|
||||
<th>Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</tbody>
|
||||
{{ range $key, $value := .Data.Terms.Alphabetical}}
|
||||
<tr>
|
||||
<td><a href="{{ $data.Plural }}/{{ $value.Name| urlize }}">
|
||||
{{ $value.Name}}
|
||||
</a></td>
|
||||
<td>{{ $value.Count }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
23
layouts/index.html
Normal file
23
layouts/index.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{ partial "header.html" . }}
|
||||
{{ partial "math.html" . }}
|
||||
<body>
|
||||
|
||||
<article>
|
||||
{{ partial "brand.html" . }}
|
||||
|
||||
{{ range first 5 .Site.Pages }}
|
||||
<section class="post-summary">
|
||||
{{ partial "content.header.html" . }}
|
||||
<p>{{ .Summary }}</p>
|
||||
{{ if .Truncated }}
|
||||
<a href="{{ .RelPermalink }}">Read On →</a>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
</div>
|
||||
{{ partial "body.includes.html" . }}
|
||||
</article>
|
||||
</body>
|
||||
</html>
|
1
layouts/partials/body.includes.html
Normal file
1
layouts/partials/body.includes.html
Normal file
|
@ -0,0 +1 @@
|
|||
<!-- Includes go here -->
|
7
layouts/partials/brand.html
Normal file
7
layouts/partials/brand.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<div class="header">
|
||||
<div class="brand">
|
||||
<h1>{{ .Site.Title}}</h1>
|
||||
<h2>{{ .Site.Params.subtitle }}</h2>
|
||||
{{ partial "nav.html" . }}
|
||||
</div>
|
||||
</div>
|
0
layouts/partials/comments.html
Normal file
0
layouts/partials/comments.html
Normal file
35
layouts/partials/content.header.html
Normal file
35
layouts/partials/content.header.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<h1 class="content-title-mini">{{ .Type }}</h1>
|
||||
<h1 class="content-title">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
{{ .Title }}
|
||||
{{ if .Draft }} :: Draft {{end}}
|
||||
</a>
|
||||
</h1>
|
||||
{{ if .Params.subtitle }}<p class=subtitle>{{ .Params.subtitle }}</p>{{ end }}
|
||||
{{ if or (eq .Type "post") (.Params.meta) }}
|
||||
<span class="content-meta">
|
||||
{{ if .Params.author }}
|
||||
<i class="fa fa-user"> </i><span class="author">
|
||||
{{ .Params.author }}</span> <br>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if not .Params.hidedate }}
|
||||
<i class="fa fa-calendar"></i>
|
||||
{{ .Date.Format "Jan 2, 2006" }}
|
||||
{{end }}
|
||||
|
||||
{{ if not .Params.hidereadtime }}
|
||||
<i class="fa fa-clock-o"></i>
|
||||
{{ .ReadingTime }} min read
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.categories }}
|
||||
<br>
|
||||
<i class="fa fa-tags"> </i>
|
||||
{{ range .Params.categories }}
|
||||
<a href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
19
layouts/partials/disqus.html
Normal file
19
layouts/partials/disqus.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{ if .Params.comments }}
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
(function() {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from 'localhost:1313' on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
var disqus_shortname = '{{ .Site.Params.disqusShortname }}';
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
{{ end }}
|
2
layouts/partials/doctype.html
Normal file
2
layouts/partials/doctype.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
26
layouts/partials/footer.html
Normal file
26
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<div class="fineprint">
|
||||
<ul class="footer-menu">
|
||||
{{ range .Site.Menus.footer }}
|
||||
<li><a href="{{.URL}}">{{.Pre }}{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ if .Site.Params.showPoweredBy}}
|
||||
<p>
|
||||
Powered by <a href="https://gohugo.io">Hugo</a> and the
|
||||
<a href="https://github.com/shawnohare/hugo-morphism">Morphism theme</a>.
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
<div class="copyright">
|
||||
<p>
|
||||
{{ with .Site.Params.copyright }}
|
||||
{{ . | safeHTML }}
|
||||
{{ else }}
|
||||
© {{.Now.Format "2006"}}
|
||||
{{ with .Site.Params.copyrightHolder }}{{ . }}{{end}}.
|
||||
All rights reserved.
|
||||
{{end}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
7
layouts/partials/header.html
Normal file
7
layouts/partials/header.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ partial "doctype.html" . }}
|
||||
<head>
|
||||
<title>{{ .Site.Title }} - {{ .Title }}</title>
|
||||
{{ partial "meta.html" . }}
|
||||
{{ partial "opengraph.html" }}
|
||||
{{ partial "header.includes.html" . }}
|
||||
</head>
|
28
layouts/partials/header.includes.html
Normal file
28
layouts/partials/header.includes.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!-- Load MathJax, if necessary. -->
|
||||
{{ if eq .Params.math true }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Syntax highlighting -->
|
||||
<!-- {{ partial "highlight.html" . }} -->
|
||||
|
||||
<!-- Pure css -->
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
|
||||
<!--[if lte IE 8]>
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
|
||||
<![endif]-->
|
||||
<!--[if gt IE 8]><!-->
|
||||
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
|
||||
<!--<![endif]-->
|
||||
|
||||
<!-- Fonts -->
|
||||
<!-- <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans"> -->
|
||||
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface"> -->
|
||||
<!-- <link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> -->
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
|
||||
|
||||
<!-- Main CSS file based on Pure blog layout -->
|
||||
<link rel="stylesheet" href="{{ "/css/tufte.css" | absURL }}">
|
||||
<link rel="stylesheet" href="{{ "/css/hugo-tufte.css" | absURL }}">
|
0
layouts/partials/highlight.html
Normal file
0
layouts/partials/highlight.html
Normal file
18
layouts/partials/math.html
Normal file
18
layouts/partials/math.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
tex2jax: {
|
||||
inlineMath: [['$','$'], ['\\(','\\)']],
|
||||
displayMath: [['$$','$$'], ['\\[','\\]']],
|
||||
processEscapes: true,
|
||||
processEnvironments: true,
|
||||
menuSettings: { zoom: "Double-Click" },
|
||||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
|
||||
TeX: { equationNumbers: { autoNumber: "AMS" },
|
||||
extensions: ["AMSmath.js", "AMSsymbols.js"] }
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||
</script>
|
7
layouts/partials/meta.html
Normal file
7
layouts/partials/meta.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<!-- Enable responsiveness on mobile devices-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ .Description }}">
|
||||
<meta name="keywords" content="{{ range .Keywords }}{{ . }},{{ end }}">
|
||||
<meta name="author" content="{{ .Site.Title }}">
|
||||
{{ .Hugo.Generator }}
|
5
layouts/partials/nav.html
Normal file
5
layouts/partials/nav.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<span class="nav">
|
||||
{{ range .Site.Menus.nav }}
|
||||
<a href="{{ .URL }}">{{ .Pre }}{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</span>
|
0
layouts/partials/opengraph.html
Normal file
0
layouts/partials/opengraph.html
Normal file
1
layouts/partials/social.html
Normal file
1
layouts/partials/social.html
Normal file
|
@ -0,0 +1 @@
|
|||
<!-- nav and social can go here -->
|
0
layouts/partials/subheader.html
Normal file
0
layouts/partials/subheader.html
Normal file
Loading…
Add table
Add a link
Reference in a new issue