commit 8ec37661d4ace381fc1e3a4eb6ee2a84ce0ee6e2 Author: Adrian Short Date: Thu May 10 21:32:12 2018 +0100 First commit diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..624b3f3 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2018 YOUR_NAME_HERE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..0fba350 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,4 @@ +{{ partial "header" . }} + {{ block "main" . }} + {{ end }} +{{ partial "footer" . }} diff --git a/layouts/_default/li.html b/layouts/_default/li.html new file mode 100644 index 0000000..7c2996f --- /dev/null +++ b/layouts/_default/li.html @@ -0,0 +1,5 @@ +
+

{{ .Title }}

+ {{ .Description }} +

{{ .Date.Format "2 January 2006" }}

+
diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..bf7fe99 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,14 @@ +{{ define "main" }} + {{ $.Scratch.Set "fa_icon" "fa-tag" }} + + {{ if isset .Params "fa_icon" }} + {{ $.Scratch.Set "fa_icon" .Params.fa_icon }} + {{ end }} + +

{{ .Title }}

+ {{ range .Paginator.Pages }} + {{ .Render "li" }} + {{ end }} + {{ template "_internal/pagination.html" . }} +{{ end }} + diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..ebdd9d3 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{ define "main" }} +
+

{{ .Title }}

+ + {{ .Content }} + {{ partial "tags.html" . }} +
+{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..649fb91 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

{{ .Site.Title }}

+ {{ range .Paginator.Pages }} + {{ .Render "li" }} + {{ end }} + {{ template "_internal/pagination.html" . }} +{{ end }} diff --git a/layouts/partials/data/title b/layouts/partials/data/title new file mode 100644 index 0000000..dd70e01 --- /dev/null +++ b/layouts/partials/data/title @@ -0,0 +1,17 @@ +{{- $title := .Title -}} +{{- $siteTitle := .Site.Title -}} +{{- $authorName := .Site.Author.name -}} +{{- $sep := ( .Site.Params.SEO.titleSeparator | default "•" ) -}} +{{- if .IsHome -}} + {{ $siteTitle }} +{{- else if eq .Kind "taxonomy" -}} + {{ title .Data.Singular }}: {{ $title }} {{ $sep }} {{ $siteTitle }} +{{- else if ( or .IsNode ( eq .Section "page" ) ) -}} + {{ $title }} {{ $sep }} {{ $siteTitle }} +{{- else -}} + {{- with $authorName -}} + {{ $title }} {{ $sep }} {{ . }} + {{- else -}} + {{ $title }} {{ $sep }} {{ $siteTitle }} + {{- end -}} +{{- end -}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..8abd8b5 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,3 @@ +{{ template "_internal/google_analytics.html" . }} + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..c6e4067 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,35 @@ + + + + {{- partial "data/title" . -}} + {{ .Hugo.Generator }} + {{ "" | safeHTML }} + + + + + {{- template "_internal/opengraph.html" . -}} + {{ with .Params.image }} + + {{ end }} + {{- with .Site.Params.twitter -}} + + {{- end -}} + {{ if not .Page.Params.via }} + + {{ end }} + {{- template "_internal/twitter_cards.html" -}} + + +
+ + +
+ {{ range .Site.Params.social}} + + + + {{ end }} +
+
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html new file mode 100644 index 0000000..a94d3f1 --- /dev/null +++ b/layouts/partials/tags.html @@ -0,0 +1,5 @@ + diff --git a/static/css/main.css b/static/css/main.css new file mode 100644 index 0000000..208d265 --- /dev/null +++ b/static/css/main.css @@ -0,0 +1,265 @@ +body { + background-color: #fff; + color: #000; + width: 700px; + margin: 70px auto; + font-family: "Helvetica", "Helvetica Neue", Arial, serif; + line-height: 1.0rem; + font-size: 1.3em; +} + +a { + color: #333; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +a:visited { + color: #777; +} + +#site-social { + font-size: 1.3rem; +} + +.quote { + font-family: monospace; + border: 0px #777 solid; + /*background-color: #eee;*/ + font-size: 1.8rem; + line-height: 2.0rem; + /*padding: 20px;*/ + margin: 30px 0; +} + +.quote-credit { + /*font-style: italic;*/ + text-align: right; + font-size: 1.0rem; +} + +.list-item { + display: block; + border: 0px #777 solid; + padding: 0; + margin: 60px 0; + border-radius: 10px; + line-height: 1.8rem; +} + +.list-date { + font-size: 1.0rem; +} + +.list-item h2 { + line-height: 2.5rem; + margin: 0 0 15px 0; +} + +.list-item img { + margin: 0px 0 20px 0; +} + +.list-quote { + background-color: #444; + color: white; +} + +.list-video { + background-color: #000; + color: white; +} + + + +.postmeta, .listmeta { + font-weight: 300; + text-transform: uppercase; + font-size: 0.9rem; + margin: 0; +} + +.aside-list { + font-family: Georgia, "Times New Roman", serif; + font-size: 2.7rem; + line-height: 3.5rem; +} + +#aside-single { + margin: 10rem 0; + color: white; + font-family: Georgia, "Times New Roman", serif; + font-size: 4.0rem; + line-height: 4.5rem; +} + +img { + width: 100%; +} + +figure { + margin: 20px 0; + padding: 0; +} + +figcaption, figcaption h4 { + text-align: right; + font-size: 1.0rem; + font-weight: normal; +} + +article { + font-size: 1.2rem; + line-height: 1.9rem; + color: #222; +} + +article a { + text-decoration: underline; + text-decoration-style: dotted; + color: #000; +} + +article a:visited { + text-decoration: underline; + text-decoration-style: dotted; + color: #aaa; +} + +article a:hover { + color: #fff; + text-decoration: none; + background-color: #333; +} + +article figcaption { + text-transform: none; + letter-spacing: 0.0rem; + text-align: right; + font-size: 0.8rem; +} + + +h1 { + color: #eee; + font-size: 1.0rem; +} + +article h1 { + font-size: 2.5rem; + line-height: 3.2rem; + margin: 0 0 25px 0; + color: cornflowerblue; +} + +article p { + margin: 0 0 30px 0; +} + +#site-title { + margin: 0 0 0 0; + font-size: 3.5rem; + line-height: 4.0rem; + color: cornflowerblue; +} + +#site-title a, #site-title a:visited { + /* font-size: 1.0rem; */ + text-decoration: none; + text-transform: uppercase; + font-weight: normal; +} + +.post-title { + text-transform: none; +} + +ul.tags { + margin: 0; + padding: 0; + background-color: ; +} + +.tags li { + display: inline; + list-style-type: none; + margin: 0 15px 0 0; + font-size: 0.8rem; + /* text-transform: lowercase; */ +} + +.tags li a, .tags li a:hover, .tags li a:visited { + color: #777; + text-decoration: none; +} + +ul.pagination { + margin: 0; + padding: 0; +} + +ul.pagination li { + display: inline; + margin: 0 30px 0 0; +} + +ul.pagination a { + width: 20px; + height: 20px; + font-size: 1.7rem; + text-decoration: none; +} + +ul.pagination li.active a { + background-color: white; + padding: 5px 10px; +} + +ul.pagination li.disabled { + color: #333; +} + +ul.tag-cloud { + margin: 30px 0; + padding: 0; +} + +ul.tag-cloud li { + display: inline; + margin: 0; + padding: 10px 20px 10px 0; + line-height: 2rem; +} + +ul.tag-cloud li a, ul.tag-cloud li a:visited { + color: white; + text-decoration: none; +} + +.fa { + margin: 0 15px 0 0; + color: white; +} + +header { + margin: 0px 0; +} + +@media screen and (max-width: 699px) { + body { + width: 90%; + margin: 20px auto; + } + + img { + width: 100%; + } +} + +blockquote { + border-left: 2px solid #ddd; + padding-left: 25px; +} diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..9167f61 --- /dev/null +++ b/theme.toml @@ -0,0 +1,21 @@ +# theme.toml template for a Hugo theme +# See https://github.com/gohugoio/hugoThemes#themetoml for an example + +name = "Author" +license = "MIT" +licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE.md" +description = "" +homepage = "https://github.com/adrianshort/author/" +tags = [] +features = [] +min_version = "0.38" + +[author] + name = "Adrian Short" + homepage = "https://www.adrianshort.org/" + +# If porting an existing theme +[original] + name = "" + homepage = "" + repo = ""