feat: massive refactor

This commit is contained in:
Nick 2024-12-15 02:31:26 -06:00
parent c619757eff
commit fc7b85afc1
214 changed files with 4764 additions and 4716 deletions

View file

@ -1,19 +1,53 @@
module Pages.Contact exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Format exposing (..)
import Config.Helpers.Response
exposing
( pageList
, topLevelContainer
)
import Config.Helpers.StrengthBar
exposing
( barMaker
, barPadding
)
import Config.Helpers.ToolTip exposing (..)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Contact.Helpers exposing (..)
import Config.Pages.Contact.Methods.Discord exposing (contactDiscord)
import Config.Pages.Contact.Methods.Email exposing (contactEmail)
import Config.Pages.Contact.Types exposing (..)
import Config.Pages.Headers.Helpers exposing (..)
import Config.Pages.Headers.Records.Contact exposing (contactHeader)
import Config.Pages.Headers.Types exposing (..)
import Config.Pages.Interviews.Types exposing (..)
import Config.Pages.Products.Types exposing (..)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Transitions
exposing
( hoverFontDarkOrange
, transitionStyleFast
, transitionStyleSlow
)
import Effect exposing (Effect)
import Element as E exposing (..)
import Config.Pages.Headers.Helpers exposing (..)
import Config.Pages.Headers.Pages.Contact exposing (contactHeader)
import Element.Background as B
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)
@ -105,3 +139,367 @@ contactList device =
_ ->
[ [ instructionMaker ] ]
)
instructionMaker : Element msg
instructionMaker =
row
topLevelBox
[ cardMaker
[ cardTitleMaker (String.toUpper pageNames.pageContact)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ cardSubTitleMaker
[ instructionBody ]
]
]
]
]
]
instructionBody : Element msg
instructionBody =
column
[ spacing 10
, paddingEach
{ top = 10
, bottom = 0
, left = 0
, right = 0
}
]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.alignLeft
, width fill
]
)
[ text "The following terms may seem unreasonable to some, but after years on a large platform, I've learned the importance of filtering the criticisms I receive. Most feedback I receive is just vague gesturing and lacks substance, making some sort of quality filter essential. Thank you for your patience and understanding." ]
, paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.alignLeft
, width fill
]
)
[ text "Please keep in mind that any failure to comply with the following terms and conditions will forfeit your access to my time and attention. I ask that you respect my time and read these terms carefully. You are the one requesting an audience with me, and my time is mine to donate as I see fit. If you wish to submit your criticisms, you must do so on my terms, following the rules and conditions that streamline the process for me." ]
, paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.center
, width fill
, paddingEach
{ top = 10
, bottom = 10
, left = 0
, right = 0
}
]
)
[ el
[ F.color colourTheme.textLightOrange
, F.size 18
]
<|
text "Terms and Conditions"
]
, column [ spacing 10 ] <|
List.indexedMap
(\index term ->
row
[ spacing 10
, width fill
]
[ column
[ width <| px 15
, alignTop
]
[ el [ alignRight ] <| text (String.fromInt (index + 1) ++ ". ") ]
, column
[ spacing 10
, width fill
, alignRight
]
[ paragraph
[ width fill
, F.size 16
, F.alignLeft
]
term
]
]
)
termsAndConditions
, paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.center
, width fill
, paddingEach
{ top = 10
, bottom = 10
, left = 0
, right = 0
}
]
)
[ el
[ F.color colourTheme.textLightOrange
, F.size 18
]
<|
text "Additional Clarifications"
]
, paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.alignLeft
, width fill
]
)
[ text " "
, text "You are only allowed to post one criticism at a time in the "
, newTabLink []
{ url = "https://discord.com/channels/692563032546476062/1301247050796634182"
, label = el orangeFormat <| text "🔎criticism"
}
, text " channel. You may post an additional criticism only after the previous one has been addressed and resolved to my satisfaction. This policy aims to reduce spamming, rambling, and Gish galloping, and to encourage linear discourse."
]
, paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.alignLeft
, width fill
]
)
[ text " ", text "You may or may not be asked to voice chat about your criticism. While your willingness to engage in voice chat is a necessary condition for submitting your criticism, it does not guarantee that a voice chat will be requested. If your initial criticism is clear and I agree with it, then no voice chat will be required." ]
, paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.alignLeft
, width fill
]
)
[ text " ", text "You may or may not be asked to have your criticism formalized. While your willingness to have your criticism formalized is a necessary condition for submitting your criticism, it does not guarantee that a formalization will be requested. If your initial criticism is clear and I agree with it, then no formalization will be required." ]
, paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.alignLeft
, width fill
]
)
[ text " "
, text "If I find it necessary to access a text-based channel (for simple clarifying questions, for example), then either I or a moderator will open a new thread in the "
, newTabLink []
{ url = "https://discord.com/channels/692563032546476062/1301247050796634182"
, label = el orangeFormat <| text "🔎criticism"
}
, text " channel. There we can then engage in a text-based discussion and/or ping other users if needed."
]
, paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.alignLeft
, width fill
]
)
[ text " ", text "I will only request that your criticism be formalized if I do not understand it and we have exhausted all other reasonable means of clarification. If formalization is requested, you will not need to do it yourself, as I recognize that not everyone understands formal logic. If formalization is requested and I am unavailable to assist you, you may ping the @Logic role, and another user may help you." ]
]
darkFormat : Attr decorative msg
darkFormat =
F.color colourTheme.textDarkGrey
orangeFormat : List (Attr () msg)
orangeFormat =
[ F.color colourTheme.textLightOrange
, hoverFontDarkOrange
, transitionStyleFast
]
rounding : Attribute msg
rounding =
D.rounded 10
termsAndConditions : List (List (Element msg))
termsAndConditions =
[ [ paragraph [ alignLeft ]
[ text "You will register an account with "
, newTabLink []
{ url = "https://discord.com/login"
, label = el orangeFormat <| text "Discord"
}
, text " (if you haven't already)."
]
]
, [ row [ alignLeft ]
[ text "You will join the "
, newTabLink []
{ url = "https://discord.com/invite/VzU8yCvYX8"
, label = el orangeFormat <| text "upRootNutrition"
}
, text " Discord Server (if you haven't already)."
]
]
, [ el [ alignLeft ] <| text "You will click the \"😃\" emoji to enter the server (if you haven't already)." ]
, [ paragraph [ alignLeft ]
[ text "You will locate the "
, newTabLink []
{ url = "https://discord.com/channels/692563032546476062/826225570219687956"
, label = el orangeFormat <| text "💻general"
}
, text " channel in General category."
]
]
, [ row [ F.alignLeft, alignLeft ]
[ paragraph [ alignLeft ]
[ text "You will post exactly this in the "
, newTabLink []
{ url = "https://discord.com/channels/692563032546476062/826225570219687956"
, label = el orangeFormat <| text "💻general"
}
, text " channel:"
]
, column
[ paddingEach
{ top = 10
, bottom = 10
, left = 0
, right = 0
}
, alignLeft
]
[ paragraph
[ paddingEach
{ top = 15
, bottom = 15
, left = 20
, right = 20
}
, B.color colourTheme.backgroundLightGrey
, rounding
, width fill
, spacing 8
]
[ text "\"@Moderators I have a criticism for Nick.\""
]
]
]
]
, [ el [ alignLeft ] <| text "You will then receive the @Critic role." ]
, [ paragraph [ alignLeft ]
[ text "You will locate the "
, newTabLink []
{ url = "https://discord.com/channels/692563032546476062/1301247050796634182"
, label = el orangeFormat <| text "🔎criticism"
}
, text " channel in the General category."
]
]
, [ paragraph [ alignLeft ]
[ paragraph [ F.alignLeft ]
[ text "You will post your criticism in the "
, newTabLink []
{ url = "https://discord.com/channels/692563032546476062/1301247050796634182"
, label = el orangeFormat <| text "🔎criticism"
}
, text " channel with this exact format:"
]
]
, column
[ paddingEach
{ top = 10
, bottom = 10
, left = 0
, right = 0
}
, alignLeft
]
[ column
[ paddingEach
{ top = 15
, bottom = 15
, left = 20
, right = 20
}
, B.color colourTheme.backgroundLightGrey
, rounding
, width fill
, spacing 8
]
[ text "\"Hello, <@191027366640877568>. I have a criticism for you."
, row [ alignLeft ]
[ paragraph []
[ text "Proposition: "
, el [ darkFormat ] <| text "specify the exact proposition you are addressing."
]
]
, row [ alignLeft ]
[ paragraph []
[ text "Link: "
, el [ darkFormat ] <| text "provide a url to the claim, with a timestamp if applicable."
]
]
, row [ alignLeft ]
[ paragraph []
[ text "Reason for Error: "
, el [ darkFormat ] <| text "explain exactly why you believe this claim is in error."
]
]
, row [ alignLeft ]
[ paragraph []
[ text "Suggested Correction (if any): "
, el [ darkFormat ] <| text "provide the corrected information or perspective."
]
]
, row [ alignLeft ]
[ paragraph []
[ text "Additional Comments: "
, el [ darkFormat ] <| text "any other relevant thoughts or context."
, text "\""
]
]
]
]
]
, [ el [ alignLeft ] <| text "You will not post additional criticisms until the last one has been resolved." ]
, [ paragraph [ alignLeft ]
[ text "You will not post anything other than criticisms in the "
, newTabLink [ alignLeft ]
{ url = "https://discord.com/channels/692563032546476062/1301247050796634182"
, label = el orangeFormat <| text "🔎criticism"
}
, text " channel."
]
]
, [ el [ alignLeft ] <| text "You must be willing to converse over voice chat." ]
, [ el [ alignLeft ] <| text "You must be willing to have your criticism formalized." ]
]

