diff --git a/config.toml b/config.toml index 9861900..9b6ad49 100644 --- a/config.toml +++ b/config.toml @@ -1,3 +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" diff --git a/content/about.md b/content/about.md index 60c5556..3286239 100644 --- a/content/about.md +++ b/content/about.md @@ -1,10 +1,13 @@ --- -view: none +title: About --- -
This work -is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. + + diff --git a/content/post/cocode-is-bad-code/index.md b/content/post/cocode-is-bad-code/index.md index b410487..3d65515 100644 --- a/content/post/cocode-is-bad-code/index.md +++ b/content/post/cocode-is-bad-code/index.md @@ -2,7 +2,6 @@ title: Co-Code is Bad Code author: colin date: 2014-10-14 -template: article.jade --- Learn why co-coding isn't all it is cracked up to be. diff --git a/content/post/how-to-contribute-to-open-source/index.md b/content/post/how-to-contribute-to-open-source/index.md index a6ab273..22cd593 100644 --- a/content/post/how-to-contribute-to-open-source/index.md +++ b/content/post/how-to-contribute-to-open-source/index.md @@ -2,7 +2,6 @@ title: How to Contribute to Open Source author: brett date: 2014-10-14 -template: article.jade --- Learn how to get started in the big and scary Open Source community. diff --git a/content/post/microcommits/index.md b/content/post/microcommits/index.md index 41cf5c1..dc0375a 100644 --- a/content/post/microcommits/index.md +++ b/content/post/microcommits/index.md @@ -2,7 +2,6 @@ title: Microcommits author: brett date: 2015-06-24 -template: article.jade --- A look into the new development methodology of microcommitting. diff --git a/content/post/scrum-is-life/index.md b/content/post/scrum-is-life/index.md index 324dc1d..fc0e3b6 100644 --- a/content/post/scrum-is-life/index.md +++ b/content/post/scrum-is-life/index.md @@ -2,7 +2,6 @@ title: Scrum is Life author: adam date: 2016-04-26 -template: article.jade --- If you're not doing scrum, you're doing it wrong. @@ -35,4 +34,4 @@ With this minimal (and agreed upon) process in place, it's hard for me to believ Images from: * https://en.wikipedia.org/wiki/Scrum_(software_development) * https://dmquickscrum.wordpress.com/2014/11/07/in-scrum-can-a-sprint-be-cancelled-if-so-when/ -* http://leadinganswers.typepad.com/leading_answers/2012/02/timebox-alternatives.html \ No newline at end of file +* http://leadinganswers.typepad.com/leading_answers/2012/02/timebox-alternatives.html diff --git a/layouts/partials/critical-custom.css.html b/layouts/partials/critical-custom.css.html new file mode 100644 index 0000000..d9bd42a --- /dev/null +++ b/layouts/partials/critical-custom.css.html @@ -0,0 +1,16 @@ + diff --git a/layouts/post/single.html b/layouts/post/single.html new file mode 100644 index 0000000..8d437ba --- /dev/null +++ b/layouts/post/single.html @@ -0,0 +1,36 @@ +{{ define "header" }} + {{ partial "menu" . }} +{{ end }} +{{ define "main" }} +
+ {{ template "_internal/schema.html" . }} +
+

{{ .Title }}

+

{{ partial "post/meta" . }}

