mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 20:02:27 +03:00
site: give front page its own style without nav bar
This commit is contained in:
parent
8444be6f88
commit
4aee543437
11
site/site.hs
11
site/site.hs
@ -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"
|
||||
|
@ -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>
|
||||
|
42
site/templates/frontpage.html
Normal file
42
site/templates/frontpage.html
Normal 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 />
|
||||
© 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>
|
Loading…
Reference in New Issue
Block a user