2022-05-31 22:00:53 +01:00
import { Component , createRef } from "preact" ;
import { AdvancedFoodItem , FoodItem , FoodItemsContainer } from "./foodItems" ;
import { FoodTypeToggles } from "./foodTypeToggles" ;
import { FoodExcludeTypes } from "./types" ;
const FONT_TYPES = [
[ "default" , "Default (Comic Sans, Comic Neue or Default)" ] ,
2022-05-31 22:22:46 +01:00
[ "system" , "System Sans Font (as picked by Bootstrap Defaults)" ] ,
2022-05-31 22:00:53 +01:00
[ "comicneue" , "Comic Neue" ] ,
[ "opendyslexic" , "Open Dyslexic" ]
] ;
export class SettingsBlock extends Component {
constructor ( ) {
super ( )
}
fontSettingSelectRef = createRef < HTMLSelectElement > ( )
2022-06-02 13:54:33 +01:00
componentDidMount() {
document . body . setAttribute ( "data-font" , "default" ) ;
}
2022-05-31 22:00:53 +01:00
onFontChange() {
if ( ! this . fontSettingSelectRef . current ) return ;
let newFont = this . fontSettingSelectRef . current . value ;
for ( let font of FONT_TYPES ) {
document . body . removeAttribute ( ` data-font- ${ font [ 1 ] } ` )
}
document . body . setAttribute ( "data-font" , newFont ) ;
}
render() {
return < div >
2022-06-02 19:28:51 +01:00
< h2 > Settings < / h2 >
2022-05-31 22:00:53 +01:00
< div class = "form-group" >
< label for = "fontSettingSelect" > Font < / label >
< select ref = { this . fontSettingSelectRef } class = "form-control" id = "fontSettingSelect" onChange = { ( ) = > this . onFontChange ( ) } >
{ . . . FONT_TYPES . map ( ( font : string [ ] ) = > {
return < option value = { font [ 0 ] } > { font [ 1 ] } < / option > ;
} ) }
< / select >
< / div >
< / div >
}
}
export class MainPage extends Component < unknown , { toggles : FoodExcludeTypes } > {
constructor ( ) {
super ( )
}
render() {
return < >
2023-05-08 20:28:25 +01:00
< h1 class = "mt-5" > chaos ' s Food Likes / Dislikes < / h1 >
2022-08-04 22:42:20 +01:00
< p class = "lead" > a hopefully helpful guide on what food i like ? < / p >
2022-05-31 22:00:53 +01:00
2022-06-02 16:35:51 +01:00
< br / >
2022-05-31 22:00:53 +01:00
< SettingsBlock / >
2022-06-02 16:35:51 +01:00
< br / >
2022-05-31 22:00:53 +01:00
< FoodTypeToggles onChange = { ( toggles ) = > {
this . setState ( { toggles } ) ;
} } / >
< br / >
< FoodItemsContainer title = "Drinks" >
2022-05-31 23:57:45 +01:00
< FoodItem title = "Chocolate Flavor Soy/Coconut Drink" / >
2022-05-31 22:00:53 +01:00
< FoodItem title = "Mango Juice" / >
2022-05-31 23:20:34 +01:00
< FoodItem title = "Lingonberry Juice" / >
< FoodItem title = "Pineapple Juice" / >
2022-06-01 06:57:04 +01:00
< FoodItem title = "Yogurt-like drinks" contents = { { containsMilk : true } } exclude = { this . state . toggles } / >
2022-05-31 22:00:53 +01:00
< FoodItem title = "Lactose Free Chocolate Milk" contents = { { containsMilk : true } } exclude = { this . state . toggles } / >
< AdvancedFoodItem title = "Caffeinated Energy Drinks" extra = { "Brands such as Monster Energy & Red Bull" } / >
< AdvancedFoodItem
title = "Squash/Cordial/Fruit Juice Concentrate"
extra = { "Flavors such as \"Apple&Blackcurrent\", \"Blackcurrent\", \"Orange\" " }
/ >
< AdvancedFoodItem
title = "Fruity Alcoholic Ciders"
extra = "Has to be quite sugary and not at all bitter"
contents = { { containsAlcohol : true } } exclude = { this . state . toggles }
/ >
< AdvancedFoodItem
title = "Vodka-based Cocktails"
extra = "Good when sweet and fruity; do not like when too bitter"
contents = { { containsAlcohol : true } } exclude = { this . state . toggles }
/ >
< / FoodItemsContainer >
< br / >
< FoodItemsContainer title = "Snacks" >
< AdvancedFoodItem title = "Chips" extra = { "Also known as crisps; Flavors such as salted & sweet chilli are recommended" } / >
2022-06-01 06:57:47 +01:00
< AdvancedFoodItem title = "Pringles" extra = { "Salted; Sour Cream & Onion or also any other brand of Hyperbolic Paraboloid shaped potato snacks" } / >
2022-05-31 22:00:53 +01:00
< FoodItem title = "Beef/Pork Jerky" contents = { { containsMeat : true } } exclude = { this . state . toggles } / >
< AdvancedFoodItem title = "Hummus" extra = "For dipping of carrots and chips" / >
< AdvancedFoodItem title = "Wheat/Starch-Coated Chilli Peanuts" extra = "Not a fan of peanuts on own; but ok when coated" / >
< FoodItem title = "Whole or Sliced Firm Cucumber" / >
< FoodItem title = "Sliced or Sticks of Carrots" / >
< FoodItem title = "Sweetcorn" / >
< FoodItem title = "Firm Pickles" / >
< / FoodItemsContainer >
< br / >
< FoodItemsContainer title = "Treats" >
< AdvancedFoodItem title = "Sugary Sweets" extra = { "Preferably ones not too acidic" } / >
< AdvancedFoodItem title = "Doughnuts" extra = { "Circle shape with hole in middle; glazed good but not too much of it; NOT jam filled ones" } / >
< AdvancedFoodItem title = "Yum-Yums" extra = { "A kind of twisted doughnut dough covered in sugary glaze" } / >
< AdvancedFoodItem title = "Chocolate" extra = { "Light chocolate only; Can't be too bitter" } / >
< FoodItem title = "Skittles" / >
2022-06-02 09:30:45 +01:00
< FoodItem title = "Stroopwafels" contents = { { containsMilk : true } } exclude = { this . state . toggles } / >
2022-05-31 22:00:53 +01:00
< / FoodItemsContainer >
< br / >
2022-08-04 22:42:20 +01:00
< FoodItemsContainer title = "Breakfast" extra = "don't often have breakfast, but this is what i would have" >
2022-06-02 09:30:45 +01:00
< FoodItem title = "Marmite Toast" / >
< FoodItem title = "Bagels" / >
< AdvancedFoodItem title = "Jam Toast" extra = { "light thin layer of jam, not chunky jam; jams like cloudberry, strawberry, raspberry, orange" } / >
< AdvancedFoodItem title = "Corn Flakes" extra = { "Either dry or with oat milk" } / >
< AdvancedFoodItem title = "Bran Flakes" extra = { "Usually dry" } / >
< FoodItem title = "Scrambled Egg" contents = { { containsEggs : true } } exclude = { this . state . toggles } / >
< / FoodItemsContainer >
2022-06-02 16:13:45 +01:00
< br / >
2022-05-31 22:00:53 +01:00
< FoodItemsContainer title = "Smaller Foods" >
< FoodItem title = "Chicken Nuggets" contents = { { containsMeat : true } } exclude = { this . state . toggles } / >
< FoodItem title = "Turkey Dinos" contents = { { containsMeat : true } } exclude = { this . state . toggles } / >
< FoodItem title = "Smile or Waffle shaped formed potato" / >
< FoodItem title = "Fish Fingers" contents = { { containsFish : true } } exclude = { this . state . toggles } / >
2022-05-31 23:23:49 +01:00
< FoodItem title = "Yorkshire Puddings" contents = { { containsEggs : true , containsMilk : true } } exclude = { this . state . toggles } / >
2022-05-31 22:00:53 +01:00
< AdvancedFoodItem title = "Veggie Dippers" extra = "As long as don't contain sensory bads; McDonalds kind are good" / >
< AdvancedFoodItem title = "Falafel Wraps" extra = { "Great with hummus&cucumber" } / >
< FoodItem title = "Scrambled Eggs" contents = { { containsEggs : true } } exclude = { this . state . toggles } / >
< FoodItem title = "French Fries" / >
< / FoodItemsContainer >
< br / >
< FoodItemsContainer title = "Larger Foods" >
2022-06-02 16:10:16 +01:00
< AdvancedFoodItem title = "Garlic Bread" extra = { "So good,,," } / >
2022-05-31 22:00:53 +01:00
< FoodItem title = "Pizza" contents = { { containsMilk : true } } exclude = { this . state . toggles } / >
< FoodItem title = "Pasta" / >
< FoodItem title = "Spongy Fried Battered Tofu" / >
2022-06-02 09:37:39 +01:00
< FoodItem title = { "Tofu Vegetable Katsu-Style Curry" } / >
2022-05-31 22:00:53 +01:00
< FoodItem title = "Rice or Cooked Grains" / >
< FoodItem title = "Roast Potatos" / >
< FoodItem title = "Baked Potatos" / >
< FoodItem title = { "Fried Egg & French Fries" } contents = { { containsEggs : true } } exclude = { this . state . toggles } / >
2022-06-01 07:06:53 +01:00
< FoodItem title = "Carbonara" contents = { { containsEggs : true , containsMilk : true , containsMeat : true } } exclude = { this . state . toggles } / >
2022-05-31 22:00:53 +01:00
< FoodItem title = "Omlette" contents = { { containsEggs : true } } exclude = { this . state . toggles } / >
< FoodItem title = { "Cooked Potato with Spinach & Turmeric (Saag Aloo?)" } / >
< FoodItem title = { "Pasta & Meatballs" } contents = { { containsMeat : true } } exclude = { this . state . toggles } / >
< FoodItem title = "Beef/Pork Chilli" contents = { { containsMeat : true } } exclude = { this . state . toggles } / >
2022-06-02 14:02:23 +01:00
< AdvancedFoodItem title = "Chilli Sin Carne" extra = { "w/ rice is great; make sure kidney beans not too dry" } / >
2022-05-31 22:00:53 +01:00
< AdvancedFoodItem title = "Burgers" extra = "Preferably vegan soy or pea protein based burger; ones with beetroot in are nice; not wheat protein based" / >
< / FoodItemsContainer >
2022-05-31 22:10:55 +01:00
< br / >
2022-05-31 22:00:53 +01:00
< FoodItemsContainer title = "Ingredients / Condiments" >
< FoodItem title = "Hendo's Relish" / >
< FoodItem title = "Worcestershire Sauce" contents = { { containsFish : true } } exclude = { this . state . toggles } / >
< AdvancedFoodItem title = "Spicy Mayo for Fries" extra = { "Good with fries" } contents = { { containsEggs : true } } exclude = { this . state . toggles } / >
2022-06-02 13:54:33 +01:00
< AdvancedFoodItem title = "Tomato Ketchup" extra = { "Can't be too acidic" } / >
2022-05-31 22:00:53 +01:00
< / FoodItemsContainer >
< br / >
2022-06-02 09:37:39 +01:00
< FoodItemsContainer title = "Vegetables (for cooking)" >
< FoodItem title = "Sweetcorn" / >
< AdvancedFoodItem title = "Broccoli" extra = { "Cooked to be very soft" } / >
< AdvancedFoodItem title = "Cauliflower" extra = { "Cooked to be very soft" } / >
< AdvancedFoodItem title = "Carrot" extra = { "Cooked to be very soft; or crunchy as a snack;" } / >
< FoodItem title = "Swede / Rutabaga" / >
2022-06-07 15:21:04 +01:00
< AdvancedFoodItem title = "Chili Peppers" extra = { "Cooked to be soft; Cut up very finely or pureed" } / >
2022-06-02 09:37:39 +01:00
< / FoodItemsContainer >
< br / >
2022-06-07 15:19:56 +01:00
< FoodItemsContainer title = { "Soups & Stews" } >
< AdvancedFoodItem title = { "Chicken & Mushroom Soup" } extra = "Mushroom either flavor or tiny fried bits of mushroom" contents = { { containsMeat : true } } exclude = { this . state . toggles } / >
< AdvancedFoodItem title = "Mushroom Soup" extra = { "needs to be creamy, w/ coconut milk good" } / >
< FoodItem title = "Tomato Soup" / >
< FoodItem title = "Chicken Noodle Soup" contents = { { containsMeat : true } } exclude = { this . state . toggles } / >
< FoodItem title = "Nettle Soup" / >
< FoodItem title = { "Tomatoey Stew w/ Potato & Soft Carrot" } / >
< / FoodItemsContainer >
< br / >
2022-05-31 22:00:53 +01:00
< FoodItemsContainer title = "Sensory Bads (Do Not Like)" >
2022-08-04 22:42:20 +01:00
< AdvancedFoodItem title = "Anything Bitter" extra = "We are very sensitive to bitter things; way more than most ppl i know; even toast can sometimes be too bitter;" / >
2022-05-31 22:00:53 +01:00
< AdvancedFoodItem title = "Lettuce" extra = "Horrible crunch; only sometimes like the flat leafy kind but only nibbling on the lighter green parts" / >
< AdvancedFoodItem title = "Spinach Stalks" extra = { "Is fine if flattened & Stalks are removed; Is also fine pureed as can't texture then" } / >
< AdvancedFoodItem title = "Onion" extra = { "Too Crunchy; somewhat ok if cooked to remove all texture, fine as a powder or puree but not too sharp tasting" } / >
< AdvancedFoodItem title = "Firm Mushrooms" extra = { "Too Chewy; prefer mushrooms to be boiled or cooked in a way that makes them very soft and not tender" } / >
< AdvancedFoodItem title = "Button Mushroom Stalks" extra = { "Weird Texture" } / >
< AdvancedFoodItem title = "Fried Shitake Mushroom" extra = { "Again, also way too chewy and Bad" } / >
2022-06-02 17:20:43 +01:00
< AdvancedFoodItem title = "Firm/Semi-Firm Cooked Vegetables" extra = { "is Okay but prefer most vegetables to be cooked until soft enough to be smushed when pressed on" } / >
2022-05-31 22:00:53 +01:00
< AdvancedFoodItem title = "Pickles that are too soft" extra = { "is ok diced up as a ingredient; but do not like whole, closer to texture of firm cucumber is preferred" } / >
< AdvancedFoodItem title = "Lettuce" extra = "Horrible crunch; only sometimes like the flat leafy kind but only nibbling on the lighter green parts" / >
< AdvancedFoodItem title = "Some Peppers" extra = "Taste of bell peppers and jalapenos Very Bad And Repulsing Cannot Handle" / >
< AdvancedFoodItem title = { "Peppers & Chillis" } extra = "Bad when in large chunks, good when cut up to roughly size of cooked rice when surrounded by other foods of simular or larger size" / >
< AdvancedFoodItem title = "Raw Garlic" extra = { "Too sharp & digestive system isn't a fan; please lightly fry or soften; black garlic is yum" } / >
< AdvancedFoodItem title = "Beansprouts" extra = { "Too Crunch; VERY bad" } / >
< AdvancedFoodItem title = "Baby Corn Cobs" extra = { "Weird texture, never soft enough" } / >
< AdvancedFoodItem title = "Vegan Cheese" extra = { "Can't handle slimy/mucusy texture of most; the ones that puff up into a solid crunchy-ish bubble on pizza are Okay but not the ones that stay soft" } / >
< AdvancedFoodItem title = "Seitan/Gluten-Based Protein" extra = { "Can't handle texture of it, very weird" } / >
< AdvancedFoodItem title = "Peanut Butter" extra = { "Too creamy or crunchy, never a fan of taste" } / >
2022-06-01 00:05:39 +01:00
< AdvancedFoodItem title = "Silken Tofu" extra = { "Too soft, falls apart to easily, bad texture, prefer firmer pressed tofus" } / >
2022-06-02 09:37:39 +01:00
< AdvancedFoodItem title = "Lotus Fruit" extra = { "Weird texture; Also trypophobia;" } / >
< AdvancedFoodItem title = "Crumpets" extra = { "Can have if served upside down, otherwise no, too many holes" } / >
2022-06-02 14:04:03 +01:00
< AdvancedFoodItem title = "Mucus-like Textures" extra = { "Common in Vegan Cheese.." } / >
2022-06-07 15:25:34 +01:00
< AdvancedFoodItem title = "Chewy Tofu" extra = { "We like it but only a small amount of it; after a while brain starts to hate it; is good when can add as much as want to food" } / >
2022-06-02 15:12:23 +01:00
< FoodItem title = "Shrimp/Prawns" contents = { { containsFish : true } } exclude = { this . state . toggles } / >
2022-06-02 09:37:39 +01:00
< FoodItem title = "Celery" / >
2022-06-07 15:32:33 +01:00
< AdvancedFoodItem title = "Fiberous Textures" extra = { "Stuff like mango and some other fruits" } / >
2022-06-07 15:06:23 +01:00
< FoodItem title = "Cooked Fruit" / >
2022-05-31 22:00:53 +01:00
< FoodItem title = "Anything else unexpectedly crunchy" / >
< FoodItem title = "Sparkling Water" / >
< FoodItem title = "Apple Cider Vinegar" / >
2022-08-04 22:41:40 +01:00
< FoodItem title = "Anything over my limit of acidity for regular food/sauces, like mcdonalds ketchup" / >
2022-05-31 22:00:53 +01:00
< FoodItem title = "Aniseed Flavor" / >
< AdvancedFoodItem title = "Aniseed Liquorice Flavors" extra = { "Absolutely love natural liquorice root flavor; hate anise" } / >
< / FoodItemsContainer >
2022-06-02 16:36:39 +01:00
< br / >
2022-05-31 22:00:53 +01:00
< / > ;
}
2022-08-04 22:41:40 +01:00
}