feat: reverted the arguments page

This commit is contained in:
Nick 2024-11-27 15:11:21 -06:00
parent d9dccdd727
commit f2c6f1ce26
55 changed files with 272 additions and 619 deletions

0
frontend/src/Blog/Helpers.elm Normal file → Executable file
View file

0
frontend/src/Blog/Types.elm Normal file → Executable file
View file

View file

@ -11,13 +11,13 @@ type alias PageInput =
, pageNutriDex : String , pageNutriDex : String
, pagePlatforms : String , pagePlatforms : String
, pageServices : String , pageServices : String
, pageSupport : String , pageDonate : String
} }
pageNames : PageInput pageNames : PageInput
pageNames = pageNames =
{ pageHome = "upRootHealth" { pageHome = "home"
, pagePlatforms = "platforms" , pagePlatforms = "platforms"
, pageServices = "services" , pageServices = "services"
, pageDodgers = "cuckList" , pageDodgers = "cuckList"
@ -26,14 +26,20 @@ pageNames =
, pageNutriDex = "nutriDex" , pageNutriDex = "nutriDex"
, pageInterviews = "interviews" , pageInterviews = "interviews"
, pageContact = "contact" , pageContact = "contact"
, pageSupport = "support" , pageDonate = "donate"
} }
createPageName : String -> String createPageName : String -> String
createPageName pageName = createPageName pageName =
pageNames.pageHome ++ " :: " ++ pageName pageNames.pageHome ++ " :: " ++ pageName
homeName : String
homeName =
createPageName pageNames.pageHome
contactName : String contactName : String
contactName = contactName =
createPageName pageNames.pageContact createPageName pageNames.pageContact
@ -76,4 +82,4 @@ servicesName =
supportName : String supportName : String
supportName = supportName =
createPageName pageNames.pageSupport createPageName pageNames.pageDonate

View file

