From 5a9ca5c89aa32331450609e13aab1cfb56d9020b Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 25 Jan 2019 10:30:03 -0800 Subject: Implement a basic mock-up of IBB --- biz.org | 7 +++++- ibb/Main.hs | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- ibb/default.nix | 42 +++++++++++++++++----------------- ibb/ibb.cabal | 25 +++++++++++++++++++++ ibb/shell.nix | 5 ----- 5 files changed, 121 insertions(+), 28 deletions(-) create mode 100644 ibb/ibb.cabal delete mode 100644 ibb/shell.nix diff --git a/biz.org b/biz.org index 1fe35d7..dd6cbf8 100644 --- a/biz.org +++ b/biz.org @@ -3,14 +3,19 @@ :PROPERTIES: :ID: 06f115e1-8938-499c-9ef5-758e907209d7 :END: +:LOGBOOK: +CLOCK: [2019-01-23 Wed 10:39]--[2019-01-23 Wed 12:43] => 2:04 +CLOCK: [2019-01-22 Tue 12:00]--[2019-01-22 Tue 14:28] => 2:28 +:END: ** TODO Make a one-page test site :PROPERTIES: :ID: 5dd0656e-4e87-4b63-886b-3f95de2504de :END: +:END: List recommended books by: - [ ] Steve Jobs - [ ] Obama -- [ ] Warren Buffet +- [ ] Warren Buffett - [ ] Michael Jordan (or other sports icon) * PROJ PaleoPlaylist.com :PROPERTIES: diff --git a/ibb/Main.hs b/ibb/Main.hs index e552769..48e93b1 100644 --- a/ibb/Main.hs +++ b/ibb/Main.hs @@ -1,4 +1,72 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} + module Main where +import Web.Scotty (ActionM, scotty, get, html) +import Text.Blaze.Html.Renderer.Text (renderHtml) +import Text.Hamlet (shamlet) +import Text.Blaze.Html (Html) +import Text.Blaze (Markup) +import Data.Monoid (mconcat) + +render :: Html -> ActionM () +render = html . renderHtml + main :: IO () -main = putStrLn "Hello World" +main = scotty 3000 $ + get "/" $ render steveJobs + +steveJobs :: Markup +steveJobs = [shamlet| + +