Initial commit

This commit is contained in:
Steven Engler
2019-05-17 18:45:07 -04:00
commit 1522656f46
18 changed files with 952 additions and 0 deletions

0
layouts/404.html Normal file
View File

View File

@ -0,0 +1,62 @@
{{ $themeStyleDefault := "light.css" }}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<base href="{{ .Site.BaseURL }}"/>
{{ .Hugo.Generator }}{{/* See: https://gohugo.io/themes/creating/#theme-description-file */}}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<link rel="stylesheet" href="css/styles.css">
<link id="theme_css" rel="stylesheet" href="css/themes/{{ .Site.Params.ThemeStyle | default $themeStyleDefault }}">
{{ if .Site.Params.ThemeStyleSwitcher }}
<script src="js/theme-switcher.js"></script>
{{ end }}
</head>
<body>
<input class="show-hide-menu-input" style="display:none;" autocomplete="off" type="checkbox" id="toggle-1">
<div class="main">
<div class="header">
<div class="header-content">
<div class="title">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>
<div>
<div class="header-right">
{{ if .Site.Params.ThemeStyleSwitcher }}
<div id="change-theme-button" style="display:none;" class="clickable-header-label">
<img class="color-adapting-image" src="" onclick="toggle_theme()"></img>
</div>
{{ end }}
<label id="show-hide-menu-label" class="clickable-header-label" for="toggle-1">
<img class="color-adapting-image" src="images/hamburger.svg" alt="menu button">
</label>
</div>
<label class="overlay" for="toggle-1"></label>
{{ if .Site.Menus.main }}
<div class="dont-show">
Links:
</div>
<ul class="links">
{{ range .Site.Menus.main.ByWeight }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
</div>
</div>
<div class="body">
<div class="body-content">
{{ block "main" . }}{{ end }}
</div>
</div>
</div>
<div class="footer">
{{ if .Site.Params.FooterText }}
{{ .Site.Params.FooterText }}
{{ end }}
</div>
</body>
</html>

View File

@ -0,0 +1,31 @@
{{ define "title" }}{{ .Title }} &ndash; {{ .Site.Title }}{{ end }}
{{ define "main" }}
{{ .Content }}
<div class="title-header">
<h1>Posts</h1>
</div>
{{ range .Pages }}
<article class="all-list">
<div class="title-list">
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
<div class="title-list-date">
{{ if eq .Date.IsZero false }}
<time>{{ .Date.Format "Monday, January 2, 2006" }}</time>
{{ end }}
{{ if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }}
(updated)
{{ end }}
</div>
</div>
<div class="body-list">
<p></p> {{/* Spacing is weird if we don't include this */}}
<p>
{{ .Summary }}
</p>
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">Read More…</a>
{{ end }}
</div>
</article>
{{ end }}
{{ end }}

View File

@ -0,0 +1,18 @@
{{ define "title" }}{{ .Title }} &ndash; {{ .Site.Title }}{{ end }}
{{ define "main" }}
<div class="title-header">
<h1>{{ .Title }}</h1>
<div class="title-header-date">
{{ if eq .Date.IsZero false }}
<time>{{ .Date.Format "Monday, January 2, 2006" }}</time>
{{ end }}
{{ if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }}
&mdash; last updated <time>{{ .Lastmod.Format "January 2, 2006" }}</time>
{{ end }}
</div>
</div>
{{ .Content }}
{{ end }}

30
layouts/index.html Normal file
View File

@ -0,0 +1,30 @@
{{ define "main" }}
{{ .Content }}
{{ if gt ( len ( where .Pages "Section" "posts" )) 0 }}
<h2>Recent Posts</h2>
{{ range first 2 ( where .Pages "Section" "posts" ) }}
<article class="all-list">
<div class="title-list">
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<div class="title-list-date">
{{ if eq .Date.IsZero false }}
<time>{{ .Date.Format "Monday, January 2, 2006" }}</time>
{{ end }}
{{ if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }}
(updated)
{{ end }}
</div>
</div>
<div class="body-list">
<p></p> {{/* Spacing is weird if we don't include this */}}
<p>
{{ .Summary }}
</p>
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">Read More…</a>
{{ end }}
</div>
</article>
{{ end }}
{{ end }}
{{ end }}