View file

@ -1,25 +1,73 @@
module Pages.Debate exposing (Model, Msg, page)
module Pages.Debate exposing
( Model
, Msg
, debateArguments
, debateCuckList
, debateGibberish
, page
)
import Config.Data.Identity exposing (pageNames)
import Config.Data.Identity
exposing
( pageNames
)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Converters exposing (formatName)
import Config.Helpers.Format
exposing
( paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Response
exposing
( pageList
, topLevelContainer
)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Debate.Debate.Helpers exposing (..)
import Config.Pages.Debate.Debate.Pages.Arguments exposing (debateArguments)
import Config.Pages.Debate.Debate.Pages.Cucklist exposing (debateCuckList)
import Config.Pages.Debate.Debate.Pages.Gibberish exposing (debateGibberish)
import Config.Pages.Debate.Arguments.List exposing (argumentListNumber)
import Config.Pages.Debate.Cuckery.List exposing (cuckListNumber)
import Config.Pages.Debate.Gibberish.List exposing (gibberishListNumber)
import Config.Pages.Debate.Types exposing (..)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Pages.Debate exposing (debateHeader)
import Config.Pages.Headers.Records.Arguments exposing (argumentHeader)
import Config.Pages.Headers.Records.CuckList exposing (cuckListHeader)
import Config.Pages.Headers.Records.Debate exposing (debateHeader)
import Config.Pages.Headers.Records.Gibberish exposing (gibberishHeader)
import Config.Style.Colour as T exposing (colourTheme)
import Config.Style.Glow
exposing
( glowDeepDarkGrey
, glowDeepDarkOrange
)
import Config.Style.Transitions
exposing
( transitionStyleSlow
)
import Effect exposing (Effect)
import Element as E exposing (..)
import Element.Background as B
import Element.Border as D
import Element.Font as F
import Html exposing (label)
import Html.Attributes as H
import Layouts
import Page exposing (Page)
import Route exposing (Route)
import Route.Path as Path
import Shared exposing (..)
import Task
import View exposing (View)
@ -125,3 +173,153 @@ debateList device =
, debateGibberish
]
]
desktopDebateMaker : Debate -> Element msg
desktopDebateMaker debate =
row
topLevelBox
[ desktopCardMaker desktopImageBoxSize desktopImageSize (debateImage debate) debate.debateLink
, cardMaker
[ cardTitleMaker debate.debateTitle
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ descriptionMaker debate ]
]
]
]
]
mobileDebateMaker : Debate -> Element msg
mobileDebateMaker debate =
row
topLevelBox
[ column [] []
, cardMaker
[ cardTitleMaker debate.debateTitle
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ row [ width fill, spacing 10 ]
[ mobileCardMaker mobileImageBoxSize mobileImageSize (debateImage debate) debate.debateLink
, column
[ width fill ]
[]
]
]
]
]
]
]
debateImage :
Debate
->
{ src : String
, description : String
}
debateImage debate =
{ src = "debate/" ++ debate.debateImage ++ ".png"
, description = debate.debateTitle
}
descriptionMaker : Debate -> Element msg
descriptionMaker debate =
column
[ E.width fill
, centerX
, spacing 3
]
[ row []
[ paragraph
[ F.color colourTheme.textLightOrange
, paragraphSpacing
, paragraphFontSize
, F.bold
, F.size 18
, 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
, F.size 16
]
]
]
, row [ width fill ]
[ paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, spacing 3
, F.regular
, F.alignLeft
, F.size 16
]
[ text debate.debateDescription
]
]
]
debateArguments : Debate
debateArguments =
let
name =
"Arguments"
in
{ debateTitle = name
, debateLink = Path.toString Path.Debate_Arguments
, debateCount = argumentListNumber
, debateImage = formatName name
, isNewTabLink = False
, debateDescription = "This page features arguments that I hold to be sound, though with varying degrees of confidence. I'm open to hearing all challenges, as I am ready to engage with any substantive critiques and defend any argument listed. I have additionally included a confidence meter with each argument to give readers a clearer understanding of how strongly I hold to the argument."
}
debateCuckList : Debate
debateCuckList =
let
name =
"Cucklist"
in
{ debateTitle = name
, debateLink = Path.toString Path.Debate_Cucklist
, debateCount = cuckListNumber
, debateImage = formatName name
, isNewTabLink = False
, debateDescription = "This page features a list of complete fucking morons who wrote cheques with their mouths that their asses ultimately couldn't cash. Each person included in this list has dodged debating me in some way, shape, or form. Whether it's simply ignoring invitations, or outright refusing to engage, or agreeing to debate and then subsequently withdrawing. All such instances are catalogued here."
}
debateGibberish : Debate
debateGibberish =
let
name =
"Gibberish"
in
{ debateTitle = name
, debateLink = Path.toString Path.Debate_Gibberish
, debateCount = gibberishListNumber
, debateImage = formatName name
, isNewTabLink = False
, debateDescription = "This page is specifically for terms and ostensible concepts that I don't have a good reason to believe are understandable from at least one viewpoint. If the clarification of a philosophical term is unsatisfying or unsuccessful, and my interlocutor has exhausted all means of rendering the concept to me, the term ends up here until someone explains to me what the fuck it even means."
}

View file

