Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup Blaaargh imports, fix 404 template

  • Loading branch information...
commit c3561813328e783719b3d3f8b2c40f1836d8e486 1 parent 7c26b11
@gregorycollins authored
View
5 data/content/static/css/posts.css
@@ -237,3 +237,8 @@ div.indented {
margin-left: 2em;
margin-bottom: 1em;
}
+
+
+#fourohfour {
+ padding: 2em 0 2.5em 0;
+}
View
8 data/templates/404.st
@@ -1,4 +1,4 @@
-$htmlheader()$
+$htmlheader(whichCss="posts")$
<body>
<div id="page">
<div id="topbar">
@@ -6,8 +6,10 @@ $htmlheader()$
$navigation()$
</div>
- <div id="fourohfour">
- Sorry, that page was not found.
+ <div id="content">
+ <div id="fourohfour">
+ Sorry, that page was not found.
+ </div>
</div>
</div>
$footer()$
View
22 src/Homepage/Handlers.hs
@@ -4,23 +4,13 @@
module Homepage.Handlers (topLevelHandler) where
-import Control.Monad.Reader
+------------------------------------------------------------------------------
+import Blaaargh
+import Control.Monad.Reader
-import Data.List
-import Data.Monoid
-import qualified Data.ByteString.Lazy.Char8 as B
-
-import Happstack.Server
---import Happstack.Server.Parts
-
-import Homepage.Types
-import Homepage.Util.Delicious as Delicious
-
-
--- FIXME: "Blaaargh" should just export the right stuff
-import Blaaargh.Types
-import Blaaargh.Handlers
-import Blaaargh
+------------------------------------------------------------------------------
+import Homepage.Types
+import Homepage.Util.Delicious as Delicious
setDeliciousTemplate :: BlaaarghHandler -> HomepageMonad BlaaarghHandler
setDeliciousTemplate handler = do
View
32 src/Homepage/Types.hs
@@ -4,27 +4,18 @@
-- | to the website's global state, plus some synonyms
module Homepage.Types where
-import Control.Concurrent.MVar
-import Control.Monad.Reader
-import Data.IORef
-
-import qualified Network.Delicious as D
+------------------------------------------------------------------------------
+import Blaaargh
+import Control.Concurrent.MVar
+import Control.Monad.Reader
import qualified Data.ByteString.Lazy.Char8 as B
-
-import Data.Time
-
-import Happstack.Server
-
-import Blaaargh
-import Blaaargh.Types
-import Blaaargh.Post
-import Blaaargh.Templates
-import Blaaargh.Util.Templates
-
+import Data.Time
+import Happstack.Server
+import qualified Network.Delicious as D
-------------------------------------------------------------------------
+------------------------------------------------------------------------------
-- * Homepage State
-- | In order to not spam delicious, we only pull my recent feeds once
@@ -33,9 +24,6 @@ import Blaaargh.Util.Templates
data DeliciousState = DeliciousState ![D.Post] !UTCTime
--- | We're going to keep the templates inside the homepage state. The
--- | templates are wrapped in an IORef because I'm planning on using
--- | inotify to handle template reloads
data HomepageState = HomepageState {
homepageDeliciousMVar :: MVar DeliciousState
, homepageBlaaarghState :: BlaaarghState
@@ -66,7 +54,7 @@ liftH = mapServerPartT liftIO
-- | this IO action initializes the homepage's state and returns a
--- | monad evaluator function
+-- | monad evaluator function
-- | runner :: HomepageMonad a -> IO a
-- | we'll pass this into simpleHTTP'.
initHomepage :: FilePath -> IO (HomepageMonad a -> IO a)
@@ -79,7 +67,7 @@ initHomepage blaaarghDir = do
runHomepage :: HomepageState -> HomepageMonad a -> IO a
runHomepage hps = flip runReaderT hps
-
+
------------------------------------------------------------------------
-- * odds and ends
Please sign in to comment.
Something went wrong with that request. Please try again.