Browse Source

Merge remote-tracking branch 'origin/hugo'

master
Brett Langdon 9 years ago
parent
commit
202f2a1107
No known key found for this signature in database GPG Key ID: A2ECAB73CE12147F
75 changed files with 1720 additions and 834 deletions
  1. +1
    -4
      .gitignore
  2. +0
    -18
      Makefile
  3. +14
    -41
      README.md
  4. +0
    -27
      config.json
  5. +25
    -0
      config.toml
  6. +8
    -5
      content/about.md
  7. +0
    -1
      content/post/cocode-is-bad-code/index.md
  8. +0
    -1
      content/post/how-to-contribute-to-open-source/index.md
  9. +0
    -1
      content/post/microcommits/index.md
  10. +2
    -2
      content/post/scrum-is-life/index.md
  11. +0
    -3
      contents/archive.json
  12. +0
    -5
      contents/authors/adam.json
  13. +0
    -5
      contents/authors/brett.json
  14. +0
    -5
      contents/authors/colin.json
  15. +0
    -426
      contents/css/main.css
  16. +0
    -4
      contents/feed.json
  17. +51
    -0
      layouts/_default/baseof.html
  18. +16
    -0
      layouts/partials/critical-custom.css.html
  19. +36
    -0
      layouts/post/single.html
  20. +0
    -10
      package.json
  21. +0
    -91
      plugins/paginator.coffee
  22. +0
    -0
      static/images/2000px-Scrum_process.png
  23. +0
    -0
      static/images/sprint-planning.png
  24. +0
    -0
      static/images/triangles.jpg
  25. +0
    -34
      templates/archive.jade
  26. +0
    -26
      templates/article.jade
  27. +0
    -8
      templates/author.jade
  28. +0
    -25
      templates/feed.jade
  29. +0
    -29
      templates/index.jade
  30. +0
    -45
      templates/layout.jade
  31. +0
    -18
      templates/mixins/disqus.jade
  32. +2
    -0
      themes/hugo-after-dark/.gitignore
  33. +33
    -0
      themes/hugo-after-dark/CHANGELOG.md
  34. +7
    -0
      themes/hugo-after-dark/LICENSE
  35. +504
    -0
      themes/hugo-after-dark/README.md
  36. +3
    -0
      themes/hugo-after-dark/archetypes/default.md
  37. +6
    -0
      themes/hugo-after-dark/archetypes/post.md
  38. BIN
      themes/hugo-after-dark/images/design/dark_code_editor_window.sketch
  39. BIN
      themes/hugo-after-dark/images/design/minimalMacbook.sketch
  40. BIN
      themes/hugo-after-dark/images/minimal-mac.png
  41. BIN
      themes/hugo-after-dark/images/screenshot.png
  42. BIN
      themes/hugo-after-dark/images/terminal.png
  43. BIN
      themes/hugo-after-dark/images/tn.png
  44. +100
    -0
      themes/hugo-after-dark/layouts/404.html
  45. +50
    -0
      themes/hugo-after-dark/layouts/_default/baseof.html
  46. +15
    -0
      themes/hugo-after-dark/layouts/_default/list.html
  47. +15
    -0
      themes/hugo-after-dark/layouts/_default/single.html
  48. +15
    -0
      themes/hugo-after-dark/layouts/_default/taxonomy.html
  49. +16
    -0
      themes/hugo-after-dark/layouts/_default/terms.html
  50. +18
    -0
      themes/hugo-after-dark/layouts/index.html
  51. +3
    -0
      themes/hugo-after-dark/layouts/partials/critical-custom.css.html
  52. +59
    -0
      themes/hugo-after-dark/layouts/partials/critical-theme.css.html
  53. +4
    -0
      themes/hugo-after-dark/layouts/partials/critical-vendor.css.html
  54. +127
    -0
      themes/hugo-after-dark/layouts/partials/favicon.html
  55. +8
    -0
      themes/hugo-after-dark/layouts/partials/menu.html
  56. +8
    -0
      themes/hugo-after-dark/layouts/partials/meta/name-author.html
  57. +13
    -0
      themes/hugo-after-dark/layouts/partials/meta/ogimage-maybe.html
  58. +1
    -0
      themes/hugo-after-dark/layouts/partials/meta/theme-color.html
  59. +19
    -0
      themes/hugo-after-dark/layouts/partials/page-summary.html
  60. +11
    -0
      themes/hugo-after-dark/layouts/partials/pagination.html
  61. +20
    -0
      themes/hugo-after-dark/layouts/partials/post/byline.html
  62. +1
    -0
      themes/hugo-after-dark/layouts/partials/post/category-link.html
  63. +15
    -0
      themes/hugo-after-dark/layouts/partials/post/meta.html
  64. +15
    -0
      themes/hugo-after-dark/layouts/partials/post/related-content.html
  65. +1
    -0
      themes/hugo-after-dark/layouts/partials/post/tag-link.html
  66. +8
    -0
      themes/hugo-after-dark/layouts/partials/powered-by.html
  67. +12
    -0
      themes/hugo-after-dark/layouts/partials/site-verification.html
  68. +20
    -0
      themes/hugo-after-dark/layouts/partials/toc-maybe.html
  69. +32
    -0
      themes/hugo-after-dark/layouts/post/single.html
  70. +8
    -0
      themes/hugo-after-dark/layouts/shortcodes/blockquote.html
  71. +35
    -0
      themes/hugo-after-dark/layouts/shortcodes/figure.html
  72. +29
    -0
      themes/hugo-after-dark/package.json
  73. +2
    -0
      themes/hugo-after-dark/static/js/lazysizes.min.js
  74. +291
    -0
      themes/hugo-after-dark/static/js/smoothscroll.js
  75. +41
    -0
      themes/hugo-after-dark/theme.toml

+ 1
- 4
.gitignore View File

@ -1,4 +1 @@
build
node_modules
npm-debug.log
contents/css/main.min.css
public/

+ 0
- 18
Makefile View File

@ -1,18 +0,0 @@
WINTERSMITH = ./node_modules/.bin/wintersmith
build:
@./node_modules/.bin/cleancss ./contents/css/main.css > ./contents/css/main.min.css
@$(WINTERSMITH) build
clean:
@rm -rf build
preview: build
@$(WINTERSMITH) preview
pull:
git pull
update: pull build
.PHONY: build clean preview pull update

+ 14
- 41
README.md View File

@ -5,48 +5,31 @@ A satirical blog about programming and general technology.
## Installing
`theworstprogrammerever` requires `hugo` to build the server
```shell
git clone git://github.com/brettlangdon/theworstprogrammerever
cd ./theworstprogrammerever
npm install
```
## Running
### Building
If you would like to generate the blog you can run:
# build the static files
hugo
```shell
make build
# run development server at http://localhost:1313
hugo server -w
```
Which will generate the static files necessary for the blog in `./build`
### Preview
If you would like to preview the blog or any changes that you have made you can
run:
```shell
make preview
```
Then visit http://localhost:8080/
## Contributing
If you would like to contribute an article to http://theworstprogrammerever.com:
1. Fork this repository
2. Add your article to `contents/articles/<article-title-here>/index.md`
2. Add your article to `content/post/<article-title-here>/index.md`
1. Format for `index.md` should be:
```markdown
---
title: <article-title-here>
author: <name-here>
date: YYY-MM-DD
template: article.jade
---
Short summary here
@ -55,24 +38,14 @@ If you would like to contribute an article to http://theworstprogrammerever.com:
This is the actual article. You can use whatever markdown you want.
```
3. If this is your first article please add yourself to
`contents/authors/<name-here>.json`
1. Format for `<name-here>.json` should be:
```json
{
"name": "<name here>",
"website": "<link-to-site-or-github>"
}
```
4. Create a pull request to this repo to await review/merge
5. Profit
3. Create a pull request to this repo to await review/merge
4. Profit
# License
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img
alt="Creative Commons License" style="border-width:0"
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work
is licensed under a <a rel="license"
href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons
Attribution-ShareAlike 4.0 International License</a>.
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" />
</a>
<br />
This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.

+ 0
- 27
config.json View File

@ -1,27 +0,0 @@
{
"locals": {
"url": "http://theworstprogrammerever.com",
"name": "The Worst Programmer Ever",
"owner": "The Worst Programmer Ever",
"description": "The best advice from the worst programmers"
},
"plugins": [
"./plugins/paginator.coffee"
],
"require": {
"moment": "moment",
"_": "underscore",
"typogr": "typogr"
},
"jade": {
"pretty": true
},
"markdown": {
"smartLists": true,
"smartypants": true,
"gfm": true
},
"paginator": {
"perPage": 3
}
}

+ 25
- 0
config.toml View File

@ -0,0 +1,25 @@
languageCode = "en-us"
title = "The Worst Programmer Ever"
baseURL = "https://theworstprogrammerever.com"
theme = "hugo-after-dark"
disqusShortname = "theworstprogrammerever"
googleAnalytics = "UA-43062483-1"
SectionPagesMenu = "main"
[params]
description = "The best advice from the worst programmers"
show_menu = true
powered_by = false
theme_variant = "hack light"
[[menu.main]]
name = "Home"
weight = 1
identifier = "home"
url = "/"
[[menu.main]]
name = "About"
weight = 2
identifier = "about"
url = "/about"

contents/about.md → content/about.md View File


contents/articles/cocode-is-bad-code/index.md → content/post/cocode-is-bad-code/index.md View File


contents/articles/how-to-contribute-to-open-source/index.md → content/post/how-to-contribute-to-open-source/index.md View File


contents/articles/microcommits/index.md → content/post/microcommits/index.md View File


contents/articles/scrum-is-life/index.md → content/post/scrum-is-life/index.md View File


+ 0
- 3
contents/archive.json View File

@ -1,3 +0,0 @@
{
"template": "archive.jade"
}

+ 0
- 5
contents/authors/adam.json View File

@ -1,5 +0,0 @@
{
"name": "Adam Weiss",
"website": "https://github.com/amweiss",
"bio": "Adam still thinks he can write code"
}

+ 0
- 5
contents/authors/brett.json View File

@ -1,5 +0,0 @@
{
"name": "Brett Langdon",
"website": "http://brett.is",
"bio": "Brett is the breaker of things"
}

+ 0
- 5
contents/authors/colin.json View File

@ -1,5 +0,0 @@
{
"name": "Colin Higgins",
"website": "http://spykebytes.me",
"bio": ""
}

+ 0
- 426
contents/css/main.css View File

