Initial commit
This commit is contained in:
7
layouts/404.html
Normal file
7
layouts/404.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ define "title" }}404 page not found - {{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<h1 class="not-found-title">404: Not found</h1>
|
||||
<h2>Sorry, we couldn't find the page you're looking for.</h2>
|
||||
<a href="{{ "/" | relLangURL }}">Go back home</a>
|
||||
{{ end }}
|
14
layouts/_default/baseof.html
Normal file
14
layouts/_default/baseof.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Default base template. Other templates define the "main" portion in this template -->
|
||||
<html lang="{{ $.Site.LanguageCode | default "en" }}">
|
||||
{{ partial "head.html" . }}
|
||||
<body>
|
||||
{{ partial "nav.html" . }}
|
||||
<div id="content" class="content-container">
|
||||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
{{ partial "math.html" . }}
|
||||
</div>
|
||||
{{ partial "footer-mobile.html" . }}
|
||||
</body>
|
||||
</html>
|
30
layouts/_default/section.html
Normal file
30
layouts/_default/section.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!-- This page is the same as the Archives page -->
|
||||
{{ define "main" }}
|
||||
<!-- All of the site's posts grouped by year -->
|
||||
<h1>
|
||||
Archives
|
||||
</h1>
|
||||
<div>
|
||||
<!-- Group all the post pages from the same year -->
|
||||
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{ range ($pages.GroupByDate "2006") }}
|
||||
<h3>{{ .Key }}</h3> <!-- Display the year -->
|
||||
|
||||
<ul class="archives-list">
|
||||
|
||||
{{ range (.Pages) }}
|
||||
|
||||
<li class="archives-list-item">
|
||||
<span class="archives-list-item-date">{{ .PublishDate.Format "Jan 2" }}</span>
|
||||
<span>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="page-footer"></div>
|
||||
|
||||
{{ end }}
|
23
layouts/_default/single.html
Normal file
23
layouts/_default/single.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{ define "main" }}
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||
<div>
|
||||
<p>
|
||||
{{ .Content }}
|
||||
</p>
|
||||
</div>
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
|
||||
<div class="page-footer">
|
||||
{{ $taxonomy := "tags" }}
|
||||
{{ with .Param $taxonomy }}
|
||||
<hr class="footer-divider">
|
||||
{{ range $index, $tag := . }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) }}
|
||||
<a class="tag" href="{{ .Permalink }}">#{{ $tag | urlize }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{end}}
|
24
layouts/_default/tag.html
Normal file
24
layouts/_default/tag.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{ define "main" }}
|
||||
<!-- Page that displays after clicking on a post's tag -->
|
||||
<h1>Tagged "{{ .Data.Term }}"</h1>
|
||||
{{range .Pages}}
|
||||
|
||||
<!-- Display the posts with the tag -->
|
||||
<article>
|
||||
<h2>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</h2>
|
||||
<div>
|
||||
<p>
|
||||
{{ .Summary }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="post-footer">
|
||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
67
layouts/index.html
Normal file
67
layouts/index.html
Normal file
@@ -0,0 +1,67 @@
|
||||
{{ define "main" }}
|
||||
<div class = "article-content">
|
||||
{{ if isset .Site.Params "description" }}
|
||||
<div class="description">
|
||||
<p>{{ .Site.Params.Description | markdownify }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- Range over the pages and only include the ones that are a post type -->
|
||||
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{ range (.Paginate $pages).Pages }}
|
||||
<article>
|
||||
<h2>
|
||||
<a href="{{ .Permalink }}">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
</h2>
|
||||
<div><p>{{ .Summary }}</p></div>
|
||||
<div class="post-footer">
|
||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||
|
||||
<!-- Display tags -->
|
||||
{{ $taxonomy := "tags" }}
|
||||
{{ with .Param $taxonomy }}
|
||||
{{ range $index, $tag := . }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) }}
|
||||
<a class="tag" href="{{ .Permalink }}">#{{ $tag | urlize }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
<!-- Custom paginator -->
|
||||
<div class="paginator">
|
||||
{{ $paginator := .Paginator }}
|
||||
{{ if gt .Paginator.TotalPages 1 }}
|
||||
<p>Page {{ $paginator.PageNumber}} of {{ $paginator.TotalPages }}</p>
|
||||
<div class="paginator-group">
|
||||
{{ if $paginator.HasPrev }}
|
||||
<a class="color-link" href="{{ $paginator.Prev.URL }}">
|
||||
<svg width="13px" height="9px" viewBox="0 0 13 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g class="color-arrow" fill="#63BDA2" fill-rule="nonzero">
|
||||
<polygon id="Path" points="1.75929935 4.50000282 5.3292523 7.62371165 4.6707477 8.37628835 0.240700645 4.49999718 4.67081049 0.623709205 5.32930951 1.37629079"></polygon>
|
||||
<polygon id="Path" points="13 4 13 5 1 5 1 4"></polygon>
|
||||
</g>
|
||||
</svg>
|
||||
Newer
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if $paginator.HasNext }}
|
||||
<a class="color-link older" href="{{ $paginator.Next.URL }}">
|
||||
Older
|
||||
<svg width="13px" height="9px" viewBox="0 0 13 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g class="color-arrow" fill="#63BDA2" fill-rule="nonzero">
|
||||
<polygon points="7.6707477 1.37628835 8.3292523 0.623711653 12.7592994 4.50000282 8.32918951 8.37629079 7.67069049 7.62370921 11.2407006 4.49999718"></polygon>
|
||||
<polygon id="Path" points="0 5 0 4 12 4 12 5"></polygon>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
12
layouts/partials/footer-mobile.html
Normal file
12
layouts/partials/footer-mobile.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<footer class="footer-mobile">
|
||||
{{ partial "social.html" . }}
|
||||
|
||||
<div class="footer-mobile-links">
|
||||
<p><a href="https://github.com/kimcc/hugo-theme-noteworthy" target="_blank" rel="noopener">Noteworthy theme</a></p>
|
||||
<span class="divider-bar">|</span>
|
||||
<p><a href="https://gohugo.io" target="_blank" rel="noopener">Built with Hugo</a></p>
|
||||
</div>
|
||||
|
||||
{{ $script := resources.Get "js/main.js" | minify | fingerprint -}}
|
||||
<script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }}></script>
|
||||
</footer>
|
9
layouts/partials/footer.html
Normal file
9
layouts/partials/footer.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<footer class="footer">
|
||||
{{ partial "social.html" . }}
|
||||
|
||||
<p><a href="https://github.com/kimcc/hugo-theme-noteworthy" target="_blank" rel="noopener">Noteworthy theme</a></p>
|
||||
<p><a href="https://gohugo.io" target="_blank" rel="noopener">Built with Hugo</a></p>
|
||||
|
||||
{{ $script := resources.Get "js/main.js" | minify | fingerprint -}}
|
||||
<script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }}></script>
|
||||
</footer>
|
33
layouts/partials/head.html
Normal file
33
layouts/partials/head.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="format-detection" content="telephone=no"/>
|
||||
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<!-- Icons -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}">
|
||||
<link rel="manifest" href="{{ "manifest.json" | relURL }}">
|
||||
<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | relURL }}" color="#FF3DB4">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<!-- Styles -->
|
||||
<!-- Use Hugo Pipes to process the Sass file (convert to CSS, minify, and add a hash) -->
|
||||
{{ $main_style := resources.Get "css/main.scss" | toCSS | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $main_style.Permalink }}"/>
|
||||
|
||||
<!-- Uncomment to add custom styles -->
|
||||
<!-- Modify the custom.scss file inside assets > css to use scss -->
|
||||
<!-- {{ $custom_style := resources.Get "css/custom.scss" | toCSS | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $custom_style.Permalink }}"/> -->
|
||||
|
||||
<!-- Modify the custom.css file inside static > css to use vanilla css -->
|
||||
<!-- <link type="text/css" rel="stylesheet" href="{{ "/" | relURL }}css/custom.css"> -->
|
||||
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
</head>
|
5
layouts/partials/header.html
Normal file
5
layouts/partials/header.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<header>
|
||||
<div class="site-title">
|
||||
<a href="{{ "/" | relURL }}">{{ .Site.Title }}</a>
|
||||
</div>
|
||||
</header>
|
6
layouts/partials/math.html
Normal file
6
layouts/partials/math.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{{ if or .Page.Params.math .Site.Params.math }}
|
||||
<!-- KaTeX -->
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/katex.min.css" | relURL }}">
|
||||
<script type="text/javascript" src="{{ "js/katex.min.js" | relURL }}"></script>
|
||||
<script type="text/javascript" src="{{ "js/auto-render.min.js" | relURL }}"onload="renderMathInElement(document.body);"></script>
|
||||
{{ end }}
|
11
layouts/partials/nav.html
Normal file
11
layouts/partials/nav.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- Sidebar navigation -->
|
||||
<nav>
|
||||
{{ partial "header.html" . }}
|
||||
<div class="nav-menu">
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="color-link nav-link" href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
<a class="color-link nav-link" href="{{ .Site.RSSLink }}" target="_blank" rel="noopener" type="application/rss+xml">RSS</a>
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
</nav>
|
179
layouts/partials/social.html
Normal file
179
layouts/partials/social.html
Normal file
File diff suppressed because one or more lines are too long
29
layouts/section/archives.html
Normal file
29
layouts/section/archives.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{{ define "main" }}
|
||||
<!-- All of the site's posts grouped by year -->
|
||||
<h1>
|
||||
Archives
|
||||
</h1>
|
||||
<div>
|
||||
<!-- Group all the post pages from the same year -->
|
||||
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{ range ($pages.GroupByDate "2006") }}
|
||||
<h3>{{ .Key }}</h3> <!-- Display the year -->
|
||||
|
||||
<ul class="archives-list">
|
||||
|
||||
{{ range (.Pages) }}
|
||||
|
||||
<li class="archives-list-item">
|
||||
<span class="archives-list-item-date">{{ .PublishDate.Format "Jan 2" }}</span>
|
||||
<span>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</span>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="page-footer"></div>
|
||||
|
||||
{{ end }}
|
10
layouts/section/tags.html
Normal file
10
layouts/section/tags.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ define "main" }}
|
||||
<!-- Shows all of the site's tags -->
|
||||
<h1>Tags</h1>
|
||||
<ul>
|
||||
{{ range .Site.Taxonomies.tags }}
|
||||
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<div class="page-footer"></div>
|
||||
{{end}}
|
Reference in New Issue
Block a user