on master help sign in
Added some experimental features to the hakyll site.
commite9dd4c75a21ee9bc8f42ea725d071974127a97d1 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateTue 19 Jan 2010, 10:08 (17 years ago) parent77f9129
4 files changed+15−11
examples/hakyll/css/default.css+1−1 examples/hakyll/hakyll.hs+5−2 examples/hakyll/sidebar.markdown+8 examples/hakyll/templates/default.html+1−8
examples/hakyll/css/default.css+1−1
@@ -40,7 +40,7 @@ div#sidebar {
4040 text-align: right;
4141}
4242
43−div#navigation a {
43+div#sidebar a {
4444 display: block;
4545 font-size: 110%;
4646 text-decoration: none;
examples/hakyll/hakyll.hs+5−2
@@ -21,7 +21,7 @@ main = hakyll defaultHakyllConfiguration $ do
2121 [ ("title", Left "Tutorials")
2222 , ("tutorials", Right tutorialList)
2323 ]
24− renderChain ["templates/tutorials.html", "templates/default.html"] tutorialPage
24+ renderChain ["templates/tutorials.html", "templates/default.html"] $ withSidebar tutorialPage
2525
2626 mapM_ render' $ [ "about.markdown"
2727 , "index.markdown"
@@ -29,4 +29,7 @@ main = hakyll defaultHakyllConfiguration $ do
2929 , "reference.markdown"
3030 ] ++ tutorials
3131
32− where render' = renderChain ["templates/default.html"] . createPagePath
32+ where
33+ render' = renderChain ["templates/default.html"] . withSidebar . createPagePath
34+ withSidebar a = a `combine` createPagePath "sidebar.markdown"
35+
examples/hakyll/sidebar.markdownnew file+8
@@ -0,0 +1,8 @@
1+--- sidebar
2+## Navigation
3+
4+[home](index.html)
5+[philosophy](philosophy.html)
6+[about](about.html)
7+[tutorials](tutorials.html)
8+[reference](reference.html)
examples/hakyll/templates/default.html+1−8
@@ -21,14 +21,7 @@
2121 </div>
2222 <!-- Sidebar. -->
2323 <div id="sidebar">
24− <h2>Navigation</h2>
25− <div id="navigation">
26− <a href="index.html">home</a>
27− <a href="philosophy.html">philosophy</a>
28− <a href="about.html">about</a>
29− <a href="tutorials.html">tutorials</a>
30− <a href="reference.html">reference</a>
31− </div>
24+ $sidebar
3225 </div>
3326
3427 <div id="content">