diff --git a/clay/Main.hs b/clay/Main.hs index 6efca9b..ee072e1 100644 --- a/clay/Main.hs +++ b/clay/Main.hs @@ -155,22 +155,6 @@ pageContent = do transition "opacity" (sec 1) easeIn (sec 0.5) opacity 1 - "#page-content" # ".loading-error" ** p ? do - backgroundColor "#fd6f6f" - backgroundImage $ url "/images/error-loading.png" - backgroundRepeat noRepeat - backgroundPosition $ positioned (pct 50) (pct 50) - height (px 200) - fontWeight bold - lineHeight (px 200) - textAlign $ alignSide sideCenter - - "#page-content" # ".init" # ".loading" ? do - backgroundImage $ url "/images/init-loading.gif" - backgroundRepeat noRepeat - backgroundPosition $ positioned (pct 50) (pct 50) - height (px 125) - "#page-content" ** ul |> (li # ":before") ? do content $ stringContent "\\2192" paddingRight (em 0.5) diff --git a/images/init-loading.gif b/images/init-loading.gif deleted file mode 100644 index f6aa5c4..0000000 Binary files a/images/init-loading.gif and /dev/null differ diff --git a/js/default.js b/js/default.js index e08d45b..05aba7b 100644 --- a/js/default.js +++ b/js/default.js @@ -189,9 +189,6 @@ _paq.push(['enableLinkTracking']); type: 'GET', dataType: 'html', beforeSend: function (xhr, settings) { - // Remove loading error from page-content - $('#page-content').removeClass('loading-error'); - // Add .loading to #page-content and #nav to facilitate a loading animation $('#page-content, #nav').removeClass('loading-done').addClass('loading'); @@ -203,9 +200,6 @@ _paq.push(['enableLinkTracking']); console.log('beforeSend a.menuitem'); }, success: function (dta) { - // Remove the initial loading gif (if its there) - $('#page-content').removeClass('init'); - // Remove any status message errors or successes $('#status').slideUp('normal', function () { $('#status').removeClass('error').removeClass('success').children('p.message').remove(); @@ -261,20 +255,13 @@ _paq.push(['enableLinkTracking']); }, error: function (xhr, status) { /* Remove .loading from #page-content and #nav to stop the loading - * animation. Then add .loading-error to #page-content if its the sites - * first load (#page-content has class .init). Finally, display an error - * message in #status. + * animation. Finally, display an error message in #status. */ $('#page-content, #nav').removeClass('loading'); - if ($('#page-content.init')[0]) { - // TODO: instead of immediately displaying error, check if the content is stored in local storage - $('#page-content').addClass('loading-error').html('

Error initially loading blog.rekahsoft.ca. Check the url! Given "' + page_href + '"

'); - } else if ($('#status.error')[0]) { - $('#status').prepend('

Error retrieving page ' + page_href + '

'); - } else { - $('#status').prepend('

Error retrieving page ' + page_href + '

'); - $('#status').addClass('error').slideDown(); - } + + // TODO: instead of immediately displaying error, check if the content is stored in local storage + $('#status').prepend('

Error retrieving page ' + page_href + '

'); + $('#status').addClass('error').slideDown(); // Run current handles onError callback (if it exists) if (handlerCallback.hasOwnProperty('onError') && typeof handlerCallback.onError === 'function') { diff --git a/templates/default.html b/templates/default.html index 0a36ae0..0ee5d0c 100644 --- a/templates/default.html +++ b/templates/default.html @@ -21,20 +21,6 @@ - - @@ -49,7 +35,7 @@ Close -
+