site: give front page its own style without nav bar

This commit is contained in:
Simon Michael 2013-09-15 13:41:26 -07:00
parent 8444be6f88
commit 4aee543437
3 changed files with 53 additions and 5 deletions

View File

@ -13,7 +13,6 @@ import Text.Printf
main = do
symlinkPagesFromParentDir
symlinkIndexHtml
symlinkProfsDir
hakyll $ do
match ("images/*" .||. "js/**" .||. "robots.txt") $ do
@ -23,7 +22,13 @@ main = do
route idRoute
compile compressCssCompiler
match "templates/*" $ compile templateCompiler
match ("*.md" .||. "0.21/*.md" .||. "0.20/*.md" .||. "0.19/*.md" .||. "0.18/*.md") $ do
match ("README.md") $ do
route $ constRoute "index.html"
compile $
pandocCompilerWith def def
>>= loadAndApplyTemplate "templates/frontpage.html" defaultContext
>>= relativizeUrls
match (("*.md" .&&. complement "README.md") .||. "0.21/*.md" .||. "0.20/*.md" .||. "0.19/*.md" .||. "0.18/*.md") $ do
route $ setExtension "html"
compile $
pandocCompilerWith
@ -40,8 +45,6 @@ symlinkPagesFromParentDir = do
fs <- filter (".md" `isSuffixOf`) `fmap` getDirectoryContents ".."
forM_ fs $ \f -> system $ printf "[ -f %s ] || ln -s ../%s" f f
symlinkIndexHtml = ensureSiteDir >> system "ln -sf README.html _site/index.html"
symlinkProfsDir = ensureSiteDir >> system "ln -sf ../../profs _site/profs"
ensureSiteDir = system "mkdir -p _site"

View File

@ -13,6 +13,9 @@
hs.outlineType = 'rounded-black';
hs.captionEval = 'this.thumb.title';
</script>
<style>
h1 { margin:1em 0; }
</style>
</head>
<body>
<a href="https://github.com/simonmichael/hledger"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
@ -20,7 +23,7 @@
<!-- <a href="/"><img src="/logo.jpg" border="0" ALT="" /></a> -->
</div>
<div id="navigation">
<a href="/README.html">Home</a>
<a href="/">Home</a>
<a href="/DOCS.html">Docs</a>
<a href="/DEVELOP.html">Develop</a>
<a href="/DOWNLOAD.html">Download</a>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>$title$</title>
<link rel="stylesheet" type="text/css" href="/css/style.css" />
<link rel="stylesheet" type="text/css" href="/js/highslide/highslide.css" />
<script type="text/javascript" src="/js/highslide/highslide.js"></script>
<script type="text/javascript">
hs.graphicsDir = '/js/highslide/graphics/';
hs.outlineType = 'rounded-black';
hs.captionEval = 'this.thumb.title';
</script>
<style>
h1 { font-size:5em; margin-top:1em; }
</style>
</head>
<body>
<a href="https://github.com/simonmichael/hledger"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a>
<div style="text-align:center;">
<!-- <a href="/"><img src="/logo.jpg" border="0" ALT="" /></a> -->
</div>
$body$
<div id="footer">
<hr />
&copy; 2007-2013 <a href="http://joyful.com/">Simon Michael</a> and contributors
</div>
<script type="text/javascript">
var gaJsHost = (('https:' == document.location.protocol) ? 'https://ssl.' : 'http://www.');
document.write(unescape('%3Cscript src=\'' + gaJsHost + 'google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E'));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker('UA-3456280-3');
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>