feat: added dodger page

This commit is contained in:
Nick 2024-11-11 18:57:51 -06:00
parent f05a528580
commit 5ff83e3585
18 changed files with 338 additions and 51 deletions

0
Dodgers.elm Normal file → Executable file
View file

0
frontend/review/elm.json Normal file → Executable file
View file

0
frontend/review/src/ReviewConfig.elm Normal file → Executable file
View file

91
frontend/src/Config/Identity.elm Normal file → Executable file
View file

@ -1,16 +1,89 @@
module Config.Identity exposing (..) module Config.Identity exposing (..)
homeName : String import Element exposing (..)
homeName = "The Nutrivore"
platformsName : String
platformsName = homeName ++ " | Platforms"
servicesName : String type alias PageInput =
servicesName = homeName ++ " | Services" { pageHome : String
, pageContact : String
, pageDebate : String
, pageDodgers : String
, pageHyperBlog : String
, pageInterviews : String
, pageNutriDex : String
, pagePlatforms : String
, pagePropositions : String
, pageServices : String
, pageSupport : String
}
pageNames : PageInput
pageNames =
{ pageHome = "The Nutrivore"
, pagePlatforms = "Platforms"
, pageServices = "Services"
, pageDebate = "Debate"
, pageDodgers = "Dodgers"
, pagePropositions = "Propositions"
, pageHyperBlog = "HyperBlog"
, pageNutriDex = "NutriDex"
, pageInterviews = "Interviews"
, pageContact = "Contact"
, pageSupport = "Support"
}
createPageName : String -> String
createPageName pageName =
pageNames.pageHome ++ " | " ++ pageName
contactName : String
contactName =
createPageName pageNames.pageContact
debateName : String
debateName =
createPageName pageNames.pageDebate
supportName : String
supportName = homeName ++ " | Support"
dodgersName : String dodgersName : String
dodgersName = homeName ++ " | Dodgers" dodgersName =
createPageName pageNames.pageDodgers
hyperBlogName : String
hyperBlogName =
createPageName pageNames.pageHyperBlog
interviewsName : String
interviewsName =
createPageName pageNames.pageInterviews
nutriDexName : String
nutriDexName =
createPageName pageNames.pageNutriDex
platformsName : String
platformsName =
createPageName pageNames.pagePlatforms
propositionsName : String
propositionsName =
createPageName pageNames.pagePropositions
servicesName : String
servicesName =
createPageName pageNames.pageServices
supportName : String
supportName =
createPageName pageNames.pageSupport

108
frontend/src/Config/Theme.elm Normal file → Executable file
View file

