Created
August 31, 2013 22:02
-
-
Save qoelet/6400910 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- extensions | |
{-# LANGUAGE OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, MultiParamTypeClasses #-} | |
-- call the boss! | |
import Yesod | |
import Yesod.Static | |
staticFiles "static" | |
data NorthPole = NorthPole | |
{ getStatic :: Static | |
} | |
mkYesod "NorthPole" [parseRoutes| | |
/ HomeR GET | |
/static StaticR Static getStatic | |
|] | |
footer = | |
[hamlet| | |
<hr> | |
<p>Powered by # | |
<a href="https://github.com/yesodweb/yesod">Yesod</a>. Warp FTW! | |
|] | |
minLayout :: Widget -> Handler Html | |
minLayout widget = do | |
contents <- widgetToPageContent $ do | |
widget | |
giveUrlRenderer | |
[hamlet| | |
$doctype 5 | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta httpEquiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title> "northpole.sg : kenny shen" | |
<meta name="description" content="digital home of kenny shen, a django and python web developer / haskell programmer based in singapore."> | |
<meta name "viewport" content "width=device-width"> | |
<link rel="stylesheet" href="/static/css/normalize.css"> | |
<link rel="stylesheet" href="/static/css/main.css"> | |
<body> | |
^{pageBody contents} | |
^{footer} | |
|] | |
instance Yesod NorthPole where | |
defaultLayout = minLayout | |
getHomeR :: Handler Html | |
getHomeR = defaultLayout | |
[whamlet| | |
<h1> | |
<img src="/static/images/shishi.jpg"> | |
<hr> | |
<p> Kenny Shen, Singapore. | |
<p><em>"Simplicity is prerequisite for reliability." - Edsger W.Dijkstra</em> | |
<hr> | |
<p>Current adventure - Head of Marketing Systems & Developement @ Zalora Singapore | |
<p>Past adventures include (developer, engineer, lead tech, web developer) at TUS, JamiQ, Tripvillas, Fairfax Business Media. | |
<p> | |
Skills largely revolve around # | |
<a href="http://www.python.org">Python | |
\ and its ecosystem. Now expanding to include # | |
<a href="http://www.haskell.org">Haskell | |
. | |
<p> | |
Github: # | |
<a href "https://github.com/qoelet/">@qoelet | |
<p> | |
Random tech notes: # | |
<a href="http://manwithhiskeyboard.tumblr.com/"><span style="font-style: italic;">A man and his keyboard.</span> | |
<p>Toolbox: (Languages) Haskell:Python:SQL, (Frameworks) Yesod:Django, (Database) PostgreSQL, (Toys) Pd:Euterpea:Max. | |
<hr> | |
<p>When I don't type with my keyboard: novels, math, classical guitar, some DIY and loads of arabica beans. | |
<p>Workshop diaries: # | |
<a href="http://manwithhishands.tumblr.com/"><span style "font-style: italic;">A man and his hands.</span> | |
<p>A very inspiring letter: # | |
<a href="http://www.lettersofnote.com/2012/09/live-like-mighty-river.html"><span style "font-style: italic;">Live like a mighty river.</span> | |
|] | |
main :: IO () | |
main = do | |
static@(Static settings) <- static "static" | |
warp 3000 $ NorthPole static |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment