Further various fixes and improvements

- fixed path of gitsubmodules
- added folder 'files' for files that are not to be App Cached
  and included my public gpg key
- did a little work on the business card (displayed on the home page and
  contact page
- changed app cache fallback pages to be in haml instead of html

js/default.js:
  - added support for mailto and download-able (not app cached) links
  - added support for mathjax (called on each call of 'loadPageContent')

site.hs:
  - added support for using arbitrary pandoc reader/writer extensions
  - added support for rendering of maths (using mathjax)
  - added generation of tag pages to the application cache (a fallback
    is still used for the rss feeds as they are not necessary while
    offline)

TODO:
  - pagination (n posts per page)
  - save n most recent posts to localstorage and support option to
    add/remove posts
  - add general fallback page to handle main rss feed and other files
  - content and styling

Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
This commit is contained in:
Collin J. Doering 2014-03-12 20:59:58 -04:00
parent 3a7e6b5e4a
commit dc814507cc
26 changed files with 11016 additions and 90 deletions

4
.gitmodules vendored
View File

@ -1,6 +1,6 @@
[submodule "lib/Skeleton"]
path = lib/Skeleton
path = lib-src/Skeleton
url = https://github.com/dhg/Skeleton.git
[submodule "lib/jquery-address"]
path = lib/jquery-address
path = lib-src/jquery-address
url = https://github.com/asual/jquery-address.git

52
files/collin-doering.gpg Normal file
View File

@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
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
LfDnFeydLUiwlS4=
=lN4L
-----END PGP PUBLIC KEY BLOCK-----

BIN
images/business-card.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -57,8 +57,12 @@
$('#page-content a').click(function (evt) {
var page_href = $(this).attr('href');
var external_url_regexp = /https?:\/\/.*/;
if (external_url_regexp.test(page_href)) {
var mailto_regexp = /mailto:.*/;
var files_regexp = /files\/.*/;
if (external_url_regexp.test(page_href)
|| mailto_regexp.test(page_href)
|| files_regexp.test(page_href)) {
window.location.href = page_href;
} else {
evt.preventDefault();
@ -70,8 +74,8 @@
function loadPageContent(page_href) {
var post_regexp = /posts\/.*/;
var tag_regexp = /tags\/.*/;
// Check whether the requested url is a post; otherwise assume its a page
// Check whether the requested url is a post
if (post_regexp.test(page_href)) {
// Handle post urls (no change required to page_href)
$('#nav-menu li.active').removeClass('active');
@ -80,7 +84,7 @@
// Handle tag pages
$('#nav-menu li.active').removeClass('active');
$('#nav-menu li a[href="./pages/blog.html"]').parent('li').addClass('active');
} else {
} else { // otherwise assume its a page
// Check if the page_href is empty or / and if so goto home
if (page_href === '/' || page_href === '') {
page_href = '/home.html';
@ -114,8 +118,14 @@
// Replace old page-content with new page-content
$('#page-content').html(dta);
// Stop page loading
$('#page-content, #nav').removeClass('loading');
// Reload any new maths using MathJax
$('#page-content .math').each(function (math_elem) {
MathJax.Hub.Queue(["Typeset",MathJax.Hub,math_elem[0]]);
});
if ($('body').scrollTop() > $('#nav').offset().top - 15) {
$('html, body').animate({
scrollTop: $('#nav').offset().top - 15

9597
lib/JQuery/jquery-1.9.1.js vendored Normal file

File diff suppressed because it is too large Load Diff

269
lib/Skeleton/base.css Normal file
View File

@ -0,0 +1,269 @@
/*
* Skeleton V1.2
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 6/20/2012
*/
/* Table of Content
==================================================
#Reset & Basics
#Basic Styles
#Site Styles
#Typography
#Links
#Lists
#Images
#Buttons
#Forms
#Misc */
/* #Reset & Basics (Inspired by E. Meyers)
================================================== */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block; }
body {
line-height: 1; }
ol, ul {
list-style: none; }
blockquote, q {
quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none; }
table {
border-collapse: collapse;
border-spacing: 0; }
/* #Basic Styles
================================================== */
body {
background: #fff;
font: 14px/21px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #444;
-webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
-webkit-text-size-adjust: 100%;
}
/* #Typography
================================================== */
h1, h2, h3, h4, h5, h6 {
color: #181818;
font-family: "Georgia", "Times New Roman", serif;
font-weight: normal; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight: inherit; }
h1 { font-size: 46px; line-height: 50px; margin-bottom: 14px;}
h2 { font-size: 35px; line-height: 40px; margin-bottom: 10px; }
h3 { font-size: 28px; line-height: 34px; margin-bottom: 8px; }
h4 { font-size: 21px; line-height: 30px; margin-bottom: 4px; }
h5 { font-size: 17px; line-height: 24px; }
h6 { font-size: 14px; line-height: 21px; }
.subheader { color: #777; }
p { margin: 0 0 20px 0; }
p img { margin: 0; }
p.lead { font-size: 21px; line-height: 27px; color: #777; }
em { font-style: italic; }
strong { font-weight: bold; color: #333; }
small { font-size: 80%; }
/* Blockquotes */
blockquote, blockquote p { font-size: 17px; line-height: 24px; color: #777; font-style: italic; }
blockquote { margin: 0 0 20px; padding: 9px 20px 0 19px; border-left: 1px solid #ddd; }
blockquote cite { display: block; font-size: 12px; color: #555; }
blockquote cite:before { content: "\2014 \0020"; }
blockquote cite a, blockquote cite a:visited, blockquote cite a:visited { color: #555; }
hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 10px 0 30px; height: 0; }
/* #Links
================================================== */
a, a:visited { color: #333; text-decoration: underline; outline: 0; }
a:hover, a:focus { color: #000; }
p a, p a:visited { line-height: inherit; }
/* #Lists
================================================== */
ul, ol { margin-bottom: 20px; }
ul { list-style: none outside; }
ol { list-style: decimal; }
ol, ul.square, ul.circle, ul.disc { margin-left: 30px; }
ul.square { list-style: square outside; }
ul.circle { list-style: circle outside; }
ul.disc { list-style: disc outside; }
ul ul, ul ol,
ol ol, ol ul { margin: 4px 0 5px 30px; font-size: 90%; }
ul ul li, ul ol li,
ol ol li, ol ul li { margin-bottom: 6px; }
li { line-height: 18px; margin-bottom: 12px; }
ul.large li { line-height: 21px; }
li p { line-height: 21px; }
/* #Images
================================================== */
img.scale-with-grid {
max-width: 100%;
height: auto; }
/* #Buttons
================================================== */
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
background: #eee; /* Old browsers */
background: #eee -moz-linear-gradient(top, rgba(255,255,255,.2) 0%, rgba(0,0,0,.2) 100%); /* FF3.6+ */
background: #eee -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.2)), color-stop(100%,rgba(0,0,0,.2))); /* Chrome,Safari4+ */
background: #eee -webkit-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* Chrome10+,Safari5.1+ */
background: #eee -o-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* Opera11.10+ */
background: #eee -ms-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* IE10+ */
background: #eee linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* W3C */
border: 1px solid #aaa;
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
color: #444;
display: inline-block;
font-size: 11px;
font-weight: bold;
text-decoration: none;
text-shadow: 0 1px rgba(255, 255, 255, .75);
cursor: pointer;
margin-bottom: 20px;
line-height: normal;
padding: 8px 10px;
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; }
.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
color: #222;
background: #ddd; /* Old browsers */
background: #ddd -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%); /* FF3.6+ */
background: #ddd -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.3)), color-stop(100%,rgba(0,0,0,.3))); /* Chrome,Safari4+ */
background: #ddd -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Chrome10+,Safari5.1+ */
background: #ddd -o-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Opera11.10+ */
background: #ddd -ms-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* IE10+ */
background: #ddd linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* W3C */
border: 1px solid #888;
border-top: 1px solid #aaa;
border-left: 1px solid #aaa; }
.button:active,
button:active,
input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active {
border: 1px solid #666;
background: #ccc; /* Old browsers */
background: #ccc -moz-linear-gradient(top, rgba(255,255,255,.35) 0%, rgba(10,10,10,.4) 100%); /* FF3.6+ */
background: #ccc -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.35)), color-stop(100%,rgba(10,10,10,.4))); /* Chrome,Safari4+ */
background: #ccc -webkit-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* Chrome10+,Safari5.1+ */
background: #ccc -o-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* Opera11.10+ */
background: #ccc -ms-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* IE10+ */
background: #ccc linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* W3C */ }
.button.full-width,
button.full-width,
input[type="submit"].full-width,
input[type="reset"].full-width,
input[type="button"].full-width {
width: 100%;
padding-left: 0 !important;
padding-right: 0 !important;
text-align: center; }
/* Fix for odd Mozilla border & padding issues */
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/* #Forms
================================================== */
form {
margin-bottom: 20px; }
fieldset {
margin-bottom: 20px; }
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
border: 1px solid #ccc;
padding: 6px 4px;
outline: none;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
font: 13px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #777;
margin: 0;
width: 210px;
max-width: 100%;
display: block;
margin-bottom: 20px;
background: #fff; }
select {
padding: 0; }
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus {
border: 1px solid #aaa;
color: #444;
-moz-box-shadow: 0 0 3px rgba(0,0,0,.2);
-webkit-box-shadow: 0 0 3px rgba(0,0,0,.2);
box-shadow: 0 0 3px rgba(0,0,0,.2); }
textarea {
min-height: 60px; }
label,
legend {
display: block;
font-weight: bold;
font-size: 13px; }
select {
width: 220px; }
input[type="checkbox"] {
display: inline; }
label span,
legend span {
font-weight: normal;
font-size: 13px;
color: #444; }
/* #Misc
================================================== */
.remove-bottom { margin-bottom: 0 !important; }
.half-bottom { margin-bottom: 10px !important; }
.add-bottom { margin-bottom: 20px !important; }

58
lib/Skeleton/layout.css Normal file
View File

@ -0,0 +1,58 @@
/*
* Skeleton V1.2
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 6/20/2012
*/
/* Table of Content
==================================================
#Site Styles
#Page Styles
#Media Queries
#Font-Face */
/* #Site Styles
================================================== */
/* #Page Styles
================================================== */
/* #Media Queries
================================================== */
/* Smaller than standard 960 (devices and browsers) */
@media only screen and (max-width: 959px) {}
/* Tablet Portrait size to standard 960 (devices and browsers) */
@media only screen and (min-width: 768px) and (max-width: 959px) {}
/* All Mobile Sizes (devices and browser) */
@media only screen and (max-width: 767px) {}
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) {}
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {}
/* #Font-Face
================================================== */
/* This is the proper syntax for an @font-face file
Just create a "fonts" folder at the root,
copy your FontName into code below and remove
comment brackets */
/* @font-face {
font-family: 'FontName';
src: url('../fonts/FontName.eot');
src: url('../fonts/FontName.eot?iefix') format('eot'),
url('../fonts/FontName.woff') format('woff'),
url('../fonts/FontName.ttf') format('truetype'),
url('../fonts/FontName.svg#webfontZam02nTh') format('svg');
font-weight: normal;
font-style: normal; }
*/

242
lib/Skeleton/skeleton.css vendored Normal file
View File

@ -0,0 +1,242 @@
/*
* Skeleton V1.2
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 6/20/2012
*/
/* Table of Contents
==================================================
#Base 960 Grid
#Tablet (Portrait)
#Mobile (Portrait)
#Mobile (Landscape)
#Clearing */
/* #Base 960 Grid
================================================== */
.container { position: relative; width: 960px; margin: 0 auto; padding: 0; }
.container .column,
.container .columns { float: left; display: inline; margin-left: 10px; margin-right: 10px; }
.row { margin-bottom: 20px; }
/* Nested Column Classes */
.column.alpha, .columns.alpha { margin-left: 0; }
.column.omega, .columns.omega { margin-right: 0; }
/* Base Grid */
.container .one.column,
.container .one.columns { width: 40px; }
.container .two.columns { width: 100px; }
.container .three.columns { width: 160px; }
.container .four.columns { width: 220px; }
.container .five.columns { width: 280px; }
.container .six.columns { width: 340px; }
.container .seven.columns { width: 400px; }
.container .eight.columns { width: 460px; }
.container .nine.columns { width: 520px; }
.container .ten.columns { width: 580px; }
.container .eleven.columns { width: 640px; }
.container .twelve.columns { width: 700px; }
.container .thirteen.columns { width: 760px; }
.container .fourteen.columns { width: 820px; }
.container .fifteen.columns { width: 880px; }
.container .sixteen.columns { width: 940px; }
.container .one-third.column { width: 300px; }
.container .two-thirds.column { width: 620px; }
/* Offsets */
.container .offset-by-one { padding-left: 60px; }
.container .offset-by-two { padding-left: 120px; }
.container .offset-by-three { padding-left: 180px; }
.container .offset-by-four { padding-left: 240px; }
.container .offset-by-five { padding-left: 300px; }
.container .offset-by-six { padding-left: 360px; }
.container .offset-by-seven { padding-left: 420px; }
.container .offset-by-eight { padding-left: 480px; }
.container .offset-by-nine { padding-left: 540px; }
.container .offset-by-ten { padding-left: 600px; }
.container .offset-by-eleven { padding-left: 660px; }
.container .offset-by-twelve { padding-left: 720px; }
.container .offset-by-thirteen { padding-left: 780px; }
.container .offset-by-fourteen { padding-left: 840px; }
.container .offset-by-fifteen { padding-left: 900px; }
/* #Tablet (Portrait)
================================================== */
/* Note: Design for a width of 768px */
@media only screen and (min-width: 768px) and (max-width: 959px) {
.container { width: 768px; }
.container .column,
.container .columns { margin-left: 10px; margin-right: 10px; }
.column.alpha, .columns.alpha { margin-left: 0; margin-right: 10px; }
.column.omega, .columns.omega { margin-right: 0; margin-left: 10px; }
.alpha.omega { margin-left: 0; margin-right: 0; }
.container .one.column,
.container .one.columns { width: 28px; }
.container .two.columns { width: 76px; }
.container .three.columns { width: 124px; }
.container .four.columns { width: 172px; }
.container .five.columns { width: 220px; }
.container .six.columns { width: 268px; }
.container .seven.columns { width: 316px; }
.container .eight.columns { width: 364px; }
.container .nine.columns { width: 412px; }
.container .ten.columns { width: 460px; }
.container .eleven.columns { width: 508px; }
.container .twelve.columns { width: 556px; }
.container .thirteen.columns { width: 604px; }
.container .fourteen.columns { width: 652px; }
.container .fifteen.columns { width: 700px; }
.container .sixteen.columns { width: 748px; }
.container .one-third.column { width: 236px; }
.container .two-thirds.column { width: 492px; }
/* Offsets */
.container .offset-by-one { padding-left: 48px; }
.container .offset-by-two { padding-left: 96px; }
.container .offset-by-three { padding-left: 144px; }
.container .offset-by-four { padding-left: 192px; }
.container .offset-by-five { padding-left: 240px; }
.container .offset-by-six { padding-left: 288px; }
.container .offset-by-seven { padding-left: 336px; }
.container .offset-by-eight { padding-left: 384px; }
.container .offset-by-nine { padding-left: 432px; }
.container .offset-by-ten { padding-left: 480px; }
.container .offset-by-eleven { padding-left: 528px; }
.container .offset-by-twelve { padding-left: 576px; }
.container .offset-by-thirteen { padding-left: 624px; }
.container .offset-by-fourteen { padding-left: 672px; }
.container .offset-by-fifteen { padding-left: 720px; }
}
/* #Mobile (Portrait)
================================================== */
/* Note: Design for a width of 320px */
@media only screen and (max-width: 767px) {
.container { width: 300px; }
.container .columns,
.container .column { margin: 0; }
.container .one.column,
.container .one.columns,
.container .two.columns,
.container .three.columns,
.container .four.columns,
.container .five.columns,
.container .six.columns,
.container .seven.columns,
.container .eight.columns,
.container .nine.columns,
.container .ten.columns,
.container .eleven.columns,
.container .twelve.columns,
.container .thirteen.columns,
.container .fourteen.columns,
.container .fifteen.columns,
.container .sixteen.columns,
.container .one-third.column,
.container .two-thirds.column { width: 300px; }
/* Offsets */
.container .offset-by-one,
.container .offset-by-two,
.container .offset-by-three,
.container .offset-by-four,
.container .offset-by-five,
.container .offset-by-six,
.container .offset-by-seven,
.container .offset-by-eight,
.container .offset-by-nine,
.container .offset-by-ten,
.container .offset-by-eleven,
.container .offset-by-twelve,
.container .offset-by-thirteen,
.container .offset-by-fourteen,
.container .offset-by-fifteen { padding-left: 0; }
}
/* #Mobile (Landscape)
================================================== */
/* Note: Design for a width of 480px */
@media only screen and (min-width: 480px) and (max-width: 767px) {
.container { width: 420px; }
.container .columns,
.container .column { margin: 0; }
.container .one.column,
.container .one.columns,
.container .two.columns,
.container .three.columns,
.container .four.columns,
.container .five.columns,
.container .six.columns,
.container .seven.columns,
.container .eight.columns,
.container .nine.columns,
.container .ten.columns,
.container .eleven.columns,
.container .twelve.columns,
.container .thirteen.columns,
.container .fourteen.columns,
.container .fifteen.columns,
.container .sixteen.columns,
.container .one-third.column,
.container .two-thirds.column { width: 420px; }
}
/* #Clearing
================================================== */
/* Self Clearing Goodness */
.container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; }
/* Use clearfix class on parent to clear nested columns,
or wrap each row of columns in a <div class="row"> */
.clearfix:before,
.clearfix:after,
.row:before,
.row:after {
content: '\0020';
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0; }
.row:after,
.clearfix:after {
clear: both; }
.row,
.clearfix {
zoom: 1; }
/* You can also use a <br class="clear" /> to clear columns */
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}

View File

@ -0,0 +1,610 @@
/*! jQuery Address v${version} | (c) 2009, 2013 Rostislav Hristov | jquery.org/license */
(function ($) {
$.address = (function () {
var _trigger = function(name) {
var e = $.extend($.Event(name), (function() {
var parameters = {},
parameterNames = $.address.parameterNames();
for (var i = 0, l = parameterNames.length; i < l; i++) {
parameters[parameterNames[i]] = $.address.parameter(parameterNames[i]);
}
return {
value: $.address.value(),
path: $.address.path(),
pathNames: $.address.pathNames(),
parameterNames: parameterNames,
parameters: parameters,
queryString: $.address.queryString()
};
}).call($.address));
$($.address).trigger(e);
return e;
},
_array = function(obj) {
return Array.prototype.slice.call(obj);
},
_bind = function(value, data, fn) {
$().bind.apply($($.address), Array.prototype.slice.call(arguments));
return $.address;
},
_unbind = function(value, fn) {
$().unbind.apply($($.address), Array.prototype.slice.call(arguments));
return $.address;
},
_supportsState = function() {
return (_h.pushState && _opts.state !== UNDEFINED);
},
_hrefState = function() {
return ('/' + _l.pathname.replace(new RegExp(_opts.state), '') +
_l.search + (_hrefHash() ? '#' + _hrefHash() : '')).replace(_re, '/');
},
_hrefHash = function() {
var index = _l.href.indexOf('#');
return index != -1 ? _l.href.substr(index + 1) : '';
},
_href = function() {
return _supportsState() ? _hrefState() : _hrefHash();
},
_window = function() {
try {
return top.document !== UNDEFINED && top.document.title !== UNDEFINED && top.jQuery !== UNDEFINED &&
top.jQuery.address !== UNDEFINED && top.jQuery.address.frames() !== false ? top : window;
} catch (e) {
return window;
}
},
_js = function() {
return 'javascript';
},
_strict = function(value) {
value = value.toString();
return (_opts.strict && value.substr(0, 1) != '/' ? '/' : '') + value;
},
_cssint = function(el, value) {
return parseInt(el.css(value), 10);
},
_listen = function() {
if (!_silent) {
var hash = _href(),
diff = decodeURI(_value) != decodeURI(hash);
if (diff) {
if (_msie && _version < 7) {
_l.reload();
} else {
if (_msie && !_hashchange && _opts.history) {
_st(_html, 50);
}
_value = hash;
_update(FALSE);
}
}
}
},
_update = function(internal) {
_st(_track, 10);
return _trigger(CHANGE).isDefaultPrevented() ||
_trigger(internal ? INTERNAL_CHANGE : EXTERNAL_CHANGE).isDefaultPrevented();
},
_track = function() {
if (_opts.tracker !== 'null' && _opts.tracker !== NULL) {
var fn = $.isFunction(_opts.tracker) ? _opts.tracker : _t[_opts.tracker],
value = (_l.pathname + _l.search +
($.address && !_supportsState() ? $.address.value() : ''))
.replace(/\/\//, '/').replace(/^\/$/, '');
if ($.isFunction(fn)) {
fn(value);
} else if ($.isFunction(_t.urchinTracker)) {
_t.urchinTracker(value);
} else if (_t.pageTracker !== UNDEFINED && $.isFunction(_t.pageTracker._trackPageview)) {
_t.pageTracker._trackPageview(value);
} else if (_t._gaq !== UNDEFINED && $.isFunction(_t._gaq.push)) {
_t._gaq.push(['_trackPageview', decodeURI(value)]);
}
}
},
_html = function() {
var src = _js() + ':' + FALSE + ';document.open();document.writeln(\'<html><head><title>' +
_d.title.replace(/\'/g, '\\\'') + '</title><script>var ' + ID + ' = "' + encodeURIComponent(_href()).replace(/\'/g, '\\\'') +
(_d.domain != _l.hostname ? '";document.domain="' + _d.domain : '') +
'";</' + 'script></head></html>\');document.close();';
if (_version < 7) {
_frame.src = src;
} else {
_frame.contentWindow.location.replace(src);
}
},
_options = function() {
if (_url && _qi != -1) {
var i, param, params = _url.substr(_qi + 1).split('&');
for (i = 0; i < params.length; i++) {
param = params[i].split('=');
if (/^(autoUpdate|history|strict|wrap)$/.test(param[0])) {
_opts[param[0]] = (isNaN(param[1]) ? /^(true|yes)$/i.test(param[1]) : (parseInt(param[1], 10) !== 0));
}
if (/^(state|tracker)$/.test(param[0])) {
_opts[param[0]] = param[1];
}
}
_url = NULL;
}
_value = _href();
},
_load = function() {
if (!_loaded) {
_loaded = TRUE;
_options();
$('a[rel*="address:"]').address();
if (_opts.wrap) {
var body = $('body'),
wrap = $('body > *')
.wrapAll('<div style="padding:' +
(_cssint(body, 'marginTop') + _cssint(body, 'paddingTop')) + 'px ' +
(_cssint(body, 'marginRight') + _cssint(body, 'paddingRight')) + 'px ' +
(_cssint(body, 'marginBottom') + _cssint(body, 'paddingBottom')) + 'px ' +
(_cssint(body, 'marginLeft') + _cssint(body, 'paddingLeft')) + 'px;" />')
.parent()
.wrap('<div id="' + ID + '" style="height:100%;overflow:auto;position:relative;' +
(_webkit && !window.statusbar.visible ? 'resize:both;' : '') + '" />');
$('html, body')
.css({
height: '100%',
margin: 0,
padding: 0,
overflow: 'hidden'
});
if (_webkit) {
$('<style type="text/css" />')
.appendTo('head')
.text('#' + ID + '::-webkit-resizer { background-color: #fff; }');
}
}
if (_msie && !_hashchange) {
var frameset = _d.getElementsByTagName('frameset')[0];
_frame = _d.createElement((frameset ? '' : 'i') + 'frame');
_frame.src = _js() + ':' + FALSE;
if (frameset) {
frameset.insertAdjacentElement('beforeEnd', _frame);
frameset[frameset.cols ? 'cols' : 'rows'] += ',0';
_frame.noResize = TRUE;
_frame.frameBorder = _frame.frameSpacing = 0;
} else {
_frame.style.display = 'none';
_frame.style.width = _frame.style.height = 0;
_frame.tabIndex = -1;
_d.body.insertAdjacentElement('afterBegin', _frame);
}
_st(function() {
$(_frame).bind('load', function() {
var win = _frame.contentWindow;
_value = win[ID] !== UNDEFINED ? win[ID] : '';
if (_value != _href()) {
_update(FALSE);
_l.hash = _value;
}
});
if (_frame.contentWindow[ID] === UNDEFINED) {
_html();
}
}, 50);
}
_st(function() {
_trigger('init');
_update(FALSE);
}, 1);
if (!_supportsState()) {
if ((_msie && _version > 7) || (!_msie && _hashchange)) {
if (_t.addEventListener) {
_t.addEventListener(HASH_CHANGE, _listen, FALSE);
} else if (_t.attachEvent) {
_t.attachEvent('on' + HASH_CHANGE, _listen);
}
} else {
_si(_listen, 50);
}
}
if ('state' in window.history) {
$(window).trigger('popstate');
}
}
},
_popstate = function() {
if (decodeURI(_value) != decodeURI(_href())) {
_value = _href();
_update(FALSE);
}
},
_unload = function() {
if (_t.removeEventListener) {
_t.removeEventListener(HASH_CHANGE, _listen, FALSE);
} else if (_t.detachEvent) {
_t.detachEvent('on' + HASH_CHANGE, _listen);
}
},
_uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
/(msie) ([\w.]+)/.exec( ua ) ||
ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
[];
return {
browser: match[ 1 ] || '',
version: match[ 2 ] || '0'
};
},
_detectBrowser = function() {
var browser = {},
matched = _uaMatch(navigator.userAgent);
if (matched.browser) {
browser[matched.browser] = true;
browser.version = matched.version;
}
if (browser.chrome) {
browser.webkit = true;
} else if (browser.webkit) {
browser.safari = true;
}
return browser;
},
UNDEFINED,
NULL = null,
ID = 'jQueryAddress',
STRING = 'string',
HASH_CHANGE = 'hashchange',
INIT = 'init',
CHANGE = 'change',
INTERNAL_CHANGE = 'internalChange',
EXTERNAL_CHANGE = 'externalChange',
TRUE = true,
FALSE = false,
_opts = {
autoUpdate: TRUE,
history: TRUE,
strict: TRUE,
frames: TRUE,
wrap: FALSE
},
_browser = _detectBrowser(),
_version = parseFloat(_browser.version),
_webkit = _browser.webkit || _browser.safari,
_msie = !$.support.opacity,
_t = _window(),
_d = _t.document,
_h = _t.history,
_l = _t.location,
_si = setInterval,
_st = setTimeout,
_re = /\/{2,9}/g,
_agent = navigator.userAgent,
_hashchange = 'on' + HASH_CHANGE in _t,
_frame,
_form,
_url = $('script:last').attr('src'),
_qi = _url ? _url.indexOf('?') : -1,
_title = _d.title,
_silent = FALSE,
_loaded = FALSE,
_juststart = TRUE,
_updating = FALSE,
_listeners = {},
_value = _href();
if (_msie) {
_version = parseFloat(_agent.substr(_agent.indexOf('MSIE') + 4));
if (_d.documentMode && _d.documentMode != _version) {
_version = _d.documentMode != 8 ? 7 : 8;
}
var pc = _d.onpropertychange;
_d.onpropertychange = function() {
if (pc) {
pc.call(_d);
}
if (_d.title != _title && _d.title.indexOf('#' + _href()) != -1) {
_d.title = _title;
}
};
}
if (_h.navigationMode) {
_h.navigationMode = 'compatible';
}
if (document.readyState == 'complete') {
var interval = setInterval(function() {
if ($.address) {
_load();
clearInterval(interval);
}
}, 50);
} else {
_options();
$(_load);
}
$(window).bind('popstate', _popstate).bind('unload', _unload);
return {
bind: function(type, data, fn) {
return _bind.apply(this, _array(arguments));
},
unbind: function(type, fn) {
return _unbind.apply(this, _array(arguments));
},
init: function(data, fn) {
return _bind.apply(this, [INIT].concat(_array(arguments)));
},
change: function(data, fn) {
return _bind.apply(this, [CHANGE].concat(_array(arguments)));
},
internalChange: function(data, fn) {
return _bind.apply(this, [INTERNAL_CHANGE].concat(_array(arguments)));
},
externalChange: function(data, fn) {
return _bind.apply(this, [EXTERNAL_CHANGE].concat(_array(arguments)));
},
baseURL: function() {
var url = _l.href;
if (url.indexOf('#') != -1) {
url = url.substr(0, url.indexOf('#'));
}
if (/\/$/.test(url)) {
url = url.substr(0, url.length - 1);
}
return url;
},
autoUpdate: function(value) {
if (value !== UNDEFINED) {
_opts.autoUpdate = value;
return this;
}
return _opts.autoUpdate;
},
history: function(value) {
if (value !== UNDEFINED) {
_opts.history = value;
return this;
}
return _opts.history;
},
state: function(value) {
if (value !== UNDEFINED) {
_opts.state = value;
var hrefState = _hrefState();
if (_opts.state !== UNDEFINED) {
if (_h.pushState) {
if (hrefState.substr(0, 3) == '/#/') {
_l.replace(_opts.state.replace(/^\/$/, '') + hrefState.substr(2));
}
} else if (hrefState != '/' && hrefState.replace(/^\/#/, '') != _hrefHash()) {
_st(function() {
_l.replace(_opts.state.replace(/^\/$/, '') + '/#' + hrefState);
}, 1);
}
}
return this;
}
return _opts.state;
},
frames: function(value) {
if (value !== UNDEFINED) {
_opts.frames = value;
_t = _window();
return this;
}
return _opts.frames;
},
strict: function(value) {
if (value !== UNDEFINED) {
_opts.strict = value;
return this;
}
return _opts.strict;
},
tracker: function(value) {
if (value !== UNDEFINED) {
_opts.tracker = value;
return this;
}
return _opts.tracker;
},
wrap: function(value) {
if (value !== UNDEFINED) {
_opts.wrap = value;
return this;
}
return _opts.wrap;
},
update: function() {
_updating = TRUE;
this.value(_value);
_updating = FALSE;
return this;
},
title: function(value) {
if (value !== UNDEFINED) {
_st(function() {
_title = _d.title = value;
if (_juststart && _frame && _frame.contentWindow && _frame.contentWindow.document) {
_frame.contentWindow.document.title = value;
_juststart = FALSE;
}
}, 50);
return this;
}
return _d.title;
},
value: function(value) {
if (value !== UNDEFINED) {
value = _strict(value);
if (value == '/') {
value = '';
}
if (_value == value && !_updating) {
return;
}
_value = value;
if (_opts.autoUpdate || _updating) {
if (_update(TRUE)) {
return this;
}
if (_supportsState()) {
_h[_opts.history ? 'pushState' : 'replaceState']({}, '',
_opts.state.replace(/\/$/, '') + (_value === '' ? '/' : _value));
} else {
_silent = TRUE;
if (_webkit) {
if (_opts.history) {
_l.hash = '#' + _value;
} else {
_l.replace('#' + _value);
}
} else if (_value != _href()) {
if (_opts.history) {
_l.hash = '#' + _value;
} else {
_l.replace('#' + _value);
}
}
if ((_msie && !_hashchange) && _opts.history) {
_st(_html, 50);
}
if (_webkit) {
_st(function(){ _silent = FALSE; }, 1);
} else {
_silent = FALSE;
}
}
}
return this;
}
return _strict(_value);
},
path: function(value) {
if (value !== UNDEFINED) {
var qs = this.queryString(),
hash = this.hash();
this.value(value + (qs ? '?' + qs : '') + (hash ? '#' + hash : ''));
return this;
}
return _strict(_value).split('#')[0].split('?')[0];
},
pathNames: function() {
var path = this.path(),
names = path.replace(_re, '/').split('/');
if (path.substr(0, 1) == '/' || path.length === 0) {
names.splice(0, 1);
}
if (path.substr(path.length - 1, 1) == '/') {
names.splice(names.length - 1, 1);
}
return names;
},
queryString: function(value) {
if (value !== UNDEFINED) {
var hash = this.hash();
this.value(this.path() + (value ? '?' + value : '') + (hash ? '#' + hash : ''));
return this;
}
var arr = _value.split('?');
return arr.slice(1, arr.length).join('?').split('#')[0];
},
parameter: function(name, value, append) {
var i, params;
if (value !== UNDEFINED) {
var names = this.parameterNames();
params = [];
value = value === UNDEFINED || value === NULL ? '' : value.toString();
for (i = 0; i < names.length; i++) {
var n = names[i],
v = this.parameter(n);
if (typeof v == STRING) {
v = [v];
}
if (n == name) {
v = (value === NULL || value === '') ? [] :
(append ? v.concat([value]) : [value]);
}
for (var j = 0; j < v.length; j++) {
params.push(n + '=' + v[j]);
}
}
if ($.inArray(name, names) == -1 && value !== NULL && value !== '') {
params.push(name + '=' + value);
}
this.queryString(params.join('&'));
return this;
}
value = this.queryString();
if (value) {
var r = [];
params = value.split('&');
for (i = 0; i < params.length; i++) {
var p = params[i].split('=');
if (p[0] == name) {
r.push(p.slice(1).join('='));
}
}
if (r.length !== 0) {
return r.length != 1 ? r : r[0];
}
}
},
parameterNames: function() {
var qs = this.queryString(),
names = [];
if (qs && qs.indexOf('=') != -1) {
var params = qs.split('&');
for (var i = 0; i < params.length; i++) {
var name = params[i].split('=')[0];
if ($.inArray(name, names) == -1) {
names.push(name);
}
}
}
return names;
},
hash: function(value) {
if (value !== UNDEFINED) {
this.value(_value.split('#')[0] + (value ? '#' + value : ''));
return this;
}
var arr = _value.split('#');
return arr.slice(1, arr.length).join('#');
}
};
})();
$.fn.address = function(fn) {
$(this).each(function(index) {
if (!$(this).data('address')) {
$(this).on('click', function(e) {
if (e.shiftKey || e.ctrlKey || e.metaKey || e.which == 2) {
return true;
}
var target = e.currentTarget;
if ($(target).is('a')) {
e.preventDefault();
var value = fn ? fn.call(target) :
/address:/.test($(target).attr('rel')) ? $(target).attr('rel').split('address:')[1].split(' ')[0] :
$.address.state() !== undefined && !/^\/?$/.test($.address.state()) ?
$(target).attr('href').replace(new RegExp('^(.*' + $.address.state() + '|\\.)'), '') :
$(target).attr('href').replace(/^(#\!?|\.)/, '');
$.address.value(value);
}
}).on('submit', function(e) {
var target = e.currentTarget;
if ($(target).is('form')) {
e.preventDefault();
var action = $(target).attr('action'),
value = fn ? fn.call(target) : (action.indexOf('?') != -1 ? action.replace(/&$/, '') : action + '?') +
$(target).serialize();
$.address.value(value);
}
}).data('address', true);
}
});
return this;
};
})(jQuery);

View File

@ -5,16 +5,6 @@ date: 2013-10-12
weight: 1
---
$section("aboutMe")$
Welcome to the home of [**Collin Doering**](/contact.html).
Links that are loaded using js need further consideration. Specifically there are two options:
1. Use anchor references (like above) which work but will break the nojs site!
2. To have class="active", rel="address:virtualpath" and href set to the resource in question
This is what it should look like: <a class="internal" rel="address:/contact.html" href="pages/contact.html">Collin Proper</a>.
$endsection$
$section("tools")$
Tools
=====
@ -28,6 +18,7 @@ This website was proudly made with open source software! Specifically:
- [Sass][]
- [Haml][]
- [Bourbon][]
- [MathJax][]
- [Inkscape][]
- [Gimp][]
- [Gnu Emacs][]
@ -42,8 +33,8 @@ Terms of Use
This site is _Copyright 2013 © - Collin Doering_ and is distributed under the following terms.
1. All rights reserved on the "#! λ Slang" name, as well as on the
[banner image](/images/logo-banner.svg), favicons~[1](/images/favicon.ico),
[2](/images/favicon.png)~ and any other image/artwork that embodies the likeness of "#! λ
[banner image](/images/logo-banner.svg), favicons([1](/images/favicon.ico),
[2](/images/favicon.png)) and any other image/artwork that embodies the likeness of "#! λ
Slang"
2. Not withstanding (1), all images and artwork are licensed under the
[Creative Commons BY-NC-ND License][]
@ -83,6 +74,7 @@ $section$
[Sass]:http://sass-lang.com/
[Haml]: http://haml.info/
[Bourbon]: http://bourbon.io/
[MathJax]: http://www.mathjax.org/
[Inkscape]: http://inkscape.org/
[Gimp]: http://www.gimp.org/
[Gnu Emacs]: http://www.gnu.org/software/emacs/

7
post-offline.haml Normal file
View File

@ -0,0 +1,7 @@
!!! 5
%html
%body
.container
.border-box
%h1 You are currently offline and this post is unaccesable

View File

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<div class='container'>
<h1>You are currently offline and this post is unaccesable</h1>
</div>
</body>
</html>

View File

@ -10,11 +10,11 @@ tags: general
Hi all! Thanks for taking the time to visit my new blog. The terms of use of the content and
source code for the blog are on the [homepage](/). This site is still under light construction,
if you notice any issues please take the time to let me know via
[email](email/collin.doering@gmail.com).
[email](mailto:collin.doering@gmail.com).
The purpose of this blog is to allow me to 'put my thoughts to paper' so to speak. I hope you
will find at least some of my exploits entertaining, as I will discuss varying topics of
personal interest including computers, linux, programming, math among other. In an upcoming
personal interest including computers, linux, programming, and math, among others. In an upcoming
post i will detail how i built this Hakyll powered blog. Though as i mentioned earlier there
are still a few little touch ups to be completed before everything is to my satisfaction;
particularily, i haven't got pagination to work yet. Anyways, once i have it working i will

View File

@ -10,6 +10,9 @@ Exceeding reaction chamber thermal limit. We have begun power-supply calibration
Unidentified vessel travelling at sub warp speed, bearing 235.7. Fluctuations in energy readings from it, Captain. All transporters off. A strange set-up, but I'd say the graviton generator is depolarized. The dark colourings of the scrapes are the leavings of natural rubber, a type of non-conductive sole used by researchers experimenting with electricity. The molecules must have been partly de-phased by the anyon beam.
And finally here is a touch of math:
$e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$
<!--more-->
Below should be some math if everything worked out alright
@ -28,3 +31,8 @@ $\Box\diamond p\equiv\diamond p$
$\int_{0}^{1} x dx = \left[ \frac{1}{2}x^2 \right]_{0}^{1} = \frac{1}{2}$
$e^x = \sum_{n=0}^\infty \frac{x^n}{n!} = \lim_{n\rightarrow\infty} (1+x/n)^n$
this is some subscripted~sub~ stuff^hello^.
~~this is struck out~~
$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$

View File

@ -17,11 +17,32 @@
// Author: Collin J. Doering <rekahsoft@gmail.com>
// Date: Dec 5, 2013
#about-me-box
#business-card
border: 2px solid
border-radius: 5px
padding: 10px
// margin-bottom: 10px
min-height: 215px
max-width: 550px
margin: 0 auto
.photo
background: url('/images/business-card.png')
border: 1px solid
border-radius: 10px
min-height: 215px
min-width: 150px
float: left
margin-right: 10px
.info
border-top: 2px solid
overflow: hidden
padding-top: 8px
*
display: block
.name
font-weight: bold
#recent-posts
// style recent posts section

View File

@ -17,7 +17,7 @@
// Author: Collin J. Doering <rekahsoft@gmail.com>
// Date: Dec 10, 2013
@mixin border-box($padding: 0.75em, $background: rgba(250, 250, 255, 0.65))
@mixin border-box($padding: 8px, $background: rgba(250, 250, 255, 0.65))
background-color: $background
border: solid 1px #888
border-radius: 5px

View File

@ -62,6 +62,12 @@ ul, ol
hr
margin-bottom: 0.5em
sup
vertical-align: super
sub
vertical-align: sub
#noscript-alert
@include border-box(0, #FCD4D4)
text-align: center

88
site.hs
View File

@ -28,6 +28,7 @@ import Data.Char (chr)
import Data.Monoid (mappend,mconcat,(<>))
import Data.Maybe (maybeToList)
import Data.List (sortBy,intercalate)
import qualified Data.Set as S
import Data.Ord (comparing)
import Data.Functor ((<$>))
import Data.Time.Format (parseTime)
@ -38,22 +39,68 @@ import System.FilePath (takeBaseName,takeFileName,(</>))
import System.FilePath.Posix (takeBaseName)
import Text.Parsec
import Text.Pandoc.Options
import Control.Applicative hiding ((<|>),many)
---------------------------------------------------------------------------------------------------------
pandocReaderOptions :: ReaderOptions
pandocReaderOptions = defaultHakyllReaderOptions
{ readerExtensions = S.fromList
[ Ext_footnotes
, Ext_inline_notes
, Ext_pandoc_title_block
, Ext_yaml_metadata_block
, Ext_table_captions
, Ext_implicit_figures
, Ext_simple_tables
, Ext_multiline_tables
, Ext_grid_tables
, Ext_pipe_tables
, Ext_citations
, Ext_raw_tex
, Ext_raw_html
, Ext_tex_math_dollars
, Ext_latex_macros
, Ext_fenced_code_blocks
, Ext_fenced_code_attributes
, Ext_backtick_code_blocks
, Ext_inline_code_attributes
, Ext_markdown_in_html_blocks
, Ext_escaped_line_breaks
, Ext_fancy_lists
, Ext_startnum
, Ext_definition_lists
, Ext_example_lists
, Ext_all_symbols_escapable
, Ext_intraword_underscores
, Ext_blank_before_blockquote
, Ext_blank_before_header
, Ext_strikeout
, Ext_superscript
, Ext_subscript
, Ext_auto_identifiers
, Ext_header_attributes
, Ext_implicit_header_references
, Ext_line_blocks ]
}
pandocWriterOptions :: WriterOptions
pandocWriterOptions = defaultHakyllWriterOptions
{ writerHtml5 = True
, writerHTMLMathMethod = MathJax ""
, writerEmailObfuscation = NoObfuscation -- ReferenceObfuscation
}
myConfig :: Configuration
myConfig = defaultConfiguration
{ deployCommand = "rsync -rpogtzc --delete -e ssh _site/ collin@rekahsoft.ca:~/public_html/blog/"
, previewPort = 3000
}
feedConfig :: FeedConfiguration
feedConfig = feedConfiguration Nothing
main :: IO ()
main = do
-- Get a random number generator before going into Rules monad
-- Get a random number generator before going into Rules monad
stdGen <- getStdGen
hakyllWith myConfig $ do
@ -62,13 +109,19 @@ main = do
route idRoute
compile copyFileCompiler
match "files/**" $ do
route idRoute
compile copyFileCompiler
tags <- buildTags ("posts/**" .&&. hasNoVersion) (fromCapture "tags/*.html")
pageIds <- getMatches "pages/**"
fontIds <- getMatches "fonts/**"
imageIds <- getMatches "images/**"
cssIds <- getMatches "css/**"
jsIds <- getMatches "js/**"
libIds <- getMatches "lib/**"
allSassIds <- getMatches "sass/**"
let sassIds = filter (`notElem` badIds) allSassIds
badIds = filterMatches (fromRegex "^sass/bourbon/.*$|^sass/default.s[ac]ss$") allSassIds
@ -94,7 +147,9 @@ main = do
, "" ]
manifestCacheSingles = unlines [ "/index.html"
, "/default.css" ]
manifestCache = unlines $ filter (not . null) $ fmap (maybe "" ("/"++)) manifestCacheRoutesMaybe
tagsCache = unlines $ map (\(t,_) -> "/tags/" ++ t ++ ".html") $ tagsMap tags
manifestCacheFromIds = unlines $ filter (not . null) $ fmap (maybe "" ("/"++)) manifestCacheRoutesMaybe
manifestCache = manifestCacheFromIds ++ tagsCache
manifestFallback = unlines [""
, "FALLBACK:"
, "/posts/ /post-offline.html"
@ -102,13 +157,14 @@ main = do
, "" ]
manifestNetwork = unlines [ "NETWORK:"
, "*"
, "http://*"
, "https://*"
, "" ]
makeItem $ manifestStart ++ manifestCacheSingles ++ manifestCache ++ manifestFallback ++ manifestNetwork
-- TODO: This needs to be more robust
match "*-offline.html" $ do
route idRoute
compile copyFileCompiler
match "*-offline.haml" $ do
route $ setExtension "html"
compile $ getResourceBody >>= withItemBody (unixFilter "haml" [])
match "css/**" $ do
route idRoute
@ -128,7 +184,7 @@ main = do
>>= withItemBody (fmap readTemplate . unixFilter "haml" [])
---------------------------------------------------------------------------------------------------------
-- Default Version --------------------------------------------------------------------------------------
tags <- buildTags ("posts/**" .&&. hasNoVersion) (fromCapture "tags/*.html")
-- Generate tag pages
tagsRules tags $ genTagRules tags
-- paginatedPosts <- buildPaginateWith 3 (\n -> fromFilePath $ "blog/page" ++ show n ++ ".html") ("posts/**" .&&. hasNoVersion)
@ -172,7 +228,7 @@ main = do
-- TODO: add "next" and "previous" while processing templates/partials/post.haml
match "posts/**" $ do
route $ setExtension "html"
compile $ pandocCompiler
compile $ pandocCompilerWith pandocReaderOptions pandocWriterOptions
>>= saveSnapshot "content"
>>= loadAndApplyTemplate "templates/partials/post.haml" (taggedPostCtx tags)
-- >>= relativizeUrls
@ -183,7 +239,7 @@ main = do
let feedCtx = postCtx <> bodyField "description"
blogPosts <- loadAllSnapshots ("posts/**" .&&. hasNoVersion) "content"
>>= fmap (take 10) . recentFirst
renderAtom feedConfig feedCtx blogPosts
renderAtom (feedConfiguration Nothing) feedCtx blogPosts
forM_ [("js/**", idRoute),
("lib/JQuery/*", gsubRoute "JQuery" $ const "js"),
@ -217,7 +273,7 @@ main = do
-- let feedCtx = postCtx <> bodyField "description"
-- blogPosts <- loadAllSnapshots ("posts/**" .&&. hasVersion "nojs") "content"
-- >>= fmap (take 10) . recentFirst
-- renderAtom feedConfig feedCtx blogPosts
-- renderAtom (feedConfiguration Nothing) feedCtx blogPosts
-- create ["nojs/archive.html"] $ do
-- route idRoute
@ -311,7 +367,7 @@ feedConfiguration title = FeedConfiguration
{ feedTitle = title'
, feedDescription = "My encounters with math, programming, science and the world!"
, feedAuthorName = "Collin J. Doering"
, feedAuthorEmail = "support@rekahsoft.ca"
, feedAuthorEmail = "collin.doering@rekahsoft.ca"
, feedRoot = "http://blog.rekahsoft.ca"
} where title' = maybe defaultTitle ((defaultTitle ++ "; Specifically on the topic of ") ++) title
defaultTitle = "Technical Musings of a Minimalist"
@ -398,7 +454,7 @@ sortByM f xs = liftM (map fst . sortBy (comparing snd)) $
---------------------------------------------------------------------------------------------------------
--genSectionContext :: Item String -> Compiler (Context String)
genSectionContext = fmap mconcat . sequence . map makeField . unSections . readSections . itemBody
where makeField (k, b) = constField k . itemBody <$> (makeItem b >>= return . writePandoc . readPandoc)
where makeField (k, b) = constField k . itemBody <$> (makeItem b >>= return . writePandocWith pandocWriterOptions . readPandocWith pandocReaderOptions)
--readSections :: String -> Compiler (Context String)
readSections :: String -> [Section String String]

7
tags-offline.haml Normal file
View File

@ -0,0 +1,7 @@
!!! 5
%html
%body
.container
.border-box
%h1 You are currently offline and this tag page is unaccesable

View File

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<body>
<div class='container'>
<h1>You are currently offline and this tag page is unaccesable</h1>
</div>
</body>
</html>

View File

@ -15,7 +15,7 @@
/ Mobile Specific Metas
%meta(name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1")
/ CSS
%link(rel="stylesheet" href="lib/css/base.css")
%link(rel="stylesheet" href="lib/css/skeleton.css")
@ -51,8 +51,9 @@
/ External javascript libraries: JQuery, and JQuery-Address
/ Placed at the end of the document so the pages load faster
%script(src="lib/js/jquery-1.9.1.js")
%script(src="lib/js/jquery.address.js")
%script(type="text/javascript" src="lib/js/jquery-1.9.1.js")
%script(type="text/javascript" src="lib/js/jquery.address.js")
%script(type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML")
/ Custom javascript for user interactivity
%script(src="js/default.js")
%script(type="text/javascript" src="js/default.js")

View File

@ -1,6 +1,6 @@
#contact-page.container.border-box
.row
#about-me-box
%p about me card here
#about-me-blurb.row
$body0$
#contact-page.container
.border-box
.row
$partial("templates/partials/business-card.haml")$
#about-me-blurb.row
$body0$

View File

@ -1,20 +1,19 @@
#home-page.container.border-box
.row
.eight.columns.alpha
%h1 About Me
#about-me-box
$aboutMe$
.seven.columns.offset-by-one.omega
#recent-posts
%h1 Recent Posts
%hr/
$partial("templates/partials/recent-posts-list.haml")$
#tag-cloud
%h1 Tag Cloud
%hr/
$tagCloud$
.row
#license.eight.columns.alpha
$license$
#tools.seven.columns.offset-by-one.omega
$tools$
#home-page.container
.border-box
.row
.eight.columns.alpha
$partial("templates/partials/business-card.haml")$
.seven.columns.offset-by-one.omega
#recent-posts
%h1 Recent Posts
%hr/
$partial("templates/partials/recent-posts-list.haml")$
#tag-cloud
%h1 Tag Cloud
%hr/
$tagCloud$
.row
#license.eight.columns.alpha
$license$
#tools.seven.columns.offset-by-one.omega
$tools$

View File

@ -0,0 +1,9 @@
#business-card
.photo
%p.description
Welcome to my blog!
.info
%span.name Collin J. Doering
%a.email(href="mailto:collin.doering@gmail.com") collin.doering@gmail.com
%a.gpg-key(href="files/collin-doering.gpg") 4096R/E05BFEC

View File

@ -8,7 +8,7 @@
$if(author)$ by
%span.author $author$
$endif$
$if(teaser)$
$teaser$
$else$

View File

@ -10,7 +10,7 @@
$endif$
$body$
%footer
%hr
.container