From 496e0d53964e1ce2204fbb92d8bd52bf188cc48c Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Tue, 16 Dec 2014 01:34:04 -0500 Subject: [PATCH] Bump to Hakyll 4.6 and clean up Signed-off-by: Collin J. Doering --- .gitignore | 1 + blog-rekahsoft-ca.cabal | 2 +- js/default.js | 19 +++++++++++-------- pages/home.markdown | 2 +- posts/website-almost-complete.markdown | 2 ++ sass/default.sass | 4 +++- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index eeb87eb..03e8bdf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ site _site _cache dist +cabal.sandbox.config diff --git a/blog-rekahsoft-ca.cabal b/blog-rekahsoft-ca.cabal index 82b2803..9553f12 100644 --- a/blog-rekahsoft-ca.cabal +++ b/blog-rekahsoft-ca.cabal @@ -62,7 +62,7 @@ executable blog-rekahsoft-ca -- Other library packages from which modules are imported. build-depends: base >=4.7 && <4.8, - hakyll >=4.5, + hakyll >=4.6, pandoc >= 1.13, parsec >= 3.1, filepath >= 1.3, diff --git a/js/default.js b/js/default.js index f4f863c..6cfb8ea 100644 --- a/js/default.js +++ b/js/default.js @@ -5,12 +5,12 @@ * 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 . */ @@ -59,7 +59,7 @@ var external_url_regexp = /https?:\/\/.*/; var mailto_regexp = /mailto:.*/; var files_regexp = /files\/.*/; - + if (external_url_regexp.test(page_href) || mailto_regexp.test(page_href) || files_regexp.test(page_href)) { @@ -79,7 +79,7 @@ var post_regexp = /posts\/.*/; var tag_regexp = /tags\/.*/; var blog_page_regexp = /blog\d*.html/; - + // Check whether the requested url is a post if (post_regexp.test(page_href)) { // Handle post urls (no change required to page_href) @@ -91,10 +91,13 @@ $('#nav-menu li a[href="./pages/blog.html"]').parent('li').addClass('active'); } else { // otherwise assume its a page // Check if the page_href is empty or / and if so goto home - if (page_href === '/' || page_href === '') { + if (page_href === '/') { page_href = '/home.html'; } else if (blog_page_regexp.test(page_href)) { - // If page_href refers to a blog page set the + if (page_href === "/blog.html") + page_href = "/blog1.html"; + + // If page_href refers to a blog page set Blog to be the active menu item $('a.menuitem[rel="address:/blog.html"]').closest('ul').find('li.active').removeClass('active'); $('a.menuitem[rel="address:/blog.html"]').closest('li').addClass('active'); } @@ -114,7 +117,7 @@ dataType: 'html', beforeSend: function (xhr, settings) { // Add .loading to #page-content and #nav to facilitate a loading animation - $('#page-content, #nav').removeClass('loading-done').addClass('loading'); + $('#page-content, #nav').removeClass('loading-done').removeClass('loading-error').addClass('loading'); console.log('beforeSend a.menuitem'); }, @@ -134,7 +137,7 @@ $('#page-content .math').each(function (math_elem) { MathJax.Hub.Queue(["Typeset",MathJax.Hub,math_elem[0]]); }); - + if ($('body').scrollTop() > $('#nav').offset().top - 15) { $('html, body').animate({ scrollTop: $('#nav').offset().top - 15 diff --git a/pages/home.markdown b/pages/home.markdown index 7d2e1c9..7a68685 100644 --- a/pages/home.markdown +++ b/pages/home.markdown @@ -71,7 +71,7 @@ $section$ [Skeleton]: http://www.getskeleton.com/ [JQuery]: http://jquery.com [JQuery-address]: https://github.com/asual/jquery-address -[Sass]:http://sass-lang.com/ +[Sass]: http://sass-lang.com/ [Haml]: http://haml.info/ [Bourbon]: http://bourbon.io/ [MathJax]: http://www.mathjax.org/ diff --git a/posts/website-almost-complete.markdown b/posts/website-almost-complete.markdown index 3162b1e..9225d4d 100644 --- a/posts/website-almost-complete.markdown +++ b/posts/website-almost-complete.markdown @@ -10,6 +10,8 @@ tags: general [This](/) website is almost done. Well..the content and theming still need to be completed, but for the most part things are complete. +Testing links: [first post](/posts/first-post.html) + 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 diff --git a/sass/default.sass b/sass/default.sass index d426ad8..ff48a48 100644 --- a/sass/default.sass +++ b/sass/default.sass @@ -92,8 +92,10 @@ sub @include transition(opacity 1s ease-in 0.5s) opacity: 1 +// TODO: this needs work #page-content.loading-error - // do something + //background: url('/images/error-loading.png') no-repeat 50% + //height: 200px #page-content.init.loading background: url('/images/init-loading.gif') no-repeat 50%