Hakyll configuration primarily complete.

All changes are detailed below. Both the ajax (default) and nojs version
are being generated properly. Remaining tasks include:
 - theming (css - both versions)
 - additional work on the templates (both versions [where applicable])
 - writing content (used by both versions but only one copy needed)
 - writing addition js where needed (for default version only)

Changes:
  .gitmodules: added/fixed git submodules; uses bootstrap and jquery-address
  css/default.css: various minor modifications to make things look sane
  index.html: home page for default version of site
  js/default.js: minor modifications to enable carousel and loading of content with ajax
  news/*: A bunch of bogus news articles to test the generation of the site
  pages/*: All pages are written here. Giving a 'weight' in the metadata will be used to order
    the navigation.
  site.hs: Many changes..see the source. Mostly complete (perhaps consider doing a screen
    reader version of the site)
  templates/*: Did various work thoughout the templates (including splitting up some between
    the different versions (noted by templateName-versionName)
      templates/archive.html
      templates/default-nojs.html
      templates/default.html
      templates/footer.html
      templates/nav-nojs.html
      templates/nav.html
      templates/news-nojs.html
      templates/news.html
      templates/page.html
      templates/post-list.html
      templates/post.html
      templates/recent-news-nojs.html
      templates/recent-news.html
This commit is contained in:
Collin J. Doering 2013-11-02 18:42:57 -04:00
commit 610d11903b
30 changed files with 863 additions and 0 deletions

6
.gitmodules vendored Normal file
View File

@ -0,0 +1,6 @@
[submodule "jquery-address"]
path = jquery-address
url = https://github.com/asual/jquery-address.git
[submodule "bootstrap"]
path = bootstrap
url = https://github.com/twbs/bootstrap.git

1
bootstrap Submodule

@ -0,0 +1 @@
Subproject commit e8a1df5f060bf7e6631554648e0abde150aedbe4

61
css/default.css Normal file
View File

@ -0,0 +1,61 @@
/* Move down content because we have a fixed navbar that is 50px tall */
body {
padding-top: 50px;
padding-bottom: 20px;
}
ul.dropdown-menu {
cursor: pointer;
}
li.active > a {
-moz-transition: background-color 0.2s;
-o-transition: background-color 0.2s;
-webkit-transition: background-color 0.2s;
transition: background-color 0.2s;
}
/* TODO: add transitions upon loading a new page */
#page-contents {
}
#page-contents.loading {
}
#page-contents.loading-error {
}
#noscript-alert {
text-align: center;
padding-top: 10px;
}
#recent-news {
margin: 10px;
background-color: black;
}
.carousel-caption {
top: 0px;
text-align: left;
/* This needs to be set per @media type */
left: 5%;
right: 5%;
}
.carousel-control {
width: 5%;
}
.carousel-inner {
height: 250px;
}
/* TODO: theme recent-news div on nojs version of site */
#recent-news-nojs {
margin-top: 10px;
}
#footer-right {
text-align: right;
}

5
index.html Normal file
View File

@ -0,0 +1,5 @@
---
title: Index
---
loading

1
jquery-address Submodule

@ -0,0 +1 @@
Subproject commit bb6103f9021fee0bf275e2b9dae31082c683ac94

101
js/default.js Normal file
View File

@ -0,0 +1,101 @@
/**
* (C) Copyright Collin Doering 2013
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* File:. default.js
* Author: Collin J. Doering
* Date: Sep 6, 2013
* Description: Client-side logic for rekahsoft-ca
*/
//------------------------
$(document).ready(function () {
$.address.init(function(event) {
console.log("init:");
}).change(function(event) {
console.log("change " + event.value);
// remove //pages from current url
var page_href = event.value;
console.log(event.value);
if (page_href == '/' || page_href == '') {
page_href = '/home.html';
}
$('a.menuitem[rel="address:' + page_href + '"]').closest('ul').find('li.active').removeClass('active');
$('a.menuitem[rel="address:' + page_href + '"]').closest('li').addClass('active');
// set page_href ot full url for ajax call
page_href = "pages" + page_href;
$.ajax({
url: page_href,
type: 'GET',
dataType: 'html',
beforeSend: function (xhr, settings) {
// Set '#page-content.loading' to show page-content-loading graphic
$('#page-content').addClass('loading');
console.log('beforeSend a.menuitem');
},
success: function (dta) {
// no need to removeClass('loading'); done on server side
// use .addClass('fadeIn') to use a css transition *TODO*
$('#page-content').replaceWith(dta);
},
error: function (xhr, status) {
// replace loading graphic with loading error graphic
$('#page-content').removeClass('loading').addClass('loading-error');
console.log('error retrieving page "' + page_href +'": ' + status);
}
});
});
$('ul.navbar-nav a.menuitem').click(function() {
$(this).closest('ul').find('li.active').removeClass('active');
$(this).closest('li').addClass('active');
//$('.navbar-collapse').collapse('hide');
});
// Callback for when the inital page has completely loaded (including images, etc..)
$(window).load(function () {
// something
});
// Load recent-news carousel
$.ajax({
url: 'recent-news.html',
type: 'GET',
dataType: 'html',
beforeSend: function (xhr, settings) {
// Set '#page-content.loading' to show page-content-loading graphic
//$('#page-content').addClass('loading');
console.log('Attempting to retrieve recent-news..');
},
success: function (dta) {
// no need to removeClass('loading'); done on server side
// use .addClass('fadeIn') to use a css transition *TODO*
$('#page-content').before(dta);
},
error: function (xhr, status) {
// replace loading graphic with loading error graphic
//$('#page-content').removeClass('loading').addClass('loading-error');
console.log('Error retrieving recent-news"' + page_href +'": ' + status);
}
});
});

