From e5bb485c14e372264fb9a133fb7831598488929d Mon Sep 17 00:00:00 2001 From: Awstin Date: Sun, 15 Sep 2024 11:45:13 -0400 Subject: [PATCH] Adding cooking page --- src/html/garden.rs | 14 +++++++++++--- src/html/templates.rs | 4 ++++ templates/cooking.html | 38 ++++++++++++++++++++++++++++++++++++++ templates/interests.html | 3 +++ 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 templates/cooking.html diff --git a/src/html/garden.rs b/src/html/garden.rs index 30a40d2..359863b 100644 --- a/src/html/garden.rs +++ b/src/html/garden.rs @@ -6,10 +6,12 @@ use axum::{ use super::templates::{ ArchServerTemplate, BooksTemplate, + CookingTemplate, EdgeDetectionTemplate, - GardenTemplate, - HtmlTemplate, - TakTemplate, TimeTemplate, + GardenTemplate, + HtmlTemplate, + TakTemplate, + TimeTemplate, }; pub fn get_router() -> Router { @@ -20,6 +22,7 @@ pub fn get_router() -> Router { .route("/time", get(time)) .route("/tak", get(tak)) .route("/archserver", get(arch_server)) + .route("/cooking", get(cooking)) } async fn garden() -> impl IntoResponse { @@ -51,3 +54,8 @@ async fn arch_server() -> impl IntoResponse { let arch_server_page = ArchServerTemplate {}; HtmlTemplate(arch_server_page) } + +async fn cooking() -> impl IntoResponse { + let cooking_page = CookingTemplate {}; + HtmlTemplate(cooking_page) +} diff --git a/src/html/templates.rs b/src/html/templates.rs index 643c315..e61ffbd 100644 --- a/src/html/templates.rs +++ b/src/html/templates.rs @@ -116,6 +116,10 @@ pub struct HomeTemplate {} #[template(path = "about.html")] pub struct AboutTemplate {} +#[derive(Template)] +#[template(path = "cooking.html")] +pub struct CookingTemplate {} + #[derive(Template)] #[template(path = "blog_footer.html")] pub struct BlogFooterTemplate { diff --git a/templates/cooking.html b/templates/cooking.html new file mode 100644 index 0000000..f1e3043 --- /dev/null +++ b/templates/cooking.html @@ -0,0 +1,38 @@ + +{% extends "base.html" %} + +{% block content %} +

Cooking

+

+ I love to cook. + When I have the time for it. + Cooking is one of those primal sensual things that should not be rushed. + Like lovemaking, art, theater. + It takes the time it takes and trying to force it to take less is a recipe for frustration and disaster. +

+

+ There is little more vital that we do for ourselves and for those we care for then nourishment. + Having someone else to cook for and share the results with makes the experience exponentially more enjoyable and fulfilling. +

+

+ I still mostly follow recipes. + I have not yet developed the imagination to blend ingredients and see what they would taste like together in my mind. + I do make some small tweaks but the general idea is usually a recipe that I have found somewhere. + The care comes in how each step is carried out. + The chopping, making a sauce, getting just the right texture. +

+

+ It is an activity that I find forces presence like few others. + Some can cook with the television on. + I have tried that but it does not work. + My attention can't be divided. + Also being worried about chopping your finger off is a pretty good reason to focus. + Have caught a piece of finger only once in my years in the kitchen and learned that lesson well. + At most some music, and even then best not with lyrics. +

+

+ As most recipe sites are pretty terrible I plan to add some of my favourites here in an easily consumable format. + No long story, just ingredients and instructions as I would like to see them with no extraneous stuff. + Next step for this page. +

+{% endblock %} diff --git a/templates/interests.html b/templates/interests.html index 8f583cd..35fd561 100644 --- a/templates/interests.html +++ b/templates/interests.html @@ -85,4 +85,7 @@

It is what I am making this site to be a part of.

+ +

Reading

+

Cooking

{% endblock %}