blog-rekahsoft-ca/templates/default.haml
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

63 lines
2.3 KiB
Plaintext

!!! 5
/[if lt IE 7] <html class="ie ie6" lang="en">
/[if IE 7] <html class="ie ie7" lang="en"
/[if IE 8] <html class="ie ie8" lang="en">
<!-- [if (gte IE 9)|!(IE)]><!-->
%html.en(manifest='manifest.appcache')
%head
/ Basic Page Needs
%meta(charset="utf-8")
%title RekahSoft
%meta(name="description" content="The technical musings of a minimalist")
%meta(name="author" content="Collin Doering")
/ Mobile Specific Metas
%meta(name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1")
/ CSS
%link(rel="stylesheet" href="lib/css/base.css")
%link(rel="stylesheet" href="lib/css/skeleton.css")
%link(rel="stylesheet" href="lib/css/layout.css")
/ Custom styles for this template
%link(rel="stylesheet" href="default.css")
/[if lt IE 9]
%script(src="http://html5shim.googlecode.com/svn/trunk/html5.js")
/ Favicons
%link(rel="shortcut icon" href="/images/favicon.ico")
// %link(rel="icon" type="image/png" href="/images/favicon.ico.png")
// %link(rel="icon" type="image/svg+xml" href="/images/favicon.svg")
// %link(rel="apple-touch-icon" href="lib/images/apple-touch-icon.png")
// %link(rel="apple-touch-icon" sizes="72x72" href="lib/images/apple-touch-icon-72x72.png")
// %link(rel="apple-touch-icon" sizes="114x114" href="lib/images/apple-touch-icon-114x114.png")
%body
$partial("templates/partials/logo-banner.haml")$
$partial("templates/partials/nav.haml")$
#status.container
%p.message
%a.close-button Close
#page-content.init.loading
%noscript
#noscript-alert.container
%h1 This site requires javascript!
%p
If you insist on not using javascript we provide a simplified website
%a.alert-link(href="nojs/index.html") here
$partial("templates/partials/footer.haml")$
/ External javascript libraries: JQuery, and JQuery-Address
/ Placed at the end of the document so the pages load faster
%script(type="text/javascript" src="lib/js/jquery-1.9.1.js")
%script(type="text/javascript" src="lib/js/jquery.address.js")
%script(type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML")
/ Custom javascript for user interactivity
%script(type="text/javascript" src="js/default.js")