@ -1,426 +0,0 @@
h1, h2, h3, h4, h5, h6, p, body, a, img, ul, ol, blockquote, pre {
margin: 0; padding: 0; border: 0;
}
body {
font-family: 'Lora', serif;
font-size: 21px;
line-height: 1.52;
background-color: #f8f8f8;
text-rendering: optimizeLegibility;
}
.content-wrap {
width: 34em;
margin: 0 auto;
}
body, a {
color: #171717;
}
a:hover {
color: #ff8000;
text-decoration: underline;
}
p {
margin-bottom: 1.52em;
}
pre {
font-size: 0.9em;
overflow: auto;
background: #fff;
border: 1px dashed #d2d2d2;
border-radius: 0.25em;
margin-bottom: 1.8em;
padding: 1em;
}
h1 {
font-size: 2em;
margin-bottom: 1em;
}
h2 {
font-size: 1.2em;
font-weight: 600;
line-height: 1.43;
margin-bottom: 1.35em;
}
h3 {
font-style: italic;
text-align: center;
font-weight: 400;
font-size: 1.4em;
margin-top: 1.8em;
margin-bottom: 0.8em;
}
ol, ul {
margin: 0 1.4em 1.4em 4em;
}
li {
margin-bottom: 0.5em;
}
blockquote {
margin: 1.2em 3em;
padding-left: 1em;
font-style: italic;
}
hr {
border: 0;
border-top: 1px dashed #d2d2d2;
height: 0;
margin: 1.6em 0;
}
/* page header */
.header {
margin: 3em 0 5em;
}
.header h1, .header .title {
font-size: 2.0em;
text-align: center;
font-weight: 700;
margin: 0;
}
.header a, .header a:hover {
text-decoration: none;
color: #171717;
}
.header .author {
font-family: 'Merriweather', serif;
font-variant: small-caps;
text-transform: lowercase;
text-rendering: auto;
text-align: center;
font-weight: 400;
letter-spacing: 1px;
}
.header .description {
font-size: 1.2em;
font-style: italic;
text-align: center;
margin-top: -0.3em;
}
body.article-detail > header h1 {
font-size: 2em;
font-style: italic;
font-weight: 400;
margin-bottom: -0.2em;
}
body.article-detail > header {
margin-bottom: 3em;
}
/* page footer */
footer {
margin: 3em 0;
}
footer .nav {
text-align: center;
margin-top: 1em;
margin-bottom: 1em;
}
footer .nav a {
padding: 0 0.5em;
font-size: 1.2em;
text-decoration: none;
}
footer .about {
font-size: 0.7em;
text-align: center;
}
footer .copy {
text-align: center;
font-size: 0.7em;
font-style: italic;
margin-top: 1em;
}
footer .copy, footer .copy a {
color: #8e8e8e;
}
/* article */
.article {
margin: 3em 0 4em;
}
.article header {
border-top: 1px dashed #d2d2d2;
}
.article header h2 {
font-style: italic;
text-align: center;
font-weight: 400;
margin: 0.8em 0;
font-size: 1.4em;
}
.article header h2 a {
text-decoration: none;
}
.article header .date {
text-align: center;
font-size: 0.8em;
margin-top: -0.7em;
}
.article header .date span {
background-color: #f8f8f8;
padding: 0 0.7em;
}
.article.intro .content p {
display: inline;
}
.article.intro .content .more {
text-decoration: underline;
font-weight: 700;
padding-left: 0.3em;
}
.article .content img {
display: block;
width: 100%;
}
.more, .date {
font-family: 'Merriweather', serif;
font-variant: small-caps;
text-transform: lowercase;
font-weight: 400;
text-rendering: auto;
letter-spacing: 1px;
}
/* archive */
.archive {
width: 32em;
margin: 5em auto 6em;
padding-left: 2em;
}
.archive h2 {
font-size: 2em;
margin: 0;
margin-left: 6.1em;
margin-bottom: 0.5em;
font-style: italic;
}
.archive a, .archive span{
display: block;
float: left;
margin-bottom: -1px;
text-decoration: none;
}
.archive li:not(:last-child) {
border-bottom: 1px solid #d2d2d2;
margin-bottom: -1px;
}
.archive a.last, .archive span.last {
border: 0;
margin-bottom: 0;
}
.archive a {
width: 21em;
text-indent: 1em;
white-space: nowrap;
}
.archive .year-label,
.archive .month-label{
width: 4em;
font-family: 'Merriweather', serif;
font-variant: small-caps;
text-transform: lowercase;
font-weight: 400;
text-rendering: auto;
letter-spacing: 1px;
text-align: center;
}
.archive .month-label {
width: 7em;
}
.archive ul {
list-style: none;
margin: 0;
}
.archive ul li {
margin: 0;
}
/* code styling */
code {
font-family: 'Anonymous Pro', monospace;
font-size: 0.85em;
color: #000;
}
pre code {
display: block;
line-height: 1.1;
}
p code {
padding: 0.1em 0.3em 0.2em;
border-radius: 0.3em;
position: relative;
background: #fffff3;
white-space: nowrap;
}
/* syntax hl stuff */
code.lang-markdown {
color: #424242;
}
code.lang-markdown .header,
code.lang-markdown .strong {
font-weight: bold;
}
code.lang-markdown .emphasis {
font-style: italic;
}
code.lang-markdown .horizontal_rule,
code.lang-markdown .link_label,
code.lang-markdown .code,
code.lang-markdown .header,
code.lang-markdown .link_url {
color: #555;
}
code.lang-markdown .blockquote,
code.lang-markdown .bullet {
color: #bbb;
}
/* Tomorrow Theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
.tomorrow-comment, pre .comment, pre .title {
color: #8e908c;
}
.tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
color: #c82829;
}
.tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
color: #f5871f;
}
.tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
color: #eab700;
}
.tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
color: #718c00;
}
.tomorrow-aqua, pre .css .hexcolor {
color: #3e999f;
}
.tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
color: #4271ae;
}
.tomorrow-purple, pre .keyword, pre .javascript .function {
color: #8959a8;
}
/* media queries */
@media (min-width: 1600px) {
body { font-size: 26px; }
}
@media (max-width: 900px) {
body { font-size: 18px; }
}
@media (max-width: 690px) {
.content-wrap {
width: auto;
padding: 0 1em;
}
.header {
margin: 1em 0;
}
.header h1 {
font-size: 1.4em;
margin-bottom: 0.6em;
}
.header .description {
font-size: 1em;
}
.article {
margin: 1em 0 2.5em;
}
.archive {
width: 80%;
margin: 0 auto;
}
.archive * {
float: none !important;
line-height: 1.6 !important;
width: auto !important;
height: auto !important;
text-align: left !important;
border: 0 !important;
margin: 0 !important;
}
footer .nav {
margin: 1em 0;
}
footer .about {
padding: 0;
font-size: 0.9em;
padding-top: 1.6em;
-webkit-column-count: 1;
-moz-column-count: 1;
-ms-column-count: 1;
column-count: 1;
}
footer .about p {
margin-bottom: 1em;
}
}

+ 0
- 4
contents/feed.json View File

@ -1,4 +0,0 @@
{
"template": "feed.jade",
"filename": "feed.xml"
}

