1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-23 12:15:06 +03:00

Add a subtitle to the header

This commit is contained in:
Artyom 2016-07-10 23:34:13 +03:00
parent 1a0222c2d2
commit 194f0063be
2 changed files with 18 additions and 0 deletions

View File

@ -150,10 +150,16 @@ After that switching sections is simply done by adding/removing the “shown”
-}
renderSubtitle :: Monad m => HtmlT m ()
renderSubtitle =
div_ [class_ "subtitle"] $
"alpha version • very much incomplete • leave feedback"
renderRoot :: (MonadIO m, MonadRandom m, MonadReader Config m) => HtmlT m ()
renderRoot = do
wrapPage "Aelve Guide" $ do
h1_ "Aelve Guide"
renderSubtitle
h2_ (mkLink "Haskell" "/haskell")
-- TODO: show a “category not found” page
@ -479,6 +485,7 @@ renderHaskellRoot globalState mbSearchQuery =
Nothing -> h1_ "Aelve Guide: Haskell"
-- A search page isn't the main page, so we need a link to the main page
Just _ -> h1_ (mkLink "Aelve Guide: Haskell" "/haskell")
renderSubtitle
renderNoScriptWarning
renderSearch mbSearchQuery
textInput [
@ -510,6 +517,7 @@ renderCategoryPage category = do
onPageLoad $ JS.expandHash ()
-- TODO: another absolute link [absolute-links]
h1_ (mkLink "Aelve Guide: Haskell" "/haskell")
renderSubtitle
renderNoScriptWarning
renderSearch Nothing
renderCategory category

View File

@ -18,6 +18,16 @@ body {
flex: 1;
}
#main > h1 {
margin-bottom: 0px;
}
.subtitle {
font-weight: bold;
color: #e03;
margin-bottom: 2em;
}
/* headers look bad when the width is small, so */
h1 {