Skip to content

Commit

Permalink
more work
Browse files Browse the repository at this point in the history
  • Loading branch information
amitaibu committed Jul 12, 2024
1 parent 15befe2 commit c0a2c7a
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ static/app.css
static/articles
static/paragraph_quotes

# @todo: Fix the creation of duplicates
static/styleGuideImages/imageStyles

Application/Migration

# JWT
Expand Down
16 changes: 16 additions & 0 deletions Web/Element/PageTitle.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module Web.Element.PageTitle where

import Web.View.Prelude

import Application.Helper.Icons
import Web.Element.ElementWrap
import Web.Element.Types


render :: Text -> Html
render text =
text
|> cs
|> wrapHeaderTag 1


1 change: 1 addition & 0 deletions Web/Element/Quote.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module Web.Element.Quote where

import Web.View.Prelude

import Application.Helper.Icons
Expand Down
9 changes: 7 additions & 2 deletions Web/View/StyleGuide/Index.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Web.Element.Types
import Web.View.Prelude

import Web.Element.Cta
import Web.Element.PageTitle
import Web.Element.Quote

data IndexView = IndexView { }
Expand Down Expand Up @@ -34,11 +35,15 @@ instance View IndexView where

-- All the elements to be displayed in the Style Guide.
elements =
[ renderTitleAndElementNoContainer "CTA" cta
[ renderTitleAndElementWideContainer "Page Title" pageTitle
, renderTitleAndElementNoContainer "CTA" cta
, renderTitleAndElementNoContainer "Quote" quote
]
|> mconcat

pageTitle = "The source has extended, but not everyone fears it"
|> Web.Element.PageTitle.render

cta = RenderCta
{ title = "Hello, World!"
, body = "This is a test of the __emergency__ broadcast system."
Expand All @@ -52,7 +57,7 @@ instance View IndexView where
quote = RenderQuote
{ body = "The quick brown fox jumps over the lazy dog"
, subtitle = "An old proverb"
, imageUrl = "/styleGuideImages/kitten-with-wings.jpg"
, imageUrl = "/styleGuideImages/8f8827de-e5d4-4ee7-b0a3-abae36274338"
}
|> Web.Element.Quote.render

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit c0a2c7a

Please sign in to comment.