module Pages.Debate exposing ( Model , Msg , debateArguments , debateCuckList , debateGibberish , page ) import Config.Data.Identity exposing ( pageNames ) import Config.Helpers.CardFormat exposing (cardMaker) import Config.Helpers.Converters exposing (formatName) import Config.Helpers.Format exposing ( headerFontSizeSmall , paragraphFontSize , paragraphSpacing ) import Config.Helpers.Headers.Header exposing (headerMaker) import Config.Helpers.Headers.Types exposing (Header) import Config.Helpers.Response exposing ( pageList , topLevelContainer ) import Config.Helpers.ServiceFormat exposing (chunkMaker) import Config.Helpers.Viewport exposing (resetViewport) import Config.Pages.Debate.Arguments.List exposing (argumentList) import Config.Pages.Debate.Cuckery.List exposing (cuckList) import Config.Pages.Debate.Gibberish.List exposing (gibberishList) import Config.Pages.Debate.Types exposing (..) 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) page : Shared.Model -> Route () -> Page Model Msg page shared route = Page.new { init = init , update = update , subscriptions = subscriptions , view = view shared } |> Page.withLayout toLayout toLayout : Model -> Layouts.Layout Msg toLayout model = Layouts.Navbar {} -- INIT type alias Model = {} init : () -> ( Model, Effect Msg ) init () = ( {} , Effect.none ) -- UPDATE type Msg = NoOp update : Msg -> Model -> ( Model, Effect Msg ) update msg model = case msg of NoOp -> ( model , Effect.none ) -- SUBSCRIPTIONS subscriptions : Model -> Sub Msg subscriptions model = Sub.none -- VIEW view : Shared.Model -> Model -> View Msg view shared model = { title = pageNames.pageDebate , attributes = [] , element = debateContainer shared.device } debateContainer : Device -> Element msg debateContainer device = topLevelContainer (debateList device) debateList : Device -> Element msg debateList device = column (case ( device.class, device.orientation ) of _ -> pageList ) <| List.concat [ List.map (headerMaker device) [ debateHeader ] , (case ( device.class, device.orientation ) of _ -> List.map (debateMaker device) ) [ debateArguments , debateCuckList , debateGibberish ] ] debateHeader : Header debateHeader = let name = "Debate" in { headerTitle = String.toUpper name , hasImage = False , hasLink = False , headerBody = "Here you will find links to various pages relevant to debate, such as formal arguments, a list of debate-dodging cucks, and an inventory of nonsensical terminology." } debateMaker : Device -> Debate -> Element msg debateMaker device debate = cardMaker device debate.debateTitle (contentList debate) (debateImage debate) debate.debateLink contentList : Debate -> List (Element msg) contentList debate = [ descriptionMaker debate ] 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 [ spacing 5 ] [ paragraph [ F.color colourTheme.textLightOrange , paragraphSpacing , F.bold , headerFontSizeSmall , 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 ] ] , el [ width fill ] <| chunkMaker [ text debate.debateDescription ] ] debateArguments : Debate debateArguments = let name = "Arguments" in { debateTitle = name , debateLink = Path.toString Path.Debate_Arguments , debateCount = List.length argumentList , debateImage = formatName name , hasLink = True , hasImage = True , 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 = List.length cuckList , debateImage = formatName name , hasLink = True , hasImage = True , 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 = List.length gibberishList , debateImage = formatName name , hasLink = True , hasImage = True , 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." }