View File

@ -0,0 +1,24 @@
---
title: Another Sample Item
author: Collin J. Doering
date: 2013-10-18
---
Hi there, this is news that rekahsoft presented to University of Waterloo and is awaiting their decision. And here's
a code sample of a simple program (the classic hello world):
``` haskell
main :: IO()
main = putStrLn "Hello, World"
```
<!--more-->
**Below is more of the news item including a lorem ipsum.**
Run a manual sweep of anomalous airborne or electromagnetic readings. Radiation levels in our atmosphere have increased by 3,000 percent. Electromagnetic and subspace wave fronts approaching synchronization. What is the strength of the ship's deflector shields at maximum output? The wormhole's size and short period would make this a local phenomenon. Do you have sufficient data to compile a holographic simulation?
Exceeding reaction chamber thermal limit. We have begun power-supply calibration. Force fields have been established on all turbo lifts and crawlways. Computer, run a level-two diagnostic on warp-drive systems. Antimatter containment positive. Warp drive within normal parameters. I read an ion trail characteristic of a freighter escape pod. The bomb had a molecular-decay detonator. Detecting some unusual fluctuations in subspace frequencies.
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.
Resistance is futile.

View File

@ -0,0 +1,20 @@
---
title: Deploy Command Working
author: Collin J. Doering
date: 2013-10-30
---
I'm happy to announce another peice of bogus news! The deploy command is now functional! Yeah! Anwyays a Loren Ipsum is below.
<!--more-->
These are the voyages of the Starship Enterprise. Its continuing mission, to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no one has gone before. We need to neutralize the homing signal. Each unit has total environmental control, gravity, temperature, atmosphere, light, in a protective field. Sensors show energy readings in your area. We had a forced chamber explosion in the resonator coil. Field strength has increased by 3,000 percent.
Communication is not possible. The shuttle has no power. Using the gravitational pull of a star to slingshot back in time? We are going to Starbase Montgomery for Engineering consultations prompted by minor read-out anomalies. Probes have recorded unusual levels of geological activity in all five planetary systems. Assemble a team. Look at records of the Drema quadrant. Would these scans detect artificial transmissions as well as natural signals?
Exceeding reaction chamber thermal limit. We have begun power-supply calibration. Force fields have been established on all turbo lifts and crawlways. Computer, run a level-two diagnostic on warp-drive systems. Antimatter containment positive. Warp drive within normal parameters. I read an ion trail characteristic of a freighter escape pod. The bomb had a molecular-decay detonator. Detecting some unusual fluctuations in subspace frequencies.
Deflector power at maximum. Energy discharge in six seconds. Warp reactor core primary coolant failure. Fluctuate phaser resonance frequencies. Resistance is futile. Recommend we adjust shield harmonics to the upper EM band when proceeding. These appear to be some kind of power-wave-guide conduits which allow them to work collectively as they perform ship functions. Increase deflector modulation to upper frequency band.
Run a manual sweep of anomalous airborne or electromagnetic readings. Radiation levels in our atmosphere have increased by 3,000 percent. Electromagnetic and subspace wave fronts approaching synchronization. What is the strength of the ship's deflector shields at maximum output? The wormhole's size and short period would make this a local phenomenon. Do you have sufficient data to compile a holographic simulation?
Resistance is futile.

View File

@ -0,0 +1,16 @@
---
title: More Sample News
author: Collin J. Doering
date: 2013-10-11
---
This is yet again another peice of sample news. This should be removed before deployment! Hers a list just for fun
- first item
- second item
- third and final item
<!--more-->
Now what are the possibilities of warp drive? Cmdr Riker's nervous system has been invaded by an unknown microorganism. The organisms fuse to the nerve, intertwining at the molecular level. That's why the transporter's biofilters couldn't extract it. The vertex waves show a K-complex corresponding to an REM state. The engineering section's critical. Destruction is imminent. Their robes contain ultritium, highly explosive, virtually undetectable by your transporter.
Communication is not possible. The shuttle has no power. Using the gravitational pull of a star to slingshot back in time? We are going to Starbase Montgomery for Engineering consultations prompted by minor read-out anomalies. Probes have recorded unusual levels of geological activity in all five planetary systems. Assemble a team. Look at records of the Drema quadrant. Would these scans detect artificial transmissions as well as natural signals?

View File

