-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
387 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
Oops, something went wrong.