@ -145,7 +145,7 @@ makeDodge dodgeEntry index =
(List.indexedMap (List.indexedMap
(\index2 link -> (\index2 link ->
newTabLink newTabLink
[ paddingEach { top = 0, right = 0, bottom = 0, left = 5 }, F.size 13 ] [ paddingEach { top = 0, right = 15, bottom = 0, left = 5 }, F.size 13 ]
{ url = link { url = link
, label = , label =
row [] row []
@ -161,18 +161,18 @@ makeDodge dodgeEntry index =
] ]
, row paragraphBoldFormat , row paragraphBoldFormat
[ column [ alignTop, width <| px 165 ] [ column [ alignTop, width <| px 165 ]
[ text "Proposition:" |> el [ paddingEach { top = 0, right = 0, bottom = 0, left = 70 } ] [ text "Proposition:" |> el [ paddingEach { top = 0, right = 15, bottom = 0, left = 70 } ]
] ]
, column [ E.width fill, alignLeft ] , column [ E.width fill, alignLeft, paddingEach { top = 0, right = 15, bottom = 0, left = 0 } ]
[ paragraph [ F.regular ] [ text (formatProposition dodgeEntry.dodgeProposition) ] [ paragraph [ F.regular ] [ text (formatProposition dodgeEntry.dodgeProposition) ]
] ]
] ]
, maybeFallacyField , maybeFallacyField
, row (paragraphBoldFormat ++ [ width fill ]) , row (paragraphBoldFormat ++ [ width fill ])
[ column [ alignTop, width <| px 165 ] [ column [ alignTop, width <| px 165 ]
[ text "Attitude:" |> el [ paddingEach { top = 0, right = 0, bottom = 0, left = 70 } ] [ text "Attitude:" |> el [ paddingEach { top = 0, right = 15, bottom = 0, left = 70 } ]
] ]
, column [ E.width fill, alignLeft ] , column [ E.width fill, alignLeft, paddingEach { top = 0, right = 15, bottom = 0, left = 0 } ]
[ case dodgeEntry.dodgeNicksDoxasticState of [ case dodgeEntry.dodgeNicksDoxasticState of
Nothing -> Nothing ->
paragraph [ F.regular ] [ text "I don't form a doxastic state." ] paragraph [ F.regular ] [ text "I don't form a doxastic state." ]
@ -199,7 +199,7 @@ makeDodge dodgeEntry index =
[ column [ alignTop, width <| px 165 ] [ column [ alignTop, width <| px 165 ]
[ text "Reason:" |> el [ paddingEach { top = 0, right = 0, bottom = 0, left = 70 } ] [ text "Reason:" |> el [ paddingEach { top = 0, right = 0, bottom = 0, left = 70 } ]
] ]
, column [ E.width fill, alignLeft ] , column [ E.width fill, alignLeft, paddingEach { top = 0, right = 15, bottom = 0, left = 0 } ]
[ paragraph [ F.regular ] [ paragraph [ F.regular ]
[ text <| [ text <|
case dodgeEntry.dodgeNicksDoxasticReason of case dodgeEntry.dodgeNicksDoxasticReason of
@ -255,41 +255,41 @@ cuckMaker cuck =
[ row [ row
(nonHighlightedTitleFormat (nonHighlightedTitleFormat
++ [ F.size 20 ++ [ F.size 20
, B.color colourTheme.highlightTextHover
-- , B.color colourTheme.highlightTextHover
, paddingEach { top = 6, bottom = 3, left = 25, right = 15 } , paddingEach { top = 6, bottom = 3, left = 25, right = 15 }
, alignBottom , alignBottom
, width fill , width fill
, D.roundEach { topLeft = 26, topRight = 15, bottomRight = 0, bottomLeft = 0 } , D.roundEach { topLeft = 26, topRight = 26, bottomRight = 0, bottomLeft = 0 }
, B.gradient
{ angle = 1.5708 -- , B.gradient
, steps = -- { angle = 1.5708
[ colourTheme.highlightTextHover -- , steps =
, colourTheme.highlightTextHover -- [ colourTheme.highlightTextHover
, colourTheme.transparent -- , colourTheme.highlightTextHover
, colourTheme.transparent -- , colourTheme.transparent
] -- , colourTheme.transparent
} -- ]
-- }
] ]
) )
[ text cuck.cuckName ] [ text cuck.cuckName ]
, column , column
[ E.height fill [ E.height fill
, E.width fill , E.width fill
, B.color colourTheme.cardBackground
-- , B.color colourTheme.cardBackground
, paddingEach { top = 10, bottom = 10, left = 10, right = 10 } , paddingEach { top = 10, bottom = 10, left = 10, right = 10 }
, D.roundEach { topLeft = 0, topRight = 0, bottomRight = 0, bottomLeft = 26 } , D.roundEach { topLeft = 0, topRight = 0, bottomRight = 26, bottomLeft = 26 }
, spacing 3 , spacing 3
, B.gradient
{ angle = 1.5708 -- , B.gradient
, steps = -- { angle = 1.5708
[ colourTheme.cardBackground -- , steps =
, colourTheme.cardBackground -- [ colourTheme.cardBackground
, colourTheme.transparent -- , colourTheme.cardBackground
, colourTheme.transparent -- , colourTheme.transparent
] -- , colourTheme.transparent
} -- ]
-- }
] ]
[ row [ row
(paragraphBoldFormat (paragraphBoldFormat

View file

@ -1,9 +1,5 @@
module Debate.Helpers exposing (..) module Debate.Helpers exposing (..)
-- import Html exposing (div, hr)
-- import Html.Attributes as H exposing (style, title, wrap)
-- import Config.Types exposing (..)
import Config.Colour as T exposing (..) import Config.Colour as T exposing (..)
import Config.Format as O exposing (..) import Config.Format as O exposing (..)
import Debate.Types exposing (..) import Debate.Types exposing (..)
@ -13,165 +9,109 @@ import Element.Background as B exposing (..)
import Element.Border as D exposing (..) import Element.Border as D exposing (..)
import Element.Events as V exposing (..) import Element.Events as V exposing (..)
import Element.Font as F exposing (..) import Element.Font as F exposing (..)
import Html.Attributes exposing (form, id, style) import Html exposing (div, hr)
import Html.Attributes as H exposing (style, title, wrap)
import Layouts import Layouts
import List.Extra exposing (..)
import Maybe exposing (withDefault)
import Maybe.Extra exposing (isNothing)
import Page exposing (Page) import Page exposing (Page)
import Route exposing (Route) import Route exposing (Route)
import Shared import Shared
import View exposing (View) import View exposing (View)
type alias ArgMakerInput msg = argumentMaker : Argument -> Element msg
{ arg : Argument argumentMaker argument =
, index : Int row
, isExpanded : Bool [ spacing 20
, maybeHeight : Maybe Int , E.width fill
, titleClickMsg : msg , E.height fill
} , E.alignTop
, E.alignRight
argumentMaker : ArgMakerInput msg -> Element msg
argumentMaker argMakerInput =
-- row [ imageSpacer, E.alignLeft ]
-- [ E.image
-- (case argMakerInput.maybeHeight of
-- Nothing ->
-- [ transparent True ]
-- Just _ ->
-- [ centerX
-- , centerY
-- , alignTop
-- , D.rounded 100
-- , E.width <| px 52
-- ]
-- )
-- { src = "arguments/" ++ argMakerInput.arg.argumentImage ++ ".png"
-- , description = ""
-- }
-- ,
column
(if isNothing argMakerInput.maybeHeight then
[ E.htmlAttribute (id <| "arg" ++ String.fromInt argMakerInput.index)
, E.width <| px 600
] ]
[ column
else [ E.width <| px 115
[ E.width <| px 600, alignTop ] , E.height <| px 115
) , E.alignTop
[ titleMaker argMakerInput , E.alignRight
, column ]
(case argMakerInput.maybeHeight of [ column
Just h -> [ D.rounded 100
[ B.color colourTheme.cardBackground , D.width 5
, D.color colourTheme.cardBackground
]
[ E.image
[ E.alignRight
, alignTop
, D.rounded 100
, clip , clip
, E.width <| px 90
, E.height <| px 90
]
{ src = "arguments/" ++ argument.argumentImage ++ ".png"
, description = argument.argumentTitle
}
]
]
, column
[ E.width <| px 600
, alignTop
]
[ column
[ B.color colourTheme.cardBackground
, htmlAttribute <| style "transition" "all .7s ease-in-out" , htmlAttribute <| style "transition" "all .7s ease-in-out"
, roundEach { topLeft = 0, topRight = 0, bottomRight = 20, bottomLeft = 20 } , rounded 26
, height <| ]
px <| [ titleMaker argument
if argMakerInput.isExpanded then , column [ paddingEach { top = 10, right = 30, bottom = 10, left = 30 }, spacing 10 ]
h [ propositionMaker argument
, reductioMaker argument
else , summaryMaker argument
0 , strengthMaker argument
, tableMaker argument
, proofTreeMaker argument
]
] ]
Nothing ->
[ transparent True ]
)
<|
List.map (\x -> x argMakerInput)
[ propositionMaker
, reductioMaker
, summaryMaker
, strengthMaker
, tableMaker
, proofTreeMaker
] ]
] ]
titleMaker : Argument -> Element msg
-- ] titleMaker argument =
titleMaker : ArgMakerInput msg -> Element msg
titleMaker argMakerInput =
paragraph paragraph
(paragraphBoldFormat (paragraphBoldFormat
++ [ F.size 20 ++ [ F.size 20
, F.color colourTheme.backgroundColour , B.color colourTheme.highlightTextHover
, B.color colourTheme.highlightText , paddingEach { top = 6, bottom = 3, left = 30, right = 30 }
, paddingEach { top = 6, bottom = 2, left = 12, right = 12 }
, alignBottom , alignBottom
, roundEach { topLeft = 10, topRight = 10, bottomRight = 0, bottomLeft = 0 }
, F.center
, pointer
, htmlAttribute <| style "transition" "all 0.3s ease-in-out"
, mouseOver
[ B.color colourTheme.highlightTextHover
, F.color colourTheme.nonHighlightedText
]
, V.onClick <| argMakerInput.titleClickMsg
]
++ (case argMakerInput.maybeHeight of
Nothing ->
[ transparent True ]
Just _ ->
[ roundEach <|
if argMakerInput.isExpanded then
{ topLeft = 10, topRight = 10, bottomRight = 0, bottomLeft = 0 }
else
{ topLeft = 10, topRight = 10, bottomRight = 10, bottomLeft = 10 }
, F.alignLeft
]
)
)
[ text argMakerInput.arg.argumentTitle ]
propositionMaker : ArgMakerInput msg -> Element msg
propositionMaker argMakerInput =
row
[ paddingEach { top = 20, right = 30, bottom = 0, left = 30 }
, E.width fill , E.width fill
, D.roundEach { topLeft = 26, topRight = 26, bottomRight = 0, bottomLeft = 0 }
] ]
)
[ text argument.argumentTitle
]
propositionMaker : Argument -> Element msg
propositionMaker argument =
row []
[ column [ column
[ E.alignTop, E.alignLeft ] [ E.alignTop, E.alignLeft ]
[ paragraph [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ])
(paragraphBoldFormat
++ [ F.size 18
, E.width <| px 100
]
)
[ el [ tooltip below (myTooltip "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.highlightText ] ] [ el [ tooltip below (myTooltip "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.highlightText ] ]
] ]
, column , column
[ E.width fill, E.alignLeft ] [ E.width fill, E.alignLeft ]
[ paragraph (paragraphBoldFormat ++ [ F.size 18 ]) [ paragraph (paragraphBoldFormat ++ [ F.size 18 ]) [ text argument.propositionTitle |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ]
[ text argMakerInput.arg.propositionTitle
|> el
[ F.color colourTheme.nonHighlightedText
, F.regular
, F.size 16
]
]
]
] ]
reductioMaker : ArgMakerInput msg -> Element msg reductioMaker : Argument -> Element msg
reductioMaker argMakerInput = reductioMaker argument =
case argMakerInput.arg.propositionReductio of case argument.propositionReductio of
"" -> "" ->
none none
reductio -> reductio ->
row [ paddingEach { top = 8, right = 30, bottom = 0, left = 30 }, E.width fill ] row [ paddingEach { top = 10, right = 0, bottom = 0, left = 0 } ]
[ column [ column
[ E.alignTop, E.alignLeft ] [ E.alignTop, E.alignLeft ]
[ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ])
@ -179,15 +119,15 @@ reductioMaker argMakerInput =
] ]
] ]
, column [ E.width fill, E.alignLeft ] , column [ E.width fill, E.alignLeft ]
[ paragraph (paragraphBoldFormat ++ [ F.size 18, spacing 3 ]) [ paragraph (paragraphFormat ++ [ F.size 18, spacing 3 ])
[ text reductio ] [ text reductio ]
] ]
] ]
summaryMaker : ArgMakerInput msg -> Element msg summaryMaker : Argument -> Element msg
summaryMaker argMakerInput = summaryMaker argument =
row [ paddingEach { top = 10, right = 30, bottom = 0, left = 30 } ] row []
[ column [ column
[ E.alignTop, E.alignLeft ] [ E.alignTop, E.alignLeft ]
[ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ])
@ -196,25 +136,12 @@ summaryMaker argMakerInput =
] ]
, column , column
[ E.width fill, E.alignLeft ] [ E.width fill, E.alignLeft ]
[ paragraph [ paragraph (paragraphBoldFormat ++ [ F.size 18, spacing 3 ]) [ text argument.propositionSummary |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ]
(paragraphBoldFormat
++ [ F.size 18
, spacing 3
]
)
[ text argMakerInput.arg.propositionSummary
|> el
[ F.color colourTheme.nonHighlightedText
, F.regular
, F.size 16
]
]
]
] ]
strengthMaker : ArgMakerInput msg -> Element msg strengthMaker : Argument -> Element msg
strengthMaker argMakerInput = strengthMaker argument =
let let
barMaker : Int -> Element msg barMaker : Int -> Element msg
barMaker num = barMaker num =
@ -275,7 +202,7 @@ strengthMaker argMakerInput =
_ -> _ ->
"Confidence level out of expected range." "Confidence level out of expected range."
in in
row [ paddingEach { top = 10, right = 30, bottom = 0, left = 30 }, E.width fill ] row [ E.width fill ]
[ column [ column
[ E.alignTop, E.alignLeft ] [ E.alignTop, E.alignLeft ]
[ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ])
@ -283,12 +210,12 @@ strengthMaker argMakerInput =
] ]
, column , column
[ E.width fill, E.alignLeft, centerY ] [ E.width fill, E.alignLeft, centerY ]
[ barMaker argMakerInput.arg.argumentCertainty ] [ barMaker argument.argumentCertainty ]
] ]
tableMaker : ArgMakerInput msg -> Element msg tableMaker : Argument -> Element msg
tableMaker argMakerInput = tableMaker argument =
let let
formalizationMaker : List (Element msg) formalizationMaker : List (Element msg)
formalizationMaker = formalizationMaker =
@ -299,7 +226,7 @@ tableMaker argMakerInput =
in in
List.indexedMap List.indexedMap
(\index argumentEntry -> (\index argumentEntry ->
column (paragraphFormat ++ [ spacing 3, centerX, E.width fill, paddingEach { top = 10, right = 30, bottom = 0, left = 30 } ]) column (paragraphFormat ++ [ spacing 3, centerX, E.width <| px 500, paddingEach { top = 10, right = 0, bottom = 0, left = 0 } ])
(List.indexedMap (List.indexedMap
(\premiseIndex premiseWithNotation -> (\premiseIndex premiseWithNotation ->
column argumentFormatting column argumentFormatting
@ -329,13 +256,9 @@ tableMaker argMakerInput =
] ]
) )
) )
argMakerInput.arg.argumentFormalization argument.argumentFormalization
in in
column column [ centerX, E.width <| px 600 ]
[ centerX
, paddingEach { top = 8, right = 30, bottom = 0, left = 30 }
, E.width fill
]
[ wrappedRow (paragraphBoldFormat ++ [ E.alignLeft, E.width fill ]) [ wrappedRow (paragraphBoldFormat ++ [ E.alignLeft, E.width fill ])
[ E.table [ E.table
[ spacing 0 [ spacing 0
@ -344,7 +267,7 @@ tableMaker argMakerInput =
, D.color colourTheme.nonHighlightedDarkText , D.color colourTheme.nonHighlightedDarkText
, clip , clip
] ]
{ data = argMakerInput.arg.definitionTable { data = argument.definitionTable
, columns = , columns =
[ { header = [ { header =
el el
@ -401,24 +324,21 @@ tableMaker argMakerInput =
] ]
proofTreeMaker : ArgMakerInput msg -> Element msg proofTreeMaker : Argument -> Element msg
proofTreeMaker argMakerInput = proofTreeMaker argument =
row row [ paddingEach { top = 10, right = 0, bottom = 10, left = 0 }, centerX, E.width fill ]
[ paddingEach { top = 8, right = 30, bottom = 0, left = 30 } [ column [ E.alignRight ]
, centerX
, E.width fill
]
[ column [ E.width fill ]
[ newTabLink [ newTabLink
(paragraphBoldFormat (paragraphBoldFormat
++ [ F.size 18 ++ [ F.size 18
, F.color colourTheme.backgroundColour , F.color colourTheme.backgroundColour
, B.color colourTheme.highlightText , B.color colourTheme.highlightText
, paddingEach { top = 6, bottom = 2, left = 12, right = 12 } , paddingEach { top = 6, bottom = 2, left = 12, right = 12 }
, D.width 1
, D.rounded 10 , D.rounded 10
, E.width <| px 105
, F.center , F.center
, E.alignRight , E.alignRight
, alignBottom
, transitionStyle , transitionStyle
, mouseOver , mouseOver
[ B.color colourTheme.highlightTextHover [ B.color colourTheme.highlightTextHover
@ -427,8 +347,19 @@ proofTreeMaker argMakerInput =
] ]
] ]
) )
{ url = argMakerInput.arg.proofLink { url = argument.proofLink
, label = text "Proof Tree" , label = text "Proof Tree"
} }
] ]
] ]
basicDivider =
el
[ E.width fill
, centerX
, D.widthEach { bottom = 1, top = 0, left = 0, right = 0 }
, D.color (rgb255 200 200 200)
, paddingEach { top = 40, bottom = 0, left = 0, right = 0 }
]
none

0
frontend/src/Interviews/Episodes/FitAndFurious.elm Normal file → Executable file
View file

0
frontend/src/Interviews/Episodes/FoolproofMastery.elm Normal file → Executable file
View file

0
frontend/src/Interviews/Episodes/KetogeeksPodcast.elm Normal file → Executable file
View file

View file

View file

View file

View file

44
frontend/src/Interviews/Helpers.elm Normal file → Executable file
View file

@ -132,21 +132,23 @@ interviewMaker interview =
} }
, alignBottom , alignBottom
, width fill , width fill
, B.color colourTheme.highlightTextHover
, D.roundEach , D.roundEach
{ topLeft = 26 { topLeft = 26
, topRight = 15 , topRight = 26
, bottomRight = 0 , bottomRight = 0
, bottomLeft = 0 , bottomLeft = 0
} }
, B.gradient
{ angle = 1.5708 -- , B.gradient
, steps = -- { angle = 1.5708
[ colourTheme.highlightTextHover -- , steps =
, colourTheme.highlightTextHover -- [ colourTheme.highlightTextHover
, colourTheme.transparent -- , colourTheme.highlightTextHover
, colourTheme.transparent -- , colourTheme.transparent
] -- , colourTheme.transparent
} -- ]
-- }
] ]
) )
[ text interview.interviewName ] [ text interview.interviewName ]
@ -154,7 +156,7 @@ interviewMaker interview =
[ E.height fill [ E.height fill
, E.width fill , E.width fill
-- , B.color colourTheme.cardBackground , B.color colourTheme.cardBackground
, paddingEach , paddingEach
{ top = 10 { top = 10
, bottom = 10 , bottom = 10
@ -164,19 +166,19 @@ interviewMaker interview =
, D.roundEach , D.roundEach
{ topLeft = 0 { topLeft = 0
, topRight = 0 , topRight = 0
, bottomRight = 0 , bottomRight = 26
, bottomLeft = 26 , bottomLeft = 26
} }
, spacing 3 , spacing 3
, B.gradient -- , B.gradient
{ angle = 1.5708 -- { angle = 1.5708
, steps = -- , steps =
[ colourTheme.cardBackground -- [ colourTheme.cardBackground
, colourTheme.cardBackground -- , colourTheme.cardBackground
, colourTheme.transparent -- , colourTheme.transparent
, colourTheme.transparent -- , colourTheme.transparent
] -- ]
} -- }
] ]
[ row [ row
(paragraphBoldFormat (paragraphBoldFormat

0
frontend/src/Interviews/Types.elm Normal file → Executable file
View file

View file

@ -150,17 +150,17 @@ view { toContentMsg, model, content } =
, F.size 17 , F.size 17
, spacing 8 , spacing 8
] ]
[ homeButton <|
, servicesButton List.map buttonMaker
, hyperbolgButton [ pageNames.pageHome
, argumentsButton , pageNames.pageServices
, cucklistButton , pageNames.pageHyperBlog
, pageNames.pageDebate
-- , communityButton , pageNames.pageDodgers
, nutridexButton , pageNames.pageNutriDex
, donateButton , pageNames.pageInterviews
, interviewButton , pageNames.pageDonate
, contactButton , pageNames.pageContact
] ]
] ]
] ]
@ -231,261 +231,32 @@ localhostUrl =
"http://localhost:1234/" "http://localhost:1234/"
linkFormat = buttonMaker : String -> Element msg
buttonMaker name =
row
[]
[ column [ E.width <| px 36 ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/" ++ String.toLower name ++ ".png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ String.toLower name
, label =
el el
[ mouseOver [ F.color colourTheme.highlightText ] [ mouseOver [ F.color colourTheme.highlightText ]
, htmlAttribute <| style "transition" "all 0.1s ease-in-out" , htmlAttribute <| style "transition" "all 0.1s ease-in-out"
] ]
<|
text (String.toUpper name)
iconDistance =
E.width <| px 36
homeButton : Element msg
homeButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/home.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "home"
, label = linkFormat <| text "HOME"
}
]
]
servicesButton : Element msg
servicesButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/services.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "services"
, label = linkFormat <| text "SERVICES"
}
]
]
hyperbolgButton : Element msg
hyperbolgButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/hyperblog.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "hyperblog"
, label = linkFormat <| text "HYPERBLOG"
}
]
]
argumentsButton : Element msg
argumentsButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/arguments.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "arguments"
, label = linkFormat <| text "ARGUMENTS"
}
]
]
cucklistButton : Element msg
cucklistButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/cucklist.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "cucklist"
, label = linkFormat <| text "CUCKLIST"
}
]
]
communityButton : Element msg
communityButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/community.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "community"
, label = linkFormat <| text "COMMUNITY"
}
]
]
nutridexButton : Element msg
nutridexButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/nutridex.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "nutridex"
, label = linkFormat <| text "NUTRIDEX"
}
]
]
donateButton : Element msg
donateButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/donate.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "donate"
, label = linkFormat <| text "DONATE"
}
]
]
interviewButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/interviews.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "interviews"
, label = linkFormat <| text "INTERVIEWS"
}
]
]
contactButton : Element msg
contactButton =
row
[]
[ column [ iconDistance ]
[ E.image
[ alignLeft
, alignBottom
, E.width <| px 30
]
{ src = "navbar/contact.png"
, description = ""
}
]
, column
[ alignBottom ]
[ link
[]
{ url = localhostUrl ++ "contact"
, label = linkFormat <| text "CONTACT"
} }
] ]
] ]

