1
1
mirror of https://github.com/aelve/guide.git synced 2025-01-03 11:02:24 +03:00

Remove the subtitle

No reason to prohibit posting on Reddit, really.
This commit is contained in:
Artyom 2017-07-30 03:49:45 +03:00
parent 7583f929c7
commit b894850b10
No known key found for this signature in database
GPG Key ID: B8E35A33FF522710
4 changed files with 20 additions and 12 deletions

View File

@ -171,13 +171,16 @@ enabled, and in this case the relevant tag will always be “shown” and not
-- | Render the subtitle below the “Aelve Guide” header that is present on -- | Render the subtitle below the “Aelve Guide” header that is present on
-- every page. -- every page.
renderSubtitle :: (MonadReader Config m) => HtmlT m () renderSubtitle :: Monad m => HtmlT m ()
renderSubtitle = renderSubtitle = pure ()
{- previous version of the subtitle
-----------------------------------
div_ [class_ "subtitle"] $ do div_ [class_ "subtitle"] $ do
"alpha version • don't post on Reddit yet" "alpha version • don't post on Reddit yet"
lift (asks _discussLink) >>= \case lift (asks _discussLink) >>= \case
Nothing -> return () Nothing -> return ()
Just l -> "" >> mkLink "discuss the site" l Just l -> "" >> mkLink "discuss the site" l
-}
-- | Render the main page (<https://guide.aelve.com>). -- | Render the main page (<https://guide.aelve.com>).
renderRoot :: (MonadIO m, MonadReader Config m) => HtmlT m () renderRoot :: (MonadIO m, MonadReader Config m) => HtmlT m ()

View File

@ -106,15 +106,18 @@ pageDef = Page {
} }
subtitleDef subtitleDef
:: (MonadIO m, MonadReader Config m) :: MonadIO m
=> Page m => Page m
-> HtmlT m () -> HtmlT m ()
subtitleDef _page = do subtitleDef _page = pure ()
{- previous version of the subtitle
-----------------------------------
div_ [class_ "subtitle"] $ do div_ [class_ "subtitle"] $ do
"alpha version • don't share yet" "alpha version • don't share yet"
lift (asks _discussLink) >>= \case lift (asks _discussLink) >>= \case
Nothing -> return () Nothing -> return ()
Just l -> "" >> mkLink "discuss the site" l Just l -> "" >> mkLink "discuss the site" l
-}
headTagDef headTagDef
:: (MonadIO m, MonadReader Config m) :: (MonadIO m, MonadReader Config m)

View File

@ -23,6 +23,8 @@ CSS
============================================================ ============================================================
#search { #search {
/* TODO: this should rather be in the "h1+subtitle" block */
margin-top: 1em;
font-size: 200%; font-size: 200%;
font-weight: 200; font-weight: 200;
border: 1px solid #aaa; border: 1px solid #aaa;

View File

@ -54,12 +54,12 @@ mainPageTests = session "main page" $ using [chromeCaps] $ do
("content", "some-google-token") ("content", "some-google-token")
wd "has a title" $ do wd "has a title" $ do
"h1" `shouldHaveText` "Aelve Guide | Haskell" "h1" `shouldHaveText` "Aelve Guide | Haskell"
describe "subtitle" $ do -- describe "subtitle" $ do
wd "is present" $ do -- wd "is present" $ do
sub <- select ".subtitle" -- sub <- select ".subtitle"
fs <- fontSize sub; fs `shouldBeInRange` (15,17) -- fs <- fontSize sub; fs `shouldBeInRange` (15,17)
wd "has a discuss link" $ do -- wd "has a discuss link" $ do
checkPresent ".subtitle a[href='http://discuss.link']" -- checkPresent ".subtitle a[href='http://discuss.link']"
describe "footer" $ do describe "footer" $ do
wd "is present" $ do wd "is present" $ do
checkPresent "#footer" checkPresent "#footer"
@ -90,8 +90,8 @@ categoryTests = session "categories" $ using [chromeCaps] $ do
titleLink <- select "h1 > a" titleLink <- select "h1 > a"
titleLink `shouldHaveText` "Aelve Guide | Haskell" titleLink `shouldHaveText` "Aelve Guide | Haskell"
titleLink `shouldLinkToRelative` "/haskell" titleLink `shouldLinkToRelative` "/haskell"
wd "has a subtitle" $ do -- wd "has a subtitle" $ do
checkPresent ".subtitle" -- checkPresent ".subtitle"
wd "doesn't have an add-category field" $ do wd "doesn't have an add-category field" $ do
checkNotPresent ".add-category" checkNotPresent ".add-category"
wd "is present on the main page" $ do wd "is present on the main page" $ do