@ -1,19 +1,60 @@
module Pages.Debate.Arguments exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Format
exposing
( paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Response
exposing
( pageList
, topLevelContainer
)
import Config.Helpers.StrengthBar
exposing
( barMaker
, barPadding
)
import Config.Helpers.ToolTip exposing (tooltip)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Debate.Arguments.Helpers exposing (..)
import Config.Pages.Debate.Arguments.List
exposing
( argumentList
, argumentListNumber
)
import Config.Pages.Debate.Arguments.Types exposing (..)
import Config.Pages.Debate.Gibberish.Helpers exposing (..)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Records.Arguments exposing (argumentHeader)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Glow
exposing
( glowDeepDarkGrey
, glowDeepDarkOrange
)
import Config.Style.Transitions exposing (transitionStyleSlow)
import Effect exposing (Effect)
import Element as E exposing (..)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Pages.Arguments exposing (argumentHeader)
import Element.Background as B
import Element.Border as D
import Element.Font as F
import Html exposing (div, hr)
import Html.Attributes as H exposing (style, title, wrap)
import Layouts
import Page exposing (Page)
import Route exposing (Route)
@ -123,3 +164,563 @@ debateList device =
)
argumentList
]
argumentMaker : Argument -> Element msg
argumentMaker argument =
row
topLevelBox
[ desktopCardMaker desktopImageBoxSize desktopImageSize (argumentImage argument) (argumentLink argument)
, cardMaker
[ cardTitleMaker argument.argumentTitle
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ propositionMakerDesktop argument
, reductioMakerDesktop argument
, summaryMakerDesktop argument
, strengthBar argument
, tableMaker argument
, desktopFormalizationMaker argument
]
]
]
]
]
argumentMakerMobile : Argument -> Element msg
argumentMakerMobile argument =
row
topLevelBox
[ column [] []
, cardMaker
[ cardTitleMaker argument.argumentTitle
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ row [ spacing 10, E.width fill ]
[ mobileCardMaker mobileImageBoxSize mobileImageSize (argumentImage argument) (argumentLink argument)
, column [ E.width fill ]
[ propositionMakerMobile argument
]
]
, reductioMakerMobile argument
, summaryMakerMobile argument
, strengthBar argument
, tableMaker argument
, mobileFormalizationMaker argument
]
]
]
]
]
argumentImage : Argument -> { src : String, description : String }
argumentImage argument =
{ src = "/arguments/" ++ argument.argumentImage ++ ".png"
, description = argument.argumentTitle
}
argumentLink : Argument -> String
argumentLink argument =
argument.proofLink
infoSpacing =
E.width <| px 100
propositionMakerDesktop : Argument -> Element msg
propositionMakerDesktop argument =
row []
[ propositionMaker
, propositionTitleMaker argument
]
propositionMakerMobile : Argument -> Element msg
propositionMakerMobile argument =
column []
[ propositionMaker
, propositionTitleMaker argument
]
propositionMaker : Element msg
propositionMaker =
column
[ E.alignTop, E.alignLeft ]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.size 18
, infoSpacing
]
)
[ el
[ tooltip
"A proposition is a declarative statement that can be evaluated as either true or false, and which serves as the basis for debate."
]
(text "Proposition:")
|> el [ F.color colourTheme.textLightOrange ]
]
]
propositionTitleMaker : Argument -> Element msg
propositionTitleMaker argument =
column
[ E.width fill, E.alignLeft ]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.size 18 ]
)
[ text argument.propositionTitle
|> el
[ F.color colourTheme.textLightGrey
, F.regular
, F.size 16
]
]
]
reductioMakerDesktop : Argument -> Element msg
reductioMakerDesktop argument =
case argument.propositionReductio of
"" ->
none
reductio ->
row
[]
[ reductioMaker
, reductioMakerTitle reductio
]
reductioMakerMobile : Argument -> Element msg
reductioMakerMobile argument =
case argument.propositionReductio of
"" ->
none
reductio ->
row
[]
[ reductioMaker
, reductioMakerTitle reductio
]
reductioMaker : Element msg
reductioMaker =
column
[ E.alignTop, E.alignLeft ]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.size 18
, infoSpacing
]
)
[ el
[ tooltip
"This is the position from which the reductio ad absurdum is derived."
]
(text "Reductio:")
|> el [ F.color colourTheme.textLightOrange ]
]
]
reductioMakerTitle : String -> Element msg
reductioMakerTitle reductio =
column [ E.width fill, E.alignLeft ]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.size 16
, spacing 3
]
)
[ text reductio ]
]
summaryMakerDesktop : Argument -> Element msg
summaryMakerDesktop argument =
row []
[ summaryMaker
, summaryMakerTitle argument
]
summaryMakerMobile : Argument -> Element msg
summaryMakerMobile argument =
column []
[ summaryMaker
, summaryMakerTitle argument
]
summaryMaker : Element msg
summaryMaker =
column
[ E.alignTop
, E.alignLeft
]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.size 18
, infoSpacing
]
)
[ el
[ tooltip
"The following information provides additional context and insight into the reasoning behind the argument."
]
(text "Summary:")
|> el [ F.color colourTheme.textLightOrange ]
]
]
summaryMakerTitle : Argument -> Element msg
summaryMakerTitle argument =
column
[ E.width fill
, E.alignLeft
]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.size 18
, spacing 3
]
)
[ text argument.propositionSummary
|> el
[ F.color colourTheme.textLightGrey
, F.regular
, F.size 16
]
]
]
strengthBar : Argument -> Element msg
strengthBar argument =
row [ E.width fill ]
[ strengthMaker
, strengthMakerBar argument
]
strengthMaker : Element msg
strengthMaker =
column
[ E.alignTop
, E.alignLeft
]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.size 18
, E.width fill
]
)
[ el
[ tooltip
"This represents my confidence in the soundness of the argument."
]
(el
[ paddingEach
{ top = 0
, right = 5
, bottom = 0
, left = 0
}
]
<|
text "Confidence:"
)
|> el [ F.color colourTheme.textLightOrange ]
]
]
strengthMakerBar : Argument -> Element msg
strengthMakerBar argument =
barPadding
[ barMaker getConfidenceTooltip argument.argumentCertainty ]
getConfidenceTooltip : Int -> String
getConfidenceTooltip num =
case num of
0 ->
"Extremely low. Speculative reasoning."
1 ->
"Very low. Extremely weak reasoning."
2 ->
"Low. Weak reasoning."
3 ->
"Kinda low. Somewhat weak reasoning."
4 ->
"Below average. More weak than strong."
5 ->
"Moderate. OK reasoning."
6 ->
"Above average. More strong than weak."
7 ->
"Kinda high. Somewhat strong reasoning."
8 ->
"High. Robust reasoning."
9 ->
"Very high. Extremely robust reasoning."
10 ->
"Extremely high. Air tight reasoning."
_ ->
"Confidence level out of expected range."
tableMaker : Argument -> Element msg
tableMaker argument =
column
[ centerX
, E.width fill
]
[ wrappedRow
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ E.alignLeft
, E.width fill
, htmlAttribute <| H.style "position" "relative"
]
)
[ E.table
[ spacing 0
, D.rounded 10
, D.width 2
, D.color colourTheme.textDarkGrey
, clip
]
{ data = argument.definitionTable
, columns =
[ { header =
el
[ F.bold
, D.widthEach
{ bottom = 1
, top = 1
, left = 1
, right = 1
}
, D.color colourTheme.textDarkGrey
, padding 8
, E.width fill
]
(text "Definiendum")
|> el [ F.color colourTheme.textLightOrange ]
, width = fill |> maximum 50
, view =
\definition ->
row
[ F.color colourTheme.textLightOrange
, F.bold
, D.widthEach
{ bottom = 1
, top = 0
, left = 1
, right = 1
}
, D.color colourTheme.textDarkGrey
, padding 8
, E.height fill
]
[ row [ centerX ]
[ paragraph [] [ text definition.definiendum ]
]
]
}
, { header =
el
[ F.bold
, D.widthEach
{ bottom = 1
, top = 1
, left = 0
, right = 1
}
, D.color colourTheme.textDarkGrey
, padding 8
, E.width fill
]
(text "Definiens")
|> el [ F.color colourTheme.textLightOrange ]
, width = fill
, view =
\definition ->
paragraph
[ F.color colourTheme.textLightGrey
, F.regular
, D.widthEach
{ bottom = 1
, top = 0
, left = 0
, right = 1
}
, D.color colourTheme.textDarkGrey
, padding 8
, E.height fill
]
[ row []
[ paragraph [] [ text definition.definiens ]
]
]
}
]
}
]
]
argumentDesktopPadding : Attribute msg
argumentDesktopPadding =
paddingXY 40 3
argumentMobilePadding : Attribute msg
argumentMobilePadding =
paddingXY 0 3
desktopFormalizationMaker : Argument -> Element msg
desktopFormalizationMaker argument =
formalizationMaker argument argumentDesktopPadding
mobileFormalizationMaker : Argument -> Element msg
mobileFormalizationMaker argument =
formalizationMaker argument argumentMobilePadding
formalizationMaker : Argument -> Attribute msg -> Element msg
formalizationMaker argument padding =
column
[ centerX
, E.width fill
, spacing 10
]
(List.indexedMap
(\index argumentEntry ->
column
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ spacing 3
, centerX
, E.width fill
, padding
]
)
(List.indexedMap
(\entryIndex entryWithNotation ->
column
[ centerX
, F.center
, spacing 3
, E.width fill
]
[ paragraph
[ F.color colourTheme.textLightOrange
, F.bold
, spacing 3
, F.size 17
]
[ text
(if entryIndex < List.length argumentEntry.premises then
"P" ++ String.fromInt (entryIndex + 1) ++ ") "
else
"C) "
)
, text
(if entryIndex < List.length argumentEntry.premises then
entryWithNotation.premise
else
argumentEntry.conclusion
)
|> el
[ F.color colourTheme.textLightGrey
, F.regular
, E.width fill
]
]
, paragraph
[ centerX
, F.center
, spacing 3
, E.width fill
, F.color colourTheme.textLightOrange
, F.bold
]
[ text
(if entryIndex < List.length argumentEntry.premises then
"(" ++ entryWithNotation.notation ++ ")"
else
"(" ++ argumentEntry.conclusionNotation ++ ")"
)
]
]
)
(argumentEntry.premises ++ [ { premise = argumentEntry.conclusion, notation = argumentEntry.conclusionNotation } ])
)
)
argument.argumentFormalization
)

View file