View file

@ -76,7 +76,7 @@ page shared route =
{ init = init { init = init
, update = update , update = update
, subscriptions = subscriptions , subscriptions = subscriptions
, view = view shared , view = view
} }
|> Page.withLayout toLayout |> Page.withLayout toLayout
@ -91,21 +91,12 @@ toLayout model =
type alias Model = type alias Model =
{ argExpansions : List Bool {}
, argHeights : List Int
}
init : () -> ( Model, Effect Msg ) init : () -> ( Model, Effect Msg )
init () = init () =
let ( {}
numArgs : Int
numArgs =
List.length argumentList
in
( { argExpansions = List.repeat numArgs False
, argHeights = List.repeat numArgs 0
}
, Effect.none , Effect.none
) )
@ -115,104 +106,50 @@ init () =
type Msg type Msg
= GotArgHeight (List Int) = NoOp
| ToggleExpandArg Int
update : Msg -> Model -> ( Model, Effect Msg ) update : Msg -> Model -> ( Model, Effect Msg )
update msg model = update msg model =
Debug.log (Debug.toString model.argHeights) <|
case msg of case msg of
GotArgHeight argHeights -> NoOp ->
( { model | argHeights = argHeights }, Effect.none ) ( model
, Effect.none
ToggleExpandArg index ->
( case getAt index model.argExpansions of
Nothing ->
model
Just isExpanded ->
{ model
| argExpansions =
setAt index
(not isExpanded)
model.argExpansions
}
, Effect.sendCmd <| Ports.getArgHeight <| List.length model.argHeights
) )
-- SUBSCRIPTIONS
subscriptions : Model -> Sub Msg subscriptions : Model -> Sub Msg
subscriptions model = subscriptions model =
gotArgHeight GotArgHeight Sub.none
-- VIEW -- VIEW
view : Shared.Model -> Model -> View Msg view : Model -> View Msg
view shared model = view model =
{ title = debateName { title = dodgersName
, attributes = [] , attributes = []
, element = debateContainer shared model , element = debateContainer
} }
debateContainer : Shared.Model -> Model -> Element Msg debateContainer : Element msg
debateContainer shared model = debateContainer =
let topLevelContainer debateList
a : Device
a =
shared.device
in
topLevelContainer <| debateList model
debateList : Model -> Element Msg debateList : Element msg
debateList model = debateList =
let
argColumn : Bool -> Element Msg
argColumn isHidden =
column column
[ padding 30 pageList
, spacing 15
]
<| <|
List.map argumentMaker <| List.map argumentMaker
List.map4
(\w x y z ->
{ arg = w
, index = x
, isExpanded = y
, maybeHeight =
if isHidden then
Nothing
else
z
, titleClickMsg = ToggleExpandArg x
}
)
argumentList
(List.range 0 <| List.length model.argHeights)
model.argExpansions
(List.map Just model.argHeights)
in
el
[ behindContent <| argColumn True
, spacing 10
, centerX
, centerY
, alignTop
, paddingEach { top = 30, bottom = 30, left = 30, right = 30 }
]
<|
argColumn False
argumentList : List Argument
argumentList =
[ argumentApoBCVD [ argumentApoBCVD
, argumentAnabolicKeto , argumentAnabolicKeto
, argumentAntagonisticPleiotropy , argumentAntagonisticPleiotropy

0
frontend/src/Pages/Cucklist.elm Normal file → Executable file
View file

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

@ -23,6 +23,12 @@ page shared route =
, subscriptions = subscriptions , subscriptions = subscriptions
, view = view , view = view
} }
|> Page.withLayout toLayout
toLayout : Model -> Layouts.Layout Msg
toLayout model =
Layouts.Navbar {}