@ -3,15 +3,7 @@ module Config.Theme exposing (..)
import Element exposing (..) import Element exposing (..)
import Element.Background as B import Element.Background as B
import Element.Font as F import Element.Font as F
import Html.Attributes as H exposing (style)
type alias Theme =
{ nonHighlightedText : Color
, nonHighlightedDarkText : Color
, highlightText : Color
, backgroundColour : Color
, debugColour : Color
}
topLevelContainer : Element msg -> Element msg topLevelContainer : Element msg -> Element msg
@ -23,16 +15,58 @@ topLevelContainer =
] ]
pageList : List (Attribute msg)
pageList =
[ spacing 40
, centerX
, centerY
, moveDown 60
, alignTop
]
type alias Theme =
{ nonHighlightedText : Color
, nonHighlightedDarkText : Color
, highlightText : Color
, highlightTextHover : Color
, backgroundColour : Color
, debugColour : Color
}
colourTheme : Theme colourTheme : Theme
colourTheme = colourTheme =
{ nonHighlightedText = rgb255 212 212 212 { nonHighlightedText = rgb255 212 212 212
, nonHighlightedDarkText = rgb255 126 126 126 , nonHighlightedDarkText = rgb255 126 126 126
, highlightText = rgb255 204 102 0 , highlightText = rgb255 204 102 0
, highlightTextHover = rgb255 120 60 0
, backgroundColour = rgb255 40 40 40 , backgroundColour = rgb255 40 40 40
, debugColour = rgb255 227 28 121 , debugColour = rgb255 227 28 121
} }
transitionStyle : Attribute msg
transitionStyle =
htmlAttribute <| style "transition" "all .2s"
transitionHighlightedLinkHover : Element msg -> Element msg
transitionHighlightedLinkHover =
el
[ mouseOver [ F.color colourTheme.highlightTextHover ]
, transitionStyle
]
transitionNonHighlightedLinkHover : Element msg -> Element msg
transitionNonHighlightedLinkHover =
el
[ mouseOver [ F.color colourTheme.highlightText ]
, transitionStyle
]
spartanFont : F.Font spartanFont : F.Font
spartanFont = spartanFont =
F.typeface "League Spartan" F.typeface "League Spartan"
@ -43,14 +77,35 @@ imageSpacer =
spacing 20 spacing 20
navBarLinkFormat : List (Attr () msg)
navBarLinkFormat =
[ F.size 15
-- , F.bold
]
titleFormat : List (Attr () msg) titleFormat : List (Attr () msg)
titleFormat = titleFormat =
[ F.size 23 [ F.size 23
, F.bold , F.bold
, F.color colourTheme.highlightText
] ]
nonHighlightedTitleFormat : List (Attr () msg)
nonHighlightedTitleFormat =
[ F.color colourTheme.nonHighlightedText
]
++ titleFormat
highlightedTitleFormat : List (Attr () msg)
highlightedTitleFormat =
[ F.color colourTheme.highlightText
]
++ titleFormat
paragraphFontSize : Attr decorative msg paragraphFontSize : Attr decorative msg
paragraphFontSize = paragraphFontSize =
F.size 17 F.size 17
@ -64,16 +119,39 @@ paragraphLinkFormat =
] ]
paragraphText : List (Attr () msg)
paragraphText =
[ F.color colourTheme.nonHighlightedText
, spacing 8
, paragraphFontSize
]
paragraphFormat : List (Attr () msg) paragraphFormat : List (Attr () msg)
paragraphFormat = paragraphFormat =
[ spacing 8 []
, paragraphFontSize ++ paragraphText
, F.color colourTheme.nonHighlightedText
]
paragraphBoldFormat : List (Attr () msg)
paragraphBoldFormat =
[ F.bold ]
++ paragraphText
paragraphWidth : Attribute msg
paragraphWidth =
width <| px 700
paragraphAlignLeft : List (Attr () msg)
paragraphAlignLeft =
[ alignLeft, paragraphWidth ]
++ paragraphText
paragraphColumnFormat : List (Attribute msg) paragraphColumnFormat : List (Attribute msg)
paragraphColumnFormat = paragraphColumnFormat =
[ spacing 20 [ spacing 20
, width <| px 700 , paragraphWidth
] ]

31
frontend/src/Layouts/Navbar.elm Normal file → Executable file
View file

