feat: refactored a shit ton of stuff

This commit is contained in:
Nick 2024-12-09 20:42:33 -06:00
parent 7704839038
commit 7b39ebc6df
2 changed files with 76 additions and 65 deletions

View file

@ -106,6 +106,22 @@ cardContentSpacing =
]
imageTransitionStyle : List (Attribute msg)
imageTransitionStyle =
[ D.rounded 100
, D.width 5
, glowDeepDarkGrey
, D.color colourTheme.backgroundDarkGrey
, B.color colourTheme.backgroundDarkGrey
, mouseOver
[ D.color colourTheme.textDarkOrange
, B.color colourTheme.textDarkOrange
, glowDeepDarkOrange
]
, transitionStyleSlow
]
cardImageMaker : { src : String, description : String } -> String -> Element msg
cardImageMaker image urlLink =
column
@ -115,18 +131,7 @@ cardImageMaker image urlLink =
, alignRight
]
[ column
[ D.rounded 100
, D.width 5
, glowDeepDarkGrey
, D.color colourTheme.backgroundDarkGrey
, B.color colourTheme.backgroundDarkGrey
, mouseOver
[ D.color colourTheme.textDarkOrange
, B.color colourTheme.textDarkOrange
, glowDeepDarkOrange
]
, transitionStyleSlow
]
imageTransitionStyle
[ if
urlLink
== (url ++ formatName pageNames.pageArguments)
@ -139,13 +144,7 @@ cardImageMaker image urlLink =
{ url = urlLink
, label =
E.image
[ alignRight
, alignTop
, D.rounded 100
, clip
, E.width <| px 90
, E.height <| px 90
]
desktopImageSize
image
}
@ -154,19 +153,24 @@ cardImageMaker image urlLink =
{ url = urlLink
, label =
E.image
[ alignRight
, alignTop
, D.rounded 100
, clip
, E.width <| px 90
, E.height <| px 90
]
desktopImageSize
image
}
]
]
desktopImageSize : List (Attribute msg)
desktopImageSize =
[ alignRight
, alignTop
, D.rounded 100
, clip
, E.width <| px 90
, E.height <| px 90
]
cardImageMakerMobile : { src : String, description : String } -> String -> Element msg
cardImageMakerMobile image urlLink =
column
@ -181,36 +185,51 @@ cardImageMakerMobile image urlLink =
}
]
[ column
[ D.rounded 100
, D.width 5
, centerX
, alignBottom
, glowDeepDarkGrey
, D.color colourTheme.backgroundDeepDarkGrey
, B.color colourTheme.backgroundDeepDarkGrey
, mouseOver
[ D.color colourTheme.textDarkOrange
, B.color colourTheme.textDarkOrange
, glowDeepDarkOrange
]
, transitionStyleSlow
]
[ newTabLink []
{ url = urlLink
, label =
E.image
[ D.rounded 100
, clip
, centerX
, E.width <| px 45
, E.height <| px 45
]
image
}
imageTransitionStyle
[ if
urlLink
== (url ++ formatName pageNames.pageArguments)
|| urlLink
== (url ++ formatName pageNames.pageCucks)
|| urlLink
== (url ++ formatName pageNames.pageGibberish)
then
link []
{ url = urlLink
, label =
E.image
([ alignRight
, alignTop
]
++ mobileImageSize
)
image
}
else
newTabLink []
{ url = urlLink
, label =
E.image
([ centerX
]
++ mobileImageSize
)
image
}
]
]
mobileImageSize : List (Attribute msg)
mobileImageSize =
[ D.rounded 100
, clip
, E.width <| px 45
, E.height <| px 45
]
cardTitleMaker : String -> Element msg
cardTitleMaker title =
paragraph

View file

@ -92,7 +92,7 @@ argumentMaker argument =
[ propositionMakerDesktop argument
, reductioMakerDesktop argument
, summaryMakerDesktop argument
, strengthMakerDesktop argument
, strengthBar argument
, tableMaker argument
, desktopFormalizationMaker argument
]
@ -121,7 +121,7 @@ argumentMakerMobile argument =
]
, reductioMakerMobile argument
, summaryMakerMobile argument
, strengthMakerMobile argument
, strengthBar argument
, tableMaker argument
, mobileFormalizationMaker argument
]
@ -345,22 +345,14 @@ summaryMakerTitle argument =
]
strengthMakerDesktop : Argument -> Element msg
strengthMakerDesktop argument =
strengthBar : Argument -> Element msg
strengthBar argument =
row [ E.width fill ]
[ strengthMaker
, strengthMakerBar argument
]
strengthMakerMobile : Argument -> Element msg
strengthMakerMobile argument =
column [ E.width fill ]
[ strengthMaker
, strengthMakerBar argument
]
strengthMaker : Element msg
strengthMaker =
column
@ -384,7 +376,7 @@ strengthMaker =
(el
[ paddingEach
{ top = 0
, right = 10
, right = 5
, bottom = 0
, left = 0
}