feat: started working on responsiveness

This commit is contained in:
Nick 2024-12-06 02:13:22 -06:00
parent 0339496f42
commit 31be063412
8 changed files with 408 additions and 262 deletions

View file

@ -35,7 +35,6 @@ nutriDexMaker nutridex =
fieldSpacer
[ cardSubTitleMaker
[ featureList nutridex
, nutriDexTitleMaker
, nutriDexBodyMaker
, nutriDexAdjustments
, column [ spacing 10 ]
@ -66,7 +65,6 @@ nutriDexMakerMobile nutridex =
fieldSpacer
[ cardSubTitleMaker
[ featureListMobile nutridex
, nutriDexTitleMaker
, nutriDexBodyMaker
, nutriDexAdjustments
, column [ spacing 10 ]
@ -272,8 +270,8 @@ featureListMobile nutridex =
]
nutriDexTitleMaker : Element msg
nutriDexTitleMaker =
nutriDexTitleMaker : String -> Element msg
nutriDexTitleMaker title =
column
[ width fill
, height fill
@ -300,7 +298,7 @@ nutriDexTitleMaker =
}
]
)
[ text "Backstory" ]
[ text title ]
]
@ -318,7 +316,8 @@ nutriDexBodyMaker =
, height fill
]
[ column [ spacing 10 ]
[ row []
[ nutriDexTitleMaker "Backstory"
, row []
[ paragraph
(paragraphFormat
++ [ F.alignLeft
@ -392,87 +391,67 @@ nutriDexAdjustments =
column
[ width fill
, height fill
, spacing 20
]
[ column
[ width fill
, height fill
, spacing 20
]
[ row
[ 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 }
]
[]
, column [ spacing 10 ]
[ row
[ centerX
, paddingEach
{ top = 10
, right = 0
, bottom = 10
, left = 0
[ nutriDexTitleMaker "Nutrient Density Score Adjustments"
, row []
[ paragraph (paragraphFormat ++ [ F.alignLeft, width fill ])
[ text " "
, text "No adjustments are made to vitamin B1, vitamin B2, vitamin B3, manganese, phosphorus, and potassium, due to their DRIs only representing total daily intake, or due to the nutrient having close to 100% bioavailability. "
, row [ F.regular, F.size 12 ]
[ newTabLink referenceFormat
{ url = "https://www.ncbi.nlm.nih.gov/books/NBK114331/"
, label = text "1"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.ncbi.nlm.nih.gov/books/NBK114322/"
, label = text "2"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.ncbi.nlm.nih.gov/books/NBK114304/"
, label = text "3"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.ncbi.nlm.nih.gov/books/NBK56056/"
, label = text "4"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.nap.edu/read/11537/chapter/39"
, label = text "5"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.nap.edu/read/11537/chapter/41"
, label = text "6"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.nap.edu/read/11537/chapter/42"
, label = text "7"
}
]
[ paragraph
(paragraphBoldFormat
++ [ F.alignLeft
, width fill
, F.size 18
, F.color colourTheme.textLightOrange
]
)
[ text "Nutrient Density Score Adjustments" ]
]
, row []
[ paragraph (paragraphFormat ++ [ F.alignLeft, width fill ])
[ text " "
, text "No adjustments are made to vitamin B1, vitamin B2, vitamin B3, manganese, phosphorus, and potassium, due to their DRIs only representing total daily intake, or due to the nutrient having close to 100% bioavailability. "
, row [ F.regular, F.size 12 ]
[ newTabLink referenceFormat
{ url = "https://www.ncbi.nlm.nih.gov/books/NBK114331/"
, label = text "1"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.ncbi.nlm.nih.gov/books/NBK114322/"
, label = text "2"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.ncbi.nlm.nih.gov/books/NBK114304/"
, label = text "3"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.ncbi.nlm.nih.gov/books/NBK56056/"
, label = text "4"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.nap.edu/read/11537/chapter/39"
, label = text "5"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.nap.edu/read/11537/chapter/41"
, label = text "6"
}
, text ", "
, newTabLink referenceFormat
{ url = "https://www.nap.edu/read/11537/chapter/42"
, label = text "7"
}
]
]
]
]
]
]
nutridexSubTitleMaker : String -> Element msg
nutridexSubTitleMaker title =
paragraph
(paragraphBoldFormat
++ [ F.alignLeft
, width fill
, F.size 18
, F.color colourTheme.textLightOrange
]
)
[ text title ]
nutriDexVitamins : Element msg
nutriDexVitamins =
column
@ -489,15 +468,7 @@ nutriDexVitamins =
, left = 0
}
]
[ paragraph
(paragraphBoldFormat
++ [ F.alignLeft
, width fill
, F.size 18
, F.color colourTheme.textLightOrange
]
)
[ text "Vitamins" ]
[ nutridexSubTitleMaker "Vitamins"
]
, row []
[ paragraph (paragraphFormat ++ [ F.alignLeft, width fill ])
@ -627,15 +598,7 @@ nutriDexFattyAcids =
, left = 0
}
]
[ paragraph
(paragraphBoldFormat
++ [ F.alignLeft
, width fill
, F.size 18
, F.color colourTheme.textLightOrange
]
)
[ text "Fatty Acids" ]
[ nutridexSubTitleMaker "Fatty Acids"
]
, row []
[ paragraph (paragraphFormat ++ [ F.alignLeft, width fill ])
@ -698,15 +661,7 @@ nutriDexMinerals =
, left = 0
}
]
[ paragraph
(paragraphBoldFormat
++ [ F.alignLeft
, width fill
, F.size 18
, F.color colourTheme.textLightOrange
]
)
[ text "Minerals" ]
[ nutridexSubTitleMaker "Minerals"
]
, row []
[ paragraph (paragraphFormat ++ [ F.alignLeft, width fill ])
@ -806,15 +761,7 @@ nutriDexAminoAcids =
, left = 0
}
]
[ paragraph
(paragraphBoldFormat
++ [ F.alignLeft
, width fill
, F.size 18
, F.color colourTheme.textLightOrange
]
)
[ text "Amino Acids" ]
[ nutridexSubTitleMaker "Amino Acids"
]
, row []
[ paragraph (paragraphFormat ++ [ F.alignLeft, width fill ])