@ -67,6 +67,7 @@ subscriptions model =
-- image [spacing 30, width <| px 150] {src = "navbar/nutrivorelogo.png", description = ""}
-- VIEW -- VIEW
@ -74,5 +75,33 @@ view : { toContentMsg : Msg -> contentMsg, content : View contentMsg, model : Mo
view { toContentMsg, model, content } = view { toContentMsg, model, content } =
{ title = content.title { title = content.title
, attributes = [ F.family [ spartanFont ] ] , attributes = [ F.family [ spartanFont ] ]
, element = column [width fill, height fill] [text "some bullshit", content.element] , element =
column
[ width fill
, height fill
, B.color colourTheme.backgroundColour
]
[ column
[ height <| px 80
, centerX
]
[ row
[ spacing 30
, centerY
, F.color colourTheme.nonHighlightedText
]
[ image [ spacing 30, width <| px 80 ] { src = "navbar/nutrivorelogo.png", description = "" }
, link nonHighlightedTitleFormat { url = "", label = transitionNonHighlightedLinkHover <| text "THE NUTRIVORE" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "PLATFORMS" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "SERVICES" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "DEBATE" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "BLOG" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "NUTRI-DEX" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "SUPPORT" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "INTERVIEWS" }
, link navBarLinkFormat { url = "", label = transitionNonHighlightedLinkHover <| text "CONTACT" }
]
]
, content.element
]
} }

126
frontend/src/Pages/Dodgers.elm Normal file → Executable file
View file

@ -90,12 +90,128 @@ dodgersContainer =
dodgersList : Element msg dodgersList : Element msg
dodgersList = dodgersList =
column column
[ spacing 40 pageList
, centerX
, centerY
]
dodgers dodgers
type alias MakeRowInput =
{ cuckImage : String
, cuckName : String
, cuckSocial : String
, cuckDodges : List DodgeEntry
}
type alias DodgeEntry =
{ dodgeLink : String
, dodgeDescription : String
, dodgeProposition : String
}
makeRow : MakeRowInput -> Element msg
makeRow makeRowInput =
let
cuckImageFormat : List (Attribute msg)
cuckImageFormat =
[ width <| px 80 ]
dodgeRows : List (Element msg)
dodgeRows =
List.indexedMap
(\index dodgeEntry ->
column paragraphAlignLeft
[ row paragraphFormat
[ text " "
, text (String.fromInt (index + 1) ++ ". ")
, paragraphLinkFormat
{ url = dodgeEntry.dodgeLink
, label =
row []
[ transitionHighlightedLinkHover <| text dodgeEntry.dodgeDescription
, text "." |> el [ F.color colourTheme.nonHighlightedText ]
]
}
]
, row paragraphBoldFormat
[ text " Proposition:"
, row [ F.regular ]
[ text dodgeEntry.dodgeProposition ]
]
]
)
makeRowInput.cuckDodges
in
row [ imageSpacer, alignLeft ]
[ image cuckImageFormat
{ src = makeRowInput.cuckImage
, description = makeRowInput.cuckName
}
, column
paragraphAlignLeft
[ row nonHighlightedTitleFormat [ text makeRowInput.cuckName ]
, row paragraphBoldFormat
[ text "Social:"
, paragraphLinkFormat
{ url = makeRowInput.cuckSocial
, label = transitionHighlightedLinkHover <| text makeRowInput.cuckName
}
]
, row paragraphBoldFormat [ text "Dodges:" ]
, column [spacing 8] dodgeRows
]
]
type alias DodgeType =
{ noReply : String
, ranAway : String
, ghostedMe : String
, outrightNo : String
, inTooDeep : String
}
type alias PropType =
{ noClearProp : String
}
dodgers = dodgers =
[] let
dodgeType : DodgeType
dodgeType =
{ noReply = "Invitation extended with no response"
, ranAway = "Engaged in written debate and dodged when cornered"
, ghostedMe = "Debate invitation accepted with no follow-up"
, outrightNo = "Debate invitation declined"
, inTooDeep = "Debate invitation accepted and subsequently retracted"
}
propType : PropType
propType =
{ noClearProp = "failed to state position clearly."
}
in
List.map makeRow
[ { cuckImage = "cucks/adamsinger"
, cuckName = "Adam Singer"
, cuckSocial = "https://twitter.com/AdamSinger"
, cuckDodges =
[ { dodgeLink = "https://twitter.com/TheNutrivore/status/1566491269194719232?s=20"
, dodgeDescription = dodgeType.noReply
, dodgeProposition = propType.noClearProp
}
]
}
, { cuckImage = "cucks/"
, cuckName = ""
, cuckSocial = ""
, cuckDodges =
[ { dodgeLink = ""
, dodgeDescription = dodgeType.noReply
, dodgeProposition = propType.noClearProp
}
]
}
]

2
frontend/src/Pages/Home_.elm Normal file → Executable file
View file

@ -75,7 +75,7 @@ subscriptions model =
view : Model -> View Msg view : Model -> View Msg
view model = view model =
{ title = homeName { title = pageNames.pageHome
, attributes = [] , attributes = []
, element = none , element = none
} }

14
frontend/src/Pages/Platforms.elm Normal file → Executable file
View file

@ -90,9 +90,7 @@ platformsContainer =
platformsList : Element msg platformsList : Element msg
platformsList = platformsList =
column column
[ spacing 40 pageList
, centerX
]
platforms platforms
@ -137,7 +135,7 @@ makeRow makeRowInput =
, description = makeRowInput.logoDescription , description = makeRowInput.logoDescription
} }
, column paragraphColumnFormat , column paragraphColumnFormat
[ newTabLink titleFormat [ newTabLink highlightedTitleFormat
{ url = makeRowInput.platformsLink { url = makeRowInput.platformsLink
, label = text makeRowInput.platformsTitle , label = text makeRowInput.platformsTitle
} }
@ -145,13 +143,13 @@ makeRow makeRowInput =
, paragraph paragraphFormat makeRowInput.platformsParagraph2 , paragraph paragraphFormat makeRowInput.platformsParagraph2
, paragraph paragraphFormat , paragraph paragraphFormat
[ recommendedClients [ recommendedClients
, paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink1, label = text makeRowInput.platformsRecommendedClientLabel1 } , paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink1, label = transitionHighlightedLinkHover <| text makeRowInput.platformsRecommendedClientLabel1 }
, text makeRowInput.platformsRecommendedClientText1 , text makeRowInput.platformsRecommendedClientText1
, paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink2, label = text makeRowInput.platformsRecommendedClientLabel2 } , paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink2, label = transitionHighlightedLinkHover <| text makeRowInput.platformsRecommendedClientLabel2 }
, text makeRowInput.platformsRecommendedClientText2 , text makeRowInput.platformsRecommendedClientText2
, paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink3, label = text makeRowInput.platformsRecommendedClientLabel3 } , paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink3, label = transitionHighlightedLinkHover <| text makeRowInput.platformsRecommendedClientLabel3 }
, text makeRowInput.platformsRecommendedClientText3 , text makeRowInput.platformsRecommendedClientText3
, paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink4, label = text makeRowInput.platformsRecommendedClientLabel4 } , paragraphLinkFormat { url = makeRowInput.platformsRecommendedClientLink4, label = transitionHighlightedLinkHover <| text makeRowInput.platformsRecommendedClientLabel4 }
, text makeRowInput.platformsRecommendedClientText4 , text makeRowInput.platformsRecommendedClientText4
] ]
] ]

