Commit Graph

169 Commits

Author SHA1 Message Date
Collin J. Doering 98d564f061 Use absolute link to reference atom feed from nav
This is required otherwise links to the atom feed on any post or tag
page will be broken.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering af5ab576fb Updated site tests
Due to pages being generated to "/" instead of "pages/" some minor
changes were required. Also some repeated code related to filtering and
looking up html files was relocated to a function and improved.

These tests still are not very comprehensive and there's definite room
for improvement. One issue is when the tests are run they generate
needless/useless analytics data.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering 5e9ff21813 Fixed blog pagination link issue
See TODO.org for more details

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering b8b003f103 Removed unused image images/post-icon2.svg
"images/post-icon2.svg" is an exact copy of "images/post-icon.svg" and
thus can be removed.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering a4b3d3d35e Moved pages/home.markdown to pages/index.markdown
This removes a special case when generating the pages. Namely having to
change the route of "pages/home.markdown" to "pages/index.markdown"
before being converted to its final route of "/index.html".

Note: Because "pages/home.markdown" was renamed, its template
"templates/pages/home.html" has also been renamed to
"templates/pages/index.html".

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering 316ac7fd2d Consolidated repeat code for generating navContext
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering 375dbcfc74 Fixed Tag pages pagination artifact
Given a tag with name "gen", only "tags/gen1.html" through
"tags/genN.html" should be generated. Before this commit, an addition
file was unwittingly generated for each tag, which contained all posts
tagged with that tag (in the case of tag "gen" it would have generated "tags/gen.html"
which contains all posts tagged "gen").

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering deb81e9cbd Fixed double entry of /index.html in manifest
Because index.html is now generated as part of the "pages/*" rule (via
"pages/home.html") and there is no shell index page which then is filled
with content using javascript, "index.html" does not need to be listed
explicitly for manifest.appcache generation.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering 53c782d5ab Cleanup spacing/formatting in src/site.hs
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering 97d4bff5cd Site working with or without javascript
Now uses history.pushState as a replacement for jquery-address.

Links to blog and tag pages are broken currently; see TODO.org for
details.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering c5803970bd Removed extra spacing from js/default.js
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering b065448a26 Removed jquery-address
Note: The sites javascript doesn't work currently as jquery-address has not
yet been replaced by the history api. This however doesn't stop users
from viewing the site, the javascript just errors out in the background
for users who have it enabled.

See TODO.org for more details of what needs to be completed

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering 0902730137 Removed use of virtualpath contexts
Now because all URLs are now valid urls, and no special treatment of
pages is required the following changes were made:

* Removed rel attribute from navigation anchor tags in
  "templates/partials/nav.html"
* Removed use of virtualpath context and associated pagination code
  associated with virtual paths in "src/site.hs"
* Removed unneeded bloat from "templates/paritals/paginate.html" because
  irtualPaginateContext is now no longer needed

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering bc1cfaabeb Removed init and loading-error css and logic
Because all pages are complete pages that can be viewed with or without
javascript, the 'init' and 'loading-error' classes should not be set on
the '#page-content' div. Similarly the 'loading' class should not be set
on '#nav'. All associated logic and css for the 'init' and 'loading'
classes is also unused. This commit removes the aforementioned.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering a21fe60c9e Fixed js page loading issue
Load html using $.parseHTML so that no scripts are executed, otherwise
all scripts are loaded each page load and ajax load which causes an
infinite loop.

Currently, though everything is functioning, there are a few
deficiencies. See TODO.org for more details.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering e5a90c220e Fixed blog paginate page links in manifest
Since paginated pages for the blog are now generated to "/", update
"/manifest.appcache" accordingly.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering baef1e6f00 Use double quotes instead of single quotes in html
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:26 -04:00
Collin J. Doering e634f0fbe4 Consolidated default and nojs versions of site
Removed old nojs specific templates and updated "templates/default.html"
and "templates/partials/nav.html" to support nojs. All pages now use
relativized urls. Navigation pages (including blog paginated pages) are
generated to "/" instead of "/pages/".