@ -1,17 +1,54 @@
module Pages.Debate.Cucklist exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Converters exposing (formatSocial)
import Config.Helpers.Format
exposing
( paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Response
exposing
( pageList
, topLevelContainer
)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Debate.Cuckery.Helpers exposing (..)
import Config.Pages.Debate.Cuckery.List
exposing
( cuckList
, cuckListNumber
)
import Config.Pages.Debate.Cuckery.Types exposing (..)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Pages.CuckList exposing (cuckListHeader)
import Config.Pages.Headers.Records.CuckList exposing (cuckListHeader)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Transitions
exposing
( hoverFontDarkOrange
, transitionStyleFast
, transitionStyleSlow
)
import Effect exposing (Effect)
import Element as E exposing (..)
import Element.Background as B
import Element.Border as D
import Element.Font as F
import Html.Attributes as H
import Layouts
import Page exposing (Page)
import Route exposing (Route)
@ -118,3 +155,449 @@ cucksList device =
)
cuckList
]
desktopCuckMaker : Cuck -> Element msg
desktopCuckMaker cuck =
row
topLevelBox
[ desktopCardMaker desktopImageBoxSize desktopImageSize (cuckImage cuck) (cuckSocial cuck)
, cardMaker
[ cardTitleMaker (cuckTitle cuck)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ socialMaker cuck
, dodgeTitle cuck
, dodgeMaker cuck
]
]
]
]
]
mobileCuckMaker : Cuck -> Element msg
mobileCuckMaker cuck =
column
topLevelBox
[ column [] []
, cardMaker
[ cardTitleMaker (cuckTitle cuck)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ column
[ alignTop
, centerX
, alignLeft
, spacing 3
]
[ row [ spacing 10 ]
[ mobileCardMaker mobileImageBoxSize mobileImageSize (cuckImage cuck) (cuckSocial cuck)
, socialMaker cuck
]
, dodgeTitle cuck
, dodgeMaker cuck
]
]
]
]
]
]
cuckImage :
Cuck
->
{ src : String
, description : String
}
cuckImage cuck =
{ src = "/cucks/" ++ cuck.cuckImage ++ "/" ++ cuck.cuckImage ++ ".png"
, description = cuck.cuckName
}
cuckTitle : Cuck -> String
cuckTitle cuck =
cuck.cuckName
cuckSocial : Cuck -> String
cuckSocial cuck =
cuck.cuckSocial
dodgeMaker : Cuck -> Element msg
dodgeMaker cuck =
column
[ spacing 10
, width fill
]
<|
List.map2 (\x y -> makeDodge x y)
cuck.cuckDodges
(List.range 1 (List.length cuck.cuckDodges))
socialMaker : Cuck -> Element msg
socialMaker cuck =
paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, F.size 18
, spacing 8
]
[ text "Social: "
, newTabLink
[ paragraphFontSize
, F.color colourTheme.textLightOrange
]
{ url = cuck.cuckSocial
, label =
el
[ transitionStyleSlow
, hoverFontDarkOrange
]
<|
text (formatSocial cuck.cuckSocial)
}
]
dodgeTitle : Cuck -> Element msg
dodgeTitle cuck =
paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, F.size 18
]
[ text "Dodges: " ]
makeDodge : Dodge -> Int -> Element msg
makeDodge dodgeEntry index =
column
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, alignLeft
, spacing 8
, width fill
]
[ row
[ width fill
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 35
}
]
[ column
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.size 18
, alignTop
, alignRight
, F.alignRight
]
[ text (String.fromInt index ++ ". ") ]
, column
[ spacing 3
, width fill
]
[ circumstanceMaker dodgeEntry
, column
[ spacing 3
, width fill
]
[ propositionMaker dodgeEntry
, reductioMaker dodgeEntry
, attitudeMaker dodgeEntry
, reasonMaker dodgeEntry
]
]
]
]
dodgeWidth =
width <| px 93
formatProposition : String -> String
formatProposition proposition =
if proposition == "N/A" then
proposition
else
"\"" ++ proposition ++ "\""
dodgeCounter : Int -> Element msg
dodgeCounter index =
column
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.size 18
]
)
[ text (String.fromInt index ++ ". ") ]
circumstanceMaker : Dodge -> Element msg
circumstanceMaker dodgeEntry =
column
[ width fill
]
[ newTabLink
[ paragraphFontSize
, F.color colourTheme.textLightOrange
]
{ url = dodgeEntry.dodgeLink
, label =
row [ F.size 18 ]
[ column [ width fill ]
[ paragraph []
[ el
[ transitionStyleSlow
, hoverFontDarkOrange
]
<|
text
(case dodgeEntry.dodgeDescription of
NoReply ->
"Debate 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"
VagueGesture ->
"Chose to gesture vaguely instead of engaging"
)
, paragraph [ F.color colourTheme.textLightGrey ] [ text "." ]
, column
[ spacing 5
, F.size 12
]
(List.indexedMap
(\index2 link ->
newTabLink
[ paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 5
}
]
{ url = link
, label =
row [ moveUp 5 ]
[ el
[ transitionStyleSlow
, hoverFontDarkOrange
]
<|
text (String.fromInt (index2 + 1))
, text ", " |> el [ F.color colourTheme.textLightGrey ]
]
}
)
dodgeEntry.dodgeReceipts
)
]
]
]
}
]
propositionMaker : Dodge -> Element msg
propositionMaker dodgeEntry =
row
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
[ paragraph
[ alignTop
, dodgeWidth
]
[ text "Proposition:"
]
, paragraph
[ E.width fill
, alignLeft
]
[ paragraph [ F.regular ] [ text (formatProposition dodgeEntry.dodgeProposition) ]
]
]
attitudeMaker : Dodge -> Element msg
attitudeMaker dodgeEntry =
row
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ width fill ]
)
[ paragraph
[ alignTop
, dodgeWidth
]
[ text "Attitude:"
]
, paragraph
[ E.width fill
, alignLeft
]
[ case dodgeEntry.dodgeNicksDoxasticState of
Nothing ->
paragraph [ F.regular ] [ text "I don't form a doxastic state." ]
Just Belief ->
paragraph [ F.regular ]
[ text "I lean more toward "
, el [ F.bold ] (text "TRUE")
, text " than false."
]
Just Disbelief ->
paragraph [ F.regular ]
[ text "I lean more toward "
, text "FALSE" |> el [ F.bold ]
, text " than true."
]
Just Agnostic ->
el [ F.regular ] (text "I don't form beliefs about this proposition.")
]
]
reductioMaker : Dodge -> Element msg
reductioMaker dodgeEntry =
case dodgeEntry.dodgeFallacy of
Nothing ->
none
Just fallacy ->
case fallacy of
SpecificFallacy str ->
if String.isEmpty str then
none
else
displayFallacy str
AppealToNature ->
displayFallacy "Appeal to Nature"
AppealToTradition ->
displayFallacy "Appeal to Tradition"
AppealToIgnorance ->
displayFallacy "Appeal to Ignorance"
AppealFromIncredulity ->
displayFallacy "Appeal from Incredulity"
RedHerring ->
displayFallacy "Red Herring"
BeggingTheQuestion ->
displayFallacy "Begging the Question"
Strawman ->
displayFallacy "Strawman"
Equivocation ->
displayFallacy "Equivocation"
GeneticFallacy ->
displayFallacy "Genetic Fallacy"
MotteAndBailey ->
displayFallacy "Motte and Bailey"
reasonMaker : Dodge -> Element msg
reasonMaker dodgeEntry =
row
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ width fill ]
)
[ paragraph
[ alignTop
, dodgeWidth
]
[ text "Reason:"
]
, paragraph [ F.regular ]
[ text <|
case dodgeEntry.dodgeNicksDoxasticReason of
NoProp ->
"There is no proposition to evaluate."
VagueProp ->
"The proposition is too vague to evaluate."
SpecificPropReason str ->
str
]
]
displayFallacy : String -> Element msg
displayFallacy fallacyText =
row
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
[ paragraph
[ alignTop
, dodgeWidth
]
[ text "Fallacy:"
]
, paragraph
[ E.width fill
, alignLeft
]
[ paragraph [ F.regular ]
[ text fallacyText ]
]
]

View file