0
frontend/src/Pages/Hyperblog.elm Normal file → Executable file
View file

0
frontend/src/Pages/Interviews.elm Normal file → Executable file
View file

0
frontend/static/interviews/fitandfurious.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Before After
Before After

0
frontend/static/interviews/foolproofmastery.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

0
frontend/static/interviews/ketogeekspodcast.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Before After
Before After

0
frontend/static/interviews/legendarylifepodcast.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 269 KiB

After

Width:  |  Height:  |  Size: 269 KiB

Before After
Before After

0
frontend/static/interviews/markbellspowerproject.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB

Before After
Before After

0
frontend/static/interviews/musclememoirspodcast.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 318 KiB

After

Width:  |  Height:  |  Size: 318 KiB

Before After
Before After

0
frontend/static/interviews/sigmanutritionradio.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before After
Before After

0
frontend/static/navbar/arguments-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

0
frontend/static/navbar/arguments.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

0
frontend/static/navbar/community-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

0
frontend/static/navbar/community.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

0
frontend/static/navbar/contact-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

0
frontend/static/navbar/contact.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

0
frontend/static/navbar/cucklist-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

0
frontend/static/navbar/cucklist.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

0
frontend/static/navbar/discord-light.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

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

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before After
Before After

0
frontend/static/navbar/donate-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 818 B

Before After
Before After

0
frontend/static/navbar/donate.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 846 B

Before After
Before After

0
frontend/static/navbar/gitlab-light.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

0
frontend/static/navbar/gitlab.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

0
frontend/static/navbar/home-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

0
frontend/static/navbar/home.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

0
frontend/static/navbar/hyperblog-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

0
frontend/static/navbar/hyperblog.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

0
frontend/static/navbar/interviews-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

0
frontend/static/navbar/interviews.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

0
frontend/static/navbar/mastodon-light.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before After
Before After

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

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

0
frontend/static/navbar/nutridex-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

0
frontend/static/navbar/nutridex.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

0
frontend/static/navbar/services-dark.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

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

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

0
frontend/static/navbar/twitter-light.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

0
frontend/static/navbar/twitter.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before After
Before After