17
frontend/src/Pages/Services.elm Normal file → Executable file
View file

@ -90,10 +90,7 @@ servicesContainer =
servicesList : Element msg servicesList : Element msg
servicesList = servicesList =
column column
[ spacing 40 pageList
, centerX
, centerY
]
services services
@ -123,14 +120,10 @@ makeRow makeRowInput =
} }
, column paragraphColumnFormat , column paragraphColumnFormat
[ row [ spacing 8 ] [ row [ spacing 8 ]
[ newTabLink titleFormat [ newTabLink highlightedTitleFormat
{ url = makeRowInput.servicesLink { url = makeRowInput.servicesLink
, label = , label =
el transitionHighlightedLinkHover <|
[ mouseOver [ F.color (rgb255 255 50 0) ]
, htmlAttribute <| style "transition" "all .2s"
]
<|
text makeRowInput.servicesTitle text makeRowInput.servicesTitle
} }
, paragraph [ F.color colourTheme.nonHighlightedText ] [ text makeRowInput.servicesRate ] , paragraph [ F.color colourTheme.nonHighlightedText ] [ text makeRowInput.servicesRate ]
@ -162,10 +155,10 @@ services =
, servicesLink = "https://the-nutrivore.social/" , servicesLink = "https://the-nutrivore.social/"
, servicesTitle = "NUTRITION SCIENCE" , servicesTitle = "NUTRITION SCIENCE"
, servicesRate = "$40/hr" , servicesRate = "$40/hr"
, servicesDescription = "Participate in a one-hour Q&A session specifically to inquire about nutrition science. Ask questions about research design, methodology, epistemology, and study interpretation. Also, by participating you will also gain access to nutrition science interpretation cheat-sheets that will streamline and simply the research appraisal process." , servicesDescription = "Participate in a one-hour Q&A session specifically to inquire about nutrition science. Ask questions about research design, methodology, epistemology, and study interpretation. Also, by participating you will also gain access to nutrition science interpretation cheat-sheets that will streamline and simplify the research appraisal process."
} }
, { logoImage = "services/nixos.png" , { logoImage = "services/nixos.png"
, logoDescription = "debate logo" , logoDescription = "nixos logo"
, servicesLink = "https://the-nutrivore.social/" , servicesLink = "https://the-nutrivore.social/"
, servicesTitle = "CUSTOM NIX BUILDS" , servicesTitle = "CUSTOM NIX BUILDS"
, servicesRate = "$40/hr" , servicesRate = "$40/hr"

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

0
frontend/static/platforms/discord.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

0
frontend/static/platforms/mastodon.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Before After
Before After

0
frontend/static/platforms/peertube.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before After
Before After

0
frontend/static/services/debate.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

0
frontend/static/services/nixos.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Before After
Before After

0
frontend/static/services/nutrition.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Before After
Before After