summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-04-27 09:45:23 +0200
committerLars-Dominik Braun <lars@6xq.net>2015-04-27 09:46:00 +0200
commit7f2e6b73d8ec4950efe33defa964cb145676a65a (patch)
treea1aff4ef79ec0b8a8ee31faa686509fd76bfdda5
parent6454ddc2e20599306edceca0fa16617fcad1d6cd (diff)
downloadcomatose-7f2e6b73d8ec4950efe33defa964cb145676a65a.tar.gz
comatose-7f2e6b73d8ec4950efe33defa964cb145676a65a.tar.bz2
comatose-7f2e6b73d8ec4950efe33defa964cb145676a65a.zip
Add intro template
-rw-r--r--Main.hs32
1 files changed, 20 insertions, 12 deletions
diff --git a/Main.hs b/Main.hs
index 6274025..b47a96a 100644
--- a/Main.hs
+++ b/Main.hs
@@ -131,11 +131,27 @@ bibentry bib = do
-- | References section
references :: [E.T] -> Html ()
-references attrib = do
- section_ $ do
+references attrib = section_ $ do
h2_ "References"
ol_ $ forM_ attrib (li_ . bibentry)
+-- | What is this?!
+introduction :: Html ()
+introduction = section_ $ do
+ p_ "The comprehensive MAC taxonomy database (comatose) aims to be …"
+
+-- | The list of protocols
+protocols :: Database -> Html ()
+protocols db = table_ [id_ "algo", class_ "table table-striped"] $ do
+ thead_ $ do
+ tr_ $ do
+ th_ "Name"
+ th_ ""
+ th_ ""
+ th_ "Year"
+ th_ "Features"
+ tbody_ $ forM_ (M.toList $ dalgos db) (protoentry db)
+
page db attrib = doctypehtml_ $ do
head_ $ do
title_ "comatose"
@@ -153,16 +169,8 @@ page db attrib = doctypehtml_ $ do
div_ [class_ "container"] $ do
div_ [class_ "page-header"] $ do
h1_ "comatose"
- h2_ "COmprehensive MAc TaxonOmy databaSE"
- table_ [id_ "algo", class_ "table-striped"] $ do
- thead_ $ do
- tr_ $ do
- th_ "Name"
- th_ ""
- th_ ""
- th_ "Year"
- th_ "Features"
- tbody_ $ forM_ (M.toList $ dalgos db) (protoentry db)
+ introduction
+ protocols db
references (sortBy (compare `on` lookup "year" . E.fields) attrib)
script_ "$(document).ready( function () { $('#algo').DataTable( { paging: false, \"columnDefs\": [ ] } ); } );"