feat: added new images

This commit is contained in:
Nick 2024-12-24 03:08:39 -06:00
parent b1a190d9ad
commit 6763b6a860
11 changed files with 332 additions and 157 deletions

View file

@ -23,6 +23,7 @@ import Config.Helpers.Format
import Config.Helpers.Headers.Helpers exposing (..)
import Config.Helpers.Headers.Records exposing (debateHeader)
import Config.Helpers.Headers.Types as R exposing (..)
import Config.Helpers.ImageFolders as M exposing (..)
import Config.Helpers.Response
exposing
( pageList
@ -40,6 +41,7 @@ import Config.Style.Glow
( glowDeepDarkGrey
, glowDeepDarkOrange
)
import Config.Style.Images exposing (imageSquareMaker)
import Config.Style.Transitions
exposing
( transitionStyleSlow
@ -148,7 +150,7 @@ debateList device =
[ [ headerMaker (R.Debate debateHeader) ]
, List.map
(\debate ->
cardMaker device (C.Debate debate) (contentList debate)
cardMaker device (C.Debate debate) (contentList device debate)
)
[ debateArguments
, debateCuckList
@ -157,50 +159,68 @@ debateList device =
]
contentList : Debate -> List (Element msg)
contentList debate =
[ descriptionMaker debate ]
contentList : Device -> Debate -> List (Element msg)
contentList device debate =
[ descriptionMaker device debate ]
descriptionMaker : Debate -> Element msg
descriptionMaker debate =
column [ alignTop ]
[ column
[ spacing 3
, alignTop
]
[ row [ spacing 5 ]
[ paragraph
[ F.color colourTheme.textLightOrange
, paragraphSpacing
, F.bold
, headerFontSizeSmall
, E.width fill
]
[ if debate.debateTitle == "Arguments" then
text "Inferences: "
else if debate.debateTitle == "Cucklist" then
text "Cucks: "
else if debate.debateTitle == "Gibberish" then
text "Gibberations: "
else
text ""
]
, text (String.fromInt debate.debateCount)
|> el
[ F.color colourTheme.textLightGrey
, F.regular
, paragraphFontSize
]
descriptionMaker : Device -> Debate -> Element msg
descriptionMaker device debate =
let
image : String -> Element msg
image size =
el
[ alignLeft
, paddingEach
{ top = 0
, right = 10
, bottom = 0
, left = 0
}
]
, el [ width fill ] <|
chunkMaker
[ text debate.debateDescription
]
<|
imageSquareMaker device (imagePathMaker M.Debate debate.debateImage) True size
in
chunkMaker
[ image "Fatty"
, el [] <|
inferenceMaker debate
, el [ width fill, height (px 0) ] none
, el
[ F.color colourTheme.textLightGrey ]
(text debate.debateDescription)
]
inferenceMaker : Debate -> Element msg
inferenceMaker debate =
row [ spacing 5 ]
[ el
[ F.color colourTheme.textLightOrange
, paragraphSpacing
, F.bold
, headerFontSizeSmall
]
<|
if debate.debateTitle == "Arguments" then
text "Inferences: "
else if debate.debateTitle == "Cucklist" then
text "Cucks: "
else if debate.debateTitle == "Gibberish" then
text "Gibberations: "
else
text ""
, el
[ F.color colourTheme.textLightGrey
, F.regular
, paragraphFontSize
]
<|
text
(String.fromInt debate.debateCount)
]