diff options
author | Nick <nicksima@gmail.com> | 2019-01-25 10:30:03 -0800 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-01-28 12:07:42 -0800 |
commit | 5a9ca5c89aa32331450609e13aab1cfb56d9020b (patch) | |
tree | b5fa60719c96c01c132e2f708b58c8059fe458d0 /ibb/Main.hs | |
parent | fda568da816f38d318fb9b0d7f8798eb36c792c3 (diff) |
Implement a basic mock-up of IBB
Diffstat (limited to 'ibb/Main.hs')
-rw-r--r-- | ibb/Main.hs | 70 |
1 files changed, 69 insertions, 1 deletions
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| +<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous"> +<nav .navbar .navbar-light .bg-light> + <h3 .navbar-brand>IBB + <button .navbar-toggler type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation"> + <span .navbar-toggler-icon> + <div .collapse .navbar-collapse id="navbarIbb"> + <ul .navbar-nav .mr-auto .mt-2 .mt-lg-0> + <li .nav-item .active> + <p .nav-item>One +<div .container> + <div .row> + <div .card .ml-3 .mb-3 style=width:22rem;> + <img .card-img .img-fluid src="https://pbs.twimg.com/profile_images/552307347851210752/vrXDcTFC_400x400.jpeg"> + <h4>Joe Rogan + <ul> + <li><a href="https://www.amazon.com/Food-Gods-Original-Knowledge-Evolution/dp/0553371304/ref=as_li_ss_tl?s=books&ie=UTF8&qid=1510184452&sr=1-1&keywords=food+of+the+gods&linkCode=sl1&tag=jrebooks-20&linkId=2985689be53efde5cc377fe9c74de7a0">Food of the Gods</a> + <li><a href="https://www.amazon.com/War-Art-Through-Creative-Battles/dp/1936891026/ref=as_li_ss_tl?s=books&ie=UTF8&qid=1509600244&sr=1-1&keywords=the+war+of+art+steven+pressfield&dpID=41hM%252BLf2pLL&preST=_SY291_BO1,204,203,200_QL40_&dpSrc=srch&linkCode=sl1&tag=jrebooks-20&linkId=5fa2e21ba505d6b23d71e2f0d074e435">The War of Art</a> + <div .card-footer> + <a .btn href="https://www.joerogan.com"> Personal Website + <div .card .ml-3 .mb-3 style=width:22rem;> + <img .card-img .img-fluid src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTxT84sF19lxdnSiblIXAp-Y4wAigpQn8sZ2GtAerIR_ApiiEJfFQ"> + <h4>Beyoncé + <ul> + <li><a href="https://www.amazon.com/dp/B00E257Y7G/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1">What Will It Take To Make A Women President?</a> + <div .card-footer> + <a .btn href="https://www.beyonce.com"> Personal Website + <div .card .ml-3 .mb-3 style=width:22rem;> + <img .card-img .img-fluid src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQeLzftR36p0hYI-EKNa5fm7CYDuN-vyz23_R48ocqa8X1nPr6C"> + <h4>Barrack Obama + <ul> + <li><a href="https://www.amazon.com/American-Marriage-Novel-Oprahs-Selection-ebook/dp/B01NCUXEFR">An American Marriage</a> + <li><a href="https://www.amazon.com/dp/B00A9ET4MC/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1">Americanah</a> + <div .card-footer> + <a .btn href="https://barackobama.com"> Personal Website + <div .card .ml-3 .mb-3 style=width:22rem;> + <img .card-img .img-fluid src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQQbmnUykS6zqgzaf44tsq1RAsnHe6H7fapEoSqUwAoJGSFKbAPSw"> + <h4>Warren Buffett + <ul> + <li><a href="https://www.amazon.com/dp/B000FC12C8/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1">The Intelligent Investor</a> + <li><a href="https://www.amazon.com/Security-Analysis-Foreword-Buffett-Editions-ebook/dp/B0037JO5J8">Security Analysis</a> + <div .card-footer> + <a .btn href="http://www.berkshirehathaway.com"> Personal Website + <div .card .ml-3 .mb-3 style=width:22rem;> + <img .card-img .img-fluid src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQfl_Dm2RUhknIxGEafGOlQC7Jj3Ky0nyQYk6GvG791sClzwFQb"> + <h4>Micheal Jordan + <ul> + <li><a href="https://www.amazon.com/Statistical-Inference-George-Casella/dp/0534243126">Statistical Inference</a> + <li><a href="https://www.amazon.com/Course-Sample-Chapman-Statistical-Science/dp/0412043718">A Course in Large Sample Theory</a> + <div .card-footer> + <a .btn href="http://www.michaeljordansworld.com"> Fanmade Website +|] |