@ -1,26 +1,56 @@
module Pages.Debate.Gibberish exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Format
exposing
( paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Response
exposing
( pageList
, topLevelContainer
)
import Config.Helpers.StrengthBar
exposing
( barMaker
, barPadding
)
import Config.Helpers.ToolTip exposing (tooltip)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Debate.Arguments.Helpers exposing (..)
import Config.Pages.Debate.Arguments.Types exposing (..)
import Config.Pages.Debate.Gibberish.Domains.Epistemology exposing (epistemologyGibberish)
import Config.Pages.Debate.Gibberish.Domains.Metaphysics exposing (metaphysicsGibberish)
import Config.Pages.Debate.Gibberish.Domains.Normativity exposing (normativityGibberish)
import Config.Pages.Debate.Gibberish.Domains.Ontology exposing (ontologyGibberish)
import Config.Pages.Debate.Gibberish.Domains.PhilOfLanguage exposing (philOfLanguageGibberish)
import Config.Pages.Debate.Gibberish.Domains.PhilOfMind exposing (philOfMindGibberish)
import Config.Pages.Debate.Gibberish.Domains.Theology exposing (theologyGibberish)
import Config.Pages.Debate.Gibberish.Helpers exposing (..)
import Config.Pages.Debate.Gibberish.List exposing (gibberishListNumber)
import Config.Pages.Debate.Gibberish.Records.Epistemology exposing (epistemologyGibberish)
import Config.Pages.Debate.Gibberish.Records.Metaphysics exposing (metaphysicsGibberish)
import Config.Pages.Debate.Gibberish.Records.Normativity exposing (normativityGibberish)
import Config.Pages.Debate.Gibberish.Records.Ontology exposing (ontologyGibberish)
import Config.Pages.Debate.Gibberish.Records.PhilOfLanguage exposing (philOfLanguageGibberish)
import Config.Pages.Debate.Gibberish.Records.PhilOfMind exposing (philOfMindGibberish)
import Config.Pages.Debate.Gibberish.Records.Theology exposing (theologyGibberish)
import Config.Pages.Debate.Gibberish.Types exposing (..)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Pages.Gibberish exposing (gibberishHeader)
import Config.Pages.Headers.Records.Gibberish exposing (gibberishHeader)
import Config.Style.Colour exposing (colourTheme)
import Effect exposing (Effect)
import Element as E exposing (..)
import Element.Background as B
import Element.Border as D
import Element.Font as F
import Layouts
import List.Extra as L exposing (..)
import Page exposing (Page)
@ -138,3 +168,255 @@ gibberishList device =
, philOfLanguageGibberish
]
]
desktopGibberishMaker : Gibberish -> Element msg
desktopGibberishMaker gibberish =
row
topLevelBox
[ desktopCardMaker desktopImageBoxSize desktopImageSize (gibberishImage gibberish) gibberish.gibberishLink
, cardMaker
[ cardTitleMaker (gibberishTitle gibberish)
, cardFormatter
[ column [ spacing 20, padding 10 ]
[ descriptionMaker gibberish
, gibberishMakerBody gibberish
]
]
]
]
mobileGibberishMaker : Gibberish -> Element msg
mobileGibberishMaker gibberish =
row
topLevelBox
[ cardMaker
[ cardTitleMaker (gibberishTitle gibberish)
, cardFormatter
[ row [ spacing 20, padding 10 ]
[ column [] [ mobileCardMaker mobileImageBoxSize mobileImageSize (gibberishImage gibberish) gibberish.gibberishLink ]
, column [ width fill ]
[ descriptionMaker gibberish
]
]
, domainList gibberish
]
]
]
gibberishMakerBody : Gibberish -> Element msg
gibberishMakerBody gibberish =
cardContentSpacing
[ column
fieldSpacer
[ paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.size 18
, F.center
]
[ domainList gibberish
]
]
]
gibberishImage : Gibberish -> { src : String, description : String }
gibberishImage gibberish =
{ src = "/gibberish/" ++ gibberish.gibberishImage ++ ".png"
, description = gibberish.gibberishTitle
}
gibberishTitle : Gibberish -> String
gibberishTitle gibberish =
gibberish.gibberishTitle
domainList : Gibberish -> Element msg
domainList gibberish =
column
[ spacing 8
, E.width fill
]
(List.indexedMap (makeTerms intelligibilityBar) gibberish.gibberishTerms)
descriptionMaker : Gibberish -> Element msg
descriptionMaker gibberish =
column
[ E.width fill
, centerX
]
[ paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, spacing 3
, F.regular
, F.alignLeft
, F.size 16
]
[ text gibberish.gibberishDescription
]
]
makeTerms : (Terms -> Element msg) -> Int -> Terms -> Element msg
makeTerms bar index terms =
column
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, E.alignLeft
, spacing 8
, E.width fill
]
[ row
[ F.color colourTheme.textLightGrey
, F.regular
, F.size 18
, F.bold
, F.alignLeft
, E.width fill
]
[ column
[ E.alignRight
, alignTop
]
[ paragraph
[]
[ text (String.fromInt (index + 1) ++ ". ") ]
]
, column
[ E.width fill
, paddingEach
{ top = 0
, bottom = 0
, left = 10
, right = 10
}
, spacing 3
]
[ paragraph
[]
[ el [ F.color colourTheme.textLightOrange ] <|
text <|
String.toLower "\""
++ terms.term
++ "\""
]
, bar terms
, paragraph
[ F.color colourTheme.textLightGrey
, F.regular
, F.size 16
, F.alignLeft
]
[ text
(case terms.explanation of
NoClue ->
"I have no fucking clue what this means."
SpecificExplanation str ->
str
)
]
]
]
]
intelligibilityBar : Terms -> Element msg
intelligibilityBar terms =
row
[ E.width fill
, height fill
]
[ column
[ E.alignTop
, E.alignLeft
]
[ paragraph
[ F.color colourTheme.textLightGrey
, F.bold
, F.size 18
, paragraphSpacing
, paragraphFontSize
, E.alignLeft
, E.width fill
]
[ el
[ tooltip
tooltipMessage
]
(el
[ paddingEach
{ top = 0
, right = 10
, bottom = 0
, left = 0
}
]
<|
text barTitle
)
]
]
, barPadding
[ barMaker getIntelligibilityTooltip terms.strength ]
]
tooltipMessage : String
tooltipMessage =
"This represents my confidence that the term can be understood from at least one viewpoint."
barTitle : String
barTitle =
"Intelligibility:"
getIntelligibilityTooltip : Int -> String
getIntelligibilityTooltip num =
case num of
0 ->
"Total fucking gibberish."
1 ->
"Extremely unclear, speaking in tongues."
2 ->
"Mostly unclear, hard to make any sense of."
3 ->
"Somewhat unclear, difficult to understand."
4 ->
"Slightly unclear, understandable with effort."
5 ->
"Neutral, not sure what to make of it."
6 ->
"Slightly clear, with unanswered questions."
7 ->
"Somewhat clear, kinda get the idea."
8 ->
"Very clear, usefulness questionable."
9 ->
"Extremely clear, usefulness dubious."
10 ->
"Perfectly clear, but also useless."
_ ->
"Intelligibility rating is out of bounds."

View file