+ 51
- 0
layouts/_default/baseof.html View File

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
{{ .Hugo.Generator }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ block "title" . }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
{{ with .Description }}
<meta name="description" content="{{ . }}">
{{ end }}
{{ $default_noindex_kinds := slice "section" "taxonomy" "taxonomyTerm" }}
{{ $noindex_kinds := .Site.Params.noindex_kinds | default $default_noindex_kinds }}
{{ $is_noindex_true := and (isset .Params "noindex") .Params.noindex }}
{{ if or (in $noindex_kinds .Kind) ($is_noindex_true) }}
<meta name="robots" content="noindex">
{{ end }}
{{ partial "meta/name-author" . }}
{{ template "_internal/opengraph.html" . }}
{{ partial "meta/ogimage-maybe" . }}
{{ partial "meta/theme-color" . }}
{{ if eq .Kind "home" }}
{{ partial "site-verification" . }}
{{ end }}
{{ template "_internal/google_analytics_async.html" . }}
{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
<link rel="canonical" href="{{ .Permalink }}">
{{ if (isset .Params "prev") }}
<link rel="prev" href="{{ .Params.prev }}">
{{ end }}
{{ if (isset .Params "next") }}
<link rel="next" href="{{ .Params.next }}">
{{ end }}
{{ partial "favicon" . }}
{{ partial "critical-vendor.css" }}
{{ partial "critical-theme.css" }}
{{ partial "critical-custom.css" }}
{{ $lazylist := findRE "class=\".*?\\blazyload\\b.*?\"|class=lazyload\b" .Content }}<!-- http://regexr.com/3f9d1 -->
{{ if ge (len $lazylist) 1 }}
<script async src="/js/lazysizes.min.js"></script>
{{ end }}
</head>
{{ $theme_variant := .Site.Params.theme_variant | default "hack dark" }}
<body class="{{ $theme_variant }} main container">
<a href="https://github.com/brettlangdon/theworstprogrammerever" class="github-corner" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
<header>{{ block "header" . }}{{ end }}</header>
<main>{{ block "main" . }}{{ end }}</main>
<footer>{{ block "footer" . }}{{ end }}</footer>
</body>
</html>

+ 16
- 0
layouts/partials/critical-custom.css.html View File

@ -0,0 +1,16 @@
<style>
img {
max-width: 100%;
}
.light {
}
.light h2 a {
}
.light .muted {
color: rgba(0, 0, 0, 0.5);
}
</style>

+ 36
- 0
layouts/post/single.html View File

@ -0,0 +1,36 @@
{{ define "header" }}
{{ partial "menu" . }}
{{ end }}
{{ define "main" }}
<article itemscope itemtype="http://schema.org/BlogPosting">
{{ template "_internal/schema.html" . }}
<header>
<h1 itemprop="headline">{{ .Title }}</h1>
<p class="muted">{{ partial "post/meta" . }}</p>
</header>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
{{ partial "toc-maybe" . }}
<div itemprop="articleBody">
{{ .Content }}
</div>
{{ if .Site.DisqusShortname }}
<article>
{{ template "_internal/disqus.html" . }}
</article>
{{ end }}
<footer>
<hr>
{{ partial "post/byline" . }}
{{ partial "post/related-content" . }}
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License" style="border-width:0"
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" />
</a>
</footer>
</article>
{{ end }}
{{ define "footer" }}
{{ partial "powered-by" . }}
{{ end }}

+ 0
- 10
package.json View File

@ -1,10 +0,0 @@
{
"dependencies": {
"clean-css": "^2.2.16",
"moment": "2.3.x",
"typogr": "0.5.x",
"underscore": "1.4.x",
"wintersmith": "~2.1.x"
},
"repository": "none"
}

+ 0
- 91
plugins/paginator.coffee View File

@ -1,91 +0,0 @@
module.exports = (env, callback) ->
### Paginator plugin. Defaults can be overridden in config.json
e.g. "paginator": {"perPage": 10} ###
defaults =
template: 'index.jade' # template that renders pages
articles: 'articles' # directory containing contents to paginate
first: 'index.html' # filename/url for first page
filename: 'page/%d/index.html' # filename for rest of pages
perPage: 2 # number of articles per page
# assign defaults any option not set in the config file
options = env.config.paginator or {}
for key, value of defaults
options[key] ?= defaults[key]
getArticles = (contents) ->
# helper that returns a list of articles found in *contents*
# note that each article is assumed to have its own directory in the articles directory
articles = contents[options.articles]._.directories.map (item) -> item.index
# skip articles that does not have a template associated
articles = articles.filter (item) -> item.template isnt 'none'
# sort article by date
articles.sort (a, b) -> b.date - a.date
return articles
class PaginatorPage extends env.plugins.Page
### A page has a number and a list of articles ###
constructor: (@pageNum, @articles) ->
getFilename: ->
if @pageNum is 1
options.first
else
options.filename.replace '%d', @pageNum
getView: -> (env, locals, contents, templates, callback) ->
# simple view to pass articles and pagenum to the paginator template
# note that this function returns a funciton
# get the pagination template
template = templates[options.template]
if not template?
return callback new Error "unknown paginator template '#{ options.template }'"
# setup the template context
ctx = {@articles, @pageNum, @prevPage, @nextPage}
# extend the template context with the enviroment locals
env.utils.extend ctx, locals
# finally render the template
template.render ctx, callback
# register a generator, 'paginator' here is the content group generated content will belong to
# i.e. contents._.paginator
env.registerGenerator 'paginator', (contents, callback) ->
# find all articles
articles = getArticles contents
# populate pages
numPages = Math.ceil articles.length / options.perPage
pages = []
for i in [0...numPages]
pageArticles = articles.slice i * options.perPage, (i + 1) * options.perPage
pages.push new PaginatorPage i + 1, pageArticles
# add references to prev/next to each page
for page, i in pages
page.prevPage = pages[i - 1]
page.nextPage = pages[i + 1]
# create the object that will be merged with the content tree (contents)
# do _not_ modify the tree directly inside a generator, consider it read-only
rv = {pages:{}}
for page in pages
rv.pages["#{ page.pageNum }.page"] = page # file extension is arbitrary
rv['index.page'] = pages[0] # alias for first page
rv['last.page'] = pages[(numPages-1)] # alias for last page
# callback with the generated contents
callback null, rv
# add the article helper to the environment so we can use it later
env.helpers.getArticles = getArticles
# tell the plugin manager we are done
callback()

contents/images/2000px-Scrum_process.png → static/images/2000px-Scrum_process.png View File


contents/images/sprint-planning.png → static/images/sprint-planning.png View File


contents/images/triangles.jpg → static/images/triangles.jpg View File


+ 0
- 34
templates/archive.jade View File

@ -1,34 +0,0 @@
extends layout
//- this logic should be moved to a view at some point
block content
- var lineHeight = 2.2;
- var archives = _.chain(env.helpers.getArticles(contents)).groupBy(function(item) {
- return item.date.getFullYear()
- }).value()
- for (var archive in archives) {
- archives[archive] = _.groupBy(archives[archive], function(item){return item.date.getMonth();})
- }
- var month_names = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
section.archive
h2 Archive
ul
- var yearsK = _.chain(archives).keys().reverse().value()
- for(var year in yearsK)
- months = archives[yearsK[year]]
- var yearHeight = lineHeight * _.reduce(months, function(memo,month) { return memo + month.length; }, 0);
li
span.year-label(style='line-height:' + yearHeight+'em')=yearsK[year]
ul(style='margin-left:4em')
- var monthsK = _.chain(months).keys().reverse().value()
- for(month in monthsK){
- var monthHeight = lineHeight * months[monthsK[month]].length
li
span.month-label(style='line-height:'+monthHeight+'em')=month_names[monthsK[month]]
ul(style='margin-left:7em')
each item in months[monthsK[month]]
li(style='height:'+ lineHeight + 'em;line-height:'+ lineHeight + 'em;')
a(href=item.url)=item.title
- }

+ 0
- 26
templates/article.jade View File

@ -1,26 +0,0 @@
include mixins/disqus
extends layout
block append vars
- bodyclass = 'article-detail'
block prepend title
| #{ page.title + " - "}
block append header
include author
h1= page.title
p.author
| #{ "Written by " }
mixin author(page.metadata.author)
block content
article.article
section.content!= typogr(page.html).typogrify()
section.comments
+disqus
block prepend footer
div.nav
a(href=contents.index.url) « Home

+ 0
- 8
templates/author.jade View File

@ -1,8 +0,0 @@
mixin author(authorName)
- var author = contents.authors[authorName + '.json']
span.author
if author
a(href=author.metadata.website)= author.metadata.name
else
=authorName

+ 0
- 25
templates/feed.jade View File

@ -1,25 +0,0 @@
doctype xml
rss(version='2.0',
xmlns:content='http://purl.org/rss/1.0/modules/content/',
xmlns:wfw='http://wellformedweb.org/CommentAPI/',
xmlns:dc='http://purl.org/dc/elements/1.1/'
xmlns:atom='http://www.w3.org/2005/Atom')
channel
- var articles = env.helpers.getArticles(contents);
title= locals.name
atom:link(href=locals.url + '/feed.xml', rel='self', type='application/rss+xml')
link= locals.url
description= locals.description
pubDate= articles[0].rfc822date
generator Wintersmith - https://github.com/jnordberg/wintersmith
language en
for article in articles
- var permalink = locals.url + article.url
item
title= article.title
link= permalink
pubDate= article.rfc822date
guid(isPermaLink='true')= permalink
author= article.author
//- passing locals.url resolves all relative urls to absolute
description= article.getHtml(locals.url)

+ 0
- 29
templates/index.jade View File

@ -1,29 +0,0 @@
extends layout
block content
include author
each article in articles
article.article.intro
header
p.date
span= moment.utc(article.date).format('DD. MMMM YYYY')
h2
a(href=article.url)= article.title
section.content
if article.intro.length > 0
| !{ typogr(article.intro).typogrify() }
if article.hasMore
p.more
a(href=article.url) more
block prepend footer
div.nav
if prevPage
a(href=prevPage.url) « Newer
else
a(href='/archive.html') « Archives
if nextPage
a(href=nextPage.url) Next page »

+ 0
- 45
templates/layout.jade View File

@ -1,45 +0,0 @@
doctype html
block vars
- var bodyclass = null;
html(lang='en')
head
block head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
meta(name='viewport', content='width=device-width')
title
block title
= locals.name
link(rel='alternate', href=locals.url+'/feed.xml', type='application/rss+xml', title=locals.description)
link(rel='stylesheet', href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic|Anonymous+Pro:400,700,400italic,700italic|Merriweather:400,700,300')
link(rel='stylesheet', href='/css/main.min.css')
body(class=bodyclass)
header.header
div.content-wrap
block header
div.logo
h1.title
a(href=locals.url)= locals.name
p.description= locals.description
div#content
div.content-wrap
block content
h2 Welcome to The Worst Programmer Ever!
footer
div.content-wrap
block footer
section.about
!=contents['about.md'].html
section.copy
p &copy; #{ new Date().getFullYear() } #{ locals.owner } &mdash; powered by&nbsp;
a(href='https://github.com/jnordberg/wintersmith') Wintersmith
//- please leave the "powered by" if you use the design
script(type='text/javascript').
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-43062483-1', 'auto');
ga('send', 'pageview');
a(href="https://github.com/brettlangdon/theworstprogrammerever", target="_blank")
img(style="position: absolute; top: 0; left: 0; border: 0;", src="https://camo.githubusercontent.com/567c3a48d796e2fc06ea80409cc9dd82bf714434/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png")

+ 0
- 18
templates/mixins/disqus.jade View File

@ -1,18 +0,0 @@
mixin disqus
#disqus_thread
script(type="text/javascript").
var disqus_shortname = 'theworstprogrammerever';
var disqus_identifier = 'http://theworstprogrammerever.com#{page.url}';
var disqus_title = '#{page.title}';
var disqus_url = "http://theworstprogrammerever.com#{page.url}";
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
noscript
| Please enable JavaScript to view the
a(href="http://disqus.com/?ref_noscript")=" comments powered by Disqus."
a(href="http://disqus.com").dsq-brlink
| comments powered by
span.logo-disqus=" Disqus"

+ 2
- 0
themes/hugo-after-dark/.gitignore View File

@ -0,0 +1,2 @@
.DS_Store
node_modules/

+ 33
- 0
themes/hugo-after-dark/CHANGELOG.md View File

@ -0,0 +1,33 @@
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
<a name="1.2.0"></a>
# [1.2.0](https://github.com/comfusion/after-dark/compare/v1.1.0...v1.2.0) (2017-03-30)
### Features
* **highlighting:** add syntax highlighting ([455062f](https://github.com/comfusion/after-dark/commit/455062f))
* **shortcodes:** add figure shortcode ([8a0317f](https://github.com/comfusion/after-dark/commit/8a0317f))
<a name="1.1.0"></a>
# [1.1.0](https://github.com/comfusion/after-dark/compare/v1.0.0...v1.1.0) (2017-03-30)
### Features
* **shortcodes:** add blockquote shortcode ([ea293e3](https://github.com/comfusion/after-dark/commit/ea293e3))
<a name="1.0.0"></a>
# 1.0.0 (2017-03-30)
### Bug Fixes
* 404 page theme color url ref ([79d2377](https://github.com/comfusion/after-dark/commit/79d2377))
* add add theme color to 404 page ([4f5ec87](https://github.com/comfusion/after-dark/commit/4f5ec87))

+ 7
- 0
themes/hugo-after-dark/LICENSE View File

@ -0,0 +1,7 @@
ISC License (ISC)
Copyright 2017 Josh Habdas
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+ 504
- 0
themes/hugo-after-dark/README.md View File

@ -0,0 +1,504 @@
<h1 align="center">After Dark</h1>
<p align="center">
<strong>A simple, yet highly configurable responsive dark theme for the <a target="intro" href="https://gohugo.io/">Hugo</a> static site generator.</strong>
</p>
<img align="center" src="https://raw.githubusercontent.com/comfusion/after-dark/master/images/minimal-mac.png" title="After Dark running on a MacBook and iPhone" alt="After Dark theme screenshots">
<p align="center">
<a href="https://www.npmjs.com/package/after-dark"><img src="https://img.shields.io/npm/dm/after-dark.svg" alt="NPM downloads per month"></a>
<a href="https://www.npmjs.com/package/after-dark"><img src="https://img.shields.io/npm/v/after-dark.svg" alt="Latest NPM version"></a>
<a href="https://github.com/comfusion/after-dark/blob/master/LICENSE"><img src="https://img.shields.io/github/license/comfusion/after-dark.svg" alt="Project license"></a>
</p>
## Features
<details>
<summary style="margin-bottom:1em">
View the full list of features
</summary>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
<tr>
<td>Deceptive Simplicity</td>
<td>After Dark is a <a target="feature" href="http://themes.gohugo.io/">Hugo theme</a>, making it a suitable starting point for <b>novice and advanced developers</b> alike. It advances using the "Code for today, not for tomorrow" philosophy of <abbr title="eXtreme Programming">XP</abbr>, and includes only what's necessary to create and run your site &ndash; nothing more.</td>
</tr>
<tr>
<td>Semantic Versioning</td>
<td>Predictable changes enable theme users stay up-to-date with what's happening. After Dark uses <a target="feature" href="http://semver.org/">Semantic Versioning</a> and maintains a <a target="feature" href="https://github.com/comfusion/after-dark/blob/master/CHANGELOG.md">CHANGELOG</a> for easy consumption.</td>
</tr>
<tr>
<td>Inclusive Design</td>
<td>Optimized for mobile, tablet, desktop and <kbd>terminal</kbd> browsers.</td>
</tr>
<tr>
<td>Performance Optimized</td>
<td>Page content and styles <b>load in a single request</b> on all pages. External resources, if present, are loaded asynchronously, and only when necessary. This keeps pages zippy, and affords <b>~1 second page loads over 2G</b> when hosted using a <abbr title="Content Delivery Network">CDN</abbr>.</td>
</tr>
<tr>
<td>Vertical Scaling</td>
<td>After Dark is capable of generating <b>~1000 pages per second</b> thanks to <a target="feature" href="https://gohugo.io/">Hugo</a>, and is likely to become faster over time.</td>
</tr>
<tr>
<td><a href="#seo-and-ux">Search Awareness</a></td>
<td>Using <a target="feature" href="https://moz.com/learn/seo/schema-structured-data">Schema Structured Data</a> and meta tags, After Dark gives crawlers rich data about the site structure, page and page author. No configuration required.</td>
</tr>
<tr>
<td><a href="#opengraph">Social Awareness</a></td>
<td>After Dark provides automatic and configurable <a target="feature"href="http://ogp.me/">OpenGraph</a> support, making social shares pop like 37 pieces of flair.</td>
</tr>
<tr>
<td><a href="#theme-variants">Personalization</a></td>
<td>Not completely satisfied with the default look-and-feel? Customize the theme to your liking using one of the available theme variants provided by <a target="feature" href="http://hackcss.com/">hack.css</a>.</td>
</tr>
<tr>
<td><a href="#section-menu">Section Menu</a></td>
<td>Add and customize your site's global navigation. After Dark uses Hugo's <a target="feature" href="https://gohugo.io/extras/menus#section-menu-for-the-lazy-blogger">Section Menu for "the Lazy Blogger"</a>, making navigation easy to create and predictable to use. Don't want navigation? Simply disable it from your site configuration.</td>
</tr>
<tr>
<td><a href="#intelligent-lazyloading">Intelligent Lazyloading</a></td>
<td>Lazyload your images, iFrames and script embeds. After Dark uses the <a title="feature" href="https://github.com/aFarkas/lazysizes">lazysizes</a> library, a zero-configuration JavaScript library with support for <abbr title="Low Quality Image Placeholders">LQIP</abbr> and responsive images.</td>
</tr>
<tr>
<td><a href="#related-content">Related Content</a></td>
<td>Promote more of your content to your site visitors. By offering your readers more content that's relevant to them you can <b>increase your site's page views</b>, the time spent on your site and reader loyalty.</td>
</tr>
<tr>
<td><a href="#table-of-contents">Table Of Contents</a></td>
<td>Help users locate and share information on your site. By providing a <abbr title="Table Of Contents">TOC</abbr>, users will spend less time scrolling to locate information in larger documents, and are more likely to <i>deep link</i> to specific information on a page.</td>
</tr>
<tr>
<td>Analytics</td>
<td>Understand and action on user behavior by enabling Google Analytics. After Dark uses the <a target="feature" href="https://developers.google.com/analytics/devguides/collection/analyticsjs/">async tracking snippet</a> to boost performance and allow script preloading.</td>
</tr>
<tr>
<td>User Generated Content</td>
<td>Improve search rankings and provide interactivity to users with <abbr title="User Generated Content">UGC</abbr>. Enable <a target="feature" href="https://disqus.com/">Disqus</a> commenting to get started.</td>
</tr>
<tr>
<td>Reading Time</td>
<td>Set user expectations up-front. After Dark provides <b>estimated reading time</b> for each post near the top of the page. This feature is automatic and assumes a reading speed of 200-250 words per minute.</td>
</tr>
<tr>
<td><a href="#modification-dating">Modification Dating</a></td>
<td>Surface recently updated content to users and crawlers, allowing them to understand when a post or page was was last modified. Recently updated posts will be flagged as modified, and visually lifted upwards in chronological listings.</td>
</tr>
<tr>
<td><a href="#syntax-highlighting">Syntax Highlighting</a></td>
<td>Share code snippets with style. After Dark provides <b>opt-in syntax highlighting</b> with support for line numbers and highlighted lines.</td>
</tr>
<tr>
<td>Taxonomy Pages</td>
<td>Help users discover taxonomic content. After Dark automatically generates <b>taxonomy and taxonomy terms pages</b>, and links to them in post bylines.</td>
</tr>
<tr>
<td>Post Bylines</td>
<td>Rich post bylines include optional author name, word count, links to taxonomy pages and metadata for search engines.</td>
</tr>
<tr>
<td>Pagination</td>
<td>Pagination can be hard. After Dark makes it easy with simple list pagination with page indication.</td>
</tr>
<tr>
<td>Animated Error Page</td>
<td>Decrease bounce rate when URL errors occur. After Dark provides an <a target="feature" href="https://hackcabin.com/post/after-dark-error-page-redesign/">engaging 404 page</a> with animated background.</td>
</tr>
<tr>
<td>Accessibility</td>
<td>After Dark uses semantic HTML5 markup to provide a better experience for aural readers and facilitates <b>navigation via keyboard</b> only.</td>
</tr>
</tbody>
</table>
</details>
## Demo & Tutorial
Head to [Hack Cabin](https://hackcabin.com) for a **live example** running on <abbr title="Amazon Web Services">AWS</abbr> and learn more about the [site architecture](https://hackcabin.com/post/initial-commit/). I've also written a [step-by-step guide](http://go.habd.as/zero-to-http-2) to hosting After Dark on Amazon, which includes a **free year of hosting**. For cloud hosting using a VPS, [Vultr](http://go.habd.as/2oiL54G) and [DigitalOcean](http://go.habd.as/2oDN04T) are options.
## Getting Started
[Install Hugo](https://gohugo.io/#action) on your machine and use it to create a new site. Instructions for [Homebrew](https://brew.sh/) on macOS:
```shell
brew install hugo
hugo new site flying-toasters && cd $_
```
Clone After Dark and use it to serve your site:
```shell
(cd themes; git clone https://github.com/comfusion/after-dark)
hugo serve --theme=after-dark
```
Copy custom archetypes to your site:
```shell
cp themes/after-dark/archetypes/* archetypes
```
Finally, include the settings in your site's `config.toml`:
```toml
baseurl = "https://c74ce35e.ngrok.io" # Controls base URL
languageCode = "en-US" # Controls html lang attribute
title = "After Dark" # Homepage title and page title suffix
paginate = 5 # Number of posts to show before paginating
# theme = "after-dark" # Uncomment to use as default theme
enableRobotsTXT = true # Suggested, enable robots.txt file
googleAnalytics = "" # Optional, add tracking Id for analytics
disqusShortname = "" # Optional, add Disqus shortname for comments
SectionPagesMenu = "main" # Enable menu system for lazy bloggers
footnoteReturnLinkContents = "↩" # Provides a nicer footnote return link
[params]
description = "" # Suggested, controls default description meta
author = "" # Optional, controls author name display on posts
hide_author = false # Optional, set true to hide author name on posts
show_menu = false # Optional, set true to enable section menu
powered_by = true # Optional, set false to disable credits
images = [] # Suggested, controls default OpenGraph images
theme_variant = "" # Optional, for use to overriding default theme
```
That's it! Everything else is optional. Read on to learn how to configure specific features and customize the theme.
## Customizing
### Section Menu
Theme uses [Section Menu for Lazy Bloggers](https://gohugo.io/extras/menus/#section-menu-for-the-lazy-blogger) to produce global site navigation, if enabled.
To customize the menu, update the settings in `config.toml` like:
```toml
[[menu.main]]
name = "Home"
weight = 1
identifier = "home"
url = "/"
[[menu.main]]
name = "Posts"
weight = 2
identifier = "post"
url = "/post/"
```
Or update the menu using front matter from your pages:
```toml
menu = "main"
weight = 3
```
### Intelligent Lazyloading
Lazyloading prioritizes when and how images and more are downloaded, improving perceived performance and reducing page load times. When activated, lazyloading will start working automatically. No JavaScript configuration is necessary.
**What makes it _Intelligent_?** If no lazyloaded content is detected on a page when the site is generated, the feature will not be activated and no additional downloads will occur.
To activate lazyloading with [lazysizes], add `lazyload` to the `class` attribute of your images/iframes in conjunction with a `data-src` and/or `data-srcset` attribute:
```html
<!-- non-responsive -->
<img data-src="image.jpg" class="lazyload">
```
```html
<!-- responsive with automatic sizes calculation -->
<img
data-sizes="auto"
data-src="image2.jpg"
data-srcset="image1.jpg 300w, image2.jpg 600w, image3.jpg 900w"
class="lazyload">
```
```html
<!-- iframe example -->
<iframe frameborder="0"
class="lazyload"
allowfullscreen
data-src="//www.youtube.com/embed/ZfV-aYdU4uE">
</iframe>
```
Additional information and examples, including how to set-up and use LQIP (Low-Quality Image Placeholders), are available on the [lazysizes] repository on GitHub.
### Related Content
Promote more of your content to your site visitors. By offering your readers more content that's relevant to them you can increase your site's page views, the time spent on your site and reader loyalty.
Related content surfaces content across sections by matching taxonomy tags. If After Dark finds related content it will automatically output a list of links to that content in reverse chronological order below the byline of your post content.
By default After Dark will display up to 7 items by title along with their reading times. You can limit the number of items displayed by setting the following optional parameter in the `[params]` section of your `config.toml` file:
```toml
related_content_limit = 5
```
### Table Of Contents
Help users locate and share information on your site. By providing a <abbr title="Table Of Contents">TOC</abbr>, users will spend less time scrolling to location information in larger documents, and are more likely to deep to specific information on a page.
To automatically generate a TOC for a post based on the [page outline](https://gsnedders.html5.org/outliner/), add the following to your post front matter:
```toml
toc = true
```
To hide the TOC set `toc = false`, or simply remove the setting from the post front matter.
After Dark uses the HTML5 [`details`](http://devdocs.io/html/element/details) and [`summary`](http://devdocs.io/html/element/summary) elements to provide a TOC which does not require use of CSS or JavaScript to function.
When a page is first loaded, the TOC will be collapsed so it does not clutter up the page. Once expanded, selecting an item in the TOC will smooth scroll to that section within the document, highlight the section header and updating the browser's location bar for deep linking and back-button support.
### OpenGraph
After Dark leverages OpenGraph tags using the *undocumented* [internal template](https://github.com/spf13/hugo/blob/95ad3ad2fa3e6f4514166b47b77f051d280c16e9/tpl/template_embedded.go#L161-L204) to achieve rich sharing cards for Facebook and other social networks, as shown here:
![OpenGraph image with author attribution](https://cloud.githubusercontent.com/assets/440298/22554715/156ba7f0-e99c-11e6-9d5b-14f0ac4fe496.png)
Specify `author` in `config.toml` and, optionally, override it from your post front matter:
```toml
title = "Become a Digital Nomad in Bali: The Lost Guide"
description = "Everything you need to know to become a Digital Nomad in Bali."
author = "After Dark"
date = "2017-02-02T11:57:24+08:00"
publishdate = "2017-01-28T02:31:22+08:00"
images = [
"https://source.unsplash.com/-09QE4q0ezw/2000x1322"
]
```
To configure a site-wide OpenGraph images and fallbacks for posts not specifying their own, add the following to your site parameters in `config.toml` in the `[params]` section:
```toml
images = [
"https://source.unsplash.com/-09QE4q0ezw/2000x1322" # Default OpenGraph image for site
]
```
Test how things are looking during development using a combination of the [Facebook Sharing Debugger](https://developers.facebook.com/tools/debug/) and [ngrok](https://ngrok.com/).
### SEO and UX
After Dark is built with SEO in mind. Aside from OpenGraph, Schema Structured Data and SEO meta is applied to give robots what they want, automatically, without any user configuration necessary. This helps ensure your After Dark site will rank well in Search Engine Results Pages (SERPs) and prevent crawlers from indexing undesirable content.
Fine-tune your SEO settings using the following available options.
### Webmaster Verification
Verify your site with several webmaster tools including Google, Bing, Alexa and Yandex. To allow verification of your site with any or all of these providers simply add the following to your `config.toml` and fill in their respective values:
```toml
[params.seo.webmaster_verifications]
google = "" # Optional, Google verification code
bing = "" # Optional, Bing verification code
alexa = "" # Optional, Alexa verification code
yandex = "" # Optional, Yandex verification code
```
**Note:** Claiming your site with Alexa was [retired in May 2016](https://support.alexa.com/hc/en-us/articles/219135887-Claiming-has-been-retired-May-2016). However, Alexa verification has been added as a convenience for existing sites migrating to After Dark.
### Meta Descriptions
Well-crafted page titles help catch the human eye on search results pages. And meta descriptions provide a summary of the content and why its relevant for the reader, driving click-throughs.
To add a custom meta description to your pages and posts add `description` to the front matter:
```toml
description = "Everything you need to know to become a Digital Nomad in Bali."
```
In addition to appearing in search engines, meta descriptions also appear on individual pages and in content summaries in After Dark, adding transparency to how your page will appear in search.
If no custom description is provided After Dark will fallback to the description provided in `config.toml`. Learn more on [how to craft your meta descriptions](https://moz.com/learn/seo/meta-description).
### Modification Dating
Help user agents know when posts were last modified. To do so add `publishdate` to your page front matter and update `date` anytime you make an update to a post.
Updates will be made visible to readers by surfacing content higher in your page and post listings, and using using visible callouts on content summaries. For robots, making this change will automatically update Schema Structured Data and Web feeds, as well as the `lastmod` setting your `sitemap.xml` file.
You can be specific and use a datetime (with timezone offset) like:
```
date = "2017-02-02T01:20:56-06:00"
publishdate = "2016-11-21T10:32:33+08:00"
```
Or less specific and use just the dates:
```
date = "2017-02-02"
publishdate = "2016-11-21"
```
Review the W3C website for more [information on dates and times](https://www.w3.org/TR/html51/infrastructure.html#dates-and-times) for the Web infrastructure.
### Link Types
For related content split across multiple pages in a sequence After Dark supports use of `prev` and `next` settings in your front matter.
Learn more about [link types](http://devdocs.io/html/link_types).
### Index Blocking
Just because a page appears in your `sitemap.xml` does not mean you want it to appear in a SERP. Examples of pages which will appear in your `sitemap.xml` that you typically do not want indexed by crawlers include error pages, search pages, legal pages, and pages that simply list summaries of other pages.
Though it's possible to block search indexing from a `robots.txt` file, After Dark makes it possible to block page indexing using Hugo configuration as well. By default the following page types will be blocked:
- Section Pages (e.g. Post listings)
- Taxonomy Pages (e.g. Category and Tag listings)
- Taxonomy Terms Pages (e.g. Pages listing taxonomies)
To customize default blocking configure the `noindex_kinds` setting in the `[params]` section of your `config.toml`. For example, if you want to enable crawling for sections appearing in [Section Menu](#adding-a-section-menu) add the following to your configuration file:
```
[params]
noindex_kinds = [
"taxonomy",
"taxonomyTerm"
]
```
To block individual pages from being indexed add `nofollow` to your page's front matter and set the value to `true`, like:
```toml
noindex = true
```
And, finally, if you're using Hugo `v0.18` or better, you can also add an `_index.md` file with the `noindex` front matter to control indexing for specific section list layouts:
```shell
├── content
│ ├── modules
│ │ ├── starry-night.md
│ │ └── flying-toilets.md
│ └── news
│ ├── _index.md
│ └── return-flying-toasters.md
```
To learn more about how crawlers use this feature read [block search indexing with meta tags](https://support.google.com/webmasters/answer/93710).
### Markdown Output
Gain more control over markdown conversion to HTML. By modifying the markdown processor settings you can take advantage of [Blackfriday](https://github.com/russross/blackfriday) features not enabled by default.
To customize conversion output add a `[blackfriday]` section to your site's `config.toml` file like so:
```toml
[blackfriday]
hrefTargetBlank = true
fractions = false
```
Overrides to theme markdown processing defaults are available from page front matter as well, giving you control on a page-by-page basis.
See the Hugo docs for additional [configuration options](http://gohugo.io/overview/configuration/#configure-blackfriday-rendering).
### Shortcodes
Keep your content <abbr title="Don't Repeat Yourself">DRY</abbr> and improve thematic consistency across your site. To help achieve this, Hugo provides [Shortcodes](https://gohugo.io/extras/shortcodes).
Shortcodes are very powerful, and can be used to achieve functionality not otherwise available in the markdown processor. Hugo provides a number of [built-in shortcodes](https://gohugo.io/extras/shortcodes#built-in-shortcodes) you can use on your site. And After Dark provides some as well.
Here's the `blockquote` shortcode provided by After Dark:
```html
<blockquote {{ with .Get "class" }}class="{{ . }}"{{ end }} {{ with .Get "citelink" }}cite="{{ . }}"{{ end }}>
{{ .Inner }}
{{ with .Get "citelink" }}
<cite><a target="_blank" href="{{ . }}">{{ $.Get "cite" }}</a></cite>
{{ else }}
<cite>{{ .Get "cite" }}</cite>
{{ end }}
</blockquote>
```
Use it in your markdown files like:
```html
{{< blockquote cite="Bitly" citelink="https://bitly.is/2mkxskj" >}}
<p>When you create your own Branded Short Domain, you can expect to see up to a 34% increase in CTR when compared to standard bit.ly links.</p>
{{< /blockquote >}}
```
Additional theme-provided shortcodes at your disposal:
- `figure` - Similar to the Hugo built-in, but with [Intelligent Lazyloading](#intelligent-lazyloading), an adjusted caption title and smaller caption text.
To create your own custom shortcodes add a `layouts/shortcodes` directory to your site, place your shortcodes within and start using them in your markdown content.
Reference the Hugo docs for [shortcode usage instructions](https://gohugo.io/extras/shortcodes#using-a-shortcode).
### Syntax Highlighting
Provide a richer experience when sharing code snippets on your site. After Dark provides support for code highlighting using the lovely [One Dark](https://github.com/atom/one-dark-syntax) or [One Light](https://github.com/atom/one-light-syntax) syntax themes used in [Atom](https://github.com/atom/atom).
**Why not use Highlight.js?** Because it's slow, doesn't support line numbers or highlighting of individual lines. In addition, JS-based solutions force browsers to do the same work over and over when that work can be done once during site generation.
To set-up syntax highlighting for your After Dark site:
- Follow Hugo's [Pygments installation](https://gohugo.io/extras/highlighting/#pygments) instructions.
- Open the `themes/after-dark` folder and run `npm i` (assumes NPM installed)
- Then open `./node_modules/atom-one-pygments` and `npm i`
- Once dependencies are installed, issue `npm run build` to generate the stylesheets to the `./dist` directory
Then choose either `./dist/light.css` or `dark.css` depending on your [Theme Variant](#theme-variants), and copy the contents of the file into your [Custom CSS](#custom-css) file.
Once configured, syntax highlighting can be achieved using the Hugo built-in [`highlight` shortcode](https://gohugo.io/extras/shortcodes#highlight). Reference Hugo's Syntax Highlighting docs for [additional usage instructions](https://gohugo.io/extras/highlighting/#usage).
### Custom CSS
To add your own theme css or override existing CSS without having to change theme files do the following:
1. Create a `critical-custom.css.html` in your site's `layouts/partials directory`.
1. Add your customizations inside a `style` element.
Example customization file:
```html
<style media="screen">
.hack ul li {
margin: 0;
}
</style>
```
Your customizations will automatically be added to generated pages, inline in the document `HEAD`. Thanks to [@rsommerard](https://github.com/rsommerard) for making the suggestion.
### Theme Variants
[`hack.css`](http://hackcss.com/) provides a few variants you may wish to use instead of the After Dark defaults. To download them do an `npm i` from `/themes/after-dark/` (assumes NPM installed).
Once downloaded, open `node_modules/hack/dist` directory and replace the CSS contents of `critical-vendor.css.html` with those you wish to use, updating the `theme_variant` setting in the site configuration like:
theme_variant = "standard dark-grey"
**Why not use external CSS files?** After Dark is optimized for speed, and, as a result, limits the number of HTTP requests whenever possible. This just so happens to be of those occasions.
Once the vendor file is updated, open your favorite dev tools and test the changes by previewing your site on mobile, tablet and desktop at different display resolutions and orientations, making any tweaks necessary to `critical-theme.css.html`.
And, finally, adjust your [Customized CSS](#custom-css), 404 page and `/meta/theme-color` as necessary.
## Contributing
If you've spotted a bug or would like to make an enhancement suggestion, please [open an issue on GitHub](https://github.com/comfusion/after-dark/issues). Build something awesome with After Dark? [Add it to the wiki](https://github.com/comfusion/after-dark/wiki) for others to see. For general questions or support, please feel free to reach out to me directly at: [https://habd.as/contact](https://habd.as/contact). Thanks!
## License
[ISC](https://github.com/comfusion/after-dark/blob/master/LICENSE)
[lazysizes]: https://github.com/aFarkas/lazysizes

+ 3
- 0
themes/hugo-after-dark/archetypes/default.md View File

@ -0,0 +1,3 @@
+++
description = ""
+++

+ 6
- 0
themes/hugo-after-dark/archetypes/post.md View File

@ -0,0 +1,6 @@
+++
description = ""
draft = true
categories = [""]
tags = ["", ""]
+++

BIN
themes/hugo-after-dark/images/design/dark_code_editor_window.sketch View File


BIN
themes/hugo-after-dark/images/design/minimalMacbook.sketch View File


BIN
themes/hugo-after-dark/images/minimal-mac.png View File

Before After
Width: 2400  |  Height: 1800  |  Size: 548 KiB

BIN
themes/hugo-after-dark/images/screenshot.png View File

Before After
Width: 3000  |  Height: 2000  |  Size: 556 KiB

BIN
themes/hugo-after-dark/images/terminal.png View File

Before After
Width: 1848  |  Height: 1272  |  Size: 735 KiB

BIN
themes/hugo-after-dark/images/tn.png View File

Before After
Width: 1800  |  Height: 1200  |  Size: 276 KiB

+ 100
- 0
themes/hugo-after-dark/layouts/404.html
File diff suppressed because it is too large
View File


+ 50
- 0
themes/hugo-after-dark/layouts/_default/baseof.html View File

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
{{ .Hugo.Generator }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ block "title" . }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
{{ with .Description }}
<meta name="description" content="{{ . }}">
{{ end }}
{{ $default_noindex_kinds := slice "section" "taxonomy" "taxonomyTerm" }}
{{ $noindex_kinds := .Site.Params.noindex_kinds | default $default_noindex_kinds }}
{{ $is_noindex_true := and (isset .Params "noindex") .Params.noindex }}
{{ if or (in $noindex_kinds .Kind) ($is_noindex_true) }}
<meta name="robots" content="noindex">
{{ end }}
{{ partial "meta/name-author" . }}
{{ template "_internal/opengraph.html" . }}
{{ partial "meta/ogimage-maybe" . }}
{{ partial "meta/theme-color" . }}
{{ if eq .Kind "home" }}
{{ partial "site-verification" . }}
{{ end }}
{{ template "_internal/google_analytics_async.html" . }}
{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
<link rel="canonical" href="{{ .Permalink }}">
{{ if (isset .Params "prev") }}
<link rel="prev" href="{{ .Params.prev }}">
{{ end }}
{{ if (isset .Params "next") }}
<link rel="next" href="{{ .Params.next }}">
{{ end }}
{{ partial "favicon" . }}
{{ partial "critical-vendor.css" }}
{{ partial "critical-theme.css" }}
{{ partial "critical-custom.css" }}
{{ $lazylist := findRE "class=\".*?\\blazyload\\b.*?\"|class=lazyload\b" .Content }}<!-- http://regexr.com/3f9d1 -->
{{ if ge (len $lazylist) 1 }}
<script async src="/js/lazysizes.min.js"></script>
{{ end }}
</head>
{{ $theme_variant := .Site.Params.theme_variant | default "hack dark" }}
<body class="{{ $theme_variant }} main container">
<header>{{ block "header" . }}{{ end }}</header>
<main>{{ block "main" . }}{{ end }}</main>
<footer>{{ block "footer" . }}{{ end }}</footer>
</body>
</html>

+ 15
- 0
themes/hugo-after-dark/layouts/_default/list.html View File

@ -0,0 +1,15 @@
{{ define "header" }}
{{ partial "menu" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
</header>
{{ range .Paginator.Pages }}
{{ partial "page-summary" . }}
{{ end }}
{{ end }}
{{ define "footer" }}
{{ partial "pagination" . }}
{{ partial "powered-by" . }}
{{ end }}

+ 15
- 0
themes/hugo-after-dark/layouts/_default/single.html View File

@ -0,0 +1,15 @@
{{ define "title" -}}
{{ .Title }} | {{ .Site.Title }}
{{- end }}
{{ define "header" }}
{{ partial "menu" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
</header>
{{ .Content }}
{{ end }}
{{ define "footer" }}
{{ partial "powered-by" . }}
{{ end }}

+ 15
- 0
themes/hugo-after-dark/layouts/_default/taxonomy.html View File

@ -0,0 +1,15 @@
{{ define "header" }}
{{ partial "menu" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
</header>
{{ range .Paginator.Pages }}
{{ partial "page-summary" . }}
{{ end }}
{{ end }}
{{ define "footer" }}
{{ partial "pagination" . }}
{{ partial "powered-by" . }}
{{ end }}

+ 16
- 0
themes/hugo-after-dark/layouts/_default/terms.html View File

@ -0,0 +1,16 @@
{{ define "header" }}
{{ partial "menu" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
</header>
<ul>
{{ range $key, $value := .Data.Terms }}
<li><a href="{{ $key | urlize }}">{{ $key }}</a> ({{ len $value }})
{{ end }}
</ul>
{{ end }}
{{ define "footer" }}
{{ partial "powered-by" . }}
{{ end }}

+ 18
- 0
themes/hugo-after-dark/layouts/index.html View File

@ -0,0 +1,18 @@
{{ define "title" -}}
{{ .Site.Title }}
{{- end }}
{{ define "header" }}
{{ partial "menu" . }}
{{ end }}
{{ define "main" }}
<header>
<h1>{{ .Title }}</h1>
</header>
{{ range (.Paginate (where .Data.Pages "Type" "post")).Pages }}
{{ partial "page-summary" . }}
{{ end }}
{{ end }}
{{ define "footer" }}
{{ partial "pagination" . }}
{{ partial "powered-by" . }}
{{ end }}

+ 3
- 0
themes/hugo-after-dark/layouts/partials/critical-custom.css.html View File

@ -0,0 +1,3 @@
<!-- {{/*
Placholder file for theme CSS customizations
*/}} -->

+ 59
- 0
themes/hugo-after-dark/layouts/partials/critical-theme.css.html View File

@ -0,0 +1,59 @@
<style media="screen">
@keyframes intro {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.muted {
color: rgba(255, 255, 255, 0.5);
}
main, footer {
animation: intro 0.3s both;
animation-delay: 0.15s;
}
:target {
color: #fff;
}
/* hack.css overrides and enhancements */
.hack li ul {
margin: 0;
}
.main {
padding: 20px 10px;
}
nav a.active {
background-color: #ff2e88;
color: #fff;
}
a[itemprop="url"] {
color: #ff9800;
}
a[itemprop="url"]:hover {
color: #fff;
}
a[target="_blank"]::after {
/* svg icon for external links in pop-up window thanks to @Fastidious for the idea */
content: " " url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" class=\"i-external\" viewBox=\"0 0 32 32\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"#ff9800\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"9.38%\"><path d=\"M14 9 L3 9 3 29 23 29 23 18 M18 4 L28 4 28 14 M28 4 L14 18\" /></svg>");
}
html {
font-size: 13px;
}
.hack pre {
font-size: 17px;
}
article [itemprop="description"] {
margin-bottom: 20px;
margin-top: 20px;
}
@media screen and (min-width: 768px) {
html {
font-size: 1em;
}
.container {
max-width: 50rem;
}
}
</style>

+ 4
- 0
themes/hugo-after-dark/layouts/partials/critical-vendor.css.html
File diff suppressed because it is too large
View File


+ 127
- 0
themes/hugo-after-dark/layouts/partials/favicon.html View File

@ -0,0 +1,127 @@
<link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAG+ZJREFU
eAHNmudzHEd6xt/NETkSBEEwiJk8SlS05DtXqc6fr8r2J/+V9jfflSWfpTtlSmISSDGByFh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wSS/fhVjRlgRLt2FrW5hMFFM22c6XSwI6SozbIfi1gIYJc064XG+1LNc
pc8PJJB0kZQDptZAe3525N5R6MF07tBa1RwT3ZXvcTfMA3a5h6wZsJLk/RG8IXpe0DSUJkIAoD57
bgDVENQloAJWOE+gpKanMBlGRWFAHMLFf8CZn7IQIKHXLjuU7YlhekiTJDowAHdtFUClyAclgGQX
V7ZV7NsOnnZXhDMmPx9w8ZbWI1G4SNKN8pf/9CFeCZKaVN4LYPBLLelptullDqmVzvoIrceu+YnM
EGlskqwMiSqIUe4dJrgJ4d8yBEgjSF0gqB0qEkN+HQpTuPYxE87EBUICWO0CN1GjPEQWWpxh9A5Q
vouNVyVx1q1SW9D8WYtFqs8vef+9p0/ezn2v7qUBav6skV/IAHHAvcAbsm1JNIWYcfGcibshVlJP
QWGG6yzApRqCwljFDoTkMFKDwH3+AeQkQITASLwJgaQURuBmeDIrc13mGvoDD+Rm1ldBC84iP2DC
fvdLT88yYPDlv8gATegm21+BpAdWuQPa2cxQYYLKDJwZ5pyFE0MqVoC4fdyFAMipOsyQx+gAFm2O
GpRXcBt1CBYT9JuANubALWep+aBEAnIHewaJeB3Xns6nxtqn+TnVUL8OmQcW4BIiSToNA1JiAmGd
tqokJyUdHWywhXk0XGU3II4wH+KDUFVuVQQHR/Adt880z4Rnul/T7YEMeNnYg8xxjKAD2t0RQ+pi
jJasrM9JHpMQoTocKVCL4IPr/fOT+fzoT3p+SelrFs2odf2vmwZACVzT9SAJ8iKO6OCx+/tKkw2M
87ouX+gG/5oJPLGeKE+sP/81Y/xfv/NKDPCLH2SA+vz9U+rwuNN/9f/jLCG+0tK8FnhyXmkwP8jf
8PzKDPgbrvUXmep/AP7954PFaszmAAAAAElFTkSuQmCC">

+ 8
- 0
themes/hugo-after-dark/layouts/partials/menu.html View File

@ -0,0 +1,8 @@
{{ if ne .Site.Params.show_menu false }}
<nav itemscope itemtype="http://schema.org/SiteNavigationElement">
{{ $currentNode := . }}
{{ range .Site.Menus.main }}
<a itemprop="url" class="{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}active{{end}}" href="{{ .URL }}"><span itemprop="name">{{ .Name }}</span></a>
{{ end }}
</nav>
{{ end }}

+ 8
- 0
themes/hugo-after-dark/layouts/partials/meta/name-author.html View File

@ -0,0 +1,8 @@
<!-- {{/*
Undocumented Facebook feature parses author name for social sharing
*/}}-->
{{ if isset .Params "author" }}
<meta name="author" content="{{ index .Params "author" }}">
{{ else }}
<meta name="author" content="{{ .Site.Params.author }}">
{{ end }}

+ 13
- 0
themes/hugo-after-dark/layouts/partials/meta/ogimage-maybe.html View File

@ -0,0 +1,13 @@
<!-- {{/*
Hack to allow generic site image for Nodes until supported
by the Hugo internal opengraph template.
*/}}-->
{{ if and (.IsNode) (.Site.Params.images) }}
<meta property="og:image" content="{{ index .Site.Params.images 0 }}">
{{ end }}
<!-- {{/*
If specified, fallback to site image if not overriden at Page level
*/}}-->
{{ if and (.IsPage) (not .Params.images) (.Site.Params.images) }}
<meta property="og:image" content="{{ index .Site.Params.images 0 }}">
{{ end }}

+ 1
- 0
themes/hugo-after-dark/layouts/partials/meta/theme-color.html View File

@ -0,0 +1 @@
<meta name="theme-color" content="#000">

+ 19
- 0
themes/hugo-after-dark/layouts/partials/page-summary.html View File

@ -0,0 +1,19 @@
<article itemscope itemtype="http://schema.org/CreativeWork">
<header>
<h2 itemprop="headline">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h2>
{{ if eq .Type "post" }}
<p class="muted">{{ partial "post/meta" . }}</p>
{{ end }}
</header>
{{ if .Description }}
<blockquote itemprop="about">{{ .Description }}</blockquote>
{{ end }}
<div itemprop="description">
{{ .Summary }}
</div>
{{ if .Truncated }}
<p><a itemprop="url" href="{{ .RelPermalink }}">Read More&nbsp;&raquo;</a></p>
{{ end }}
</article>

+ 11
- 0
themes/hugo-after-dark/layouts/partials/pagination.html View File

@ -0,0 +1,11 @@
<nav>
<p>
{{if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}">&laquo; Previous</a> |
{{ end }}
<span>Page {{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}</span>
{{ if .Paginator.HasNext }}
| <a href="{{ .Paginator.Next.URL }}">Next &raquo;</a>
{{ end }}
</p>
</nav>

+ 20
- 0
themes/hugo-after-dark/layouts/partials/post/byline.html View File

@ -0,0 +1,20 @@
<p>
Published
{{ if ne .Site.Params.hide_author true }}
{{ with .Params.author }}
by <span itemprop="author">{{ index . }}</span>
{{ else }}
by <span itemprop="author">{{ .Site.Params.author }}</span>
{{ end }}
{{ end }}
<time datetime="{{ dateFormat "2006-01-02T15:04:05-07:00" (default .Date (.PublishDate)) }}">
{{ dateFormat "2 Jan, 2006" (default .Date (.PublishDate)) }}
</time>
{{ with .Params.categories }}
in <span itemprop="articleSection">{{ delimit (apply (apply (sort .) "partial" "post/category-link" ".") "chomp" ".") ", " " and " }}</span>
{{ end }}
{{ with .Params.tags }}
and tagged {{ delimit (apply (apply (sort .) "partial" "post/tag-link" ".") "chomp" ".") ", " " and " }}
{{ end }}
using <span itemprop="wordCount">{{ .WordCount }}</span> words.
</p>

+ 1
- 0
themes/hugo-after-dark/layouts/partials/post/category-link.html View File

@ -0,0 +1 @@
<a href="/categories/{{ . | urlize }}/">{{ . }}</a>

+ 15
- 0
themes/hugo-after-dark/layouts/partials/post/meta.html View File

@ -0,0 +1,15 @@
<svg style="margin-bottom:-3px" id="i-clock" viewBox="0 0 32 32" width="16" height="16" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="6.25%">
<circle cx="16" cy="16" r="14" />
<path d="M16 8 L16 16 20 20" />
</svg>
<span>{{ .ReadingTime }} minute read</span>
<svg style="margin-bottom: -3px" id="i-edit" viewBox="0 0 32 32" width="16" height="16" fill="none" stroke="currentcolor" stroke-linecap="round" stroke-linejoin="round" stroke-width="6.25%">
<path d="M30 7 L25 2 5 22 3 29 10 27 Z M21 6 L26 11 Z M5 22 L10 27 Z" />
</svg>
{{ if .PublishDate.IsZero }}
Published: <time datetime="{{ .Date.Format "2006-01-02T15:04:05-07:00" }}">{{ .Date.Format "2 Jan, 2006" }}</time>
{{ else if lt .PublishDate .Lastmod }}
Modified: <time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" }}">{{ .Lastmod.Format "2 Jan, 2006" }}</time>
{{ else }}
Published: <time datetime="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" }}">{{ .PublishDate.Format "2 Jan, 2006" }}</time>
{{ end }}

+ 15
- 0
themes/hugo-after-dark/layouts/partials/post/related-content.html View File

@ -0,0 +1,15 @@
{{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
{{ $.Scratch.Set "has_related" true }}
{{ end }}
{{ if $.Scratch.Get "has_related" }}
<aside>
<header>Related Content</header>
<ul>
{{ $num_to_show := .Site.Params.related_content_limit | default 7 }}
{{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> &ndash; {{ .ReadingTime }} minutes
{{ end }}
</ul>
</aside>
{{ end }}

+ 1
- 0
themes/hugo-after-dark/layouts/partials/post/tag-link.html View File

@ -0,0 +1 @@
<a href="/tags/{{ . | urlize }}/">{{ . }}</a>

+ 8
- 0
themes/hugo-after-dark/layouts/partials/powered-by.html View File

@ -0,0 +1,8 @@
{{ if ne .Site.Params.powered_by false }}
<p class="muted">
This page was generated using
<a target="_blank" rel="noopener" href="https://comfusion.github.io/after-dark/">After Dark</a>
for
<a target="_blank" rel="noopener" href="https://gohugo.io/">Hugo</a>.
</p>
{{ end }}

+ 12
- 0
themes/hugo-after-dark/layouts/partials/site-verification.html View File

@ -0,0 +1,12 @@
{{ if .Site.Params.seo.webmaster_verifications.google }}
<meta name="google-site-verification" content="{{ .Site.Params.seo.webmaster_verifications.google }}" />
{{ end }}
{{ if .Site.Params.seo.webmaster_verifications.bing }}
<meta name="msvalidate.01" content="{{ .Site.Params.seo.webmaster_verifications.bing }}">
{{ end }}
{{ if .Site.Params.seo.webmaster_verifications.alexa }}
<meta name="alexaVerifyID" content="{{ .Site.Params.seo.webmaster_verifications.alexa }}">
{{ end }}
{{ if .Site.Params.seo.webmaster_verifications.yandex }}
<meta name="yandex-verification" content="{{ .Site.Params.seo.webmaster_verifications.yandex }}">
{{ end }}

+ 20
- 0
themes/hugo-after-dark/layouts/partials/toc-maybe.html View File

@ -0,0 +1,20 @@
{{ if and (isset .Params "toc") .Params.toc }}
<details>
<summary>Table of Contents</summary>
{{ .TableOfContents }}
</details>
<script>
const el = document.querySelector('details summary')
el.onclick = () => {
(function(l,o,a,d,e,r){e=o.createElement(a),r=o.getElementsByTagName(a)[0];e.async=1;e.src=d;r.parentNode.insertBefore(e,r)})(window,document,'script','/js/smoothscroll.js');
el.onclick = null
}
document.querySelectorAll('#TableOfContents a').forEach(link => {
link.addEventListener('click', () => {
document.querySelector(
link.href.slice(link.href.indexOf('#'))
).scrollIntoView({ behavior: 'smooth' })
})
})
</script>
{{ end }}

+ 32
- 0
themes/hugo-after-dark/layouts/post/single.html View File

@ -0,0 +1,32 @@
{{ define "header" }}
{{ partial "menu" . }}
{{ end }}
{{ define "main" }}
<article itemscope itemtype="http://schema.org/BlogPosting">
{{ template "_internal/schema.html" . }}
<header>
<h1 itemprop="headline">{{ .Title }}</h1>
<p class="muted">{{ partial "post/meta" . }}</p>
</header>
{{ if .Description }}
<blockquote itemprop="description">{{ .Description }}</blockquote>
{{ end }}
{{ partial "toc-maybe" . }}
<div itemprop="articleBody">
{{ .Content }}
</div>
{{ if .Site.DisqusShortname }}
<article>
{{ template "_internal/disqus.html" . }}
</article>
{{ end }}
<footer>
<hr>
{{ partial "post/byline" . }}
{{ partial "post/related-content" . }}
</footer>
</article>
{{ end }}
{{ define "footer" }}
{{ partial "powered-by" . }}
{{ end }}

+ 8
- 0
themes/hugo-after-dark/layouts/shortcodes/blockquote.html View File

@ -0,0 +1,8 @@
<blockquote {{ with .Get "class" }}class="{{ . }}"{{ end }} {{ with .Get "citelink" }}cite="{{ . }}"{{ end }}>
{{ .Inner }}
{{ with .Get "citelink" }}
<cite><a target="_blank" href="{{ . }}">{{ $.Get "cite" }}</a></cite>
{{ else }}
<cite>{{ .Get "cite" }}</cite>
{{ end }}
</blockquote>

+ 35
- 0
themes/hugo-after-dark/layouts/shortcodes/figure.html View File

@ -0,0 +1,35 @@
<!--{{/*
Similar to the Hugo built-in, but with After Dark Intelligent Lazyloading,
an adjusted caption title and smaller caption text.
*/}}-->
<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}>
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
{{ if .Get "lqipsrc" }}
<img class="lazyload blur-up" src="{{ .Get "lqipsrc" }}" data-src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }} />
{{ else }}
<img class="lazyload" data-src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }} />
{{ end }}
{{ if .Get "link" }}</a>{{ end }}
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
<figcaption>{{ if isset .Params "title" }}
<header><b>{{ .Get "title" }}</b></header>{{ end }}
{{ if or (.Get "caption") (.Get "attr")}}
<small>{{ .Get "caption" }}
{{ with .Get "attrlink" }}<a href="{{ . }}"> {{ end }}
{{ .Get "attr" }}
{{ if .Get "attrlink"}}</a> {{ end }}
</small>{{ end }}
</figcaption>
{{ end }}
</figure>
<style media="screen">
.blur-up {
-webkit-filter: blur(5px);
filter: blur(5px);
transition: filter 400ms, -webkit-filter 400ms;
}
.blur-up.lazyloaded {
-webkit-filter: blur(0);
filter: blur(0);
}
</style>

+ 29
- 0
themes/hugo-after-dark/package.json View File

@ -0,0 +1,29 @@
{
"name": "after-dark",
"version": "1.2.0",
"description": "A simple, yet highly configurable responsive dark theme for the Hugo static site generator.",
"author": "Josh Habdas <josh@habd.as> (https://habd.as/)",
"keywords": [
"hugo",
"vaporwave",
"jamstack",
"theme"
],
"repository": "comfusion/after-dark",
"scripts": {
"copy:lazysizes": "cp -i node_modules/lazysizes/lazysizes.min.js static/js",
"copy:smoothscroll": "cp -i node_modules/smoothscroll-polyfill/dist/smoothscroll.js static/js",
"test": "echo \"Error: no test specified\" && exit 1",
"release": "standard-version"
},
"dependencies": {
"atom-one-pgyments": "^1.0.0",
"hack": "0.7.7",
"lazysizes": "^3.0.0-rc4",
"smoothscroll-polyfill": "^0.3.4"
},
"devDependencies": {
"standard-version": "^4.0.0"
},
"license": "ISC"
}

+ 2
- 0
themes/hugo-after-dark/static/js/lazysizes.min.js
File diff suppressed because it is too large
View File


+ 291
- 0
themes/hugo-after-dark/static/js/smoothscroll.js View File

@ -0,0 +1,291 @@
/*
* smoothscroll polyfill - v0.3.4
* https://iamdustan.github.io/smoothscroll
* 2016 (c) Dustan Kasten, Jeremias Menichelli - MIT License
*/
(function(w, d, undefined) {
'use strict';
/*
* aliases
* w: window global object
* d: document
* undefined: undefined
*/
// polyfill
function polyfill() {
// return when scrollBehavior interface is supported
if ('scrollBehavior' in d.documentElement.style) {
return;
}
/*
* globals
*/
var Element = w.HTMLElement || w.Element;
var SCROLL_TIME = 468;
/*
* object gathering original scroll methods
*/
var original = {
scroll: w.scroll || w.scrollTo,
scrollBy: w.scrollBy,
scrollIntoView: Element.prototype.scrollIntoView
};
/*
* define timing method
*/
var now = w.performance && w.performance.now
? w.performance.now.bind(w.performance) : Date.now;
/**
* changes scroll position inside an element
* @method scrollElement
* @param {Number} x
* @param {Number} y
*/
function scrollElement(x, y) {
this.scrollLeft = x;
this.scrollTop = y;
}
/**
* returns result of applying ease math function to a number
* @method ease
* @param {Number} k
* @returns {Number}
*/
function ease(k) {
return 0.5 * (1 - Math.cos(Math.PI * k));
}
/**
* indicates if a smooth behavior should be applied
* @method shouldBailOut
* @param {Number|Object} x
* @returns {Boolean}
*/
function shouldBailOut(x) {
if (typeof x !== 'object'
|| x === null
|| x.behavior === undefined
|| x.behavior === 'auto'
|| x.behavior === 'instant') {
// first arg not an object/null
// or behavior is auto, instant or undefined
return true;
}
if (typeof x === 'object'
&& x.behavior === 'smooth') {
// first argument is an object and behavior is smooth
return false;
}
// throw error when behavior is not supported
throw new TypeError('behavior not valid');
}
/**
* finds scrollable parent of an element
* @method findScrollableParent
* @param {Node} el
* @returns {Node} el
*/
function findScrollableParent(el) {
var isBody;
var hasScrollableSpace;
var hasVisibleOverflow;
do {
el = el.parentNode;
// set condition variables
isBody = el === d.body;
hasScrollableSpace =
el.clientHeight < el.scrollHeight ||
el.clientWidth < el.scrollWidth;
hasVisibleOverflow =
w.getComputedStyle(el, null).overflow === 'visible';
} while (!isBody && !(hasScrollableSpace && !hasVisibleOverflow));
isBody = hasScrollableSpace = hasVisibleOverflow = null;
return el;
}
/**
* self invoked function that, given a context, steps through scrolling
* @method step
* @param {Object} context
*/
function step(context) {
// call method again on next available frame
context.frame = w.requestAnimationFrame(step.bind(w, context));
var time = now();
var value;
var currentX;
var currentY;
var elapsed = (time - context.startTime) / SCROLL_TIME;
// avoid elapsed times higher than one
elapsed = elapsed > 1 ? 1 : elapsed;
// apply easing to elapsed time
value = ease(elapsed);
currentX = context.startX + (context.x - context.startX) * value;
currentY = context.startY + (context.y - context.startY) * value;
context.method.call(context.scrollable, currentX, currentY);
// return when end points have been reached
if (currentX === context.x && currentY === context.y) {
w.cancelAnimationFrame(context.frame);
return;
}
}
/**
* scrolls window with a smooth behavior
* @method smoothScroll
* @param {Object|Node} el
* @param {Number} x
* @param {Number} y
*/
function smoothScroll(el, x, y) {
var scrollable;
var startX;
var startY;
var method;
var startTime = now();
var frame;
// define scroll context
if (el === d.body) {
scrollable = w;
startX = w.scrollX || w.pageXOffset;
startY = w.scrollY || w.pageYOffset;
method = original.scroll;
} else {
scrollable = el;
startX = el.scrollLeft;
startY = el.scrollTop;
method = scrollElement;
}
// cancel frame when a scroll event's happening
if (frame) {
w.cancelAnimationFrame(frame);
}
// scroll looping over a frame
step({
scrollable: scrollable,
method: method,
startTime: startTime,
startX: startX,
startY: startY,
x: x,
y: y,
frame: frame
});
}
/*
* ORIGINAL METHODS OVERRIDES
*/
// w.scroll and w.scrollTo
w.scroll = w.scrollTo = function() {
// avoid smooth behavior if not required
if (shouldBailOut(arguments[0])) {
original.scroll.call(
w,
arguments[0].left || arguments[0],
arguments[0].top || arguments[1]
);
return;
}
// LET THE SMOOTHNESS BEGIN!
smoothScroll.call(
w,
d.body,
~~arguments[0].left,
~~arguments[0].top
);
};
// w.scrollBy
w.scrollBy = function() {
// avoid smooth behavior if not required
if (shouldBailOut(arguments[0])) {
original.scrollBy.call(
w,
arguments[0].left || arguments[0],
arguments[0].top || arguments[1]
);
return;
}
// LET THE SMOOTHNESS BEGIN!
smoothScroll.call(
w,
d.body,
~~arguments[0].left + (w.scrollX || w.pageXOffset),
~~arguments[0].top + (w.scrollY || w.pageYOffset)
);
};
// Element.prototype.scrollIntoView
Element.prototype.scrollIntoView = function() {
// avoid smooth behavior if not required
if (shouldBailOut(arguments[0])) {
original.scrollIntoView.call(this, arguments[0] || true);
return;
}
// LET THE SMOOTHNESS BEGIN!
var scrollableParent = findScrollableParent(this);
var parentRects = scrollableParent.getBoundingClientRect();
var clientRects = this.getBoundingClientRect();
if (scrollableParent !== d.body) {
// reveal element inside parent
smoothScroll.call(
this,
scrollableParent,
scrollableParent.scrollLeft + clientRects.left - parentRects.left,
scrollableParent.scrollTop + clientRects.top - parentRects.top
);
// reveal parent in viewport
w.scrollBy({
left: parentRects.left,
top: parentRects.top,
behavior: 'smooth'
});
} else {
// reveal element in viewport
w.scrollBy({
left: clientRects.left,
top: clientRects.top,
behavior: 'smooth'
});
}
};
}
if (typeof exports === 'object') {
// commonjs
module.exports = { polyfill: polyfill };
} else {
// global
polyfill();
}
})(window, document);

+ 41
- 0
themes/hugo-after-dark/theme.toml View File

@ -0,0 +1,41 @@
name = "After Dark"
license = "ISC"
licenselink = "https://github.com/comfusion/after-dark/blob/master/LICENSE.md"
description = "A simple, yet highly configurable responsive dark theme."
homepage = "https://comfusion.github.io/after-dark/"
tags = [
"personal",
"minimal",
"responsive",
"accessible",
"vaporwave"
]
features = [
"Mobile-optimized",
"SEO-optimized",
"Responsive Design",
"Flexbox Layouts",
"Google Analytics",
"Disqus",
"Image lazyloading",
"OpenGraph",
"Schema Structured Data",
"Pagination",
"Reading time",
"Related content",
"Modification dating",
"Author byline",
"Word Count",
"Related Posts",
"Section Menu",
"Block Templates",
"Table of Contents",
"Keyboard accessible",
"Terminal friendly",
"Customizable theme"
]
min_version = 0.16
[author]
name = "Josh Habdas"
homepage = "https://habd.as"

Loading…
Cancel
Save