feat: refactored some stuff

This commit is contained in:
Nick 2024-11-28 00:33:22 -06:00
parent 5e25267fbe
commit ed73a38cbe
6 changed files with 380 additions and 141 deletions

View file

@ -4,6 +4,7 @@ import Config.CardFormat exposing (..)
import Config.Colour exposing (..)
import Config.Format exposing (..)
import Config.StrengthBar exposing (..)
import Config.ToolTip exposing (..)
import Cuckery.Types exposing (..)
import Effect exposing (Effect)
import Element as E exposing (..)
@ -97,14 +98,17 @@ makeAppearance appearanceEntry index =
]
)
[ row
[ width fill
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 35
}
]
(paragraphFormat
++ [ F.size 18
, E.width fill
, paddingEach
{ top = 0
, bottom = 0
, left = 35
, right = 0
}
]
)
[ column
(paragraphFormat
++ [ F.size 18
@ -118,20 +122,34 @@ makeAppearance appearanceEntry index =
[ spacing 8
, width fill
]
[ column
[ spacing 8
, width fill
]
[ experienceMaker appearanceEntry
, dateMaker appearanceEntry
, subjectMaker appearanceEntry
, subjectList appearanceEntry
]
[ episodeMaker appearanceEntry
, experienceMaker appearanceEntry
, dateMaker appearanceEntry
, subjectMaker appearanceEntry
, subjectList appearanceEntry
]
]
]
episodeMaker : Appearance -> Element msg
episodeMaker appearanceEntry =
paragraphLinkFormat
{ url = appearanceEntry.appearanceLink
, label =
row
[ F.size 18
]
[ text ("#" ++ appearanceEntry.appearanceEpisode ++ ": " ++ appearanceEntry.appearanceTitle)
|> el
[ F.color colourTheme.highlightText
, mouseOver [ F.color colourTheme.highlightTextHover ]
, transitionStyle
]
]
}
experienceMaker : Appearance -> Element msg
experienceMaker appearanceEntry =
row
@ -139,12 +157,23 @@ experienceMaker appearanceEntry =
, height fill
]
[ column
[ E.alignTop, E.alignLeft ]
[ E.alignTop
, E.alignLeft
]
[ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 112 ])
[ el [ tooltip below (myTooltip "This represents how pleasant it was to interact with the host(s).") ] (text "Pleasantness:") ]
[ el
[ tooltip
"This represents how pleasant it was to interact with the host(s)."
]
(text "Pleasantness:")
]
]
, column
[ E.width fill, E.alignLeft ]
[ E.width fill
, E.alignLeft
, centerY
, height fill
]
[ barMaker getExperienceTooltip appearanceEntry.appearanceExperience ]
]