@ -1,27 +1,56 @@
module Pages.Donate exposing (Model, Msg, page)
import Config.Data.Identity as I exposing (..)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Format
exposing
( paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Response
exposing
( pageList
, topLevelContainer
)
import Config.Helpers.StrengthBar
exposing
( barMaker
, barPadding
)
import Config.Helpers.ToolTip exposing (tooltip)
import Config.Helpers.Viewport exposing (..)
import Config.Pages.Donate.Helpers exposing (..)
import Config.Pages.Donate.Methods.Cardano exposing (donateCardano)
import Config.Pages.Donate.Methods.KoFi exposing (donateKoFi)
import Config.Pages.Donate.Methods.LiberaPay exposing (donateLiberaPay)
import Config.Pages.Donate.Methods.Merch exposing (donateMerch)
import Config.Pages.Donate.Methods.Patreon exposing (donatePatreon)
import Config.Pages.Donate.Methods.PayPal exposing (donatePayPal)
import Config.Pages.Donate.Methods.Stripe exposing (donateStripe)
import Config.Pages.Donate.Methods.YouTube exposing (donateYouTube)
import Config.Pages.Donate.Records.Cardano exposing (donateCardano)
import Config.Pages.Donate.Records.KoFi exposing (donateKoFi)
import Config.Pages.Donate.Records.LiberaPay exposing (donateLiberaPay)
import Config.Pages.Donate.Records.Merch exposing (donateMerch)
import Config.Pages.Donate.Records.Patreon exposing (donatePatreon)
import Config.Pages.Donate.Records.PayPal exposing (donatePayPal)
import Config.Pages.Donate.Records.Stripe exposing (donateStripe)
import Config.Pages.Donate.Records.YouTube exposing (donateYouTube)
import Config.Pages.Donate.Types exposing (..)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Pages.Donate exposing (donateHeader)
import Config.Pages.Headers.Records.Donate exposing (donateHeader)
import Config.Style.Colour as T exposing (..)
import Effect exposing (Effect)
import Element as E exposing (..)
import Element.Background as B
import Element.Border as D
import Element.Font as F
import Html.Attributes as H
import Layouts
import Page exposing (Page)
import Route exposing (Route)
@ -136,3 +165,460 @@ donateList device =
, donateMerch
]
]
donateMaker : Donate -> Element msg
donateMaker donate =
row
topLevelBox
[ desktopCardMaker desktopImageBoxSize desktopImageSize (donateImage donate) (donateLink donate)
, cardMaker
[ cardTitleMaker (donateTitle donate)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ feeMaker donate
, preferenceMaker donate
, tableMaker donate
, proTitleMaker donate
, proMaker donate
, conTitleMaker donate
, conMaker donate
]
]
]
]
]
donateMakerMobile : Donate -> Element msg
donateMakerMobile donate =
row
topLevelBox
[ column [] []
, cardMaker
[ cardTitleMaker (donateTitle donate)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ row [ width fill, spacing 10 ]
[ mobileCardMaker mobileImageBoxSize
mobileImageSize
(donateImage donate)
(donateLink donate)
, column
[ width fill ]
[ feeMaker donate
, preferenceMaker donate
]
]
, tableMakerMobile donate
, proTitleMaker donate
, proMaker donate
, conTitleMaker donate
, conMaker donate
]
]
]
]
]
donateImage :
Donate
->
{ src : String
, description : String
}
donateImage donate =
{ src = "donate/" ++ donate.donateImage ++ ".png"
, description = donate.donateName
}
donateTitle : Donate -> String
donateTitle donate =
donate.donateName
donateLink : Donate -> String
donateLink donate =
donate.donateLink
donateWidth =
width <| px 45
feeMaker : Donate -> Element msg
feeMaker donate =
row
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.size 18
, E.width fill
]
)
[ column
[ alignTop
, donateWidth
]
[ text "Fees:"
]
, column
[ E.width fill
, alignLeft
]
[ paragraph [ F.regular ]
[ el [ F.color colourTheme.textLightOrange ] <|
text donate.donateFees
]
]
]
proTitleMaker : Donate -> Element msg
proTitleMaker donate =
row
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
[ column
[ alignTop
, width <| px 80
]
[ text "Pros:"
]
]
conTitleMaker : Donate -> Element msg
conTitleMaker donate =
row
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
[ column
[ alignTop
, width <| px 80
]
[ text "Cons:"
]
]
proMaker : Donate -> Element msg
proMaker donate =
column
[ spacing 8
, width fill
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 35
}
]
<|
List.map2 (\x y -> makePro x)
donate.donatePros
(List.range 1 (List.length donate.donatePros))
makePro : Pros -> Element msg
makePro pro =
column
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, alignLeft
]
++ [ spacing 8
, width fill
]
)
[ paragraph [ F.regular ]
[ text (" " ++ pro.pro) ]
]
conMaker : Donate -> Element msg
conMaker donate =
column
[ spacing 8
, width fill
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 35
}
]
<|
List.map2 (\x y -> makeCon x)
donate.donateCons
(List.range 1 (List.length donate.donateCons))
makeCon : Cons -> Element msg
makeCon con =
column
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, alignLeft
]
++ [ spacing 8
, width fill
]
)
[ paragraph [ F.regular ]
[ text (" " ++ con.con) ]
]
preferenceMaker : Donate -> Element msg
preferenceMaker donate =
row
[ width fill
, height fill
]
[ column
[ E.alignTop
, E.alignLeft
]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.size 18
, alignLeft
, E.width fill
]
)
[ el
[ tooltip
"This represents how strongly I prefer a given platform relative to other platforms."
]
(el
[ paddingEach
{ top = 0
, right = 10
, bottom = 0
, left = 0
}
]
<|
text "Preference:"
)
]
]
, barPadding
[ barMaker getPreferenceTooltip donate.donatePreference ]
]
getPreferenceTooltip : Int -> String
getPreferenceTooltip num =
case num of
0 ->
"Disdain this platform."
1 ->
"Very negative towards this platform."
2 ->
"Strongly dislike this platform."
3 ->
"Dislike this platform."
4 ->
"Somewhat dislike this platform."
5 ->
"Neutral, no strong feelings."
6 ->
"Somewhat like this platform."
7 ->
"Like this platform."
8 ->
"Strongly like this platform."
9 ->
"Very positive towards this platform."
10 ->
"Absolutely love this platform!"
_ ->
"Preference is out of bounds."
tableMaker : Donate -> Element msg
tableMaker donate =
column
[ centerX
, E.width fill
]
[ wrappedRow
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ E.alignLeft
, E.width fill
, htmlAttribute <| H.style "position" "relative"
]
)
[ E.table
[ spacing 0
, D.rounded 10
, D.width 2
, D.color colourTheme.textDarkGrey
, clip
]
{ data = donate.donateFeatures
, columns =
List.map createColumn
[ { label = "Zero Fees"
, getter = .free
}
, { label = "Subscriptions"
, getter = .subscriptions
}
, { label = "User Friendly"
, getter = .userFriendly
}
, { label = "Anonymous"
, getter = .anonymous
}
, { label = "Rewards"
, getter = .rewardTiers
}
]
}
]
]
tableMakerMobile : Donate -> Element msg
tableMakerMobile donate =
column
[ centerX
, E.width fill
]
[ wrappedRow
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ E.alignLeft
, E.width fill
, htmlAttribute <| H.style "position" "relative"
]
)
[ E.table
[ spacing 0
, D.rounded 10
, D.width 2
, D.color colourTheme.textDarkGrey
, clip
]
{ data = donate.donateFeatures
, columns =
List.map createColumn
[ { label = "Free"
, getter = .free
}
, { label = "Subs"
, getter = .subscriptions
}
, { label = "Easy"
, getter = .userFriendly
}
, { label = "Safe"
, getter = .anonymous
}
]
}
]
]
createColumn : { label : String, getter : Features -> Maybe Bool } -> Column Features msg
createColumn { label, getter } =
{ header =
el
[ F.bold
, D.widthEach
{ bottom = 1
, top = 1
, left = 1
, right = 1
}
, D.color colourTheme.textDarkGrey
, padding 8
, E.width fill
, F.center
]
(text label)
|> el [ F.color colourTheme.textLightOrange ]
, width = fill
, view =
\feature ->
row
[ F.color colourTheme.textLightOrange
, F.bold
, D.widthEach
{ bottom = 1
, top = 0
, left = 1
, right = 1
}
, D.color colourTheme.textDarkGrey
, padding 8
, E.height fill
]
[ row [ centerX ]
[ paragraph []
[ E.image
[ E.width <| px 30
, E.height <| px 30
]
(featureToString (getter feature))
]
]
]
}
featureToString : Maybe Bool -> { src : String, description : String }
featureToString maybeBool =
case maybeBool of
Just True ->
{ src = "donate/checkmark.png", description = "" }
Just False ->
{ src = "donate/ex.png", description = "" }
Nothing ->
{ src = "donate/question.png", description = "" }

View file

@ -1,19 +1,34 @@
module Pages.Home_ exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Format
exposing
( paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Response
exposing
( pageListCenter
, topLevelContainer
)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Home.Helpers exposing (..)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Icons.Icons exposing (construction2)
import Config.Style.Glow exposing (glowDeepDarkGrey)
import Config.Style.Icons.Icons
exposing
( construction2
, upRootLarge
, upRootMedium
, upRootSmall
)
import Config.Style.Transitions exposing (transitionStyleMedium)
import Effect exposing (Effect)
import Element as E exposing (..)
import Element.Background as B
import Element.Border as D
import Element.Font as F exposing (color)
import Html exposing (Html)
import Html.Attributes as H
import Layouts
import Page exposing (Page)
import Route exposing (Route)
@ -93,21 +108,6 @@ view shared model =
}
-- construction2
-- { elementAttributes =
-- [ centerX
-- , centerY
-- , transitionStyleMedium
-- , mouseOver [ F.color colourTheme.textDarkOrange ]
-- ]
-- , sharedModel = shared
-- , svgAttributes =
-- [ SvgAttr.width "300" ]
-- }
-- , element = homeContainer shared.device
homeContainer : Device -> Element msg
homeContainer device =
topLevelContainer (homeList device)
@ -139,3 +139,64 @@ homeList device =
Landscape ->
mobileSmallHomePage
]
homePage : Html msg -> Element msg
homePage image =
column
[ centerX
, centerY
, E.spacing 20
]
[ el [ centerX, E.width E.fill, E.height <| px 100 ] <|
html image
, column
[ paddingEach
{ top = 15
, bottom = 15
, left = 20
, right = 20
}
, glowDeepDarkGrey
, B.color colourTheme.backgroundDarkGrey
, D.rounded 10
, E.width E.fill
, E.spacing 8
]
[ paragraph
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ centerX ]
)
[ text "upRootNutrition is an open source project, created by Nick Hiebert, designed to elevate the quality of nutrition science communication in online discourse. By applying more rigorous systems of reasoning, such as formal logic, upRootNutrition aims to cut through the misinformation and sophistry that are endemic on social media." ]
]
]
desktopHomePageImage : Html msg
desktopHomePageImage =
upRootLarge
mobileLargeHomePageImage : Html msg
mobileLargeHomePageImage =
upRootMedium
mobileSmallHomePageImage : Html msg
mobileSmallHomePageImage =
upRootSmall
desktopHomePage =
homePage desktopHomePageImage
mobileLargeHomePage =
homePage mobileLargeHomePageImage
mobileSmallHomePage =
homePage mobileSmallHomePageImage

