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

Add a link to the main page on category pages

This commit is contained in:
Artyom 2016-03-20 03:15:20 +03:00
parent eb0e13b94e
commit c81fa12305
2 changed files with 20 additions and 11 deletions

View File

@ -95,6 +95,15 @@ instead of simple
renderRoot :: GlobalState -> Maybe Text -> HtmlT IO () renderRoot :: GlobalState -> Maybe Text -> HtmlT IO ()
renderRoot globalState mbSearchQuery = renderRoot globalState mbSearchQuery =
wrapPage "Aelve Guide" $ do wrapPage "Aelve Guide" $ do
-- TODO: [very-easy] this header looks bad when the page is narrow, it
-- should be fixed in css.css by adding line-height to it
h1_ "The Haskeller's guide"
noscript_ $ div_ [id_ "noscript-message"] $
toHtml $ renderMarkdownBlock [text|
You have Javascript disabled! This site works fine without
Javascript, but since all editing needs Javascript to work,
you won't be able to edit anything.
|]
renderHelp renderHelp
onPageLoad $ JS.showOrHideHelp (JS.selectId "help", helpVersion) onPageLoad $ JS.showOrHideHelp (JS.selectId "help", helpVersion)
form_ $ do form_ $ do
@ -180,18 +189,7 @@ wrapPage pageTitle page = doctypehtml_ $ do
|] |]
body_ $ do body_ $ do
-- TODO: [very-easy] this header looks bad when the page is narrow, it
-- should be fixed in css.css by adding line-height to it
h1_ "The Haskeller's guide"
noscript_ $ div_ [id_ "noscript-message"] $
toHtml $ renderMarkdownBlock [text|
You have Javascript disabled! This site works fine without
Javascript, but since all editing needs Javascript to work,
you won't be able to edit anything.
|]
page page
div_ [id_ "footer"] $ do div_ [id_ "footer"] $ do
"made by " >> a_ [href_ "https://artyom.me"] "Artyom" "made by " >> a_ [href_ "https://artyom.me"] "Artyom"
emptySpan "2em" emptySpan "2em"
@ -205,6 +203,16 @@ wrapPage pageTitle page = doctypehtml_ $ do
renderCategoryPage :: Category -> HtmlT IO () renderCategoryPage :: Category -> HtmlT IO ()
renderCategoryPage category = renderCategoryPage category =
wrapPage (category^.title <> " Aelve Guide") $ do wrapPage (category^.title <> " Aelve Guide") $ do
-- TODO: [very-easy] this header looks bad when the page is narrow, it
-- should be fixed in css.css by adding line-height to it
-- TODO: another absolute link [absolute-links]
h1_ (a_ [href_ "/haskell"] "The Haskeller's guide")
noscript_ $ div_ [id_ "noscript-message"] $
toHtml $ renderMarkdownBlock [text|
You have Javascript disabled! This site works fine without
Javascript, but since all editing needs Javascript to work,
you won't be able to edit anything.
|]
renderCategory category renderCategory category
-- TODO: allow archiving items if they are in every way worse than the rest, -- TODO: allow archiving items if they are in every way worse than the rest,

View File

@ -71,6 +71,7 @@ a:visited {color: #B40EB4; text-decoration: none;}
a:hover {text-decoration: underline;} a:hover {text-decoration: underline;}
a:active {text-decoration: underline;} a:active {text-decoration: underline;}
.text-button > a:visited {color: #008ACE;} .text-button > a:visited {color: #008ACE;}
h1 > a:visited {color: #008ACE;} /* for header in category pages */
a.anchor { a.anchor {
margin-right: 0.5em; margin-right: 0.5em;