Site now works when javascript is disabled. Unfortunately, it no longer
works when javascript is enabled. This is due to the client side router
but needs to be debugged further.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:15:14 -04:00
Collin J. Doering df6d5f0e68 Hide analytics img on nojs site
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-16 02:08:40 -04:00
Collin J. Doering 0410e41e11 Fix nojs navigation hrefs
Because the metadata of pages/* is needed for generating pages/* itself,
and for posts/**, it must be preprocessed. This is done in the version
"nav-gen" but because the pages are not given a route, they have an
empty $url$ field within templates. That is, when a list of pages is
retrieved and used to generate the navigation, they have no url field,
thus breaking navigation. Specifying the same route for both solves this
problem, as the final version depends on the preprocessed version and
thus will be the final result.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-10 17:35:46 -04:00
Collin J. Doering bedfd8d297 Add SEO meta information to default-nojs template
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-10 16:56:43 -04:00
Collin J. Doering 4eaf774f11 Minor changes and cleanup to nojs version
Unfortunately, tags do not seem to be working correctly. That is:

* Nothing seems to be generated to the expect spot
  _site/nojs/tags/*.html
* tagcloud for tagsNoJs is empty
* tags are displayed on post pages but are not hyperlinked

Currently why this does not work is unknown.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-10 16:56:43 -04:00
Collin J. Doering 4ed922d553 Removed unused templates
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-10 16:56:43 -04:00
Collin J. Doering c535ebde58 Removed unused nojs/archive rule and template
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-10 16:56:43 -04:00
Collin J. Doering d8c7e54aaa Partly working NoJs site
Updated nojs site as the code became stale over time as a comment. Nojs
site now mostly works, excluding the following issues:

* Navigation links have no href.
* Tags do not seem to work; the tagcloud that is displayed on the nojs
  homepage references the tags for the main site and tags aren't
  displayed in posts. The cause for this is not yet known.
* Unused templates that are nojs specific can be removed:
  * templates/archive.html
  * templates/partials/post-nojs.html
  * templates/partials/recent-posts-nojs.html

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-10 16:56:43 -04:00
Collin J. Doering 8997f122b5 Uncommented old nojs site generator code
Also updated the name of template files from *.haml to *.html as haml is
no longer used for html templates.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-10 16:56:43 -04:00
Collin J. Doering ea1fcd0c8b Worked on draft church-encoding-in-javascript
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-10 16:55:28 -04:00
Collin J. Doering 4b832099aa Add blog post: About Comments
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-05 07:25:01 -04:00
Collin J. Doering 05bdb874fc Setup Piwik analytics
Setup Piwik tracking of page loads. The global array _paq is used to
communicate commands to the piwik tracker via the script piwik.js which
is loaded asynchronously from the analytics server. Every time a ajax
call is made successfully and content is loaded in the page, analytics
data is captured and sent to the tracker (the loadPageContent function).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-05 06:55:48 -04:00
Collin J. Doering 2f16cce227 Change email to @rekahsoft.ca on business-card
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-05 06:55:48 -04:00
Collin J. Doering 92acb5344e Add robots.txt for web robots
Allow all robots to access any part of the site. This may change in the
future, as the html snippets that are generated for the posts and pages
should not be directly indexed.

See: http://www.robotstxt.org/robotstxt.html

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-05 02:42:12 -04:00
Collin J. Doering b41c58246f Add SEO meta information to default html template
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-05 02:39:22 -04:00
Collin J. Doering bcfe9e049c Mention bug tracker in README.md
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-08-03 21:16:27 -04:00
Collin J. Doering 65fc31e285 Added post to test markdown features and styles
The file posts/.markdown-test.markdown uses all features of
markdown (excluding code blocks). This is handy to check the styling of
various things (figures, inline images, tables, headings, etc..).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-19 03:31:36 -04:00
Collin J. Doering c9db6b881d Fix spacing of post footers
Give more space to tags, as 'Read More' and 'See Comments' each take a
static amount of space but the number of tags for a given post varies.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-19 03:29:07 -04:00
Collin J. Doering 0b1f68a992 Added 'Computer From Scratch' article
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-19 03:29:07 -04:00
Collin J. Doering b4d1523cc6 Added files/images directory and modified drafts
The file/images directory is meant for images used for posts. They will
not be application cached (which is what one would want as otherwise the
application cache would become too large).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-19 03:29:07 -04:00
Collin J. Doering 9976b7a719 Added drafts folder including some upcoming articles
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-19 03:29:07 -04:00
Collin J. Doering ac168aa1af Removed lorem ipsum testing posts
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-19 03:29:07 -04:00
Collin J. Doering ecc75e6375 Removed old nojs comments from src/site.hs
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-11 03:12:05 -04:00
Collin J. Doering 026237b911 Wrap site tool to allow testing option
Instead of having a symbolic link from ./site to the executable in
dist/build/blog-rekahsoft-ca/blog-rekahsoft-ca, a separate test
running script ./site-test and a Makefile (which is redundant), have a
single shell script that wraps the blog-rekahsoft-ca executable and adds
a test option along with a switch to start selenium (-s|--run-selenium).

Updated README accordingly and removed unnecessary Makefile, and
site-test. Moved the symbolic link ./site to ./%site.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-11 03:11:48 -04:00
Collin J. Doering 1bc0beefab Fixed no javascript access message page
When the site is viewed without javascript the navbar forever animates
and the opacity of #page-contents is set, thus making the no javascript
message display not acceptable. To get around this a noscript tag in the
header is added that sets specific CSS in the case the there is indeed
no javascript.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-06 21:41:20 -04:00
Collin J. Doering 1d8e0a5587 Fixed status message behavioral issues
Now displays multiple error messages one after the other. Also fixed an
issue where when there is a status message being display and another
error happens, the status message slides up then down again with the new
message.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-06 21:41:20 -04:00
Collin J. Doering c83671ad8c General CSS touch ups
Added margin to bottom of business-card and tidied up spacing of h1 and
hr elements.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-06 21:41:20 -04:00
Collin J. Doering 99ab1162da Added road map to README
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-06 21:41:20 -04:00
Collin J. Doering 072e3d9870 Themed post content (tables, images, figures, code)
Added theming for tables, inline images, and figures. Inline images are
specified using the markdown syntax "![link text](link_href)" somewhere
within a paragraph. When a link is specified with the same syntax given
previously, Pandoc will generate it as a figure. Figures are displayed
across the whole width of the post and inline-images floated to the
right. Some javascript was added to js/default.js to enable the ability
to click to toggle fullscreen on images and figures.

Code blocks were previously themed but the styling needed to be updated
due to how an update to how pandoc generates code blocks.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-06 21:41:20 -04:00
Collin J. Doering 283e4ce8e5 Added information about test-suite to README.md
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-03 03:02:53 -04:00
Collin J. Doering fa36bb8062 Removed upper bounds on test-suite dependencies
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-03 03:02:53 -04:00
Collin J. Doering 519f3833bf Upgraded Hakyll 4.6 -> 4.7
The type of the function `readPandocWith` changed slightly between
versions. This commit fixes the minor issue it caused.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-07-03 03:02:12 -04:00
Collin J. Doering 039a961217 Fix ghc warnings generated when compiling src/site.hs
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-02-18 03:13:38 -05:00