View file

@ -1,7 +1,21 @@
module Pages.HyperBlog exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat as C exposing (underConstructionMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Response
exposing
( pageList
@ -9,8 +23,7 @@ import Config.Helpers.Response
)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Pages.NutriDex exposing (nutriDexHeader)
import Config.Pages.HyperBlog.Helpers exposing (..)
import Config.Pages.Headers.Records.NutriDex exposing (nutriDexHeader)
import Config.Style.Colour as T exposing (..)
import Config.Style.Icons.Icons exposing (construction)
import Effect exposing (Effect)

View file

@ -1,26 +1,64 @@
module Pages.Interviews exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Converters exposing (formatSocial)
import Config.Helpers.Format
exposing
( paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Response
exposing
( pageList
, topLevelContainer
)
import Config.Helpers.StrengthBar
exposing
( barMaker
, barPadding
)
import Config.Helpers.ToolTip exposing (tooltip)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Interviews.Episodes.DrShawnBakerPodcast exposing (drShawnBakerPodcast)
import Config.Pages.Interviews.Episodes.FitAndFurious exposing (fitAndFurious)
import Config.Pages.Interviews.Episodes.FoolproofMastery exposing (foolproofMastery)
import Config.Pages.Interviews.Episodes.KetogeeksPodcast exposing (ketoGeeksPodcast)
import Config.Pages.Interviews.Episodes.LegendaryLifePodcast exposing (legendaryLifePodcast)
import Config.Pages.Interviews.Episodes.MarkBellsPowerProject exposing (markBellsPowerProject)
import Config.Pages.Interviews.Episodes.MuscleMemoirsPodcast exposing (muscleMemoirsPodcast)
import Config.Pages.Interviews.Episodes.SigmaNutritionRadio exposing (sigmaNutritionRadio)
import Config.Pages.Interviews.Episodes.StrenuousLifePodcast exposing (strenuousLifePodcast)
import Config.Pages.Interviews.Helpers exposing (..)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Records.Interviews exposing (interviewHeader)
import Config.Pages.Interviews.Records.DrShawnBakerPodcast exposing (drShawnBakerPodcast)
import Config.Pages.Interviews.Records.FitAndFurious exposing (fitAndFurious)
import Config.Pages.Interviews.Records.FoolproofMastery exposing (foolproofMastery)
import Config.Pages.Interviews.Records.KetogeeksPodcast exposing (ketoGeeksPodcast)
import Config.Pages.Interviews.Records.LegendaryLifePodcast exposing (legendaryLifePodcast)
import Config.Pages.Interviews.Records.MarkBellsPowerProject exposing (markBellsPowerProject)
import Config.Pages.Interviews.Records.MuscleMemoirsPodcast exposing (muscleMemoirsPodcast)
import Config.Pages.Interviews.Records.SigmaNutritionRadio exposing (sigmaNutritionRadio)
import Config.Pages.Interviews.Records.StrenuousLifePodcast exposing (strenuousLifePodcast)
import Config.Pages.Interviews.Types exposing (..)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Transitions
exposing
( hoverFontDarkOrange
, transitionStyleFast
, transitionStyleSlow
)
import Effect exposing (Effect)
import Element as E exposing (..)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Pages.Interviews exposing (interviewHeader)
import Element.Background as B
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)
@ -136,3 +174,343 @@ interviewList device =
, drShawnBakerPodcast
]
]
interviewMaker : Interview -> Element msg
interviewMaker interview =
row
topLevelBox
[ desktopCardMaker desktopImageBoxSize desktopImageSize (interviewImage interview) (interviewSocial interview)
, cardMaker
[ cardTitleMaker (interviewTitle interview)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ socialMaker interview
, appearanceTitle interview
, appearanceMaker interview
]
]
]
]
]
interviewMakerMobile : Interview -> Element msg
interviewMakerMobile interview =
row
topLevelBox
[ column [] []
, cardMaker
[ cardTitleMaker (interviewTitle interview)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ row [ spacing 10 ]
[ mobileCardMaker mobileImageBoxSize mobileImageSize (interviewImage interview) (interviewSocial interview)
, socialMaker interview
]
, appearanceTitle interview
, appearanceMaker interview
]
]
]
]
]
interviewImage : Interview -> { src : String, description : String }
interviewImage interview =
{ src = "interviews/" ++ interview.interviewImage ++ ".png"
, description = interview.interviewImage
}
interviewTitle : Interview -> String
interviewTitle interview =
interview.interviewName
interviewSocial : Interview -> String
interviewSocial interview =
interview.interviewSocial
socialMaker : Interview -> Element msg
socialMaker interview =
paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, F.size 18
, spacing 5
]
[ text "Social: "
, newTabLink
[ paragraphFontSize
, F.color colourTheme.textLightOrange
]
{ url = interview.interviewSocial
, label =
el
[ transitionStyleSlow
, hoverFontDarkOrange
]
<|
text (formatSocial interview.interviewSocial)
}
]
appearanceTitle : Interview -> Element msg
appearanceTitle interview =
paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, F.size 18
]
[ text "Appearances: " ]
appearanceMaker : Interview -> Element msg
appearanceMaker interview =
column [ spacing 15, width fill ] <|
List.map2 (\x y -> makeAppearance x y)
interview.interviewAppearances
(List.range 1 (List.length interview.interviewAppearances))
makeAppearance : Appearance -> Int -> Element msg
makeAppearance appearanceEntry index =
column
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, alignLeft
, spacing 8
, width fill
]
[ row
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.size 18
, E.width fill
, paddingEach
{ top = 0
, bottom = 0
, left = 35
, right = 0
}
]
)
[ column
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.size 18
, alignTop
, alignRight
, F.alignRight
]
[ text (String.fromInt index ++ ". ") ]
, column
[ spacing 8
, width fill
]
[ episodeMaker appearanceEntry
, experienceMaker appearanceEntry
, dateMaker appearanceEntry
, subjectMaker appearanceEntry
, subjectList appearanceEntry
]
]
]
episodeMaker : Appearance -> Element msg
episodeMaker appearanceEntry =
newTabLink
[ paragraphFontSize
, F.color colourTheme.textLightOrange
]
{ url = appearanceEntry.appearanceLink
, label =
paragraph
[ F.size 18
]
[ text ("#" ++ appearanceEntry.appearanceEpisode ++ ": " ++ appearanceEntry.appearanceTitle)
|> el
[ F.color colourTheme.textLightOrange
, hoverFontDarkOrange
]
]
}
experienceMaker : Appearance -> Element msg
experienceMaker appearanceEntry =
row
[ width fill
, height fill
]
[ column
[ E.alignTop
, E.alignLeft
]
[ paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, F.size 18
, E.width fill
]
[ el
[ tooltip
"This represents how pleasant it was to interact with the host(s)."
]
(el
[ paddingEach
{ top = 0
, right = 10
, bottom = 0
, left = 0
}
]
<|
text "Pleasantness:"
)
]
]
, barPadding
[ barMaker getExperienceTooltip appearanceEntry.appearanceExperience ]
]
getExperienceTooltip : Int -> String
getExperienceTooltip num =
case num of
0 ->
"Nightmare. Complete fucking cunt."
1 ->
"Toxic. Deliberately malicious."
2 ->
"Hostile. Consistently disruptive."
3 ->
"Belligerent. Consistently disrespectful."
4 ->
"Uncivil. Frequently dismissive."
5 ->
"Neutral. Unremarkable social interaction."
6 ->
"Civil. Slightly considerate."
7 ->
"Pleasant. Genuinely respectful."
8 ->
"Very kind. Consistently supportive."
9 ->
"Compassionate. Went out of their way."
10 ->
"Absolute angel. Perfectly empathetic."
_ ->
"Behavior level out of expected range."
dateMaker : Appearance -> Element msg
dateMaker appearanceEntry =
row
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
[ column
[ alignTop
]
[ text "Published:"
]
, column
[ alignTop
, width fill
]
[ paragraph
[ F.regular
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 3
}
]
[ text appearanceEntry.appearanceYear ]
]
]
subjectMaker : Appearance -> Element msg
subjectMaker appearanceEntry =
paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
[ column
[ alignTop
]
[ text "Subjects: "
]
]
subjectList : Appearance -> Element msg
subjectList appearanceEntry =
paragraph
[ spacing 8
, width fill
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 25
}
]
<|
List.map2 (\x y -> makeSubject x)
appearanceEntry.appearanceSubjects
(List.range 1 (List.length appearanceEntry.appearanceSubjects))
makeSubject : Subjects -> Element msg
makeSubject subjects =
paragraph
[ E.width fill
, alignLeft
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 8
}
]
[ paragraph [ F.regular ]
[ text (" " ++ subjects.subject) ]
]

