diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d578170 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +version = 1.0.2 + +.PHONY: release clean + +release: + -mkdir -p releases/smallblog-linux-amd64-${version}/pages + -mkdir -p releases/smallblog-linux-arm-${version}/pages + cp -r assets/ releases/smallblog-linux-amd64-${version} + cp -r assets/ releases/smallblog-linux-arm-${version} + cp -r templates/ releases/smallblog-linux-amd64-${version} + cp -r assets/ releases/smallblog-linux-arm-${version} + cp examples/article.md.example releases/smallblog-linux-amd64-${version}/pages/article.md + cp examples/article.md.example releases/smallblog-linux-arm-${version}/pages/article.md + cp examples/conf.yml.example releases/smallblog-linux-amd64-${version}/conf.yml + cp examples/conf.yml.example releases/smallblog-linux-arm-${version}/conf.yml + go build -o releases/smallblog-linux-amd64-${version}/smallblog + GOARCH=arm go build -o releases/smallblog-linux-arm-${version}/smallblog + tar czf releases/smallblog-linux-amd64-${version}.tar.gz releases/smallblog-linux-amd64-${version} + tar czf releases/smallblog-linux-arm-${version}.tar.gz releases/smallblog-linux-arm-${version} + +clean: + -rm -r releases/ diff --git a/assets/grids-responsive-min.css b/assets/grids-responsive-min.css new file mode 100644 index 0000000..1df05db --- /dev/null +++ b/assets/grids-responsive-min.css @@ -0,0 +1,7 @@ +/*! +Pure v0.6.0 +Copyright 2014 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +https://github.com/yahoo/pure/blob/master/LICENSE.md +*/ +@media screen and (min-width:35.5em){.pure-u-sm-1,.pure-u-sm-1-1,.pure-u-sm-1-2,.pure-u-sm-1-3,.pure-u-sm-2-3,.pure-u-sm-1-4,.pure-u-sm-3-4,.pure-u-sm-1-5,.pure-u-sm-2-5,.pure-u-sm-3-5,.pure-u-sm-4-5,.pure-u-sm-5-5,.pure-u-sm-1-6,.pure-u-sm-5-6,.pure-u-sm-1-8,.pure-u-sm-3-8,.pure-u-sm-5-8,.pure-u-sm-7-8,.pure-u-sm-1-12,.pure-u-sm-5-12,.pure-u-sm-7-12,.pure-u-sm-11-12,.pure-u-sm-1-24,.pure-u-sm-2-24,.pure-u-sm-3-24,.pure-u-sm-4-24,.pure-u-sm-5-24,.pure-u-sm-6-24,.pure-u-sm-7-24,.pure-u-sm-8-24,.pure-u-sm-9-24,.pure-u-sm-10-24,.pure-u-sm-11-24,.pure-u-sm-12-24,.pure-u-sm-13-24,.pure-u-sm-14-24,.pure-u-sm-15-24,.pure-u-sm-16-24,.pure-u-sm-17-24,.pure-u-sm-18-24,.pure-u-sm-19-24,.pure-u-sm-20-24,.pure-u-sm-21-24,.pure-u-sm-22-24,.pure-u-sm-23-24,.pure-u-sm-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-sm-1-24{width:4.1667%;*width:4.1357%}.pure-u-sm-1-12,.pure-u-sm-2-24{width:8.3333%;*width:8.3023%}.pure-u-sm-1-8,.pure-u-sm-3-24{width:12.5%;*width:12.469%}.pure-u-sm-1-6,.pure-u-sm-4-24{width:16.6667%;*width:16.6357%}.pure-u-sm-1-5{width:20%;*width:19.969%}.pure-u-sm-5-24{width:20.8333%;*width:20.8023%}.pure-u-sm-1-4,.pure-u-sm-6-24{width:25%;*width:24.969%}.pure-u-sm-7-24{width:29.1667%;*width:29.1357%}.pure-u-sm-1-3,.pure-u-sm-8-24{width:33.3333%;*width:33.3023%}.pure-u-sm-3-8,.pure-u-sm-9-24{width:37.5%;*width:37.469%}.pure-u-sm-2-5{width:40%;*width:39.969%}.pure-u-sm-5-12,.pure-u-sm-10-24{width:41.6667%;*width:41.6357%}.pure-u-sm-11-24{width:45.8333%;*width:45.8023%}.pure-u-sm-1-2,.pure-u-sm-12-24{width:50%;*width:49.969%}.pure-u-sm-13-24{width:54.1667%;*width:54.1357%}.pure-u-sm-7-12,.pure-u-sm-14-24{width:58.3333%;*width:58.3023%}.pure-u-sm-3-5{width:60%;*width:59.969%}.pure-u-sm-5-8,.pure-u-sm-15-24{width:62.5%;*width:62.469%}.pure-u-sm-2-3,.pure-u-sm-16-24{width:66.6667%;*width:66.6357%}.pure-u-sm-17-24{width:70.8333%;*width:70.8023%}.pure-u-sm-3-4,.pure-u-sm-18-24{width:75%;*width:74.969%}.pure-u-sm-19-24{width:79.1667%;*width:79.1357%}.pure-u-sm-4-5{width:80%;*width:79.969%}.pure-u-sm-5-6,.pure-u-sm-20-24{width:83.3333%;*width:83.3023%}.pure-u-sm-7-8,.pure-u-sm-21-24{width:87.5%;*width:87.469%}.pure-u-sm-11-12,.pure-u-sm-22-24{width:91.6667%;*width:91.6357%}.pure-u-sm-23-24{width:95.8333%;*width:95.8023%}.pure-u-sm-1,.pure-u-sm-1-1,.pure-u-sm-5-5,.pure-u-sm-24-24{width:100%}}@media screen and (min-width:48em){.pure-u-md-1,.pure-u-md-1-1,.pure-u-md-1-2,.pure-u-md-1-3,.pure-u-md-2-3,.pure-u-md-1-4,.pure-u-md-3-4,.pure-u-md-1-5,.pure-u-md-2-5,.pure-u-md-3-5,.pure-u-md-4-5,.pure-u-md-5-5,.pure-u-md-1-6,.pure-u-md-5-6,.pure-u-md-1-8,.pure-u-md-3-8,.pure-u-md-5-8,.pure-u-md-7-8,.pure-u-md-1-12,.pure-u-md-5-12,.pure-u-md-7-12,.pure-u-md-11-12,.pure-u-md-1-24,.pure-u-md-2-24,.pure-u-md-3-24,.pure-u-md-4-24,.pure-u-md-5-24,.pure-u-md-6-24,.pure-u-md-7-24,.pure-u-md-8-24,.pure-u-md-9-24,.pure-u-md-10-24,.pure-u-md-11-24,.pure-u-md-12-24,.pure-u-md-13-24,.pure-u-md-14-24,.pure-u-md-15-24,.pure-u-md-16-24,.pure-u-md-17-24,.pure-u-md-18-24,.pure-u-md-19-24,.pure-u-md-20-24,.pure-u-md-21-24,.pure-u-md-22-24,.pure-u-md-23-24,.pure-u-md-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-md-1-24{width:4.1667%;*width:4.1357%}.pure-u-md-1-12,.pure-u-md-2-24{width:8.3333%;*width:8.3023%}.pure-u-md-1-8,.pure-u-md-3-24{width:12.5%;*width:12.469%}.pure-u-md-1-6,.pure-u-md-4-24{width:16.6667%;*width:16.6357%}.pure-u-md-1-5{width:20%;*width:19.969%}.pure-u-md-5-24{width:20.8333%;*width:20.8023%}.pure-u-md-1-4,.pure-u-md-6-24{width:25%;*width:24.969%}.pure-u-md-7-24{width:29.1667%;*width:29.1357%}.pure-u-md-1-3,.pure-u-md-8-24{width:33.3333%;*width:33.3023%}.pure-u-md-3-8,.pure-u-md-9-24{width:37.5%;*width:37.469%}.pure-u-md-2-5{width:40%;*width:39.969%}.pure-u-md-5-12,.pure-u-md-10-24{width:41.6667%;*width:41.6357%}.pure-u-md-11-24{width:45.8333%;*width:45.8023%}.pure-u-md-1-2,.pure-u-md-12-24{width:50%;*width:49.969%}.pure-u-md-13-24{width:54.1667%;*width:54.1357%}.pure-u-md-7-12,.pure-u-md-14-24{width:58.3333%;*width:58.3023%}.pure-u-md-3-5{width:60%;*width:59.969%}.pure-u-md-5-8,.pure-u-md-15-24{width:62.5%;*width:62.469%}.pure-u-md-2-3,.pure-u-md-16-24{width:66.6667%;*width:66.6357%}.pure-u-md-17-24{width:70.8333%;*width:70.8023%}.pure-u-md-3-4,.pure-u-md-18-24{width:75%;*width:74.969%}.pure-u-md-19-24{width:79.1667%;*width:79.1357%}.pure-u-md-4-5{width:80%;*width:79.969%}.pure-u-md-5-6,.pure-u-md-20-24{width:83.3333%;*width:83.3023%}.pure-u-md-7-8,.pure-u-md-21-24{width:87.5%;*width:87.469%}.pure-u-md-11-12,.pure-u-md-22-24{width:91.6667%;*width:91.6357%}.pure-u-md-23-24{width:95.8333%;*width:95.8023%}.pure-u-md-1,.pure-u-md-1-1,.pure-u-md-5-5,.pure-u-md-24-24{width:100%}}@media screen and (min-width:64em){.pure-u-lg-1,.pure-u-lg-1-1,.pure-u-lg-1-2,.pure-u-lg-1-3,.pure-u-lg-2-3,.pure-u-lg-1-4,.pure-u-lg-3-4,.pure-u-lg-1-5,.pure-u-lg-2-5,.pure-u-lg-3-5,.pure-u-lg-4-5,.pure-u-lg-5-5,.pure-u-lg-1-6,.pure-u-lg-5-6,.pure-u-lg-1-8,.pure-u-lg-3-8,.pure-u-lg-5-8,.pure-u-lg-7-8,.pure-u-lg-1-12,.pure-u-lg-5-12,.pure-u-lg-7-12,.pure-u-lg-11-12,.pure-u-lg-1-24,.pure-u-lg-2-24,.pure-u-lg-3-24,.pure-u-lg-4-24,.pure-u-lg-5-24,.pure-u-lg-6-24,.pure-u-lg-7-24,.pure-u-lg-8-24,.pure-u-lg-9-24,.pure-u-lg-10-24,.pure-u-lg-11-24,.pure-u-lg-12-24,.pure-u-lg-13-24,.pure-u-lg-14-24,.pure-u-lg-15-24,.pure-u-lg-16-24,.pure-u-lg-17-24,.pure-u-lg-18-24,.pure-u-lg-19-24,.pure-u-lg-20-24,.pure-u-lg-21-24,.pure-u-lg-22-24,.pure-u-lg-23-24,.pure-u-lg-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-lg-1-24{width:4.1667%;*width:4.1357%}.pure-u-lg-1-12,.pure-u-lg-2-24{width:8.3333%;*width:8.3023%}.pure-u-lg-1-8,.pure-u-lg-3-24{width:12.5%;*width:12.469%}.pure-u-lg-1-6,.pure-u-lg-4-24{width:16.6667%;*width:16.6357%}.pure-u-lg-1-5{width:20%;*width:19.969%}.pure-u-lg-5-24{width:20.8333%;*width:20.8023%}.pure-u-lg-1-4,.pure-u-lg-6-24{width:25%;*width:24.969%}.pure-u-lg-7-24{width:29.1667%;*width:29.1357%}.pure-u-lg-1-3,.pure-u-lg-8-24{width:33.3333%;*width:33.3023%}.pure-u-lg-3-8,.pure-u-lg-9-24{width:37.5%;*width:37.469%}.pure-u-lg-2-5{width:40%;*width:39.969%}.pure-u-lg-5-12,.pure-u-lg-10-24{width:41.6667%;*width:41.6357%}.pure-u-lg-11-24{width:45.8333%;*width:45.8023%}.pure-u-lg-1-2,.pure-u-lg-12-24{width:50%;*width:49.969%}.pure-u-lg-13-24{width:54.1667%;*width:54.1357%}.pure-u-lg-7-12,.pure-u-lg-14-24{width:58.3333%;*width:58.3023%}.pure-u-lg-3-5{width:60%;*width:59.969%}.pure-u-lg-5-8,.pure-u-lg-15-24{width:62.5%;*width:62.469%}.pure-u-lg-2-3,.pure-u-lg-16-24{width:66.6667%;*width:66.6357%}.pure-u-lg-17-24{width:70.8333%;*width:70.8023%}.pure-u-lg-3-4,.pure-u-lg-18-24{width:75%;*width:74.969%}.pure-u-lg-19-24{width:79.1667%;*width:79.1357%}.pure-u-lg-4-5{width:80%;*width:79.969%}.pure-u-lg-5-6,.pure-u-lg-20-24{width:83.3333%;*width:83.3023%}.pure-u-lg-7-8,.pure-u-lg-21-24{width:87.5%;*width:87.469%}.pure-u-lg-11-12,.pure-u-lg-22-24{width:91.6667%;*width:91.6357%}.pure-u-lg-23-24{width:95.8333%;*width:95.8023%}.pure-u-lg-1,.pure-u-lg-1-1,.pure-u-lg-5-5,.pure-u-lg-24-24{width:100%}}@media screen and (min-width:80em){.pure-u-xl-1,.pure-u-xl-1-1,.pure-u-xl-1-2,.pure-u-xl-1-3,.pure-u-xl-2-3,.pure-u-xl-1-4,.pure-u-xl-3-4,.pure-u-xl-1-5,.pure-u-xl-2-5,.pure-u-xl-3-5,.pure-u-xl-4-5,.pure-u-xl-5-5,.pure-u-xl-1-6,.pure-u-xl-5-6,.pure-u-xl-1-8,.pure-u-xl-3-8,.pure-u-xl-5-8,.pure-u-xl-7-8,.pure-u-xl-1-12,.pure-u-xl-5-12,.pure-u-xl-7-12,.pure-u-xl-11-12,.pure-u-xl-1-24,.pure-u-xl-2-24,.pure-u-xl-3-24,.pure-u-xl-4-24,.pure-u-xl-5-24,.pure-u-xl-6-24,.pure-u-xl-7-24,.pure-u-xl-8-24,.pure-u-xl-9-24,.pure-u-xl-10-24,.pure-u-xl-11-24,.pure-u-xl-12-24,.pure-u-xl-13-24,.pure-u-xl-14-24,.pure-u-xl-15-24,.pure-u-xl-16-24,.pure-u-xl-17-24,.pure-u-xl-18-24,.pure-u-xl-19-24,.pure-u-xl-20-24,.pure-u-xl-21-24,.pure-u-xl-22-24,.pure-u-xl-23-24,.pure-u-xl-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-xl-1-24{width:4.1667%;*width:4.1357%}.pure-u-xl-1-12,.pure-u-xl-2-24{width:8.3333%;*width:8.3023%}.pure-u-xl-1-8,.pure-u-xl-3-24{width:12.5%;*width:12.469%}.pure-u-xl-1-6,.pure-u-xl-4-24{width:16.6667%;*width:16.6357%}.pure-u-xl-1-5{width:20%;*width:19.969%}.pure-u-xl-5-24{width:20.8333%;*width:20.8023%}.pure-u-xl-1-4,.pure-u-xl-6-24{width:25%;*width:24.969%}.pure-u-xl-7-24{width:29.1667%;*width:29.1357%}.pure-u-xl-1-3,.pure-u-xl-8-24{width:33.3333%;*width:33.3023%}.pure-u-xl-3-8,.pure-u-xl-9-24{width:37.5%;*width:37.469%}.pure-u-xl-2-5{width:40%;*width:39.969%}.pure-u-xl-5-12,.pure-u-xl-10-24{width:41.6667%;*width:41.6357%}.pure-u-xl-11-24{width:45.8333%;*width:45.8023%}.pure-u-xl-1-2,.pure-u-xl-12-24{width:50%;*width:49.969%}.pure-u-xl-13-24{width:54.1667%;*width:54.1357%}.pure-u-xl-7-12,.pure-u-xl-14-24{width:58.3333%;*width:58.3023%}.pure-u-xl-3-5{width:60%;*width:59.969%}.pure-u-xl-5-8,.pure-u-xl-15-24{width:62.5%;*width:62.469%}.pure-u-xl-2-3,.pure-u-xl-16-24{width:66.6667%;*width:66.6357%}.pure-u-xl-17-24{width:70.8333%;*width:70.8023%}.pure-u-xl-3-4,.pure-u-xl-18-24{width:75%;*width:74.969%}.pure-u-xl-19-24{width:79.1667%;*width:79.1357%}.pure-u-xl-4-5{width:80%;*width:79.969%}.pure-u-xl-5-6,.pure-u-xl-20-24{width:83.3333%;*width:83.3023%}.pure-u-xl-7-8,.pure-u-xl-21-24{width:87.5%;*width:87.469%}.pure-u-xl-11-12,.pure-u-xl-22-24{width:91.6667%;*width:91.6357%}.pure-u-xl-23-24{width:95.8333%;*width:95.8023%}.pure-u-xl-1,.pure-u-xl-1-1,.pure-u-xl-5-5,.pure-u-xl-24-24{width:100%}} \ No newline at end of file diff --git a/assets/konami.js b/assets/konami.js new file mode 100644 index 0000000..1d9d539 --- /dev/null +++ b/assets/konami.js @@ -0,0 +1,105 @@ +/* + * Konami-JS ~ + * :: Now with support for touch events and multiple instances for + * :: those situations that call for multiple easter eggs! + * Code: https://github.com/snaptortoise/konami-js + * Examples: http://www.snaptortoise.com/konami-js + * Copyright (c) 2009 George Mandis (georgemandis.com, snaptortoise.com) + * Version: 1.4.5 (3/2/2016) + * Licensed under the MIT License (http://opensource.org/licenses/MIT) + * Tested in: Safari 4+, Google Chrome 4+, Firefox 3+, IE7+, Mobile Safari 2.2.1 and Dolphin Browser + */ + +var Konami = function (callback) { + var konami = { + addEvent: function (obj, type, fn, ref_obj) { + if (obj.addEventListener) + obj.addEventListener(type, fn, false); + else if (obj.attachEvent) { + // IE + obj["e" + type + fn] = fn; + obj[type + fn] = function () { + obj["e" + type + fn](window.event, ref_obj); + } + obj.attachEvent("on" + type, obj[type + fn]); + } + }, + input: "", + pattern: "38384040373937396665", + load: function (link) { + this.addEvent(document, "keydown", function (e, ref_obj) { + if (ref_obj) konami = ref_obj; // IE + konami.input += e ? e.keyCode : event.keyCode; + if (konami.input.length > konami.pattern.length) + konami.input = konami.input.substr((konami.input.length - konami.pattern.length)); + if (konami.input == konami.pattern) { + konami.code(link); + konami.input = ""; + e.preventDefault(); + return false; + } + }, this); + this.iphone.load(link); + }, + code: function (link) { + window.location = link + }, + iphone: { + start_x: 0, + start_y: 0, + stop_x: 0, + stop_y: 0, + tap: false, + capture: false, + orig_keys: "", + keys: ["UP", "UP", "DOWN", "DOWN", "LEFT", "RIGHT", "LEFT", "RIGHT", "TAP", "TAP"], + code: function (link) { + konami.code(link); + }, + load: function (link) { + this.orig_keys = this.keys; + konami.addEvent(document, "touchmove", function (e) { + if (e.touches.length == 1 && konami.iphone.capture == true) { + var touch = e.touches[0]; + konami.iphone.stop_x = touch.pageX; + konami.iphone.stop_y = touch.pageY; + konami.iphone.tap = false; + konami.iphone.capture = false; + konami.iphone.check_direction(); + } + }); + konami.addEvent(document, "touchend", function (evt) { + if (konami.iphone.tap == true) konami.iphone.check_direction(link); + }, false); + konami.addEvent(document, "touchstart", function (evt) { + konami.iphone.start_x = evt.changedTouches[0].pageX; + konami.iphone.start_y = evt.changedTouches[0].pageY; + konami.iphone.tap = true; + konami.iphone.capture = true; + }); + }, + check_direction: function (link) { + x_magnitude = Math.abs(this.start_x - this.stop_x); + y_magnitude = Math.abs(this.start_y - this.stop_y); + x = ((this.start_x - this.stop_x) < 0) ? "RIGHT" : "LEFT"; + y = ((this.start_y - this.stop_y) < 0) ? "DOWN" : "UP"; + result = (x_magnitude > y_magnitude) ? x : y; + result = (this.tap == true) ? "TAP" : result; + + if (result == this.keys[0]) this.keys = this.keys.slice(1, this.keys.length); + if (this.keys.length == 0) { + this.keys = this.orig_keys; + this.code(link); + } + } + } + } + + typeof callback === "string" && konami.load(callback); + if (typeof callback === "function") { + konami.code = callback; + konami.load(); + } + + return konami; +}; diff --git a/assets/style.css b/assets/style.css index 2f09304..6281e94 100644 --- a/assets/style.css +++ b/assets/style.css @@ -3,8 +3,6 @@ body { font-family: 'Roboto', serif; text-align: justify; - margin: 40px auto; - max-width: 650px; line-height: 1.6; font-size: 18px; color: #444; @@ -69,6 +67,16 @@ pre { overflow: auto; border-radius: 0.3em; } +code { + font-family: 'Roboto Mono'; + background-color: rgba(0, 0, 0, 0.04); + padding: 0.2em; + padding-left: 0.3em; + padding-right: 0.3em; + padding-top: 0.3em; + font-size: 14px; + border-radius: 0.3em; +} pre>code { padding: 0; padding-right: 1em; @@ -82,16 +90,6 @@ pre>code { word-wrap: normal; line-height: 1.5; } -code { - font-family: 'Roboto Mono'; - background-color: rgba(0, 0, 0, 0.04); - padding: 0.2em; - padding-left: 0.3em; - padding-right: 0.3em; - padding-top: 0.3em; - font-size: 14px; - border-radius: 0.3em; -} /* Custom */ @@ -102,7 +100,7 @@ code { .head { text-align: center; margin-top: 0; - margin-bottom: 75px; + margin-bottom: 50px; } .tag { background: grey; diff --git a/assets/term.css b/assets/term.css new file mode 100644 index 0000000..c042681 --- /dev/null +++ b/assets/term.css @@ -0,0 +1,192 @@ +/* Global Design */ + +body { + font-family: 'Roboto', serif; + text-align: justify; + line-height: 1.6; + font-size: 18px; + color: #7cb4fc; + text-shadow: #89d3fd 0 -1px 35px; + background: #000; + font: 400 19px VT323, monospace; +} +h1:after,h2:after,h3:after,h4:after{ + content: "\220E"; + -webkit-animation: cursor .95s ease-in-out infinite; + -moz-animation: cursor .95s ease-in-out infinite; + -ms-animation: cursor .95s ease-in-out infinite; + -o-animation: cursor .95s ease-in-out infinite; + animation: cursor .95s ease-in-out infinite; + font-size: 120%; +} +th, td { + border-bottom: 1px solid #ddd; + padding: 15px; +} +tr:nth-child(even) { + background-color: #000; +} +table{ + border-collapse: collapse; +} +a { + text-decoration: underline;; + color: #7cb4fc; +} +a:hover { + color: #444; +} +h1, h2, h3 { + line-height: 1.2; + margin-top: 50px; +} +hr { + border: 0; + height: 1px; + background: grey; +} +blockquote { + padding-left: 10px; + padding-bottom: 10px; + margin: 0; + border-left: 4px solid; + border-color: grey; + font-style: italic; + overflow: auto; +} +blockquote>p { + padding-right: 10px; + margin: 0; +} +cite { + float: right; + font-style: normal; +} + +/* Code related stuff */ + +code[class*="language-"], pre[class*="language-"] { + font-family: 'Roboto Mono'; +} +pre { + font-family: 'Roboto Mono'; + font-size: 14px; + background: #272822; + padding: 1em; + margin: .5em 0; + overflow: auto; + border-radius: 0.3em; +} +code { + font-family: 'Roboto Mono'; + border: 1px solid; + padding: 0; + padding-left: 0.3em; + padding-right: 0.3em; + font-size: 14px; + border-radius: 0.3em; +} +pre>code { + padding: 0; + padding-right: 1em; + color: #f8f8f2; + border: none; + background-color: transparent; + text-shadow: 0 1px rgba(0, 0, 0, 0.3); + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; +} + +/* Custom */ + +.title { + margin-bottom: 0; + margin-top: 0; +} +.head { + text-align: center; + margin-top: 0; + margin-bottom: 50px; +} +.tag { + background: grey; + display: inline-block; + color: #fff; + position: relative; + border-radius: 16px; + padding-left: 0.6em; + padding-right: 0.6em; + padding-top: 0.2em; + padding-bottom: 0.2em; + text-decoration: none; + font-size: 14px; +} +.footerinfo { + text-align: center; + margin-top: 70px; +} + +@-webkit-keyframes scan { + from { + top: -50%; + left: 0; + } + to { + top: 150%; + left: 0; + } +} +@keyframes scan { + from { + top: -50%; + left: 0; + } + to { + top: 150%; + left: 0; + } +} +@-webkit-keyframes cursor { + from { + opacity: 1.0; + } + to { + opacity: 0.0; + } +} +@-moz-keyframes cursor { + from { + opacity: 1.0; + } + to { + opacity: 0.0; + } +} +@-ms-keyframes cursor { + from { + opacity: 1.0; + } + to { + opacity: 0.0; + } +} +@-o-keyframes cursor { + from { + opacity: 1.0; + } + to { + opacity: 0.0; + } +} +@keyframes cursor { + from { + opacity: 1.0; + } + to { + opacity: 0.0; + } +} diff --git a/examples/article.md.example b/examples/article.md.example new file mode 100644 index 0000000..65e911b --- /dev/null +++ b/examples/article.md.example @@ -0,0 +1,12 @@ +title: First Article +description: Article's Description +slug: first-article +author: Yourself +date: 2016-05-06 11:22:00 +tags: + - first + +# Actual Markdown Content +Notice the blank line right after the `tags` list. +That's how you tell the parser that you are done with yaml format. +And that's a really long line you don't want to type every other day because it's excessively long. diff --git a/examples/conf.yml.example b/examples/conf.yml.example new file mode 100644 index 0000000..f04800f --- /dev/null +++ b/examples/conf.yml.example @@ -0,0 +1,6 @@ +host: 127.0.0.1 +port: 8080 +title: Blog's Title +description: Blog's Description +pages_dir: pages/ +debug: false diff --git a/templates/index.tmpl b/templates/index.tmpl index 1a38ad7..4184507 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -6,7 +6,7 @@ {{ if .info.Title }}{{ .info.Title }}{{ else }}Home{{ end }} - + @@ -15,9 +15,15 @@ {{ if .info.Title }}

{{ .info.Title }}

{{ end }} {{ if .info.Description }}{{ .info.Description }}{{ end }} - {{ range .posts }} - {{ .DateFmt }} - {{ .Title }}
- {{ end }} +
+
+
+ {{ range .posts }} + {{ .DateFmt }} - {{ .Title }}
+ {{ end }} +
+
+ diff --git a/templates/post.tmpl b/templates/post.tmpl index f84a96a..2f9d84e 100644 --- a/templates/post.tmpl +++ b/templates/post.tmpl @@ -7,6 +7,7 @@ + @@ -15,15 +16,30 @@ ← Back
-

{{ .post.Title }}

- {{ if .post.Description }}{{ .post.Description }}{{ end }}

- {{ range .post.Tags }}{{ . }} {{ end }} +

{{ .post.Title }}

{{ if .post.Description }}{{ .post.Description }}{{ end }} +
+
{{ range .post.Tags }}{{ . }}{{ end }}
- {{ .post.Markdown }} -
- {{ .post.DateFmt }}{{ if .post.Author }} - {{ .post.Author }}{{ end }} - Raw Markdown +
+
+
+ {{ .post.Markdown }} +
+ {{ .post.DateFmt }}{{ if .post.Author }} - {{ .post.Author }}{{ end }} - Raw Markdown +
+
+ +