* templates/partials/analytics.html: Upon a client load of the website, determine which site
they are viewing (dev, staging, production) and setup plausible analytics appropriately.
* templates/default.html: Remove non-functional piwiki script reference and replace with a
reference to the new partial template for analytics
* src/site.hs (main): Remove remnant of application cache support
* js/default.js: Remove unneeded analytics code specific to piwiki. No additions were made here in support of plausible
* TODO.org: Mark associated TODO item DONE
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Paginate URLs now working correctly. In posts and pages a link to a page can be given
using either:
- absolute url (eg. /pages/somepage.html)
- virtual page path (eg. /#/somepage.html)
This is achieved in js/default.js by treating a tags with the rel
attribute as virtual. Specifically, the rel attribute should be of the
form "address:/virtual/path.html" , though this isn't tested for. If a
value val, is found in the rel attribute then it is used as the URL in
loadPageContent where if it doesn't match certain regexps it is assumed
to be a page and "pages" + val is loaded into the page-content div. See
loadPageContent for more details.
Placed first page, previous page, next page, and last page links at
bottom of blog pages to switch between pages.
Still incomplete:
- pagination menu needs to be further styled with images, tool tips, etc.
- check if rel conforms to the form /address:.*/ and if not don't treat
is specially (as virtual)
Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
- made the border surrounding content a consistent width on each page
- minor aesthetic changes to the tag page
- removed need for index.html
Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
- 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>
Almost ready for prime time. What remains to be completed is as follows:
* pagination
* fix the escape parsing bug in the section parser
* add support to locally cache posts (opt-in)
* clean-up the code
* finish contact page and home page
The following was completed since last commit:
* added gpl.txt to project
* deleted otf free fonts to save space
* various structural changes
* added a new post 'first-post'
* various ascetic changes to templates and sass code
* used function to remove js from global namespace (js/default.js)
* added support for application cache and generating a cache manifest
file (site.hs) as well as created appropriate fallback .html
files '{post,tags}-fallback.html'
Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
* Changes
** Hakyll "site.hs"
*** Added the ability to have per-page templates (for all "pages/*")
*** "pages/*" can now be sectioned off into blocks
A section is a logical division of a page. It removes the requirement
for pages that have multiple sections to have some html in the
markdown for the page or to move some of the markdown content to the
template. Both of which are un-maintainable.
There are two types of sections, both with slightly different syntax's.
A _global section_ is a section who's content will be included in all
sections (regardless of ordering). This is handy for including links
and footnotes that might be needed in more then one section or
non-section . It is not accessible from the Context obtained from
genSectionContext. To indicate where a global section begins and ends
use "$section$" and "$endsection$" respectively (without
quotes). Formally:
$section$ <body> $endsection$
A _named section_ is a section of a document that can be accessed by a
given name from the context obtained from the function
genSectionContext. To specify a named section use the following syntax:
$section("<name>")$ <body> $endsection$
where <name> is the name of the section (any character except \")
and <body> is the section body
Anything that is not a section is referred to as a non-section. These
are still important as they will include all
content of the global sections of the document as well as the
non-section itself. To be a little more formal a non-section is
everything between "$end-section$" and ("$section$ or
$section("<name>")$").
**** Example: mypage.markdown
page title
==========
$section("column-one")$
This is text that can be formatted in the individual page template
located at "templates/pages/mypage.haml". Here is a link from a
global section. See [Home][].
$endsection$
This is some text in between two sections or a section and the top or
bottom of the page. It can be accessed by $body<n>$ where <n> its
position from the top of all non-sections starting from 0. Here i can
also use
$section$
[Home]: http://blog.rekahsoft.ca
$endsection$
***** To see more visit
- "pages/<name>" where the sectioned page markdown is written
- "templates/pages/<name>.haml" where the individual page
template is stored/loaded from
- "templates/page.haml" the generic page wrapper
** Miscellaneous
*** Reorganized the file structure
- created folder "image-src" for image-sources
- created folder "lib" for libraries that will be needed on the server
- moved jQuery and Skeleton to lib and made appropriate
- created folder "fonts" for FreeMono and FreeSans font files which are
now used via css @font-face
- create folder "css" and setup "site.hs" to minimize all css files
and publish them to idRoute
- created folder "sass" which contains a variety of s[ac]ss files along
with a file named "default.s[ax]ss" which will be processed by sass
to include any other s[ac]ss files that are needed and output
"default.css" to the site root
*** cleaned up .gitmodules
** Javascript
- fixed processing of urls
- temporarily disabled nojs version of site as its under heavy development
Note: still need to merge changes made to default version into the
nojs one; specifically having "templates/pages/*.haml" be applied to
there respective page before "templates/page.haml" is applied to the
result
** Styling
- switched to using sass (with a side bourbon) instead of css
leaving css folder and processing for convenience
- slimmed the site of the nav-loading image
- updated favicon (rounded corders, preparing to support more sizes)
- updated the logo-banner
- added new images for tab page
** Templates
- converted all "templates/**" to haml and made the apropriate
adjustments in site.hs
- added "templates/pages/*" which contains individual templates per
page in "pages/*"
** Known Issues
**** Sections cannot contain $section$ or $section("<name>")$ or $sectionend$ in them (this is an issue with escaping in the parser)
**** pagination has been attempted but no solution yet
**** haven't been able to generate two sets of tag-pages (one for the default version and the other for the nojs version
**** opening a internal link in a new tab in any browser will load the snippet that would normally loaded by by ajax
Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>