summaryrefslogtreecommitdiff
path: root/src/WWW/Templates.hs
blob: 883bba50c05fe777843d1a3a7214feea8a90ef50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{-# LANGUAGE TemplateHaskell #-}
module WWW.Templates
    ( defaultTemplate
    , navigationTemplate
    , mathTemplate
    , tikzTemplate
    -- * Context
    , myContext
    ) where

import Prolog

import Hakyll

import Hakyll.TeX.TikZ (tikzTemplate)
import Hakyll.Web.Template.Util (slug)


defaultTemplate :: Template
defaultTemplate = $(embedTemplate "templates/default.html")

navigationTemplate :: Template
navigationTemplate = $(embedTemplate "templates/nav.html")

mathTemplate :: Template
mathTemplate = $(embedTemplate "templates/math.html")


myContext :: Context String
myContext = fold
    [ constField "personalEmail" "chris@mathematicaster.org"
    , constField "workEmail" "cwells@haverford.edu"
    , slug
    , defaultContext
    ]