mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: push for isaac
This commit is contained in:
parent
76e7d5a5fc
commit
f3f7df13f5
15 changed files with 293 additions and 145 deletions
|
@ -44,10 +44,4 @@ barPadding =
|
||||||
column
|
column
|
||||||
[ E.width fill
|
[ E.width fill
|
||||||
, E.alignLeft
|
, E.alignLeft
|
||||||
, paddingEach
|
|
||||||
{ top = 0
|
|
||||||
, right = 0
|
|
||||||
, bottom = 0
|
|
||||||
, left = 10
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -88,6 +88,7 @@ argumentMaker argument =
|
||||||
, summaryMakerDesktop argument
|
, summaryMakerDesktop argument
|
||||||
, strengthMakerDesktop argument
|
, strengthMakerDesktop argument
|
||||||
, tableMaker argument
|
, tableMaker argument
|
||||||
|
, formalizationMaker argument
|
||||||
, proofTreeMaker argument
|
, proofTreeMaker argument
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -113,6 +114,7 @@ argumentMakerMobile argument =
|
||||||
, summaryMakerMobile argument
|
, summaryMakerMobile argument
|
||||||
, strengthMakerMobile argument
|
, strengthMakerMobile argument
|
||||||
, tableMaker argument
|
, tableMaker argument
|
||||||
|
, formalizationMaker argument
|
||||||
, proofTreeMaker argument
|
, proofTreeMaker argument
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -336,7 +338,17 @@ strengthMaker =
|
||||||
[ tooltip
|
[ tooltip
|
||||||
"This represents my confidence in the soundness of the argument."
|
"This represents my confidence in the soundness of the argument."
|
||||||
]
|
]
|
||||||
(text "Confidence:")
|
(el
|
||||||
|
[ paddingEach
|
||||||
|
{ top = 0
|
||||||
|
, right = 10
|
||||||
|
, bottom = 0
|
||||||
|
, left = 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<|
|
||||||
|
text "Confidence:"
|
||||||
|
)
|
||||||
|> el [ F.color colourTheme.textLightOrange ]
|
|> el [ F.color colourTheme.textLightOrange ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -394,7 +406,7 @@ tableMaker argument =
|
||||||
[ centerX
|
[ centerX
|
||||||
, E.width fill
|
, E.width fill
|
||||||
]
|
]
|
||||||
([ wrappedRow
|
[ wrappedRow
|
||||||
(paragraphBoldFormat
|
(paragraphBoldFormat
|
||||||
++ [ E.alignLeft
|
++ [ E.alignLeft
|
||||||
, E.width fill
|
, E.width fill
|
||||||
|
@ -485,12 +497,10 @@ tableMaker argument =
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
++ formalizationMaker argument
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
formalizationMaker : Argument -> List (Element msg)
|
formalizationMaker : Argument -> Element msg
|
||||||
formalizationMaker argument =
|
formalizationMaker argument =
|
||||||
let
|
let
|
||||||
argumentFormatting : List (Attribute msg)
|
argumentFormatting : List (Attribute msg)
|
||||||
|
@ -501,71 +511,83 @@ formalizationMaker argument =
|
||||||
, E.width fill
|
, E.width fill
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
List.indexedMap
|
column
|
||||||
(\index argumentEntry ->
|
[ centerX
|
||||||
column
|
, E.width fill
|
||||||
(paragraphFormat
|
, spacing 10
|
||||||
++ [ spacing 3
|
]
|
||||||
, centerX
|
(List.indexedMap
|
||||||
, E.width fill
|
(\index argumentEntry ->
|
||||||
, paddingXY 35 10
|
column
|
||||||
]
|
(paragraphFormat
|
||||||
)
|
++ [ spacing 3
|
||||||
(List.indexedMap
|
, centerX
|
||||||
(\premiseIndex premiseWithNotation ->
|
, E.width fill
|
||||||
column
|
, paddingXY 0 10
|
||||||
(argumentFormatting ++ [ E.width fill ])
|
, explain Debug.todo
|
||||||
[ paragraph paragraphHightlightedBoldText
|
]
|
||||||
[ text ("P" ++ String.fromInt (premiseIndex + 1) ++ ")")
|
|
||||||
, text premiseWithNotation.premise
|
|
||||||
|> el
|
|
||||||
[ F.color colourTheme.textLightGrey
|
|
||||||
, F.regular
|
|
||||||
, E.width fill
|
|
||||||
, paddingEach
|
|
||||||
{ top = 0
|
|
||||||
, right = 0
|
|
||||||
, bottom = 0
|
|
||||||
, left = 5
|
|
||||||
}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
, paragraph argumentFormatting
|
|
||||||
[ text ("(" ++ premiseWithNotation.notation ++ ")")
|
|
||||||
|> el [ F.color colourTheme.textLightOrange, F.bold ]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
argumentEntry.premises
|
(List.indexedMap
|
||||||
++ [ column
|
(\premiseIndex premiseWithNotation ->
|
||||||
(argumentFormatting ++ [ E.width fill ])
|
column
|
||||||
[ paragraph paragraphHightlightedBoldText
|
(argumentFormatting ++ [ E.width fill ])
|
||||||
[ text "C)"
|
[ paragraph paragraphHightlightedBoldText
|
||||||
, text argumentEntry.conclusion
|
[ text ("P" ++ String.fromInt (premiseIndex + 1) ++ ")")
|
||||||
|> el
|
, text premiseWithNotation.premise
|
||||||
[ F.color colourTheme.textLightGrey
|
|> el
|
||||||
, F.regular
|
[ F.color colourTheme.textLightGrey
|
||||||
, E.width fill
|
, F.regular
|
||||||
, paddingEach
|
, E.width fill
|
||||||
{ top = 0
|
, paddingEach
|
||||||
, right = 0
|
{ top = 0
|
||||||
, bottom = 0
|
, right = 0
|
||||||
, left = 5
|
, bottom = 0
|
||||||
}
|
, left = 5
|
||||||
]
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, paragraph
|
||||||
|
(argumentFormatting
|
||||||
|
++ [ F.color colourTheme.textLightOrange
|
||||||
|
, F.bold
|
||||||
|
]
|
||||||
|
)
|
||||||
|
[ text ("(" ++ premiseWithNotation.notation ++ ")")
|
||||||
|
]
|
||||||
]
|
]
|
||||||
, paragraph argumentFormatting
|
)
|
||||||
[ text ("(∴" ++ argumentEntry.conclusionNotation ++ ")")
|
argumentEntry.premises
|
||||||
|> el
|
++ [ column
|
||||||
[ F.color colourTheme.textLightOrange
|
(argumentFormatting ++ [ E.width fill ])
|
||||||
, F.bold
|
[ paragraph paragraphHightlightedBoldText
|
||||||
]
|
[ text "C)"
|
||||||
|
, text argumentEntry.conclusion
|
||||||
|
|> el
|
||||||
|
[ F.color colourTheme.textLightGrey
|
||||||
|
, F.regular
|
||||||
|
, E.width fill
|
||||||
|
, paddingEach
|
||||||
|
{ top = 0
|
||||||
|
, right = 0
|
||||||
|
, bottom = 0
|
||||||
|
, left = 5
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, paragraph
|
||||||
|
(argumentFormatting
|
||||||
|
++ [ F.color colourTheme.textLightOrange
|
||||||
|
, F.bold
|
||||||
|
]
|
||||||
|
)
|
||||||
|
[ text ("(∴" ++ argumentEntry.conclusionNotation ++ ")")
|
||||||
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
)
|
||||||
)
|
)
|
||||||
|
argument.argumentFormalization
|
||||||
)
|
)
|
||||||
argument.argumentFormalization
|
|
||||||
|
|
||||||
|
|
||||||
proofTreeMaker : Argument -> Element msg
|
proofTreeMaker : Argument -> Element msg
|
||||||
|
|
|
@ -22,5 +22,13 @@ cuckTroKalayjian =
|
||||||
, dodgeNicksDoxasticState = Just Belief
|
, dodgeNicksDoxasticState = Just Belief
|
||||||
, dodgeNicksDoxasticReason = SpecificPropReason "The proposition seems trivially true."
|
, dodgeNicksDoxasticReason = SpecificPropReason "The proposition seems trivially true."
|
||||||
}
|
}
|
||||||
|
, { dodgeLink = "https://x.com/TheNutrivore/status/1865857839845232689"
|
||||||
|
, dodgeDescription = RanAway
|
||||||
|
, dodgeProposition = "Meat doesn’t cause cardiovascular disease"
|
||||||
|
, dodgeReceipts = []
|
||||||
|
, dodgeFallacy = Just (SpecificFallacy "")
|
||||||
|
, dodgeNicksDoxasticState = Just Disbelief
|
||||||
|
, dodgeNicksDoxasticReason = SpecificPropReason "The aggregate of the data suggests that higher intakes of meat, particularly red meat, increases the risk of cardiovascular disease, especially when replacing plant-based protein sources."
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ gibberishMaker gibberish =
|
||||||
, F.center
|
, F.center
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
[ domainList gibberish ]
|
[ desktopDomainList gibberish ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -73,7 +73,7 @@ gibberishMakerMobile gibberish =
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
[ cardImageMakerMobile (gibberishImage gibberish)
|
[ cardImageMakerMobile (gibberishImage gibberish)
|
||||||
, domainList gibberish
|
, mobileDomainList gibberish
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -94,20 +94,32 @@ gibberishTitle gibberish =
|
||||||
gibberish.gibberishTitle
|
gibberish.gibberishTitle
|
||||||
|
|
||||||
|
|
||||||
domainList : Gibberish -> Element msg
|
desktopDomainList : Gibberish -> Element msg
|
||||||
domainList gibberish =
|
desktopDomainList gibberish =
|
||||||
column
|
column
|
||||||
[ spacing 8
|
[ spacing 8
|
||||||
, E.width fill
|
, E.width fill
|
||||||
]
|
]
|
||||||
<|
|
<|
|
||||||
List.map2 (\x y -> makeTerms x y)
|
List.map2 (\x y -> desktopMakeTerms x y)
|
||||||
gibberish.gibberishTerms
|
gibberish.gibberishTerms
|
||||||
(List.range 1 (List.length gibberish.gibberishTerms))
|
(List.range 1 (List.length gibberish.gibberishTerms))
|
||||||
|
|
||||||
|
|
||||||
makeTerms : Terms -> Int -> Element msg
|
mobileDomainList : Gibberish -> Element msg
|
||||||
makeTerms terms index =
|
mobileDomainList gibberish =
|
||||||
|
column
|
||||||
|
[ spacing 8
|
||||||
|
, E.width fill
|
||||||
|
]
|
||||||
|
<|
|
||||||
|
List.map2 (\x y -> mobileMakeTerms x y)
|
||||||
|
gibberish.gibberishTerms
|
||||||
|
(List.range 1 (List.length gibberish.gibberishTerms))
|
||||||
|
|
||||||
|
|
||||||
|
desktopMakeTerms : Terms -> Int -> Element msg
|
||||||
|
desktopMakeTerms terms index =
|
||||||
column
|
column
|
||||||
(paragraphAlignLeft
|
(paragraphAlignLeft
|
||||||
++ [ spacing 8
|
++ [ spacing 8
|
||||||
|
@ -144,31 +156,7 @@ makeTerms terms index =
|
||||||
[ el [ F.color colourTheme.textLightOrange ] <|
|
[ el [ F.color colourTheme.textLightOrange ] <|
|
||||||
text terms.term
|
text terms.term
|
||||||
]
|
]
|
||||||
, row
|
, desktopBar terms
|
||||||
[ E.width fill
|
|
||||||
, height fill
|
|
||||||
]
|
|
||||||
[ column
|
|
||||||
[ E.alignTop
|
|
||||||
, E.alignLeft
|
|
||||||
]
|
|
||||||
[ paragraph
|
|
||||||
(paragraphBoldFormat
|
|
||||||
++ [ F.size 18
|
|
||||||
, E.alignLeft
|
|
||||||
, E.width fill
|
|
||||||
]
|
|
||||||
)
|
|
||||||
[ el
|
|
||||||
[ tooltip
|
|
||||||
"This represents my confidence that the term can be understood from at least one viewpoint."
|
|
||||||
]
|
|
||||||
(text "Intelligibility:")
|
|
||||||
]
|
|
||||||
]
|
|
||||||
, barPadding
|
|
||||||
[ barMaker getIntelligibilityTooltip terms.strength ]
|
|
||||||
]
|
|
||||||
, paragraph
|
, paragraph
|
||||||
[ F.color colourTheme.textLightGrey
|
[ F.color colourTheme.textLightGrey
|
||||||
, F.regular
|
, F.regular
|
||||||
|
@ -189,6 +177,133 @@ makeTerms terms index =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
mobileMakeTerms : Terms -> Int -> Element msg
|
||||||
|
mobileMakeTerms terms index =
|
||||||
|
column
|
||||||
|
(paragraphAlignLeft
|
||||||
|
++ [ 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 ++ ". ") ]
|
||||||
|
]
|
||||||
|
, column
|
||||||
|
[ E.width fill
|
||||||
|
, paddingEach
|
||||||
|
{ top = 0
|
||||||
|
, bottom = 0
|
||||||
|
, left = 10
|
||||||
|
, right = 10
|
||||||
|
}
|
||||||
|
]
|
||||||
|
[ paragraph
|
||||||
|
[]
|
||||||
|
[ el [ F.color colourTheme.textLightOrange ] <|
|
||||||
|
text terms.term
|
||||||
|
]
|
||||||
|
, mobileBar 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
|
||||||
|
)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
desktopBar : Terms -> Element msg
|
||||||
|
desktopBar terms =
|
||||||
|
row
|
||||||
|
[ E.width fill
|
||||||
|
, height fill
|
||||||
|
]
|
||||||
|
[ column
|
||||||
|
[ E.alignTop
|
||||||
|
, E.alignLeft
|
||||||
|
]
|
||||||
|
[ paragraph
|
||||||
|
(paragraphBoldFormat
|
||||||
|
++ [ F.size 18
|
||||||
|
, E.alignLeft
|
||||||
|
, E.width fill
|
||||||
|
]
|
||||||
|
)
|
||||||
|
[ el
|
||||||
|
[ tooltip
|
||||||
|
"This represents my confidence that the term can be understood from at least one viewpoint."
|
||||||
|
]
|
||||||
|
(el
|
||||||
|
[ paddingEach
|
||||||
|
{ top = 0
|
||||||
|
, right = 10
|
||||||
|
, bottom = 0
|
||||||
|
, left = 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<|
|
||||||
|
text "Intelligibility:"
|
||||||
|
)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, barPadding
|
||||||
|
[ barMaker getIntelligibilityTooltip terms.strength ]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
mobileBar : Terms -> Element msg
|
||||||
|
mobileBar terms =
|
||||||
|
column
|
||||||
|
[ E.width fill
|
||||||
|
, height fill
|
||||||
|
]
|
||||||
|
[ column
|
||||||
|
[ E.alignTop
|
||||||
|
, E.alignLeft
|
||||||
|
]
|
||||||
|
[ paragraph
|
||||||
|
(paragraphBoldFormat
|
||||||
|
++ [ F.size 18
|
||||||
|
, E.alignLeft
|
||||||
|
, E.width fill
|
||||||
|
]
|
||||||
|
)
|
||||||
|
[ el
|
||||||
|
[ tooltip
|
||||||
|
"This represents my confidence that the term can be understood from at least one viewpoint."
|
||||||
|
]
|
||||||
|
(text "Intelligibility:")
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, barPadding
|
||||||
|
[ barMaker getIntelligibilityTooltip terms.strength ]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
getIntelligibilityTooltip : Int -> String
|
getIntelligibilityTooltip : Int -> String
|
||||||
getIntelligibilityTooltip num =
|
getIntelligibilityTooltip num =
|
||||||
case num of
|
case num of
|
||||||
|
|
|
@ -231,7 +231,17 @@ preferenceMaker donate =
|
||||||
[ tooltip
|
[ tooltip
|
||||||
"This represents how strongly I prefer a given platform relative to other platforms."
|
"This represents how strongly I prefer a given platform relative to other platforms."
|
||||||
]
|
]
|
||||||
(text "Preference:")
|
(el
|
||||||
|
[ paddingEach
|
||||||
|
{ top = 0
|
||||||
|
, right = 10
|
||||||
|
, bottom = 0
|
||||||
|
, left = 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<|
|
||||||
|
text "Preference:"
|
||||||
|
)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, barPadding
|
, barPadding
|
||||||
|
|
|
@ -189,7 +189,17 @@ experienceMaker appearanceEntry =
|
||||||
[ tooltip
|
[ tooltip
|
||||||
"This represents how pleasant it was to interact with the host(s)."
|
"This represents how pleasant it was to interact with the host(s)."
|
||||||
]
|
]
|
||||||
(text "Pleasantness:")
|
(el
|
||||||
|
[ paddingEach
|
||||||
|
{ top = 0
|
||||||
|
, right = 10
|
||||||
|
, bottom = 0
|
||||||
|
, left = 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
<|
|
||||||
|
text "Pleasantness:"
|
||||||
|
)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, barPadding
|
, barPadding
|
||||||
|
|
|
@ -5,6 +5,7 @@ import Config.Format as O exposing (..)
|
||||||
import Config.Identity as I exposing (..)
|
import Config.Identity as I exposing (..)
|
||||||
import Effect exposing (Effect)
|
import Effect exposing (Effect)
|
||||||
import Element as E exposing (..)
|
import Element as E exposing (..)
|
||||||
|
import Element.Events as Events
|
||||||
import Element.Background as B exposing (..)
|
import Element.Background as B exposing (..)
|
||||||
import Element.Border as D exposing (..)
|
import Element.Border as D exposing (..)
|
||||||
import Element.Font as F
|
import Element.Font as F
|
||||||
|
@ -180,6 +181,12 @@ desktopNavbar =
|
||||||
, F.color colourTheme.textLightGrey
|
, F.color colourTheme.textLightGrey
|
||||||
, F.size 17
|
, F.size 17
|
||||||
, spacing 8
|
, spacing 8
|
||||||
|
, paddingEach
|
||||||
|
{ top = 0
|
||||||
|
, right = 0
|
||||||
|
, bottom = 0
|
||||||
|
, left = 10
|
||||||
|
}
|
||||||
]
|
]
|
||||||
(desktopHomeButtonMaker
|
(desktopHomeButtonMaker
|
||||||
:: List.map desktopPagesButtonMaker
|
:: List.map desktopPagesButtonMaker
|
||||||
|
@ -440,7 +447,7 @@ desktopFooterIcons =
|
||||||
, spacing 20
|
, spacing 20
|
||||||
, paddingEach
|
, paddingEach
|
||||||
{ top = 25
|
{ top = 25
|
||||||
, bottom = 10
|
, bottom = 25
|
||||||
, left = 0
|
, left = 0
|
||||||
, right = 0
|
, right = 0
|
||||||
}
|
}
|
||||||
|
@ -507,7 +514,7 @@ footerImageMaker :
|
||||||
-> Element msg
|
-> Element msg
|
||||||
footerImageMaker config =
|
footerImageMaker config =
|
||||||
column [ centerX ]
|
column [ centerX ]
|
||||||
[ link []
|
[ newTabLink []
|
||||||
{ url = config.url
|
{ url = config.url
|
||||||
, label =
|
, label =
|
||||||
row []
|
row []
|
||||||
|
|
|
@ -19,7 +19,6 @@ import Html.Attributes as H exposing (style, title, wrap)
|
||||||
import Layouts
|
import Layouts
|
||||||
import List.Extra as L exposing (..)
|
import List.Extra as L exposing (..)
|
||||||
import Page exposing (Page)
|
import Page exposing (Page)
|
||||||
import Ports exposing (gotArgHeight)
|
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
import Shared
|
import Shared
|
||||||
import View exposing (View)
|
import View exposing (View)
|
||||||
|
|
|
@ -26,7 +26,6 @@ import Html.Attributes as H exposing (style, title, wrap)
|
||||||
import Layouts
|
import Layouts
|
||||||
import List.Extra as L exposing (..)
|
import List.Extra as L exposing (..)
|
||||||
import Page exposing (Page)
|
import Page exposing (Page)
|
||||||
import Ports exposing (gotArgHeight)
|
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
import Shared
|
import Shared
|
||||||
import View exposing (View)
|
import View exposing (View)
|
||||||
|
|
|
@ -1,7 +1,2 @@
|
||||||
port module Ports exposing (getArgHeight, gotArgHeight)
|
port module Ports exposing (..)
|
||||||
|
|
||||||
|
|
||||||
port getArgHeight : Int -> Cmd msg
|
|
||||||
|
|
||||||
|
|
||||||
port gotArgHeight : (List Int -> msg) -> Sub msg
|
|
||||||
|
|
|
@ -54,9 +54,10 @@ type alias Model =
|
||||||
|
|
||||||
init : Result Json.Decode.Error Flags -> Route () -> ( Model, Effect Msg )
|
init : Result Json.Decode.Error Flags -> Route () -> ( Model, Effect Msg )
|
||||||
init flagsResult route =
|
init flagsResult route =
|
||||||
( modelFromFlagsResult flagsResult
|
Debug.log "Debug: "
|
||||||
, Effect.none
|
( modelFromFlagsResult flagsResult
|
||||||
)
|
, Effect.none
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
modelFromFlagsResult : Result Error Flags -> Model
|
modelFromFlagsResult : Result Error Flags -> Model
|
||||||
|
@ -68,7 +69,11 @@ modelFromFlagsResult f =
|
||||||
, width = flags.width
|
, width = flags.width
|
||||||
}
|
}
|
||||||
|
|
||||||
Err _ ->
|
Err e ->
|
||||||
|
let
|
||||||
|
_ =
|
||||||
|
Debug.log "error" e
|
||||||
|
in
|
||||||
{ device =
|
{ device =
|
||||||
E.classifyDevice
|
E.classifyDevice
|
||||||
{ height = 0
|
{ height = 0
|
||||||
|
|
|
@ -1,32 +1,16 @@
|
||||||
// This is called BEFORE your Elm app starts up
|
// This is called BEFORE your Elm app starts up
|
||||||
//
|
//
|
||||||
// The value returned here will be passed as flags
|
// The value returned here will be passed as flags
|
||||||
// into your `Shared.init` function.
|
// into your `Shared.init` function.
|
||||||
export const flags = ({ env }) => {
|
export const flags = ({ env }) => {
|
||||||
return {
|
return {
|
||||||
height: window.innerHeight,
|
height: window.innerHeight,
|
||||||
width: window.innerWidth
|
width: window.innerWidth,
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
// This is called AFTER your Elm app starts up
|
// This is called AFTER your Elm app starts up
|
||||||
//
|
//
|
||||||
// Here you can work with `app.ports` to send messages
|
// Here you can work with `app.ports` to send messages
|
||||||
// to your Elm application, or subscribe to incoming
|
// to your Elm application, or subscribe to incoming
|
||||||
// messages from Elm
|
// messages from Elm
|
||||||
export const onReady = ({ app, env }) => {
|
export const onReady = ({ app, env }) => {};
|
||||||
app.ports.getArgHeight.subscribe((numArgs) => {
|
|
||||||
const heights = [];
|
|
||||||
for (let i = 0; i < numArgs; i++) {
|
|
||||||
const element = document.getElementById(`arg${i}`);
|
|
||||||
if (element) {
|
|
||||||
heights.push(element.offsetHeight);
|
|
||||||
} else {
|
|
||||||
console.error(`Element with ID 'arg${i}' not found.`);
|
|
||||||
heights.push(null); // Add null or any placeholder for missing elements
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
app.ports.gotArgHeight.send(heights);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 96 KiB |
BIN
frontend/static/navbar/nutridex-dark.png
Executable file → Normal file
BIN
frontend/static/navbar/nutridex-dark.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 93 KiB |
BIN
frontend/static/navbar/nutridex.png
Executable file → Normal file
BIN
frontend/static/navbar/nutridex.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 91 KiB |
Loading…
Add table
Add a link
Reference in a new issue