summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-26 02:45:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-26 02:45:01 -0400
commit3ac2cf09e56cb1918312a31e0884d56829a14c32 (patch)
tree09861831ebcb33a0ae7fe28cd3e2d62cb9ab1f03 /templates
parent6a8540c1a2ae61d81e06eae2865ac00c6c759ed5 (diff)
added a custom defaultLayout, static site, and favicon
Broke hamlet out into standalone files. I don't like the favicon display; it should be served from /favicon.ico, but I could only get the static site to serve /static/favicon.ico, so I had to use a <link rel=icon> to pull it in. I looked at Yesod.Default.Handlers.getFaviconR, but it doesn't seem to embed the favicon into the binary?
Diffstat (limited to 'templates')
-rw-r--r--templates/default-layout.hamlet11
-rw-r--r--templates/htmlshim.hamlet7
2 files changed, 18 insertions, 0 deletions
diff --git a/templates/default-layout.hamlet b/templates/default-layout.hamlet
new file mode 100644
index 000000000..e07addc8e
--- /dev/null
+++ b/templates/default-layout.hamlet
@@ -0,0 +1,11 @@
+$doctype 5
+<html>
+ <head>
+ <title>#{baseTitle webapp} #{pageTitle page}
+ <link rel="icon" href=@{StaticR favicon_ico} type="image/x-icon">
+
+ ^{pageHead page}
+ <body>
+ $maybe msg <- mmsg
+ <div #message>#{msg}
+ ^{pageBody page}
diff --git a/templates/htmlshim.hamlet b/templates/htmlshim.hamlet
new file mode 100644
index 000000000..c10042c99
--- /dev/null
+++ b/templates/htmlshim.hamlet
@@ -0,0 +1,7 @@
+$doctype 5
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; URL=#{url}">
+ <body>
+ <p>
+ <a href=#{url}">Starting webapp...