Commit Graph

168 Commits

Author SHA1 Message Date
Collin J. Doering 0bb23967c0 Stop once recursion depth has been reached
While testing I had the router allow infinite loops, but had support all
along to stop them if they occur. Though a message signaled to the user
using a status message would be mice, currently just log to console.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-02-01 03:22:18 -05:00
Collin J. Doering 1866ea9aa6 Fixed redirect loop issue on firefox
In firefox, when going to site from another page was unable to go back.
The exact reason this happens in firefox and not in chromium is still a
mystery.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-02-01 03:19:31 -05:00
Collin J. Doering 5ddd857e79 Cleaned up './site deploy' output
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-30 04:49:02 -05:00
Collin J. Doering 8205cb8c87 Tweaked list styles after skeleton upgrade
Numbered bullets didn't stand out and text wasn't formatted correctly
around them (within ol > li's). Also changed the amount of margin
spacing around nested ol/ul elements.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-30 04:46:26 -05:00
Collin J. Doering 110b6a0e64 Fixed issue with ol > li's not being numbered
Issue introduced in b0851fc where in ordered lists, li's were
unnumbered.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-29 16:59:23 -05:00
Collin J. Doering 100b575137 Bumped JQuery version from 1.9.1 -> 1.11.2
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-28 23:26:23 -05:00
Collin J. Doering 843c0f3f69 Fixed little issue with tag page headings
For some reason changing from skeleton 1.2 -> 2.04 broke the "tagged"
image displayed before h1's on the tag pages.

See commit 06114cf

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-25 03:23:58 -05:00
Collin J. Doering 0b82fc7874 Use .row instead of .container when within .container
This is due to a change from skeleton 1.2 -> 2.04 that was missed in
commit 06114cf (last commit).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-25 03:18:04 -05:00
Collin J. Doering 06114cfc0d Upgrade skeleton from 1.2 -> 2.04
Skeleton switched from having 16 columns to 12. A few improvements to
skeleton also required a little tweaking of the current css as well as a
cleanup of templates/default.html.

Note: templates/default-nojs.html was not updated though an update will
be trivial. This is only relevant if the nojs section of the site is
revived.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-25 01:44:32 -05:00
Collin J. Doering 773b407af2 Cleaned up README.md
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-25 01:01:29 -05:00
Collin J. Doering 917775a909 Updated site deploy commands
Now when './site deploy' is run the empty files that are left over from
Hakyll generating the site are removed. Also rsync now uses verbose
output so that its easy to see what files are updated on the server.

Note, because the commands run by './site deploy' include 'echo' and
'find' this requires a posix environment (and thus can't be built on
Windows without cygwin).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-25 00:00:55 -05:00
Collin J. Doering 485bab9b98 Began theming pagination first/last/next/previous
Added spans that will show "First Page", "Previous Page", "Next Page",
"Last Page" when its unavailable. Eg. the user is on the last page so
there should be no link to click and instead just place holder text.

The css uses flexbox display and thus only works in modern
browsers (see: http://caniuse.com/#feat=flexbox). This may be changed in
the future as to support more browsers (IE9+ specifically).

Images/Icons for "First Page", "Previous Page", "Next Page", "Last Page"
have yet to be set (though would preferably be done in pure CSS).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-24 18:36:55 -05:00
Collin J. Doering 5b42ae5e2c Fixed link in sample-news post
This post is just a filler post (lorem ipsum) to test pagination (along
with a couple others - which soon will be removed).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-24 14:11:43 -05:00
Collin J. Doering 2f607aa078 Removed unused .gitmodules file
Stopped using git submodules (for jquery, jquery-address, skeleton, and
any other libraries used for this site) but forgot to remove the
.gitmodules file. This commit removed said empty file.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-24 13:21:06 -05:00
Collin J. Doering 4db3cb536c Fixed passing of most jslint checks
The only checks that fail are the 'insecure regexp' checks (which in
this case are not insecure) as well as a few functions that take unused
parameters.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-23 14:33:24 -05:00
Collin J. Doering bfa6e42d9f Cleaned up client side router
Wrapped client side url router in a function that returns an object (the
interface for the router). Because javascript passes by reference,
passing the array of handler/route objects to the router was an issue
so the array of routes used for this application was moved to within the
wrapper function. In the future this should be changed so
the array is supplied and can be modified with a method like addRoute.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-23 14:33:24 -05:00
Collin J. Doering 07eb14f986 Added initial implementation of client side router
Re-factored how urls are handled. Specifically, made it more clear which
urls are rewritten when as well as what to run beforeSending, onError
and onSuccess.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-23 14:33:24 -05:00
Collin J. Doering b0851fc6fa Fixed li bullet indicator
Use the unicode arrow '2192' infront of ol > li bullets. This must have
been missed while porting css from sass to clay.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-23 14:26:20 -05:00
Collin J. Doering 2401f3aa9b Trivial UI cleanup on individual posts
Both the clay css and templates/partials/post.html added a horizontal
rule at the top of each post footer (using the css border property and
hr respectively). Opted for using the clay css one as its used on
multiple pages (eg. blog pages and tag pages).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-22 13:40:52 -05:00
Collin J. Doering 3df2f3df34 Cleaned up client side URL rewriting
When a page listed in the navigation was opened in a new page/tab, the
url used to be the whole path (/#/pages/pagename.html). This commit
enables rewriting of the urls (using jquery address) so that the client
always sees a pretty url (eg /#/blog.html instead of
/#/pages/blog.html).

Also fixed issue introduced last commit (b6d6830) where when clicking on
post or tag links failed to activate the blog menuitem.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-22 13:35:58 -05:00
Collin J. Doering b6d683014d Fixed opening nav items in new tab/window
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-22 01:07:48 -05:00
Collin J. Doering e2fd291e8f Fixed opening issue with links within page-content
Previously, all anchor clicks within #page-content was handled by a
event listener that checked whether the anchor's href was to an
'external' url and if so loaded it directly. Otherwise it passed the
value of the anchors href attribute to the jquery address plugin (via
the $.address.value function).

This unfortunately cause clicking on anchors to work fine but when
opening them in a new page or window (or copying the link) caused the
link to reference the html snippet of the page/post instead of the
entire application.

To rectify this, this commit simply transforms internal urls href
attribute after the snippet is loaded into #page-content.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-22 00:24:52 -05:00
Collin J. Doering 046f97a2bb Passes most jslint tests
Excluding insecure regexps (used to check urls - which is not a security
risk in this case). In a future commit this can be fixed by adding
comments ignoring the jslint errors or by making the regexps more
specific.

Also in the ajax call in loadPageContent the callbacks fore beforeSend
and error have unused parameters (xhr and settings, though the error
callback uses its second argument status).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-19 23:53:38 -05:00
Collin J. Doering 86b05d8f28 Fixed rendering of source code
Commit cd5ae7b652 (the switch to clay)
introduced a error rendering source code in posts.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-19 23:40:37 -05:00
Collin J. Doering 723fde5fee Fixed creative commons license link on home page
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-19 23:40:03 -05:00
Collin J. Doering 4fa0eed737 Cleaned up README build instructions
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering d5f2f56ec4 Completed porting haml templates back to html
Removed all haml templates and returned to using the default hakyll
style html templates. The main reason for this was to avoid the
requirement for external tools that cannot be installed with cabal. Also
as much as haml is nicer to read and write (in my opinion) it is in this
case just adding another layer of needless abstraction.

Perhaps in the future haml-like functionality can be added to default
hakyll templates. Until then, follow the KISS mentality.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 0213eec3af Modified pagination template
Switched from four .four.column divs (one for firstPage, previousPage,
nextPage, and lastPage) to two .eight.column divs (one for firstPage and
previousPage, and the other for nextPage and lastPage).

This is mostly an ascetic fix that will be modified in the future when I
get around to theming the pagination buttons.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 08cb941a93 Removed unused/stale template
The template "templates/recent-posts.haml" has been superseded by
"templates/partials/recent-post-list.haml" but was left behind.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 4b8c5a8c04 Fixed some comments and a false mention in the README
I was thinking of using hamlet for templates but hadn't implemented
anything yet. Using hamlet doesn't work well in this case though because
hamlet templates are compiled (using template haskell). Removed this
false mention from README.md.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 23ad19ffa6 Cleaned up src/site.hs fixing most ghc warnings
Only two ghc warnings remain; that is:
* defaulting a type to integer (line 476)
* discarding the result of a do-notation statement (can be turned off
  with the -fno-warn-unused-do-bind option (line 502)

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 662309ff4e Fixed link in business-card snippet
Now when using "./site check" everything looks good (excluding the
reference to nojs/index.html from templates/default.haml)

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 038657caf4 Updated utilized open-source software list on homepage
* removed references to sass and bourbon
* added reference for clay

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 9a9630435b Fixed handling of internal image urls within page-content
When an anchor within #page-content has a href matching /images\/.*/ it
should be viewed as a resource for download/view instead of loaded into
$page-content.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 4c2f99c302 Added README.md
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 72e6291915 Removed sass css implementation in favor of clay
Now that the css (implemented using sass) has been fully ported to clay,
the sass folder can and has been completely removed.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering cd5ae7b652 Finished porting css from sass to clay
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 81c675f7b4 Fixed clay css output issue
Added the --verbose=0 option when "cabal run gencss compact" is run from
src/site.hs. This stops cabal from outputting compiler/success messages
to the front of the generated css file.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 7b08488815 Ported sass/_blog.sass to clay and modularized clay css files
* ported sass/_blog.sass to within clay/Header.hs (excluding use of
mixins - see comments in source)
* split up clay css into a few modules (Util, Header and Main)
* still missing any properties that were implemented as sass
  mixins (from sass/default.sass and sass/_blog.sass) as well as porting
  the following sass files (from sass/):
  * _home-page.sass
  * _contact-page.sass
  * _post-page.sass
  * _tag-page.sass
  * _src-highlight.sass

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering c64af63d82 Switch from sass to clay for css pre-processing
Removed dependency on sass in src/site.hs and replaced it with clay.
This is achieved by adding a second executable to the projects cabal
file (called 'gencss') and a folder (called 'clay) that contains all .hs files for
clay (nested however deeply). Then whenever the site is being built, the
"cabal build gencss" command is run, which if successful is followed by
"cabal run gencss compact" whose output is captured and saved to
/default.css.

The sass folder has been left while the majority of the sass has not
been ported over to clay. Only part of sass/default.sass has been ported.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering b6b60871bd Added symbolic link for easy execution of site generator
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 06b4752bee Fixed a couple comments in site javascript
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering 5bbacb1725 Added initial implementation of error messages
Cleans up error reporting when an ajax call fails, and thus
the #page-content div can't be filled. This is accomplished by using
a #status which has a p.message element that can be populated for text
displaying status messages. By adding either .error or .success
to #status causes it to be highlighted as either a error or success message
respectively.

When its the first load of the page, and #page-content hasn't yet been
populated with content, an error message is shown in the #page-content
div.

Removed the /posts/ and /tags/ fallbacks in the generated
manifest.appcache because even when online, ajax calls for invalid URLs
under those paths return the respective fallback page instead of an
error message, and populate the #page-content div with the fallback. So
from this point forward the fact that the website is offline will be
handled from JavaScript.

When a page is not accessible in the application cache and the user is
offline, an error message is displayed using the mechanism mentioned
above.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:29 -05:00
Collin J. Doering f0a702f5d4 Reduced repetition of arguments passed to transform
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:28 -05:00
Collin J. Doering 7b9530089d Added justification of posts' paragraphs
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:28 -05:00
Collin J. Doering 5c219069c4 Added site-wide rss link icon
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:28 -05:00
Collin J. Doering 3d49ef6194 Fixed use of 'i' instead of 'I' in first blog post
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:28 -05:00
Collin J. Doering 0bf8f8a6a1 Remove repeated copyFileCompiler Rules
Instead use a single pattern (providing the route also remains
unchanged; that is, idRoute)

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:28 -05:00
Collin J. Doering a746af2a02 Fixed link to git repository on home page
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-14 04:50:28 -05:00
Collin J. Doering 891fadf3a2 Paginate tag pages
Paginate tag pages, allowing maximum 2 pages per tag to be app cached.
Setup virtual paths for tag pages such that /tags/tagname.html loads
/tags/tagname1.html similar to how pages are handed. This is similar to
how pages are handled in that /pagename.html loads /pages/pagename.html.

Dry up blog page's pagination and create a dry template for pagination
because it is also used on the tag pages.

Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
2015-01-14 04:50:28 -05:00