Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added bling page

  • Loading branch information...
commit cde2514e14de35ee52532329892d4b523c69bc23 1 parent 843c38d
@snoyberg authored
View
1  Controller.hs
@@ -34,6 +34,7 @@ import Handler.News
import Handler.Job
import Handler.Team
import Handler.Topic
+import Handler.Bling
-- This line actually creates our YesodSite instance. It is the second half
-- of the call to mkYesodData which occurs in Haskellers.hs. Please see
View
11 Handler/Bling.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-}
+module Handler.Bling
+ ( getBlingR
+ ) where
+
+import Haskellers
+
+getBlingR :: Handler RepHtml
+getBlingR = defaultLayout $ do
+ setTitle "Haskell Bling"
+ $(widgetFile "bling")
View
5 Haskellers.hs
@@ -187,6 +187,8 @@ mkYesodData "Haskellers" [$parseRoutes|
/teams/#TeamId/topics TopicsR GET POST
/topics/#TopicId TopicR GET POST
/topics/#TopicId/message TopicMessageR POST
+
+/bling BlingR GET
|]
maybeAuth' :: GHandler s Haskellers (Maybe ((UserId, User), Maybe Username))
@@ -239,13 +241,13 @@ instance Yesod Haskellers where
Nothing -> return ()
Just ((uid, _), _) -> addHamletHead [$hamlet|<link href="@{UserFeedR uid}" type="application/atom+xml" rel="alternate" title="Your Haskellers Updates">
|]
- addWidget widget
addCassius $(Settings.cassiusFile "default-layout")
addScriptEither $ urlJqueryJs y
addScriptEither $ urlJqueryUiJs y
addStylesheetEither $ urlJqueryUiCss y
addJulius $(Settings.juliusFile "analytics")
addJulius $(Settings.juliusFile "default-layout")
+ addWidget widget
let login' = $(hamletFile "login")
hamletToRepHtml $(Settings.hamletFile "default-layout")
@@ -322,6 +324,7 @@ loginbar = ("Account", [("Login", AuthR LoginR)])
instance YesodBreadcrumbs Haskellers where
breadcrumb RootR = return ("Homepage", Nothing)
breadcrumb FaqR = return ("Frequently Asked Questions", Just RootR)
+ breadcrumb BlingR = return ("Bling", Just RootR)
breadcrumb NewsR = return ("News Archive", Just RootR)
breadcrumb (NewsItemR nid) = do
n <- runDB $ get404 nid
View
2  cassius/bling.cassius
@@ -0,0 +1,2 @@
+p
+ line-height: 1.4em
View
3  cassius/default-layout.cassius
@@ -41,6 +41,9 @@ h3
font-weight: normal
margin: 0 3px
padding: 2px 30px
+#haskell_bar a
+ padding-right: 1em
+ text-decoration: none
#heading, #main_content, #footer_content, #section_title div
margin: 0 auto
width: 940px
View
19 devel-server.hs
@@ -1,19 +1,4 @@
-import Network.Wai.Handler.DevelServer (run)
-import Control.Concurrent (forkIO)
+import Yesod (develServer)
main :: IO ()
-main = do
- mapM_ putStrLn
- [ "Starting your server process. Code changes will be automatically"
- , "loaded as you save your files. Type \"quit\" to exit."
- , "You can view your app at http://localhost:3000/"
- , ""
- ]
- _ <- forkIO $ run 3000 "Controller" "withHaskellers" ["hamlet"]
- go
- where
- go = do
- x <- getLine
- case x of
- 'q':_ -> putStrLn "Quitting, goodbye!"
- _ -> go
+main = develServer 3000 "Controller" "withHaskellers"
View
2  hamlet/bling.hamlet
@@ -0,0 +1,2 @@
+<p>What is the one thing Haskell is missing? Bling. We need T-shirts, sweatshirts, coffee mugs, USB sticks, and everything else that <i>modern</i> programming languages have. This page should help bridge that gap.
+<p>Anyone who wants to advertise Haskell-specific bling on this page should <a href="/users/snoyberg/">contact me directly</a>: for obvious reasons I will not be putting up a form to get your content automatically added. I don't care if you are selling stuff, giving it away for free, whatever: just send it in.
View
4 hamlet/default-layout.hamlet
@@ -9,7 +9,8 @@
<link href="@{JobsFeedR}" type="application/atom+xml" rel="alternate" title="Haskellers Job Listings">
<body .#{bodyClass}>
<div id="haskell_bar">
- <p .title>Haskell
+ <p .title>
+ <a href="http://www.haskell.org/">Haskell
<div id="heading_wrapper">
<div id="heading">
<a href="@{RootR}" alt="Home">
@@ -21,6 +22,7 @@
<a id="find_haskeller" href="@{UsersR}">Find a<br/>Haskeller
<a id="find_job" href="@{JobsR}">Find a Job
<div id="secondary_menu">
+ <a href=@{BlingR}>Bling
<a href="@{FaqR}">FAQ
<a href="@{NewsR}">News Archive
<a href="@{AllSkillsR}">Browse Skills
Please sign in to comment.
Something went wrong with that request. Please try again.