View file

@ -1,11 +1,29 @@
module Pages.NotFound_ exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Response
exposing
( pageList
, pageListCenter
, topLevelContainer
)
import Effect exposing (Effect)
import Element as E exposing (..)
import Layouts
import Page exposing (Page)
import Route exposing (Route)
@ -20,7 +38,7 @@ page shared route =
{ init = init
, update = update
, subscriptions = subscriptions
, view = view
, view = view shared
}
|> Page.withLayout toLayout
@ -75,6 +93,42 @@ subscriptions model =
-- VIEW
view : Model -> View Msg
view model =
View.fromString "IT'S NOT HERE YO"
view : Shared.Model -> Model -> View Msg
view shared model =
{ title = pageNames.pageNotFound
, attributes = []
, element = notFoundContainer shared.device
}
notFoundContainer : Device -> Element msg
notFoundContainer device =
topLevelContainer (notFoundList device)
notFoundList : Device -> Element msg
notFoundList device =
column pageListCenter
[ case device.class of
Desktop ->
none
BigDesktop ->
none
Tablet ->
case device.orientation of
Portrait ->
none
Landscape ->
none
Phone ->
case device.orientation of
Portrait ->
none
Landscape ->
none
]

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,27 @@
module Pages.Services exposing (Model, Msg, page)
import Browser
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
, cardFormatter
, cardMaker
, cardTitleMaker
, desktopCardMaker
, desktopImageBoxSize
, desktopImageSize
, fieldSpacer
, mobileCardMaker
, mobileImageBoxSize
, mobileImageSize
, topLevelBox
)
import Config.Helpers.Format
exposing
( paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Response
exposing
( pageList
@ -8,16 +29,19 @@ import Config.Helpers.Response
)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Headers.Helpers exposing (headerMaker)
import Config.Pages.Headers.Pages.Services exposing (servicesHeader)
import Config.Pages.Services.Helpers exposing (..)
import Config.Pages.Services.Services.DebateAnalysis exposing (..)
import Config.Pages.Services.Services.DebateCoaching exposing (..)
import Config.Pages.Services.Services.ElmBuilds exposing (..)
import Config.Pages.Services.Services.NixBuilds exposing (..)
import Config.Pages.Services.Services.NutritionScience exposing (..)
import Config.Pages.Headers.Records.Services exposing (servicesHeader)
import Config.Pages.Services.Records.DebateAnalysis exposing (..)
import Config.Pages.Services.Records.DebateCoaching exposing (..)
import Config.Pages.Services.Records.ElmBuilds exposing (..)
import Config.Pages.Services.Records.NixBuilds exposing (..)
import Config.Pages.Services.Records.NutritionScience exposing (..)
import Config.Pages.Services.Types exposing (..)
import Config.Style.Colour as T exposing (..)
import Effect exposing (Effect)
import Element as E exposing (..)
import Element.Background as B
import Element.Border as D
import Element.Font as F
import Layouts
import Page exposing (Page)
import Route exposing (Route)
@ -129,3 +153,139 @@ servicesList device =
, servicesElmBuilds
]
]
serviceMaker : Service msg -> Element msg
serviceMaker service =
row
topLevelBox
[ desktopCardMaker desktopImageBoxSize desktopImageSize (serviceImage service) service.serviceLink
, cardMaker
[ cardTitleMaker service.serviceName
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ rateMaker service
, descriptionMaker service
, offeringMaker service
]
]
]
]
]
serviceMakerMobile : Service msg -> Element msg
serviceMakerMobile service =
row
topLevelBox
[ column [] []
, cardMaker
[ cardTitleMaker service.serviceName
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ row [ spacing 10 ] [ mobileCardMaker mobileImageBoxSize mobileImageSize (serviceImage service) service.serviceLink, rateMaker service ]
, descriptionMaker service
, offeringMaker service
]
]
]
]
]
serviceImage : Service msg -> { src : String, description : String }
serviceImage service =
{ src = "services/" ++ service.serviceImage ++ ".png"
, description = service.serviceName
}
serviceWidth =
width <| px 45
rateMaker : Service msg -> Element msg
rateMaker service =
row
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
++ [ F.size 18
, E.width fill
]
)
[ column
[ alignTop
, serviceWidth
]
[ E.text "Rate:"
]
, column
[ E.width fill
, alignLeft
]
[ paragraph [ F.regular ]
[ el [ F.color colourTheme.textLightOrange ] <|
E.text service.serviceRate
]
]
]
descriptionMaker : Service msg -> Element msg
descriptionMaker service =
row
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
]
[ column
[ alignTop
, width <| px 80
]
[ E.text "Offerings:"
]
]
offeringMaker : Service msg -> Element msg
offeringMaker service =
column
[ spacing 8
, width fill
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 35
}
]
<|
List.map2 (\x y -> makeDescription x)
service.serviceDescription
(List.range 1 (List.length service.serviceDescription))
makeDescription : Description -> Element msg
makeDescription description =
column
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, alignLeft
]
++ [ spacing 8
, width fill
]
)
[ paragraph [ F.regular ]
[ E.text (" " ++ description.point) ]
]

View file

@ -6,7 +6,7 @@ import Config.Helpers.Format exposing (..)
import Config.Helpers.Response exposing (pageList, topLevelContainer)
import Config.Helpers.ToolTip exposing (..)
import Config.Pages.Headers.Types exposing (..)
import Config.Pages.Services.Services.DebateAnalysis exposing (..)
import Config.Pages.Services.Records.DebateAnalysis exposing (..)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Transitions
exposing

View file

@ -10,7 +10,7 @@ import Config.Helpers.Response
)
import Config.Helpers.ToolTip exposing (..)
import Config.Pages.Headers.Types exposing (..)
import Config.Pages.Services.Services.DebateCoaching exposing (servicesDebateCoaching)
import Config.Pages.Services.Records.DebateCoaching exposing (servicesDebateCoaching)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Transitions
exposing

View file

@ -10,7 +10,7 @@ import Config.Helpers.Response
)
import Config.Helpers.ToolTip exposing (..)
import Config.Pages.Headers.Types exposing (..)
import Config.Pages.Services.Services.ElmBuilds exposing (servicesElmBuilds)
import Config.Pages.Services.Records.ElmBuilds exposing (servicesElmBuilds)
import Config.Style.Colour exposing (..)
import Config.Style.Transitions
exposing

View file

@ -10,7 +10,7 @@ import Config.Helpers.Response
)
import Config.Helpers.ToolTip exposing (..)
import Config.Pages.Headers.Types exposing (..)
import Config.Pages.Services.Services.NixBuilds exposing (servicesNixBuilds)
import Config.Pages.Services.Records.NixBuilds exposing (servicesNixBuilds)
import Config.Style.Colour exposing (..)
import Config.Style.Transitions
exposing

View file

@ -10,7 +10,7 @@ import Config.Helpers.Response
)
import Config.Helpers.ToolTip exposing (..)
import Config.Pages.Headers.Types exposing (..)
import Config.Pages.Services.Services.NutritionScience exposing (servicesNutritionScience)
import Config.Pages.Services.Records.NutritionScience exposing (servicesNutritionScience)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Transitions
exposing