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
|
||||
[ E.width fill
|
||||
, E.alignLeft
|
||||
, paddingEach
|
||||
{ top = 0
|
||||
, right = 0
|
||||
, bottom = 0
|
||||
, left = 10
|
||||
}
|
||||
]
|
||||
|
|
|
@ -88,6 +88,7 @@ argumentMaker argument =
|
|||
, summaryMakerDesktop argument
|
||||
, strengthMakerDesktop argument
|
||||
, tableMaker argument
|
||||
, formalizationMaker argument
|
||||
, proofTreeMaker argument
|
||||
]
|
||||
]
|
||||
|
@ -113,6 +114,7 @@ argumentMakerMobile argument =
|
|||
, summaryMakerMobile argument
|
||||
, strengthMakerMobile argument
|
||||
, tableMaker argument
|
||||
, formalizationMaker argument
|
||||
, proofTreeMaker argument
|
||||
]
|
||||
]
|
||||
|
@ -336,7 +338,17 @@ strengthMaker =
|
|||
[ tooltip
|
||||
"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 ]
|
||||
]
|
||||
]
|
||||
|
@ -394,7 +406,7 @@ tableMaker argument =
|
|||
[ centerX
|
||||
, E.width fill
|
||||
]
|
||||
([ wrappedRow
|
||||
[ wrappedRow
|
||||
(paragraphBoldFormat
|
||||
++ [ E.alignLeft
|
||||
, E.width fill
|
||||
|
@ -486,11 +498,9 @@ tableMaker argument =
|
|||
}
|
||||
]
|
||||
]
|
||||
++ formalizationMaker argument
|
||||
)
|
||||
|
||||
|
||||
formalizationMaker : Argument -> List (Element msg)
|
||||
formalizationMaker : Argument -> Element msg
|
||||
formalizationMaker argument =
|
||||
let
|
||||
argumentFormatting : List (Attribute msg)
|
||||
|
@ -501,14 +511,20 @@ formalizationMaker argument =
|
|||
, E.width fill
|
||||
]
|
||||
in
|
||||
List.indexedMap
|
||||
column
|
||||
[ centerX
|
||||
, E.width fill
|
||||
, spacing 10
|
||||
]
|
||||
(List.indexedMap
|
||||
(\index argumentEntry ->
|
||||
column
|
||||
(paragraphFormat
|
||||
++ [ spacing 3
|
||||
, centerX
|
||||
, E.width fill
|
||||
, paddingXY 35 10
|
||||
, paddingXY 0 10
|
||||
, explain Debug.todo
|
||||
]
|
||||
)
|
||||
(List.indexedMap
|
||||
|
@ -530,9 +546,13 @@ formalizationMaker argument =
|
|||
}
|
||||
]
|
||||
]
|
||||
, paragraph argumentFormatting
|
||||
, paragraph
|
||||
(argumentFormatting
|
||||
++ [ F.color colourTheme.textLightOrange
|
||||
, F.bold
|
||||
]
|
||||
)
|
||||
[ text ("(" ++ premiseWithNotation.notation ++ ")")
|
||||
|> el [ F.color colourTheme.textLightOrange, F.bold ]
|
||||
]
|
||||
]
|
||||
)
|
||||
|
@ -554,18 +574,20 @@ formalizationMaker argument =
|
|||
}
|
||||
]
|
||||
]
|
||||
, paragraph argumentFormatting
|
||||
[ text ("(∴" ++ argumentEntry.conclusionNotation ++ ")")
|
||||
|> el
|
||||
[ F.color colourTheme.textLightOrange
|
||||
, paragraph
|
||||
(argumentFormatting
|
||||
++ [ F.color colourTheme.textLightOrange
|
||||
, F.bold
|
||||
]
|
||||
)
|
||||
[ text ("(∴" ++ argumentEntry.conclusionNotation ++ ")")
|
||||
]
|
||||
]
|
||||
]
|
||||
)
|
||||
)
|
||||
argument.argumentFormalization
|
||||
)
|
||||
|
||||
|
||||
proofTreeMaker : Argument -> Element msg
|
||||
|
|
|
@ -22,5 +22,13 @@ cuckTroKalayjian =
|
|||
, dodgeNicksDoxasticState = Just Belief
|
||||
, 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
|
||||
]
|
||||
)
|
||||
[ domainList gibberish ]
|
||||
[ desktopDomainList gibberish ]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
@ -73,7 +73,7 @@ gibberishMakerMobile gibberish =
|
|||
]
|
||||
)
|
||||
[ cardImageMakerMobile (gibberishImage gibberish)
|
||||
, domainList gibberish
|
||||
, mobileDomainList gibberish
|
||||
]
|
||||
]
|
||||
]
|
||||
|
@ -94,20 +94,32 @@ gibberishTitle gibberish =
|
|||
gibberish.gibberishTitle
|
||||
|
||||
|
||||
domainList : Gibberish -> Element msg
|
||||
domainList gibberish =
|
||||
desktopDomainList : Gibberish -> Element msg
|
||||
desktopDomainList gibberish =
|
||||
column
|
||||
[ spacing 8
|
||||
, E.width fill
|
||||
]
|
||||
<|
|
||||
List.map2 (\x y -> makeTerms x y)
|
||||
List.map2 (\x y -> desktopMakeTerms x y)
|
||||
gibberish.gibberishTerms
|
||||
(List.range 1 (List.length gibberish.gibberishTerms))
|
||||
|
||||
|
||||
makeTerms : Terms -> Int -> Element msg
|
||||
makeTerms terms index =
|
||||
mobileDomainList : Gibberish -> Element msg
|
||||
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
|
||||
(paragraphAlignLeft
|
||||
++ [ spacing 8
|
||||
|
@ -144,7 +156,128 @@ makeTerms terms index =
|
|||
[ el [ F.color colourTheme.textLightOrange ] <|
|
||||
text terms.term
|
||||
]
|
||||
, row
|
||||
, desktopBar 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
|
||||
)
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
]
|
||||
|
@ -169,24 +302,6 @@ makeTerms terms index =
|
|||
, barPadding
|
||||
[ barMaker getIntelligibilityTooltip terms.strength ]
|
||||
]
|
||||
, 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
|
||||
)
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
getIntelligibilityTooltip : Int -> String
|
||||
|
|
|
@ -231,7 +231,17 @@ preferenceMaker donate =
|
|||
[ tooltip
|
||||
"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
|
||||
|
|
|
@ -189,7 +189,17 @@ experienceMaker appearanceEntry =
|
|||
[ tooltip
|
||||
"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
|
||||
|
|
|
@ -5,6 +5,7 @@ import Config.Format as O exposing (..)
|
|||
import Config.Identity as I exposing (..)
|
||||
import Effect exposing (Effect)
|
||||
import Element as E exposing (..)
|
||||
import Element.Events as Events
|
||||
import Element.Background as B exposing (..)
|
||||
import Element.Border as D exposing (..)
|
||||
import Element.Font as F
|
||||
|
@ -180,6 +181,12 @@ desktopNavbar =
|
|||
, F.color colourTheme.textLightGrey
|
||||
, F.size 17
|
||||
, spacing 8
|
||||
, paddingEach
|
||||
{ top = 0
|
||||
, right = 0
|
||||
, bottom = 0
|
||||
, left = 10
|
||||
}
|
||||
]
|
||||
(desktopHomeButtonMaker
|
||||
:: List.map desktopPagesButtonMaker
|
||||
|
@ -440,7 +447,7 @@ desktopFooterIcons =
|
|||
, spacing 20
|
||||
, paddingEach
|
||||
{ top = 25
|
||||
, bottom = 10
|
||||
, bottom = 25
|
||||
, left = 0
|
||||
, right = 0
|
||||
}
|
||||
|
@ -507,7 +514,7 @@ footerImageMaker :
|
|||
-> Element msg
|
||||
footerImageMaker config =
|
||||
column [ centerX ]
|
||||
[ link []
|
||||
[ newTabLink []
|
||||
{ url = config.url
|
||||
, label =
|
||||
row []
|
||||
|
|
|
@ -19,7 +19,6 @@ import Html.Attributes as H exposing (style, title, wrap)
|
|||
import Layouts
|
||||
import List.Extra as L exposing (..)
|
||||
import Page exposing (Page)
|
||||
import Ports exposing (gotArgHeight)
|
||||
import Route exposing (Route)
|
||||
import Shared
|
||||
import View exposing (View)
|
||||
|
|
|
@ -26,7 +26,6 @@ import Html.Attributes as H exposing (style, title, wrap)
|
|||
import Layouts
|
||||
import List.Extra as L exposing (..)
|
||||
import Page exposing (Page)
|
||||
import Ports exposing (gotArgHeight)
|
||||
import Route exposing (Route)
|
||||
import Shared
|
||||
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,6 +54,7 @@ type alias Model =
|
|||
|
||||
init : Result Json.Decode.Error Flags -> Route () -> ( Model, Effect Msg )
|
||||
init flagsResult route =
|
||||
Debug.log "Debug: "
|
||||
( modelFromFlagsResult flagsResult
|
||||
, Effect.none
|
||||
)
|
||||
|
@ -68,7 +69,11 @@ modelFromFlagsResult f =
|
|||
, width = flags.width
|
||||
}
|
||||
|
||||
Err _ ->
|
||||
Err e ->
|
||||
let
|
||||
_ =
|
||||
Debug.log "error" e
|
||||
in
|
||||
{ device =
|
||||
E.classifyDevice
|
||||
{ height = 0
|
||||
|
|
|
@ -5,28 +5,12 @@
|
|||
export const flags = ({ env }) => {
|
||||
return {
|
||||
height: window.innerHeight,
|
||||
width: window.innerWidth
|
||||
}
|
||||
}
|
||||
width: window.innerWidth,
|
||||
};
|
||||
};
|
||||
// This is called AFTER your Elm app starts up
|
||||
//
|
||||
// Here you can work with `app.ports` to send messages
|
||||
// to your Elm application, or subscribe to incoming
|
||||
// messages from Elm
|
||||
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);
|
||||
});
|
||||
};
|
||||
|
||||
export const onReady = ({ app, env }) => {};
|
||||
|
|
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