Browse files

Added TOC, Cover, some styles.

  • Loading branch information...
1 parent b94a4df commit 87314924a97be1e58a50d81922fefa2b56487eb8 @liamoc committed Feb 16, 2011
Showing with 88 additions and 5 deletions.
  1. +12 −0 css/coverstyle.css
  2. +3 −3 css/style.css
  3. +8 −0 hakyll.hs
  4. +1 −0 index.md
  5. +1 −1 pages/introduction.md
  6. +13 −0 templates/cover.html
  7. +1 −1 templates/default.html
  8. +29 −0 templates/toc.html
  9. +20 −0 toc.md
View
12 css/coverstyle.css
@@ -0,0 +1,12 @@
+body {
+ background: #FFFFBA;
+ margin:0px;
+}
+
+a {
+ text-decoration: none;
+}
+
+a:hover {
+ font-weight:bold;
+}
View
6 css/style.css
@@ -58,7 +58,7 @@ pre.sourceCode span.Error { color: red; }
#content {
background: #FFFFFF;
- padding: 20px;
+ padding: 40px;
}
code {
@@ -122,10 +122,10 @@ ul {
}
body {
- margin:60px;
+ margin:40px;
margin-bottom:20px;
font-family: sans-serif;
- background: #CCCCCC;
+ background: #DACCCC;
}
h1 {
View
8 hakyll.hs
@@ -12,8 +12,16 @@ main = hakyllWithConfiguration conf $ do
directory static "static"
directory css "css"
directory render "pages"
+ renderCover "index.md"
+ renderTOC "toc.md"
where render = renderChain ["templates/default.html"]
. withHeader
. withFooter
. createPage
+ renderCover = renderChain ["templates/cover.html"]
+ . createPage
+ renderTOC = renderChain ["templates/toc.html"]
+ . withHeader
+ . withFooter
+ . createPage
conf = (defaultHakyllConfiguration "http://learnyouanagda.com") { pandocWriterOptions = defaultWriterOptions { writerHTMLMathMethod = GladTeX } }
View
1 index.md
@@ -0,0 +1 @@
+<a href="/toc.html"><center><img src="/static/cover.png" alt="Learn you an Agda and Achieve Enlightenment!"><br/>Read It!</center></a>
View
2 pages/introduction.md
@@ -146,7 +146,7 @@ So, Agda is a language that really lives the dream of the Curry-Howard correspon
program is also a proof of the formula represented in its type.
How do I get started?
----------------------
+=====================
At the time of writing, it is only really feasible to edit Agda code using Emacs. GNU Emacs or XEmacs
are both fine. I personally am not an Emacs fan, but even I use Emacs to edit Agda, and so should you.
View
13 templates/cover.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html lang=en>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
+<link rel="stylesheet" href="/css/style.css" />
+<link rel="stylesheet" href="/css/coverstyle.css" />
+<title>Learn you An Agda And Achieve Enlightenment</title>
+</head>
+<body>
+$body
+</body>
+</html>
View
2 templates/default.html
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<link rel="stylesheet" href="/css/style.css" />
-<title>Liam O'Connor - $title </title>
+<title>Learn You An Agda - $title </title>
</head>
<body>
<div class=container>
View
29 templates/toc.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html lang=en>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
+<link rel="stylesheet" href="/css/style.css" />
+<style>
+ h1 { width=100%; border-bottom: 1px solid #AAAAAA; padding-bottom:3px; margin-bottom:10px; font-size:26px; }
+ a { text-decoration: none;}
+ h3 { padding-left: 40px; font-size: 18px;}
+ h2 { font-size: 22px;}
+ h2, h3 { font-family: sans-serif }
+</style>
+<title>Learn You An Agda - TOC</title>
+</head>
+<body>
+<div class=container>
+<div class='titleimage'>Learn you an Agda</div>
+<div class='header'>
+$header
+</div>
+<div id="content">
+<div class='title'>$title</div>
+$body
+<div class='footer'>$footer</div>
+</div>
+</div>
+</body>
+</html>
View
20 toc.md
@@ -0,0 +1,20 @@
+-----
+title: Table of Contents
+-----
+
+#1. [Introduction](pages/introduction.html)
+##1.1 [About this tutorial](pages/introduction.html#about-this-tutorial)
+###[Step One: Learn Haskell](pages/introduction.html#step-one-learn-haskell)
+##1.2 [What is Agda, anyway?](pages/introduction.html#what-is-agda-anyway)
+###[Types are Proofs](pages/introduction.html#types-are-proofs)
+##1.3 [How do I get started?](pages/introduction.html#how-do-i-get-started)
+
+
+#2. [Hello, Peano](pages/peano.html)
+##2.1 [Definitions, Definitions](pages/peano.html#definitions-definitions)
+### [Hold on a second, types have types?](pages/peano.html#hold-on-a-second-types-have-types)
+### [Structural Induction](pages/peano.html#structural-induction)
+##2.2 [One, Two... Five!](pages/peano.html#one-two..-five)
+##2.3 [Our First Check](pages/peano.html#our-first-check)
+### ["I have merely proven it correct"](pages/peano.html#i-have-merely-proven-it-correct)
+

0 comments on commit 8731492

Please sign in to comment.