mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-17 04:45:12 -05:00
121 lines
4.5 KiB
Elm
121 lines
4.5 KiB
Elm
![]() |
module Cuckery.Helpers exposing (..)
|
||
|
|
||
|
import Config.Colour exposing (..)
|
||
|
import Config.Format exposing (..)
|
||
|
import Cuckery.Types exposing (..)
|
||
|
import Effect exposing (Effect)
|
||
|
import Element exposing (..)
|
||
|
import Element.Border as D
|
||
|
import Element.Font as F
|
||
|
import Html.Attributes as H exposing (style)
|
||
|
import Layouts
|
||
|
import Page exposing (Page)
|
||
|
import Route exposing (Route)
|
||
|
import Shared
|
||
|
import View exposing (View)
|
||
|
|
||
|
|
||
|
makeDodge : Dodge -> Int -> Element msg
|
||
|
makeDodge dodgeEntry index =
|
||
|
column paragraphAlignLeft
|
||
|
[ row (paragraphFormat ++ [ width fill ])
|
||
|
[ text " "
|
||
|
, text (String.fromInt index ++ ". ")
|
||
|
, paragraphLinkFormat
|
||
|
{ url = dodgeEntry.dodgeLink
|
||
|
, label =
|
||
|
row []
|
||
|
[ transitionHighlightedLinkHover <|
|
||
|
text
|
||
|
(case dodgeEntry.dodgeDescription of
|
||
|
NoReply ->
|
||
|
"Invitation extended with no response"
|
||
|
|
||
|
RanAway ->
|
||
|
"Engaged in written debate and ran away when cornered"
|
||
|
|
||
|
GhostedMe ->
|
||
|
"Debate invitation accepted with no follow-up"
|
||
|
|
||
|
OutrightNo ->
|
||
|
"Debate invitation declined"
|
||
|
|
||
|
InTooDeep ->
|
||
|
"Debate invitation accepted and subsequently retracted"
|
||
|
|
||
|
KillScreen ->
|
||
|
"All further debate invitations preemptively declined"
|
||
|
)
|
||
|
, text "." |> el [ F.color colourTheme.nonHighlightedText ]
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
, row paragraphBoldFormat
|
||
|
[ column [ alignTop ]
|
||
|
[ text " Proposition:"
|
||
|
]
|
||
|
, column [ width fill, alignLeft ] [ paragraph [ F.regular ] [ text ("\"" ++ dodgeEntry.dodgeProposition ++ "\"") ] ]
|
||
|
]
|
||
|
, row (paragraphBoldFormat ++ [ width fill ])
|
||
|
[ text " Doxastic State:"
|
||
|
, case dodgeEntry.dodgeNicksDoxasticState of
|
||
|
Nothing ->
|
||
|
paragraph [ F.regular ] [ text "Nick doesn't form a doxastic state." ]
|
||
|
|
||
|
Just Belief ->
|
||
|
paragraph [ F.regular ]
|
||
|
[ text "Nick leans more toward "
|
||
|
, el [ F.bold ] (text "TRUE")
|
||
|
, text " than false."
|
||
|
]
|
||
|
|
||
|
Just Disbelief ->
|
||
|
paragraph [ F.regular ]
|
||
|
[ text "Nick leans more toward "
|
||
|
, text "FALSE" |> el [ F.bold ]
|
||
|
, text " than true."
|
||
|
]
|
||
|
|
||
|
Just Agnostic ->
|
||
|
el [ F.regular ] (text "Nick doesn't form beliefs about this proposition.")
|
||
|
]
|
||
|
, row (paragraphBoldFormat ++ [ width fill ])
|
||
|
[ text " Reason:"
|
||
|
, el [ F.regular ]
|
||
|
(text <|
|
||
|
case dodgeEntry.dodgeNicksDoxasticReason of
|
||
|
NoProp ->
|
||
|
"there is no proposition to evaluate."
|
||
|
|
||
|
Vague ->
|
||
|
"the proposition is too vague to evaluate."
|
||
|
)
|
||
|
]
|
||
|
]
|
||
|
|
||
|
|
||
|
cuckMaker : Cuck -> Element msg
|
||
|
cuckMaker cuck =
|
||
|
row [ imageSpacer, alignLeft ]
|
||
|
[ image [ centerX, centerY, D.rounded 100, clip, width <| px 80 ]
|
||
|
{ src = "cucks/" ++ cuck.cuckImage ++ ".png"
|
||
|
, description = cuck.cuckName
|
||
|
}
|
||
|
, column
|
||
|
paragraphAlignLeft
|
||
|
[ row nonHighlightedTitleFormat [ text cuck.cuckName ]
|
||
|
, row paragraphBoldFormat
|
||
|
[ text "Social:"
|
||
|
, paragraphLinkFormat
|
||
|
{ url = cuck.cuckSocial
|
||
|
, label = transitionHighlightedLinkHover <| text cuck.cuckName
|
||
|
}
|
||
|
]
|
||
|
, row paragraphBoldFormat [ text "Dodges:" ]
|
||
|
, column [ spacing 8 ] <|
|
||
|
List.map2 (\x y -> makeDodge x y)
|
||
|
cuck.cuckDodges
|
||
|
(List.range 1 (List.length cuck.cuckDodges))
|
||
|
]
|
||
|
]
|