mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
chore: push for isaac
This commit is contained in:
parent
a5151ef112
commit
45ca7a9718
62 changed files with 385 additions and 55 deletions
|
@ -13,7 +13,9 @@ type alias Theme =
|
|||
, highlightTextHover : Color
|
||||
, backgroundColour : Color
|
||||
, debugColour : Color
|
||||
, darker : Color
|
||||
, cardBackground : Color
|
||||
, barGreen : Color
|
||||
, barRed : Color
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,5 +27,7 @@ colourTheme =
|
|||
, highlightTextHover = rgb255 120 60 0
|
||||
, backgroundColour = rgb255 40 40 40
|
||||
, debugColour = rgb255 227 28 121
|
||||
, darker = rgb255 30 30 30
|
||||
, cardBackground = rgb255 30 30 30
|
||||
, barGreen = rgb255 0 102 0
|
||||
, barRed = rgb255 102 0 0
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ argumentAbortion =
|
|||
, propositionReductio = ""
|
||||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~2Q~5R),(P),(Q),((R~1F~1~3H)~5M),(F),(~3H),(M~5~3W)%7C=(~3W)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "one consents to becoming pregnant"
|
||||
|
|
|
@ -10,7 +10,7 @@ argumentAgnosticism =
|
|||
, propositionReductio = ""
|
||||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x~6y(~3Pxy~5~3Qxy)),(~6x~6y(~3Qxy~5Rxy)),(~3Por)|=(Ror)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x,y)"
|
||||
, definiens = "(x) can unpack what evidence would lead them to change their doxastic attitude on (y)"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentAgriculturalPredation =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x~6y~6z(Px~4Qxyz~1(Rxyz~2Sxyz)~1Wxyz)),(Qahl),(Rahl~2Sahl),(Wahl)%7C=(Pa)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) counts as predation"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentAnabolicKeto =
|
|||
, propositionSummary = "A higher proportion of amino acids are spent on gluconeogenesis while on ketogenic diets, reducing the amount available for hypertrophy. This likely costs anabolic potential on ketogenic diets compared to non-ketogenic diets."
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5Q),(P),(Q~5R)|=(R)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "a higher proportion of amino acids are spent on gluconeogenesis while on ketogenic diets compared to non-ketogenic diets"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentAnimalRights =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5~3Qx)),(~3Pa~5~7t(Rta~5(Rth~5~3Ph))),(~3~7t(Rta~5(Rth~5~3Ph))),(Pa)|=(~3Qa)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) has moral worth"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentAntagonisticPleiotropy =
|
|||
, propositionSummary = "Humans have more genetic adaptations to ancestral foods than novel foods, which makes the long-term negative consequences of antagonistic pleiotropy a greater concern for ancestral foods."
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5Q),(Q~5R),(P)|=(R)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "humans have more genetic adaptations to ancestral foods than novel foods"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentAntiRewilding =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5~3Qx)),(Pa),(~3Qa~5~3R),(~3R~5Sa)|=(Sa)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) has negative rights"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentAntiVandalism =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5Q),(P),(Q~5R)%7C=(R)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "zoos must spend extra money cleaning graffiti"
|
||||
|
|
|
@ -10,6 +10,7 @@ argumentApoBCVD =
|
|||
, propositionReductio = ""
|
||||
, propositionSummary = "ApoB-containing lipoproteins consistently and proportionately associate with increased plaque volume after controlling for relevant confounders, which satisfies the conditions outlined for an exposure to cause atherosclerosis."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(Qw)|=(Pw)"
|
||||
, argumentCertainty = 9
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) dose-dependently causes atherosclerosis"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentBoobyTrapPagers =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4(Qx~1Rx~1Sx))),(Qp),(Rp),(~3Sp)|=(~3Pp)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is a booby-trap"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentCarbsObesity =
|
|||
, propositionSummary = "There are a number of predictions made from the hypothesis that carbohydrates uniquely cause obesity. One of those predictions is that obesity would track with carbohydrate intake, but it doesn't"
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5Q),(~3Q)|=(~3P)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "carbs uniquely cause fat accumulation or obesity"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentColonizingNature =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~1~3Q~1~3R~1~3S~5W),(P),(~3Q),(~3R),(~3S)%7C=(W)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "the natural world contains intolerable rights violations"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentCropDeaths =
|
|||
, propositionSummary = "We can't claim to know that cropland kills more animals than wildland, because if we did know this, there would be evidence for it, and there isn't any such evidence."
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5Q),(~3Q)%7C=(~3P)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "it is known that cropland leads to more animal death than wildland"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentDairyCowRape =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x~6y(Px~4(Qxy~1~3Ryx))),(Qae),(~3Rea)|=(Pa)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) qualifies as rape"
|
||||
|
|
|
@ -10,6 +10,7 @@ argumentDietaryCholesterol =
|
|||
, propositionReductio = ""
|
||||
, propositionSummary = "LDL causally associates with heart disease in a linear and proportional manner, and in all cases exposures that durably increase LDL over time produce likewise increases in heart disease risk. Dietary cholesterol is one such exposure."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5Qx)),(Pd)|=(Qd)"
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "consuming high amounts of (x) increases LDL"
|
||||
|
|
|
@ -10,6 +10,7 @@ argumentEfilismPatrolSquad =
|
|||
, propositionReductio = "Efilists fundamentally believe that sentient life is inherently characterized by suffering and that the most ethical action is to prevent the creation of any new sentient beings, ultimately aiming to completely eliminate all conscious life in the universe to end suffering permanently."
|
||||
, propositionSummary = "If efilists follow their own logic to its ultimate conclusion, they would paradoxically be committed to a form of pragmatic natalism - the very opposite of their core philosophical stance."
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5Q),(~3Q),(~3P~1R~5~3S),(R),(~3S~5W)|=(W)"
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "humans abstaining from procreation maximally reduces rights violations"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentEpidemiologyCausality =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5Qx)),(Pe)|=(Qe)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) consistently identifies associations that are later confirmed by randomized controlled trials"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentEthicalSlurs =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(~6x(~3Px~5Rx)),(~3Pr),(~3Qr~1Rr~5Sr),(Sr~5Wr)|=(Wr)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x)'s negative connotations have been neutralised"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentFineTuning =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5Qx)),(Pg),(Qg~5R)%7C=(R)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is finely tuned"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentFlatEarthDebunk =
|
|||
, propositionSummary = "The argument is structured to demonstrate that, within the context of a flat Earth model, if the stars are perceived as rotating counter-clockwise from the center, they cannot also be perceived as rotating clockwise from any point on the Earth."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x~6y~6z(Pxy~5(Qyz~5Rxz))),(Pkt~1Qta),(Rka~5~3Ska)|=(~3Ska)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x,y)"
|
||||
, definiens = "(x) is perceived as rotating counter-clockwise from point (y)"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentFructoseNAFLD =
|
|||
, propositionSummary = "Experimental investigations into fructose overfeeding have consistently failed to produce a fatty liver phenotype in humans. This suggests that fructose, contrary to popular belief in some domains, does not uniquely cause fatty liver disease."
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5~3Q),(P)|=(~3Q)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "experimental investigations into fructose overfeeding consistently fail to recreate a fatty liver phenotype in humans"
|
||||
|
|
|
@ -10,6 +10,7 @@ argumentHealthPromotingFoods =
|
|||
, propositionSummary = "Given that food is, by its very definition, material that provides essential nutrients and energy to sustain bodily functions and growth, it follows that anything classified as food must be inherently health-promoting by its very nature."
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5Q),(P)|=(Q)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "food is defined as material consisting essentially of protein, carbohydrate, and/or fat used in the body of an organism to sustain growth, repair, and vital processes and to furnish energy"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentHealthSeeker =
|
|||
, propositionSummary = "If someone values consuming ancestral foods over novel foods because they have the overall value of reducing disease risk, but a novel food reduces disease risk when replacing an ancestral food, they would be acting against their values by rejecting the novel food."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~7x(Px)~1~7y(Qy)~5~6x~6y(~3Rxy~5Sx)),(~7x(Px)),(~7y(Qy))|=(~6x~6y(~3Rxy~5Sx))"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) favours consuming ancestral foods to the exclusion of (y) because they value reducing disease risk"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentHealthyChocolate =
|
|||
, propositionSummary = "Despite chocolate containing high amounts of saturated fat, populations that consume more chocolate do not exhibit higher rates of atherosclerosis, suggesting that chocolate does not have the same effect on heart disease risk as most other saturated fat sources."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5Qx)),(~3Qc)|=(~3Pc)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) causes atherosclerosis"
|
||||
|
|
|
@ -10,6 +10,7 @@ argumentHealthyDairy =
|
|||
, propositionSummary = "The diet-heart hypothesis would predict that populations consuming more dairy foods should have higher rates of the disease. However, even when you account for factors that could plausibly influence the results, non-churned, non-homogenized dairy have been shown to consistently reduce the risk of morbidity and mortality, strongly suggesting that they directly contribute to better health outcomes, particularly with respect to cardiovascular disease and colorectal cancer."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5Qx)),(~3Qh)|=(~3Ph)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) causes atherosclerosis"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentHealthyFattyFish =
|
|||
, propositionSummary = "Even when you account for factors that could plausibly influence the results, fatty fish have been shown to consistently reduce the risk of morbidity and mortality, strongly suggesting that they directly contribute to better health outcomes, particularly with respect to cardiovascular disease."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(Qf)|=(Pf)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is overwhelmingly healthy"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentHealthyFibre =
|
|||
, propositionSummary = "Even when you account for factors that could plausibly influence the results, both refined and whole fibre have been shown to consistently reduce the risk of morbidity and mortality, strongly suggesting that they directly contribute to better health outcomes, particularly with respect to cardiovascular disease."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(Qb)|=(Pb)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is overwhelmingly healthy"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentHealthyFood =
|
|||
, propositionSummary = "A food is considered healthier than another in a specific context if it increases the time before illness or disease sets in when replacing the other food. On a desert island, since Pepsi can extend the time before starvation compared to leafy greens, it is considered healthier than leafy greens in that context."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x~6y~6z~6w(Pxyw~4Qwxzy)),(Qdpsl)|=(Ppld)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x,y,w)"
|
||||
, definiens = "(x) is healthy compared to (w) when in (y)"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentHealthyPlantFoods =
|
|||
, propositionSummary = "Since whole plant foods consistently consistently associate with reduced risk of illness and death, it is reasonable to conclude that whole plant foods are overwhelmingly healthy."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(Qf)|=(Pf)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is overwhelmingly healthy"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentHealthySeedOils =
|
|||
, propositionSummary = "Even when you account for factors that could plausibly influence the results, non-hydrogenated vegetable oils have been shown to consistently reduce the risk of morbidity and mortality, strongly suggesting that they directly contribute to better health outcomes."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5Qx)),(Pv)|=(Qv)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is overwhelmingly healthy"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentHealthySoy =
|
|||
, propositionSummary = "Even when you account for factors that could plausibly influence the results, non-hydrogenated soy products have been shown to consistently reduce the risk of morbidity and mortality, strongly suggesting that they directly contribute to better health outcomes, particularly with respect to cardiovascular disease."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(Qs)|=(Ps)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is overwhelmingly healthy"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentImmortalityReductio =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x~6y(Hx~5~3Rxy)),(Hs)%7C=(~3Rsd)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "humans undergo (x)"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentMalondialdehyde =
|
|||
, propositionSummary = "If one takes the view that in order for a substance to increase the risk of atherosclerosis, it must facilitate the oxidative modification of LDL particles via malondialdehyde production, and one also affirms that omega-3s are anti-atherogenic, then this would imply that all fatty acids that produce malondialdehyde, including omega-3s, must also be atherogenic, which contradicts the their belief that omega-3s are heart-healthy."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(Qm),(Pm~5~6x(Rx))%7C=(Ro)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) increases the risk of atherosclerosis"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentOddOrderPredators =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~5~3Qx)),(Pa),(~3Qa~5R)%7C=(R)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) has negative rights"
|
||||
|
|
|
@ -10,6 +10,7 @@ argumentOmega3Omega6Ratio =
|
|||
, propositionSummary = "More often than not, the associated risks of a high omega-6/omega-3 ratio are better explained by omega-3 alone. In multivariable analyses, the ratio looks like it matters, but in univariable anaylses, low omega-3 is almost always driving the risk via lowering the denominator."
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5Q),(~3Q)|=(~3P)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "increases or decreases in disease risk associated with a high or low omega-6/omega-3 ratio are better explained by changes in omega-3 alone"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentOstroveganism =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx~1Rx~1(Sx~2Wx))),(Qc~1~3Rc~1Sc~1~3Wc),(~3Pc~5~6x(~3Tx))|=(~3Tb)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) counts as a brain"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentPlantBasedCVDReversal =
|
|||
, propositionSummary = "To date, there is not a single case of supposed heart disease reversal from a plant-based diet that is actually compatible with established definitions of heart disease reversal in the literature."
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~1~3Q~5~3R),(P),(~3Q)|=(~3R)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "there are established definitions for atherosclerosis reversal in the domain of cardiology"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentPollinationReductio =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4~3Qx)),(Qb),(~3Pb~5~6y(~3Ry))|=(~3Ra)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is vegan"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentPolyphenolReductio =
|
|||
, propositionSummary = "If one is committed to the notions that polyphenols in plants are bad for humans, and that grass-fed red meat is the healthiest available type of red meat, then they're pragmatically committed to being pro-GMO to lower the grass-derived polyphenol content of grass-fed beef."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x~6y(Px~1Qxy~5Rxy)),(Pp),(Qpg),(Rpg~5Spg),(Spg~5Wp)|=(Wp)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is harmful"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentScratcherPioneers =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx~2Rx~2Sx)),(Qt),(Rt),(St)%7C=(Pt)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is a scratcher"
|
||||
|
|
|
@ -10,6 +10,7 @@ argumentSodiumCVD =
|
|||
, propositionSummary = "In all of the strongest analysis on the relationship between sodium intake and cardiovascular disease risk, there is a linear and proportional relationship. Particularly when the strongest measurement methods are used, such as multiple 24-hour urinary collections."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~1Q~5Rx)),(Ps),(Q)|=(Rs)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) consistently raises blood pressure in controlled studies"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentTMAOCausality =
|
|||
, propositionSummary = "In the strongest research we have on the relationship between TMAO and heart disease risk, such as with Mendelian randomization and genome-wide associational studies, there is no persuasive causal link between TMAO in the blood and heart disease risk."
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(~3Qt)|=(~3Pt)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is likely to be causative of heart diseas"
|
||||
|
|
|
@ -10,6 +10,7 @@ argument =
|
|||
, propositionReductio = ""
|
||||
, propositionSummary = ""
|
||||
, proofLink = ""
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = ""
|
||||
, definiens = ""
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentTransPeople =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Rx~1Wx)),(~6x(Qx~4Sx~1Wx)),(Ra~1Wa),(Sg~1Wg)|=(Pa~1Qg)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "Male"
|
||||
, definiens = "the cluster of traits that associate with small, but not large, gametes."
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentTruncatedMeta =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(P~5Q),(P)%7C=(Q)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "underpowered studies provide weaker causal estimates than adequately powered studies"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentUnhealthyCoconutOil =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~1Qx~5~3Rx)),(Pc),(Qc)|=(~3Rc)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P"
|
||||
, definiens = "a given (x) increases LDL-C at a similar rate to other saturated fat sources"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentUnhealthyProcessedMeat =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(Qs)|=(Ps)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is overwhelmingly unhealthy"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentUnhealthyRedMeat =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(Qm)|=(Pm)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is overwhelmingly unhealthy"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentUnhealthySaturatedFat =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4Qx)),(Qf)|=(Pf)"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "(x) is overwhelmingly unhealthy"
|
||||
|
|
|
@ -11,6 +11,7 @@ argumentVeganSocietyReductio =
|
|||
, propositionSummary = "Summary"
|
||||
, proofLink = "https://www.umsu.de/trees/#(~6x(Px~4~3Qx)),(~6x~6y(~3Rx~5~3Q(e(y)))),(~3Rg)%7C=(P(e(g)))"
|
||||
|
||||
, argumentCertainty = 1
|
||||
, definitionTable =
|
||||
[ { definiendum = "P(x)"
|
||||
, definiens = "it is vegan to do (x)"
|
||||
|
|
|
@ -13,7 +13,7 @@ import Element.Background as B exposing (..)
|
|||
import Element.Border as D exposing (..)
|
||||
import Element.Events as V exposing (..)
|
||||
import Element.Font as F exposing (..)
|
||||
import Html.Attributes exposing (form)
|
||||
import Html.Attributes exposing (form, id)
|
||||
import Layouts
|
||||
import List.Extra exposing (..)
|
||||
import Maybe exposing (withDefault)
|
||||
|
@ -35,46 +35,47 @@ import View exposing (View)
|
|||
-- )
|
||||
|
||||
|
||||
argumentMaker : (Int -> msg) -> List Bool -> Argument -> Int -> Element msg
|
||||
argumentMaker onClickMsg areArgsExpanded argument indexExpand =
|
||||
argumentMaker : (Int -> msg) -> List Int -> Argument -> Int -> Element msg
|
||||
argumentMaker onClickMsg argHeights argument indexExpand =
|
||||
let
|
||||
isArgumentExpanded : Bool
|
||||
isArgumentExpanded : Int
|
||||
isArgumentExpanded =
|
||||
withDefault False <| getAt indexExpand areArgsExpanded
|
||||
withDefault 0 <| getAt indexExpand argHeights
|
||||
in
|
||||
column
|
||||
[ B.color colourTheme.darker
|
||||
[ B.color colourTheme.cardBackground
|
||||
, rounded 10
|
||||
, E.width <| px 700
|
||||
, E.htmlAttribute (id <| "arg" ++ String.fromInt indexExpand)
|
||||
]
|
||||
[ titleMaker onClickMsg indexExpand argument.argumentTitle isArgumentExpanded
|
||||
, column
|
||||
([ E.width <| px 600, centerX, transitionStyle, spacing 10 ]
|
||||
++ (if not isArgumentExpanded then
|
||||
[ transitionStyle
|
||||
, height <| px 0
|
||||
, roundEach { topLeft = 0, topRight = 0, bottomRight = 10, bottomLeft = 10 }
|
||||
, clip
|
||||
]
|
||||
|
||||
else
|
||||
[ transitionStyle
|
||||
, height <| px 800
|
||||
, clip
|
||||
]
|
||||
)
|
||||
-- ++ (if not isArgumentExpanded then
|
||||
-- [ transitionStyle
|
||||
-- -- , height <| px 0
|
||||
-- , roundEach { topLeft = 0, topRight = 0, bottomRight = 10, bottomLeft = 10 }
|
||||
-- , clip
|
||||
-- ]
|
||||
-- else
|
||||
-- [ transitionStyle
|
||||
-- , height <| px 300
|
||||
-- , clip
|
||||
-- ]
|
||||
-- )
|
||||
)
|
||||
[ propositionMaker argument isArgumentExpanded
|
||||
, reductioMaker argument isArgumentExpanded
|
||||
, summaryMaker argument isArgumentExpanded
|
||||
, strengthMaker argument isArgumentExpanded
|
||||
, tableMaker argument isArgumentExpanded
|
||||
, proofTreeMaker argument isArgumentExpanded
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
titleMaker : (Int -> msg) -> Int -> String -> Bool -> Element msg
|
||||
titleMaker onClickMsg indexExpand title isArgumentExpanded =
|
||||
titleMaker : (Int -> msg) -> Int -> String -> Int -> Element msg
|
||||
titleMaker onClickMsg indexExpand title argHeight =
|
||||
paragraph
|
||||
(paragraphBoldFormat
|
||||
++ [ F.size 20
|
||||
|
@ -94,7 +95,7 @@ titleMaker onClickMsg indexExpand title isArgumentExpanded =
|
|||
]
|
||||
, V.onClick <| onClickMsg indexExpand
|
||||
]
|
||||
++ (if not isArgumentExpanded then
|
||||
++ (if argHeight == 30 then
|
||||
[ rounded 10 ]
|
||||
|
||||
else
|
||||
|
@ -105,22 +106,37 @@ titleMaker onClickMsg indexExpand title isArgumentExpanded =
|
|||
]
|
||||
|
||||
|
||||
propositionMaker : Argument -> Bool -> Element msg
|
||||
propositionMaker argument isArgumentExpanded =
|
||||
row [ paddingEach { top = 10, right = 0, bottom = 0, left = 0 } ]
|
||||
propositionMaker : Argument -> Int -> Element msg
|
||||
propositionMaker argument argHeight =
|
||||
row
|
||||
[ paddingEach { top = 10, right = 0, bottom = 0, left = 0 }
|
||||
]
|
||||
[ column
|
||||
[ E.alignTop, E.alignLeft ]
|
||||
[ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ])
|
||||
[ paragraph
|
||||
(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 ] ]
|
||||
]
|
||||
, column
|
||||
[ E.width fill, E.alignLeft ]
|
||||
[ paragraph (paragraphBoldFormat ++ [ F.size 18 ]) [ text argument.propositionTitle |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ]
|
||||
[ paragraph (paragraphBoldFormat ++ [ F.size 18 ])
|
||||
[ text argument.propositionTitle
|
||||
|> el
|
||||
[ F.color colourTheme.nonHighlightedText
|
||||
, F.regular
|
||||
, F.size 16
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
reductioMaker : Argument -> Bool -> Element msg
|
||||
reductioMaker argument isArgumentExpanded =
|
||||
reductioMaker : Argument -> Int -> Element msg
|
||||
reductioMaker argument argHeight =
|
||||
case argument.propositionReductio of
|
||||
"" ->
|
||||
none
|
||||
|
@ -140,8 +156,8 @@ reductioMaker argument isArgumentExpanded =
|
|||
]
|
||||
|
||||
|
||||
summaryMaker : Argument -> Bool -> Element msg
|
||||
summaryMaker argument isArgumentExpanded =
|
||||
summaryMaker : Argument -> Int -> Element msg
|
||||
summaryMaker argument argHeight =
|
||||
row []
|
||||
[ column
|
||||
[ E.alignTop, E.alignLeft ]
|
||||
|
@ -151,12 +167,99 @@ summaryMaker argument isArgumentExpanded =
|
|||
]
|
||||
, column
|
||||
[ E.width fill, E.alignLeft ]
|
||||
[ paragraph (paragraphBoldFormat ++ [ F.size 18, spacing 3 ]) [ text argument.propositionSummary |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ]
|
||||
[ paragraph
|
||||
(paragraphBoldFormat
|
||||
++ [ F.size 18
|
||||
, spacing 3
|
||||
]
|
||||
)
|
||||
[ text argument.propositionSummary
|
||||
|> el
|
||||
[ F.color colourTheme.nonHighlightedText
|
||||
, F.regular
|
||||
, F.size 16
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
tableMaker : Argument -> Bool -> Element msg
|
||||
tableMaker argument isArgumentExpanded =
|
||||
strengthMaker : Argument -> Int -> Element msg
|
||||
strengthMaker argument argHeight =
|
||||
let
|
||||
barMaker : Int -> Element msg
|
||||
barMaker num =
|
||||
el
|
||||
[ E.height <| px 12
|
||||
, E.width <| px 500
|
||||
, D.rounded 10
|
||||
, D.color colourTheme.nonHighlightedDarkText
|
||||
, D.width 2
|
||||
, B.gradient
|
||||
{ angle = 90
|
||||
, steps =
|
||||
List.concat
|
||||
[ List.repeat num colourTheme.barGreen
|
||||
, List.repeat (10 - num) colourTheme.barRed
|
||||
]
|
||||
}
|
||||
, tooltip below (myTooltip (getConfidenceTooltip num))
|
||||
]
|
||||
none
|
||||
|
||||
getConfidenceTooltip : Int -> String
|
||||
getConfidenceTooltip num =
|
||||
case num of
|
||||
0 ->
|
||||
"Extremely low. Speculative reasoning."
|
||||
|
||||
1 ->
|
||||
"Very low. Extremely weak reasoning."
|
||||
|
||||
2 ->
|
||||
"Kinda low. Weak reasoning."
|
||||
|
||||
3 ->
|
||||
"Low. Somewhat weak reasoning."
|
||||
|
||||
4 ->
|
||||
"Below average. More weak than strong."
|
||||
|
||||
5 ->
|
||||
"Moderate. OK reasoning."
|
||||
|
||||
6 ->
|
||||
"Above average. More strong than weak."
|
||||
|
||||
7 ->
|
||||
"High. Somewhat strong reasoning."
|
||||
|
||||
8 ->
|
||||
"Kinda high. Robust reasoning."
|
||||
|
||||
9 ->
|
||||
"Very high. Extremely robust reasoning."
|
||||
|
||||
10 ->
|
||||
"Extremely high. Air tight reasoning."
|
||||
|
||||
_ ->
|
||||
"Confidence level out of expected range."
|
||||
in
|
||||
row [ paddingEach { top = 10, right = 0, bottom = 0, left = 0 } ]
|
||||
[ column
|
||||
[ E.alignTop, E.alignLeft ]
|
||||
[ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ])
|
||||
[ el [ tooltip below (myTooltip "This represents my confidence in the soundness of the argument.") ] (text "Confidence:") |> el [ F.color colourTheme.highlightText ] ]
|
||||
]
|
||||
, column
|
||||
[ E.width fill, E.alignLeft, centerY ]
|
||||
[ barMaker argument.argumentCertainty ]
|
||||
]
|
||||
|
||||
|
||||
tableMaker : Argument -> Int -> Element msg
|
||||
tableMaker argument argHeight =
|
||||
let
|
||||
formalizationMaker : List (Element msg)
|
||||
formalizationMaker =
|
||||
|
@ -265,8 +368,8 @@ tableMaker argument isArgumentExpanded =
|
|||
]
|
||||
|
||||
|
||||
proofTreeMaker : Argument -> Bool -> Element msg
|
||||
proofTreeMaker argument isArgumentExpanded =
|
||||
proofTreeMaker : Argument -> Int -> Element msg
|
||||
proofTreeMaker argument argHeight =
|
||||
row [ paddingEach { top = 10, right = 0, bottom = 10, left = 0 }, centerX, E.width fill ]
|
||||
[ column [ E.alignRight ]
|
||||
[ newTabLink
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module Debate.Types exposing (..)
|
||||
|
||||
|
||||
type alias Argument =
|
||||
{ argumentTitle : String
|
||||
, propositionTitle : String
|
||||
|
@ -7,6 +8,7 @@ type alias Argument =
|
|||
, propositionReductio : String
|
||||
, proofLink : String
|
||||
, definitionTable : List Definition
|
||||
, argumentCertainty : Int
|
||||
, argumentFormalization : List ArgumentEntry
|
||||
}
|
||||
|
||||
|
|
0
frontend/src/Hashtags/Helpers.elm
Normal file → Executable file
0
frontend/src/Hashtags/Helpers.elm
Normal file → Executable file
0
frontend/src/Hashtags/Types.elm
Normal file → Executable file
0
frontend/src/Hashtags/Types.elm
Normal file → Executable file
|
@ -64,6 +64,7 @@ import Html.Attributes as H exposing (style, title, wrap)
|
|||
import Layouts
|
||||
import List.Extra as L exposing (..)
|
||||
import Page exposing (Page)
|
||||
import Ports
|
||||
import Route exposing (Route)
|
||||
import Shared
|
||||
import View exposing (View)
|
||||
|
@ -75,7 +76,7 @@ page shared route =
|
|||
{ init = init
|
||||
, update = update
|
||||
, subscriptions = subscriptions
|
||||
, view = view
|
||||
, view = view shared
|
||||
}
|
||||
|> Page.withLayout toLayout
|
||||
|
||||
|
@ -90,12 +91,12 @@ toLayout model =
|
|||
|
||||
|
||||
type alias Model =
|
||||
{ areArgsExpanded : List Bool }
|
||||
{ argHeights : List Int }
|
||||
|
||||
|
||||
init : () -> ( Model, Effect Msg )
|
||||
init () =
|
||||
( { areArgsExpanded = List.repeat (List.length argumentList) False }
|
||||
( { argHeights = List.repeat (List.length argumentList) 30 }
|
||||
, Effect.none
|
||||
)
|
||||
|
||||
|
@ -112,13 +113,13 @@ update : Msg -> Model -> ( Model, Effect Msg )
|
|||
update msg model =
|
||||
case msg of
|
||||
ToggleExpandArg index ->
|
||||
( case getAt index model.areArgsExpanded of
|
||||
( case getAt index model.argHeights of
|
||||
Nothing ->
|
||||
model
|
||||
|
||||
Just isExpanded ->
|
||||
{ model | areArgsExpanded = setAt index (not isExpanded) model.areArgsExpanded }
|
||||
, Effect.none
|
||||
Just elHeight ->
|
||||
{ model | argHeights = setAt index elHeight model.argHeights }
|
||||
, Effect.sendCmd <| Ports.getArgHeight ()
|
||||
)
|
||||
|
||||
|
||||
|
@ -135,16 +136,21 @@ subscriptions model =
|
|||
-- VIEW
|
||||
|
||||
|
||||
view : Model -> View Msg
|
||||
view model =
|
||||
view : Shared.Model -> Model -> View Msg
|
||||
view shared model =
|
||||
{ title = debateName
|
||||
, attributes = []
|
||||
, element = debateContainer model
|
||||
, element = debateContainer shared model
|
||||
}
|
||||
|
||||
|
||||
debateContainer : Model -> Element Msg
|
||||
debateContainer model =
|
||||
debateContainer : Shared.Model -> Model -> Element Msg
|
||||
debateContainer shared model =
|
||||
let
|
||||
a : Device
|
||||
a =
|
||||
shared.device
|
||||
in
|
||||
topLevelContainer <| debateList model
|
||||
|
||||
|
||||
|
@ -153,11 +159,11 @@ debateList model =
|
|||
column
|
||||
pageList
|
||||
<|
|
||||
List.map2 (argumentMaker ToggleExpandArg model.areArgsExpanded)
|
||||
List.map2 (argumentMaker ToggleExpandArg model.argHeights)
|
||||
argumentList
|
||||
<|
|
||||
List.range 0 <|
|
||||
List.length model.areArgsExpanded
|
||||
List.length model.argHeights
|
||||
|
||||
|
||||
argumentList : List Argument
|
||||
|
|
|
@ -5,7 +5,9 @@ import Config.Format as O exposing (..)
|
|||
import Config.Identity as I exposing (..)
|
||||
import Cuckery.Types exposing (..)
|
||||
import Effect exposing (Effect)
|
||||
import Element exposing (..)
|
||||
import Element as E exposing (..)
|
||||
import Element.Background as D exposing (..)
|
||||
import Element.Border as R exposing (..)
|
||||
import Html.Attributes as H exposing (style)
|
||||
import Layouts
|
||||
import Page exposing (Page)
|
||||
|
|
7
frontend/src/Ports.elm
Normal file
7
frontend/src/Ports.elm
Normal file
|
@ -0,0 +1,7 @@
|
|||
port module Ports exposing (getArgHeight)
|
||||
|
||||
|
||||
port getArgHeight : () -> Cmd msg
|
||||
|
||||
|
||||
port gotArgHeight : (() -> msg) -> Sub msg
|
104
frontend/src/Shared.elm
Normal file
104
frontend/src/Shared.elm
Normal file
|
@ -0,0 +1,104 @@
|
|||
module Shared exposing
|
||||
( Flags, decoder
|
||||
, Model, Msg
|
||||
, init, update, subscriptions
|
||||
)
|
||||
|
||||
{-|
|
||||
|
||||
@docs Flags, decoder
|
||||
@docs Model, Msg
|
||||
@docs init, update, subscriptions
|
||||
|
||||
-}
|
||||
|
||||
import Effect exposing (Effect)
|
||||
import Element as E exposing (..)
|
||||
import Json.Decode exposing (..)
|
||||
import Route exposing (Route)
|
||||
import Route.Path
|
||||
import Shared.Model
|
||||
import Shared.Msg
|
||||
|
||||
|
||||
|
||||
-- FLAGS
|
||||
|
||||
|
||||
type alias Flags =
|
||||
{ height : Int
|
||||
, width : Int
|
||||
}
|
||||
|
||||
|
||||
decoder : Json.Decode.Decoder Flags
|
||||
decoder =
|
||||
Json.Decode.map2
|
||||
(\height width ->
|
||||
{ height = height
|
||||
, width = width
|
||||
}
|
||||
)
|
||||
(field "height" int)
|
||||
(field "width" int)
|
||||
|
||||
|
||||
|
||||
-- INIT
|
||||
|
||||
|
||||
type alias Model =
|
||||
Shared.Model.Model
|
||||
|
||||
|
||||
init : Result Json.Decode.Error Flags -> Route () -> ( Model, Effect Msg )
|
||||
init flagsResult route =
|
||||
( modelFromFlagsResult flagsResult
|
||||
, Effect.none
|
||||
)
|
||||
|
||||
|
||||
modelFromFlagsResult : Result Error Flags -> Model
|
||||
modelFromFlagsResult f =
|
||||
case f of
|
||||
Ok flags ->
|
||||
{ device = E.classifyDevice flags
|
||||
, height = flags.height
|
||||
, width = flags.width
|
||||
}
|
||||
|
||||
Err _ ->
|
||||
{ device =
|
||||
E.classifyDevice
|
||||
{ height = 0
|
||||
, width = 0
|
||||
}
|
||||
, height = 10
|
||||
, width = 10
|
||||
}
|
||||
|
||||
|
||||
|
||||
-- UPDATE
|
||||
|
||||
|
||||
type alias Msg =
|
||||
Shared.Msg.Msg
|
||||
|
||||
|
||||
update : Route () -> Msg -> Model -> ( Model, Effect Msg )
|
||||
update route msg model =
|
||||
case msg of
|
||||
Shared.Msg.NoOp ->
|
||||
( model
|
||||
, Effect.none
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- SUBSCRIPTIONS
|
||||
|
||||
|
||||
subscriptions : Route () -> Model -> Sub Msg
|
||||
subscriptions route model =
|
||||
Sub.none
|
10
frontend/src/Shared/Model.elm
Normal file
10
frontend/src/Shared/Model.elm
Normal file
|
@ -0,0 +1,10 @@
|
|||
module Shared.Model exposing (Model)
|
||||
|
||||
import Element exposing (Device)
|
||||
|
||||
|
||||
type alias Model =
|
||||
{ height : Int
|
||||
, width : Int
|
||||
, device : Device
|
||||
}
|
14
frontend/src/Shared/Msg.elm
Normal file
14
frontend/src/Shared/Msg.elm
Normal file
|
@ -0,0 +1,14 @@
|
|||
module Shared.Msg exposing (Msg(..))
|
||||
|
||||
{-| -}
|
||||
|
||||
|
||||
{-| Normally, this value would live in "Shared.elm"
|
||||
but that would lead to a circular dependency import cycle.
|
||||
|
||||
For that reason, both `Shared.Model` and `Shared.Msg` are in their
|
||||
own file, so they can be imported by `Effect.elm`
|
||||
|
||||
-}
|
||||
type Msg
|
||||
= NoOp
|
30
frontend/src/interop.js
Normal file
30
frontend/src/interop.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
// This is called BEFORE your Elm app starts up
|
||||
//
|
||||
// The value returned here will be passed as flags
|
||||
// into your `Shared.init` function.
|
||||
export const flags = ({ env }) => {
|
||||
return {
|
||||
height: window.innerHeight,
|
||||
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(() => {
|
||||
|
||||
setTimeout(() => {
|
||||
const element = document.getElementById('arg1');
|
||||
|
||||
if (element) {
|
||||
const height = element.offsetHeight;
|
||||
console.log(`Height of the element: ${height}px`);
|
||||
} else {
|
||||
console.error('Element not found.');
|
||||
}
|
||||
}, 0)
|
||||
})}
|
Loading…
Add table
Add a link
Reference in a new issue