@ -0,0 +1,14 @@
---
title: New News Item
author: Collin J. Doering
date: 2013-10-25
---
Why hello! This is some news! And a link to a [site](http://theundergroundmouthpeace.org)
<!--more-->
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.
Sensors indicate human life forms 30 meters below the planet's surface. Stellar flares are increasing in magnitude and frequency. Set course for Rhomboid Dronegar 006, warp seven. There's no evidence of an advanced communication network. Total guidance system failure, with less than 24 hours' reserve power. Shield effectiveness has been reduced 12 percent. We have covered the area in a spherical pattern which a ship without warp drive could cross in the given time.
Deflector power at maximum. Energy discharge in six seconds. Warp reactor core primary coolant failure. Fluctuate phaser resonance frequencies. Resistance is futile. Recommend we adjust shield harmonics to the upper EM band when proceeding. These appear to be some kind of power-wave-guide conduits which allow them to work collectively as they perform ship functions. Increase deflector modulation to upper frequency band.

10
news/sample-news.markdown Normal file
View File

@ -0,0 +1,10 @@
---
title: Sample News
author: Collin J. Doering
date: 2013-10-11
---
This is some sample news with a link to the new [homepage](http://rekahsoft.ca)
<!--more-->
Exceeding reaction chamber thermal limit. We have begun power-supply calibration. Force fields have been established on all turbo lifts and crawlways. Computer, run a level-two diagnostic on warp-drive systems. Antimatter containment positive. Warp drive within normal parameters. I read an ion trail characteristic of a freighter escape pod. The bomb had a molecular-decay detonator. Detecting some unusual fluctuations in subspace frequencies.

View File

@ -0,0 +1,22 @@
---
title: The RekahSoft website is nearing completion!
author: Collin J. Doering
date: 2013-10-29
---
[This](/) website is almost done. Well..the content and theming still need to be completed,
but for the most part things are complete.
<!--more-->
These are the voyages of the Starship Enterprise. Its continuing mission, to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no one has gone before. We need to neutralize the homing signal. Each unit has total environmental control, gravity, temperature, atmosphere, light, in a protective field. Sensors show energy readings in your area. We had a forced chamber explosion in the resonator coil. Field strength has increased by 3,000 percent.
I have reset the sensors to scan for frequencies outside the usual range. By emitting harmonic vibrations to shatter the lattices. We will monitor and adjust the frequency of the resonators. He has this ability of instantly interpreting and extrapolating any verbal communication he hears. It may be due to the envelope over the structure, causing hydrogen-carbon helix patterns throughout. I'm comparing the molecular integrity of that bubble against our phasers.
Sensors indicate no shuttle or other ships in this sector. According to coordinates, we have travelled 7,000 light years and are located near the system J-25. Tractor beam released, sir. Force field maintaining our hull integrity. Damage report? Sections 27, 28 and 29 on decks four, five and six destroyed. Without our shields, at this range it is probable a photon detonation could destroy the Enterprise.
Exceeding reaction chamber thermal limit. We have begun power-supply calibration. Force fields have been established on all turbo lifts and crawlways. Computer, run a level-two diagnostic on warp-drive systems. Antimatter containment positive. Warp drive within normal parameters. I read an ion trail characteristic of a freighter escape pod. The bomb had a molecular-decay detonator. Detecting some unusual fluctuations in subspace frequencies.
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.
Now what are the possibilities of warp drive? Cmdr Riker's nervous system has been invaded by an unknown microorganism. The organisms fuse to the nerve, intertwining at the molecular level. That's why the transporter's biofilters couldn't extract it. The vertex waves show a K-complex corresponding to an REM state. The engineering section's critical. Destruction is imminent. Their robes contain ultritium, highly explosive, virtually undetectable by your transporter.

18
pages/about.markdown Normal file
View File

@ -0,0 +1,18 @@
---
title: About
author: Collin J. Doering
date: 2013-10-12
weight: 4
---
This is a little explanation about **Rekahsoft** the company.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent turpis turpis, lobortis nec tempor vel, mollis eu augue. Aliquam nunc nisi, ornare quis odio a, egestas tempor urna. Vestibulum ac nisl sit amet risus molestie elementum a in ipsum. Ut at ligula convallis, bibendum urna a, sagittis augue. Sed ut nisi eu mi scelerisque luctus vel eget ante. Phasellus at felis sit amet justo luctus volutpat. Nullam lorem nisl, ultricies eget nibh eget, egestas porta lectus.
Curabitur id suscipit massa, vitae lobortis ligula. Nunc in enim mi. Pellentesque velit orci, aliquet at tempor a, rutrum eget lacus. Ut eleifend, dolor id varius placerat, orci leo porttitor eros, a consectetur erat lectus sed nunc. Nulla egestas vulputate orci sit amet pellentesque. Mauris sodales nulla tincidunt faucibus bibendum. Cras suscipit egestas arcu ut sagittis. Fusce velit lectus, euismod a facilisis et, posuere sit amet lorem.
Nulla quis ipsum lorem. Mauris velit lorem, accumsan sed viverra sed, rutrum a arcu. Ut varius eros dignissim mollis condimentum. Morbi a massa enim. Phasellus hendrerit, dolor vel convallis interdum, augue sapien feugiat libero, non feugiat mauris odio vel arcu. Proin posuere diam arcu, ut laoreet quam tincidunt et. Maecenas faucibus mi magna, quis suscipit augue lobortis quis. Aenean aliquam quis magna in semper. Pellentesque et sem commodo, dapibus sapien vel, viverra augue. Sed quis arcu ut mauris dapibus laoreet ut eget risus. Vivamus convallis ante magna, blandit varius neque tristique quis. Nam urna nisl, cursus consectetur adipiscing sed, iaculis vitae sem. Suspendisse at vulputate odio, eu ultrices nisl. Praesent sed orci vel massa malesuada tincidunt. Aliquam et placerat ipsum. Nullam sit amet lacus ipsum.
Aliquam a consequat risus. Fusce et urna venenatis, suscipit velit non, ultrices libero. Morbi ullamcorper felis dolor, quis scelerisque tellus placerat non. Vestibulum vitae cursus nulla. Quisque porttitor pharetra iaculis. Aenean elementum lectus dui, et porttitor tellus fermentum sed. Suspendisse varius imperdiet ipsum, vel rhoncus nulla placerat nec. Nullam faucibus tempor ligula nec egestas. Etiam nisl tortor, varius at placerat eget, cursus id tellus.
Praesent ac laoreet purus, non tempus felis. Nunc ultrices luctus ante vel tincidunt. Integer quam turpis, pharetra vitae quam et, scelerisque scelerisque est. Nam ultricies, nisl sit amet sagittis euismod, quam nisi aliquam turpis, non fringilla lectus enim a elit. Sed purus sapien, mollis sit amet fringilla eu, tristique et sapien. Duis condimentum, arcu non fringilla tristique, urna tortor mattis felis, varius mollis mauris turpis pharetra felis. Etiam ullamcorper cursus sem in iaculis. Donec commodo, sem id ullamcorper viverra, nulla mi aliquet tortor, ut cursus mi leo sit amet mi. Phasellus sollicitudin mi vitae odio elementum, ut pellentesque ante dapibus. Cras convallis mollis arcu tempus dictum. Donec a risus at augue posuere pharetra. Suspendisse at tellus est. Phasellus tincidunt dolor non velit iaculis, eu faucibus ante pellentesque. Pellentesque sollicitudin augue arcu, non sagittis purus lacinia at.

18
pages/contact.markdown Normal file
View File

@ -0,0 +1,18 @@
---
title: Contact
author: Collin J. Doering
date: 2013-10-12
weight: 3
---
This pages lists **Rekahsoft's contact information**.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sollicitudin porttitor purus non malesuada. Sed commodo diam sed libero facilisis, eget ultrices est cursus. Donec vitae urna viverra, facilisis urna eget, commodo nunc. Fusce dictum, nisl sit amet vestibulum pellentesque, mauris purus pretium nunc, in varius erat enim id metus. Duis fermentum erat a dui tincidunt, nec dapibus risus fermentum. Aenean ligula enim, rutrum non risus nec, venenatis pretium ligula. Ut pretium, nulla a condimentum mollis, mauris turpis commodo est, eget viverra risus elit dapibus magna. Nullam eu mi eget erat sodales dignissim et a lacus. Pellentesque eu mauris id nunc luctus tempor sit amet pulvinar lectus. Suspendisse sollicitudin, odio nec dignissim commodo, enim massa hendrerit nisl, tempor pellentesque sem ligula eu augue.
Etiam lacus dolor, facilisis a vestibulum ut, vulputate sed arcu. Proin pulvinar eros at dui tincidunt, id imperdiet libero scelerisque. Sed sed faucibus eros. Quisque molestie molestie ante, in interdum nibh rutrum a. Duis quis placerat enim, sed feugiat nisi. Proin quis tellus eu dui condimentum tincidunt. Quisque ac egestas diam. In suscipit nulla ac tortor sodales semper. Pellentesque vestibulum quam ut enim convallis congue. Aenean sed magna in erat placerat aliquam id ac felis. Mauris adipiscing, tortor sed feugiat vehicula, enim elit molestie purus, quis porta est eros eu sem. In hac habitasse platea dictumst. Nam feugiat ante augue, non sagittis dui dignissim ut.
Quisque adipiscing scelerisque nibh eu dapibus. Phasellus ultrices ligula commodo nulla luctus sodales. Aliquam sed nulla id ligula commodo sagittis. Praesent elementum tempus metus quis pulvinar. Nam et venenatis magna. Etiam ac urna in ante faucibus malesuada ut vitae arcu. Sed ultrices scelerisque mauris sed ultricies.
Mauris id rutrum dui, eu fermentum nisl. Morbi sed diam elit. Sed a aliquam nisl. Nam aliquet odio id mi dignissim, non rutrum nisi vulputate. Nullam aliquet convallis massa eu ornare. Mauris ante nulla, lobortis et nisl eget, imperdiet eleifend lorem. Integer sed quam tellus. Fusce elit turpis, viverra scelerisque consectetur vel, pellentesque vitae erat. Aliquam dictum laoreet lectus vehicula auctor. Phasellus ultrices congue justo, ut consequat risus tincidunt ut. Donec et nulla tincidunt, interdum velit eget, elementum nibh. Integer ac consectetur elit, a commodo diam. Suspendisse sit amet tempor dui, at iaculis neque. Donec tristique nec turpis eu molestie. Sed sed eros sem.
Vivamus interdum enim et lacinia scelerisque. Sed vitae leo eu nisl ornare accumsan. Donec rhoncus pulvinar tellus, consequat porttitor orci laoreet eget. Curabitur placerat commodo hendrerit. Duis eget risus id dolor ultricies viverra. Suspendisse sagittis porttitor tellus eget fermentum. Integer ullamcorper lacinia dolor ac laoreet. Phasellus in dignissim ipsum. Suspendisse in tortor purus. Curabitur porttitor nisl et tellus pharetra, ut accumsan arcu porttitor.

18
pages/home.markdown Normal file
View File

@ -0,0 +1,18 @@
---
title: Home
author: Collin J. Doering
date: 2013-10-12
weight: 1
---
This is the homepage for **Rekahsoft**.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer luctus vitae leo tristique iaculis. Aenean fringilla non urna non tincidunt. Nulla facilisi. Vestibulum varius, sem porta fermentum ultricies, metus dui eleifend sapien, porttitor sollicitudin erat quam tristique turpis. Sed id molestie est. Mauris ut nisl nisl. Duis aliquet, felis a tempus eleifend, dui odio iaculis odio, a ultricies felis mauris in urna. Nullam consequat luctus turpis nec commodo.
Integer ullamcorper ligula non leo gravida, at dictum urna imperdiet. Donec sit amet semper felis, pulvinar pharetra sem. Suspendisse consectetur elit sit amet ligula pellentesque cursus. Vivamus cursus, sem id dictum malesuada, risus purus vestibulum tellus, ut imperdiet justo est et metus. Aenean et velit velit. Mauris at tortor quam. Donec sed sem id massa convallis volutpat.
Cras venenatis tincidunt gravida. Curabitur ac ullamcorper nisl. Donec tempus porta dictum. Nunc cursus erat et nunc fermentum, ut semper ligula vulputate. Vestibulum nec dapibus tellus. Quisque est leo, feugiat in tellus non, sagittis elementum nisl. Mauris ac purus non augue dictum tincidunt at at orci. Ut in tellus pretium, commodo nulla vitae, commodo dolor. Morbi facilisis tristique hendrerit. In elementum, velit a convallis venenatis, lectus erat scelerisque lectus, vel convallis lectus orci et turpis. Nullam tortor nibh, vestibulum eget lacus ut, ornare accumsan velit. Cras arcu turpis, consequat ac blandit vel, lacinia et odio.
Cras rutrum, ipsum sit amet feugiat elementum, nulla mi tincidunt dui, nec lacinia arcu sem viverra nisi. Aliquam sed enim eu orci lobortis tempus. Vivamus pellentesque lorem sit amet mollis aliquet. Donec imperdiet, lacus nec ullamcorper faucibus, quam turpis ultrices elit, at rhoncus nisi sapien nec nisi. Aliquam id nisi lectus. Integer egestas hendrerit sapien, ut auctor purus dapibus a. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac faucibus tellus, eu placerat purus. Sed eget consequat ligula. Ut a dolor ligula. Donec ac consequat dolor, nec fringilla nisl. Sed venenatis urna ante, sed tincidunt sem convallis vel. Aenean adipiscing mi elit, bibendum condimentum metus euismod at. Curabitur in est viverra, faucibus odio et, ultricies massa. Donec laoreet porttitor lacus, blandit ullamcorper justo pharetra eu.
Mauris eu quam porta, semper risus at, ullamcorper elit. Phasellus vitae tortor tincidunt, adipiscing eros ac, sodales tortor. Pellentesque cursus suscipit dolor eu blandit. Proin pellentesque tincidunt dui, vel molestie ante tristique quis. Donec tempus pharetra dolor, eu fringilla orci molestie in. Nulla viverra ornare odio, id pulvinar arcu volutpat id. Aenean vehicula, velit id bibendum aliquam, augue dolor scelerisque nisl, non sollicitudin massa sem a ipsum. Integer placerat, felis sed sollicitudin posuere, leo lacus faucibus lacus, quis luctus mi tortor non risus. Nunc eleifend felis sit amet turpis vulputate, imperdiet tristique lectus sagittis. Donec pellentesque at dolor ut gravida. Curabitur sollicitudin eros ut dui ullamcorper consequat.

18
pages/services.markdown Normal file
View File

@ -0,0 +1,18 @@
---
title: Services
author: Collin J. Doering
date: 2013-10-12
weight: 2
---
This pages explains the services offered by **Rekahsoft**.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sollicitudin porttitor purus non malesuada. Sed commodo diam sed libero facilisis, eget ultrices est cursus. Donec vitae urna viverra, facilisis urna eget, commodo nunc. Fusce dictum, nisl sit amet vestibulum pellentesque, mauris purus pretium nunc, in varius erat enim id metus. Duis fermentum erat a dui tincidunt, nec dapibus risus fermentum. Aenean ligula enim, rutrum non risus nec, venenatis pretium ligula. Ut pretium, nulla a condimentum mollis, mauris turpis commodo est, eget viverra risus elit dapibus magna. Nullam eu mi eget erat sodales dignissim et a lacus. Pellentesque eu mauris id nunc luctus tempor sit amet pulvinar lectus. Suspendisse sollicitudin, odio nec dignissim commodo, enim massa hendrerit nisl, tempor pellentesque sem ligula eu augue.
Etiam lacus dolor, facilisis a vestibulum ut, vulputate sed arcu. Proin pulvinar eros at dui tincidunt, id imperdiet libero scelerisque. Sed sed faucibus eros. Quisque molestie molestie ante, in interdum nibh rutrum a. Duis quis placerat enim, sed feugiat nisi. Proin quis tellus eu dui condimentum tincidunt. Quisque ac egestas diam. In suscipit nulla ac tortor sodales semper. Pellentesque vestibulum quam ut enim convallis congue. Aenean sed magna in erat placerat aliquam id ac felis. Mauris adipiscing, tortor sed feugiat vehicula, enim elit molestie purus, quis porta est eros eu sem. In hac habitasse platea dictumst. Nam feugiat ante augue, non sagittis dui dignissim ut.
Quisque adipiscing scelerisque nibh eu dapibus. Phasellus ultrices ligula commodo nulla luctus sodales. Aliquam sed nulla id ligula commodo sagittis. Praesent elementum tempus metus quis pulvinar. Nam et venenatis magna. Etiam ac urna in ante faucibus malesuada ut vitae arcu. Sed ultrices scelerisque mauris sed ultricies.
Mauris id rutrum dui, eu fermentum nisl. Morbi sed diam elit. Sed a aliquam nisl. Nam aliquet odio id mi dignissim, non rutrum nisi vulputate. Nullam aliquet convallis massa eu ornare. Mauris ante nulla, lobortis et nisl eget, imperdiet eleifend lorem. Integer sed quam tellus. Fusce elit turpis, viverra scelerisque consectetur vel, pellentesque vitae erat. Aliquam dictum laoreet lectus vehicula auctor. Phasellus ultrices congue justo, ut consequat risus tincidunt ut. Donec et nulla tincidunt, interdum velit eget, elementum nibh. Integer ac consectetur elit, a commodo diam. Suspendisse sit amet tempor dui, at iaculis neque. Donec tristique nec turpis eu molestie. Sed sed eros sem.
Vivamus interdum enim et lacinia scelerisque. Sed vitae leo eu nisl ornare accumsan. Donec rhoncus pulvinar tellus, consequat porttitor orci laoreet eget. Curabitur placerat commodo hendrerit. Duis eget risus id dolor ultricies viverra. Suspendisse sagittis porttitor tellus eget fermentum. Integer ullamcorper lacinia dolor ac laoreet. Phasellus in dignissim ipsum. Suspendisse in tortor purus. Curabitur porttitor nisl et tellus pharetra, ut accumsan arcu porttitor.

272
site.hs Normal file
View File

@ -0,0 +1,272 @@
---------------------------------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings, TupleSections #-}
---------------------------------------------------------------------------------------------------------
-- (C) Copyright Collin Doering @!@YEAR@!@
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-- File: site.hs
-- Author: Collin J. Doering <rekahsoft@gmail.com>
-- Date: Oct 11, 2013
-- Description: The website for RekahSoft
---------------------------------------------------------------------------------------------------------
import Hakyll
import Control.Monad
import Data.Monoid (mappend)
import Data.List (sortBy)
import Data.Ord (comparing)
import Data.Functor ((<$>))
import System.FilePath ((</>))
---------------------------------------------------------------------------------------------------------
myConfig :: Configuration
myConfig = defaultConfiguration
{ deployCommand = "rsync -rpogtzc --delete -e ssh _site/ collin@omicron:~/public_html/"
, previewPort = 3000
}
feedConfig :: FeedConfiguration
feedConfig = FeedConfiguration
{ feedTitle = "RekahSoft updates and news"
, feedDescription = "Updates and news in regards to RekahSoft"
, feedAuthorName = "Collin J. Doering"
, feedAuthorEmail = "support@rekahsoft.ca"
, feedRoot = "http://rekahsoft.ca"
}
main :: IO ()
main = hakyllWith myConfig $ do
-- All Versions ------------------------------------------------------------------------------------------
match "action/**" $ do
route idRoute
compile copyFileCompiler
forM_ [("css/**", idRoute),
("bootstrap/dist/css/bootstrap.css", customRoute $ const "lib/css/bootstrap.css")] $ \(p, r) ->
match p $ do
route r
compile compressCssCompiler
forM_ [("images/**", idRoute),
("bootstrap/assets/ico/favicon.png",
customRoute $ const "lib/ico/favicon.png")] $ \(p, r) ->
match p $ do
route r
compile copyFileCompiler
match "templates/*" $ compile templateCompiler
---------------------------------------------------------------------------------------------------------
-- Default Version --------------------------------------------------------------------------------------
match "pages/*" $ do
route $ setExtension "html"
compile $ do
pandocCompiler
>>= loadAndApplyTemplate "templates/page.html" defaultContext
>>= relativizeUrls
match "news/**" $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= saveSnapshot "content"
-- >>= loadAndApplyTemplate "templates/news.html" newsCtx
>>= relativizeUrls
create ["atom.xml"] $ do
route idRoute
compile $ do
let feedCtx = newsCtx `mappend` bodyField "description"
newsPosts <- loadAllSnapshots ("news/**" .&&. hasNoVersion) "content"
>>= fmap (take 10) . recentFirst
renderAtom feedConfig feedCtx newsPosts
create ["news-archive.html"] $ do
route idRoute
compile $ do
news <- recentFirst =<< loadAllSnapshots ("news/*" .&&. hasNoVersion) "content"
let archiveCtx =
listField "news" newsCtx (return news) `mappend`
constField "title" "News Archives" `mappend`
defaultContext
makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx
>>= loadAndApplyTemplate "templates/page.html" defaultContext
>>= relativizeUrls
create ["recent-news.html"] $ do
route $ constRoute "recent-news.html"
compile $ do
-- Show a slideshow of news using js..limit to the 5 most recent posts
recentNews' <- loadAllSnapshots ("news/**" .&&. hasNoVersion) "content"
>>= fmap (take 5) . recentFirst
let mostRecentNews = head recentNews'
recentNews = tail recentNews'
recentNewsCtx =
field "mostRecentNewsTeaser" (const $ do
body <- itemBody <$> loadSnapshot (itemIdentifier mostRecentNews) "content"
case needlePrefix "<!--more-->" body of
Nothing -> fail $
"rekahsoft-ca (site.hs): No teaser defined for " ++
show (itemIdentifier mostRecentNews)
Just s -> return s) `mappend`
field "mostRecentNewsBody"
(const $ return . itemBody $ mostRecentNews) `mappend`
field "mostRecentNewsTitle"
(const $ getMetadataField' (itemIdentifier mostRecentNews) "title") `mappend`
listField "recentNews" newsTeaserCtx (return recentNews) `mappend`
defaultContext
makeItem ""
>>= loadAndApplyTemplate "templates/recent-news.html" recentNewsCtx
>>= relativizeUrls
forM_ [("js/**", idRoute),
("bootstrap/dist/js/bootstrap.js", customRoute $ const "lib/js/bootstrap.js"),
("bootstrap/assets/js/jquery.js", customRoute $ const "lib/js/jquery.js"),
("bootstrap/js/*.js", gsubRoute "bootstrap" (const "lib")),
("jquery-address/src/jquery.address.js",
customRoute $ const "lib/js/jquery.address.js")] $ \(p, r) ->
match p $ do
route r
compile $ getResourceString >>= withItemBody (unixFilter "jsmin" [])
match "index.html" $ do
route idRoute
compile $ do
-- Generate nav-bar from pages/*
pages <- sortByM pageWeight =<< loadAll ("pages/*" .&&. hasNoVersion)
let indexCtx = listField "pages" pagesCtx (return pages) `mappend` defaultContext
getResourceBody
>>= applyAsTemplate indexCtx
>>= loadAndApplyTemplate "templates/default.html" indexCtx
>>= relativizeUrls
---------------------------------------------------------------------------------------------------------
-- NOJS Version -----------------------------------------------------------------------------------------
create ["nojs/atom.xml"] $ do
route idRoute
compile $ do
let feedCtx = newsCtx `mappend` bodyField "description"
newsPosts <- loadAllSnapshots ("news/**" .&&. hasVersion "nojs") "content"
>>= fmap (take 10) . recentFirst
renderAtom feedConfig feedCtx newsPosts
create ["nojs/news-archive.html"] $ do
route idRoute
compile $ do
-- Load all news for archive
news <- recentFirst =<< loadAllSnapshots ("news/*" .&&. hasVersion "nojs") "content"
-- Generate nav-bar from pages/*
pages <- sortByM pageWeight =<< loadAll ("pages/*" .&&. hasVersion "nav-gen")
let archiveCtx =
listField "news" newsCtx (return news) `mappend`
constField "title" "News Archives" `mappend`
defaultContext
indexCtx =
listField "pagesFirst" pagesCtx (return pages) `mappend`
listField "pagesLast" pagesCtx (return []) `mappend`
defaultContext
makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx
>>= loadAndApplyTemplate "templates/default-nojs.html" indexCtx
>>= relativizeUrls
match "news/**" $ version "nojs" $ do
route $ customRoute (\r -> "nojs" </> toFilePath r) `composeRoutes` setExtension "html"
compile $ do
-- Generate nav-bar from pages/*
pages <- sortByM pageWeight =<< loadAll ("pages/*" .&&. hasVersion "nav-gen")
-- Get the current Identifier
curId <- getUnderlying
let (pagesFirst, pagesLast') = flip span pages $ \x ->
toFilePath curId /= (toFilePath . itemIdentifier $ x)
pagesLast = if not . null $ pagesLast' then tail pagesLast' else []
newsNojsCtx =
listField "pagesFirst" pagesCtx (return pagesFirst) `mappend`
listField "pagesLast" pagesCtx (return pagesLast) `mappend`
defaultContext
pandocCompiler
>>= saveSnapshot "content"
>>= loadAndApplyTemplate "templates/news-nojs.html" newsCtx
>>= loadAndApplyTemplate "templates/default-nojs.html" newsNojsCtx
>>= relativizeUrls
match "pages/*" $ version "nav-gen" $ do
route $ customRoute (\r -> "nojs" </> toFilePath r) `composeRoutes` setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/page.html" defaultContext
match "pages/*" $ version "nojs" $ do
route $ customRoute (\r -> "nojs" </> toFilePath r) `composeRoutes` setExtension "html"
compile $ do
-- Show a slideshow of news using js..limit to the 3 most recent posts
recentNews <- loadAllSnapshots ("news/**" .&&. hasVersion "nojs") "content"
>>= fmap (take 3) . recentFirst
-- Generate nav-bar from pages/*
pages <- sortByM pageWeight =<< loadAll ("pages/*" .&&. hasVersion "nav-gen")
-- Get the current Identifier
curId <- getUnderlying
let (pagesFirst, pagesLast') = flip span pages $ \x ->
toFilePath curId /= (toFilePath . itemIdentifier $ x)
pageMid = head pagesLast'
pagesLast = if not . null $ pagesLast' then tail pagesLast' else []
pagesNojsCtx =
listField "recentNews" newsTeaserCtx (return recentNews) `mappend`
listField "pagesFirst" pagesCtx (return pagesFirst) `mappend`
field "pageMid" (const $ return . itemBody $ pageMid) `mappend`
listField "pagesLast" pagesCtx (return pagesLast) `mappend`
defaultContext
loadVersion "nav-gen" curId
>>= loadAndApplyTemplate "templates/default-nojs.html" pagesNojsCtx
>>= relativizeUrls
---------------------------------------------------------------------------------------------------------
-- Functions & Constants --------------------------------------------------------------------------------
loadVersion :: String -> Identifier -> Compiler (Item String)
loadVersion v i = load (setVersion (listAsMaybe v) i) >>= makeItem . itemBody
where listAsMaybe [] = Nothing
listAsMaybe xs = Just xs
newsCtx :: Context String
newsCtx = dateField "date" "%B %e, %Y" `mappend`
defaultContext
newsTeaserCtx :: Context String
newsTeaserCtx = teaserField "teaser" "content" `mappend`
newsCtx
pagesCtx :: Context String
pagesCtx = field "virtualpath" (fmap (drop 6 . maybe "" toUrl) . getRoute . itemIdentifier) `mappend`
defaultContext
pageWeight :: (Functor f, MonadMetadata f) => Item a -> f Int
pageWeight i = fmap (maybe 0 read) $ getMetadataField (itemIdentifier i) "weight"
sortByM :: (Monad m, Ord k) => (a -> m k) -> [a] -> m [a]
sortByM f xs = liftM (map fst . sortBy (comparing snd)) $
mapM (\x -> liftM (x,) (f x)) xs
---------------------------------------------------------------------------------------------------------

3
templates/archive.html Normal file
View File

@ -0,0 +1,3 @@
<h1>News Archive</h1>
<p>Below are a list of RekahSoft press releases</p>
$partial("templates/post-list.html")$

View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Custom soltuions to unique problems">
<meta name="author" content="Collin Doering">
<link rel="shortcut icon" href="/lib/ico/favicon.png">
<title>RekahSoft</title>
<!-- Bootstrap core CSS -->
<link href="/lib/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="/css/default.css" rel="stylesheet">
</head>
<body>
$partial("templates/nav-nojs.html")$
<div class="container">
$if(recentNews)$
$partial("templates/recent-news-nojs.html")$
$endif$
$body$
$partial("templates/footer.html")$
</div>
</body>
</html>

54
templates/default.html Normal file
View File

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Custom soltuions to unique problems">
<meta name="author" content="Collin Doering">
<link rel="shortcut icon" href="lib/ico/favicon.png">
<title>RekahSoft</title>
<!-- Bootstrap core CSS -->
<link href="lib/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/default.css" rel="stylesheet">
<noscript>
<div id="noscript-alert" class="container">
<div class="alert alert-danger">
<h1>This site requires javascript!</h1>
<p>If you insist on not using javascript we provide a simplified website <a class="alert-link" href="nojs/pages/home.html">here</a></p>
</div>
</div>
</noscript>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="bootstrap/assets/js/html5shiv.js"></script>
<script src="bootstrap/assets/js/respond.min.js"></script>
<![endif]-->
</head>
<body>
$partial("templates/nav.html")$
<div class="container">
<div id="page-content" class="container loading">
<div class="row"></div>
</div>
$partial("templates/footer.html")$
</div>
<!-- External javascript libraries: Bootstrap, JQuery, and JQuery-Address
<!-- Placed at the end of the document so the pages load faster -->
<script src="lib/js/jquery.js"></script>
<script src="lib/js/bootstrap.js"></script>
<script src="lib/js/transition.js"></script>
<script src="lib/js/collapse.js"></script>
<script src="lib/js/jquery.address.js"></script>
<!-- Custom javascript for user interactivity -->
<script src="js/default.js"></script>
</body>
</html>

10
templates/footer.html Normal file
View File

@ -0,0 +1,10 @@
<hr>
<footer>
<div id="footer-left" class="col-xs-6 col-sm-6 col-md-6">
<p>&copy; <a href="/">RekahSoft</a> 2013</p>
</div>
<div id="footer-right" class="col-xs-6 col-sm-6 col-md-6">
<p>Proudly generated by <a href="http://jaspervdj.be/hakyll">Hakyll</a></p>
</div>
</footer>

31
templates/nav-nojs.html Normal file
View File

@ -0,0 +1,31 @@
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/nojs/pages/home.html">RekahSoft</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
$for(pagesFirst)$
<li>
<a class="menuitem" href="$url$">$title$</a>
</li>
$endfor$
$if(pageMid)$
<li class="active">
<a class="menuitem" href="$url$">$title$</a>
</li>
$endif$
$for(pagesLast)$
<li>
<a class="menuitem" href="$url$">$title$</a>
</li>
$endfor$
</ul>
</div>
</div>
</div>

21
templates/nav.html Normal file
View File

@ -0,0 +1,21 @@
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">RekahSoft</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
$for(pages)$
<li>
<a class="menuitem" rel="address:$virtualpath$" href="$url$">$title$</a>
</li>
$endfor$
</ul>
</div>
</div>
</div>

5
templates/news-nojs.html Normal file
View File

@ -0,0 +1,5 @@
<div class="row">
<h1>$title$</h1>
<p>Published on $date$ $if(author)$ by $author$ $endif$</p>
<p>$body$</p>
</div>

1
templates/news.html Normal file
View File

@ -0,0 +1 @@
$body$

5
templates/page.html Normal file
View File

@ -0,0 +1,5 @@
<div id="page-content" class="container">
<div class="row">
$body$
</div>
</div>

7
templates/post-list.html Normal file
View File

@ -0,0 +1,7 @@
<ul>
$for(news)$
<li>
<a href="$url$">$title$</a> - $date$
</li>
$endfor$
</ul>

8
templates/post.html Normal file
View File

@ -0,0 +1,8 @@
<div class="info">
Posted on $date$
$if(author)$
by $author$
$endif$
</div>
$body$

View File

@ -0,0 +1,15 @@
<div id="recent-news-nojs" class="panel panel-default">
<div class="panel-heading"><strong>Recent News</strong></div>
<ul class="list-group">
$for(recentNews)$
<li class="recent-news-item-nojs list-group-item">
<a href="$url$"><strong>$title$</strong></a>
$if(teaser)$
$teaser$
$else$
$body$
$endif$
</li>
$endfor$
</ul>
</div>

View File

@ -0,0 +1,49 @@
<div id="recent-news" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#recent-news" data-slide-to="0" class="active"></li>
<li data-target="#recent-news" data-slide-to="1"></li>
<li data-target="#recent-news" data-slide-to="2"></li>
<li data-target="#recent-news" data-slide-to="3"></li>
<li data-target="#recent-news" data-slide-to="4"></li>
</ol>
<div class="carousel-inner">
<div class="recent-news-item item active">
<div class="container">
<img height="250px"/>
<div class="carousel-caption">
<h1>$mostRecentNewsTitle$</h1>
$if(mostRecentNewsTeaser)$
$mostRecentNewsTeaser$
$else$
$mostRecentNewsBody$
$endif$
</div>
</div>
</div>
$for(recentNews)$
<div class="recent-news-item item">
<div class="container">
<img height="250px"/>
<div class="carousel-caption">
<h1>$title$</h1>
$if(teaser)$
$teaser$
$else$
$body$
$endif$
</div>
</div>
</div>
$endfor$
</div>
<a class="left carousel-control" href="#recent-news" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#recent-news" data-slide="next">
<span class="icon-next"></span>
</a>
</div>