+
+ {{ if .Description }} +
{{ .Description }}
+ {{ end }} + {{ partial "toc-maybe" . }} +
+ {{ .Content }} +
+ {{ if .Site.DisqusShortname }} +
+ {{ template "_internal/disqus.html" . }} +
+ {{ end }} + +
+{{ end }} +{{ define "footer" }} + {{ partial "powered-by" . }} +{{ end }} diff --git a/old/Makefile b/old/Makefile deleted file mode 100644 index b24bbe0..0000000 --- a/old/Makefile +++ /dev/null @@ -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 diff --git a/old/config.json b/old/config.json deleted file mode 100644 index 53ded1e..0000000 --- a/old/config.json +++ /dev/null @@ -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 - } -} diff --git a/old/contents/about.md b/old/contents/about.md deleted file mode 100644 index 60c5556..0000000 --- a/old/contents/about.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -view: none ---- - -
This work -is licensed under a Creative Commons -Attribution-ShareAlike 4.0 International License. diff --git a/old/contents/archive.json b/old/contents/archive.json deleted file mode 100644 index 0fd2fd3..0000000 --- a/old/contents/archive.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "template": "archive.jade" -} diff --git a/old/contents/authors/adam.json b/old/contents/authors/adam.json deleted file mode 100644 index ad16b08..0000000 --- a/old/contents/authors/adam.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Adam Weiss", - "website": "https://github.com/amweiss", - "bio": "Adam still thinks he can write code" -} diff --git a/old/contents/authors/brett.json b/old/contents/authors/brett.json deleted file mode 100644 index 87756a3..0000000 --- a/old/contents/authors/brett.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Brett Langdon", - "website": "http://brett.is", - "bio": "Brett is the breaker of things" -} diff --git a/old/contents/authors/colin.json b/old/contents/authors/colin.json deleted file mode 100644 index dc26fa2..0000000 --- a/old/contents/authors/colin.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Colin Higgins", - "website": "http://spykebytes.me", - "bio": "" -} diff --git a/old/contents/css/main.css b/old/contents/css/main.css deleted file mode 100644 index 8067a57..0000000 --- a/old/contents/css/main.css +++ /dev/null @@ -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; - } -} diff --git a/old/contents/css/main.min.css b/old/contents/css/main.min.css deleted file mode 100644 index a890bb4..0000000 --- a/old/contents/css/main.min.css +++ /dev/null @@ -1 +0,0 @@ -a,blockquote,body,h1,h2,h3,h4,h5,h6,img,ol,p,pre,ul{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}a,body{color:#171717}a:hover{color:#ff8000;text-decoration:underline}p{margin-bottom:1.52em}pre{font-size:.9em;overflow:auto;background:#fff;border:1px dashed #d2d2d2;border-radius:.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:.8em}ol,ul{margin:0 1.4em 1.4em 4em}li{margin-bottom:.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}.header{margin:3em 0 5em}.header .title,.header h1{font-size:2em;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:-.3em}body.article-detail>header h1{font-size:2em;font-style:italic;font-weight:400;margin-bottom:-.2em}body.article-detail>header{margin-bottom:3em}footer{margin:3em 0}footer .nav{text-align:center;margin-top:1em;margin-bottom:1em}footer .nav a{padding:0 .5em;font-size:1.2em;text-decoration:none}footer .about{font-size:.7em;text-align:center}footer .copy{text-align:center;font-size:.7em;font-style:italic;margin-top:1em}footer .copy,footer .copy a{color:#8e8e8e}.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:.8em 0;font-size:1.4em}.article header h2 a{text-decoration:none}.article header .date{text-align:center;font-size:.8em;margin-top:-.7em}.article header .date span{background-color:#f8f8f8;padding:0 .7em}.article.intro .content p{display:inline}.article.intro .content .more{text-decoration:underline;font-weight:700;padding-left:.3em}.article .content img{display:block;width:100%}.date,.more{font-family:Merriweather,serif;font-variant:small-caps;text-transform:lowercase;font-weight:400;text-rendering:auto;letter-spacing:1px}.archive{width:32em;margin:5em auto 6em;padding-left:2em}.archive h2{font-size:2em;margin:0 0 .5em 6.1em;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 .month-label,.archive .year-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{font-family:'Anonymous Pro',monospace;font-size:.85em;color:#000}pre code{display:block;line-height:1.1}p code{padding:.1em .3em .2em;border-radius:.3em;position:relative;background:#fffff3;white-space:nowrap}code.lang-markdown{color:#424242}code.lang-markdown .header,code.lang-markdown .strong{font-weight:700}code.lang-markdown .emphasis{font-style:italic}code.lang-markdown .code,code.lang-markdown .header,code.lang-markdown .horizontal_rule,code.lang-markdown .link_label,code.lang-markdown .link_url{color:#555}code.lang-markdown .blockquote,code.lang-markdown .bullet{color:#bbb}.tomorrow-comment,pre .comment,pre .title{color:#8e908c}.tomorrow-red,pre .attribute,pre .css .class,pre .css .id,pre .css .pseudo,pre .html .doctype,pre .regexp,pre .ruby .constant,pre .tag,pre .variable,pre .xml .doctype,pre .xml .pi,pre .xml .tag .title{color:#c82829}.tomorrow-orange,pre .built_in,pre .constant,pre .literal,pre .number,pre .params,pre .preprocessor{color:#f5871f}.tomorrow-yellow,pre .class,pre .css .rules .attribute,pre .ruby .class .title{color:#eab700}.tomorrow-green,pre .header,pre .inheritance,pre .ruby .symbol,pre .string,pre .value,pre .xml .cdata{color:#718c00}.tomorrow-aqua,pre .css .hexcolor{color:#3e999f}.tomorrow-blue,pre .coffeescript .title,pre .function,pre .javascript .title,pre .perl .sub,pre .python .decorator,pre .python .title,pre .ruby .function .title,pre .ruby .title .keyword{color:#4271ae}.tomorrow-purple,pre .javascript .function,pre .keyword{color:#8959a8}@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:.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:1.6em 0 0;font-size:.9em;-webkit-column-count:1;-moz-column-count:1;-ms-column-count:1;column-count:1}footer .about p{margin-bottom:1em}} \ No newline at end of file diff --git a/old/contents/feed.json b/old/contents/feed.json deleted file mode 100644 index 9c3d3fd..0000000 --- a/old/contents/feed.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "template": "feed.jade", - "filename": "feed.xml" -} diff --git a/old/package.json b/old/package.json deleted file mode 100644 index 8be80d2..0000000 --- a/old/package.json +++ /dev/null @@ -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" -} diff --git a/old/plugins/paginator.coffee b/old/plugins/paginator.coffee deleted file mode 100644 index a8ce516..0000000 --- a/old/plugins/paginator.coffee +++ /dev/null @@ -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() diff --git a/old/templates/archive.jade b/old/templates/archive.jade deleted file mode 100644 index 8113b30..0000000 --- a/old/templates/archive.jade +++ /dev/null @@ -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 - - } - \ No newline at end of file diff --git a/old/templates/article.jade b/old/templates/article.jade deleted file mode 100644 index 4ace439..0000000 --- a/old/templates/article.jade +++ /dev/null @@ -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 diff --git a/old/templates/author.jade b/old/templates/author.jade deleted file mode 100644 index ab7c9a5..0000000 --- a/old/templates/author.jade +++ /dev/null @@ -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 diff --git a/old/templates/feed.jade b/old/templates/feed.jade deleted file mode 100644 index 19f0343..0000000 --- a/old/templates/feed.jade +++ /dev/null @@ -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) diff --git a/old/templates/index.jade b/old/templates/index.jade deleted file mode 100644 index 81aed0c..0000000 --- a/old/templates/index.jade +++ /dev/null @@ -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 » - - - diff --git a/old/templates/layout.jade b/old/templates/layout.jade deleted file mode 100644 index f0cf4bc..0000000 --- a/old/templates/layout.jade +++ /dev/null @@ -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 © #{ new Date().getFullYear() } #{ locals.owner } — powered by  - 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") diff --git a/old/templates/mixins/disqus.jade b/old/templates/mixins/disqus.jade deleted file mode 100644 index d07ceb7..0000000 --- a/old/templates/mixins/disqus.jade +++ /dev/null @@ -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" diff --git a/old/contents/images/2000px-Scrum_process.png b/static/images/2000px-Scrum_process.png similarity index 100% rename from old/contents/images/2000px-Scrum_process.png rename to static/images/2000px-Scrum_process.png diff --git a/old/contents/images/sprint-planning.png b/static/images/sprint-planning.png similarity index 100% rename from old/contents/images/sprint-planning.png rename to static/images/sprint-planning.png diff --git a/old/contents/images/triangles.jpg b/static/images/triangles.jpg similarity index 100% rename from old/contents/images/triangles.jpg rename to static/images/triangles.jpg