From d518beb637e7c2776d84e87c63cc201c101ca89c Mon Sep 17 00:00:00 2001 From: JJ Date: Sun, 30 Mar 2025 20:56:01 +0100 Subject: styling, sub instructions --- templates/base.html | 9 ++++++++- templates/components/app.html | 6 +++++- templates/pages/account.html | 19 +++++++++++++++++-- templates/pages/home.html | 34 +++++++++++++++++++++++----------- templates/pages/signup.html | 2 ++ templates/pages/single-recipe.html | 12 ++++++++++++ 6 files changed, 67 insertions(+), 15 deletions(-) (limited to 'templates') diff --git a/templates/base.html b/templates/base.html index 64ae319..3181a2f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,9 +5,16 @@ index.cooking - {% block title %}{% endblock %} + + {% block scripts %} {% endblock %} + + - + {% include "/components/header.html" %}

{% block heading %}Some heading!{% endblock %}

{% block content %}{% endblock %} diff --git a/templates/components/app.html b/templates/components/app.html index 6a4c83a..f2fe587 100644 --- a/templates/components/app.html +++ b/templates/components/app.html @@ -1,7 +1,10 @@
-

Filter by tag

+
+

Filter by tag

+ loading indicator +
{% for facet in facets %} diff --git a/templates/pages/account.html b/templates/pages/account.html index db28632..10a3789 100644 --- a/templates/pages/account.html +++ b/templates/pages/account.html @@ -1,5 +1,11 @@ -{% extends "base.html" %} {% block title %} account {% endblock %} {% block -heading %} +{% extends "base.html" %} {% block scripts %} + + + +{% endblock %} {% block title %} account {% endblock %} {% block heading %}

Hey {{ session.username }} 👋

{% endblock %} {% block content %}

@@ -13,4 +19,13 @@ heading %} here.

+ + +

+ Are you sure you want to delete your account? This will erase all your data + including your recipes. +

+ + +
{% endblock %} diff --git a/templates/pages/home.html b/templates/pages/home.html index 6a5d4cd..c44a017 100644 --- a/templates/pages/home.html +++ b/templates/pages/home.html @@ -6,21 +6,33 @@ hx-trigger="submit load" hx-target=".app" hx-swap="innerHTML" + hx-indicator="#spinner" + hx-target-422="#form-error" + hx-target-5*="#form-error" > - +
+ + loading indicator +
+

search for recipes 🔎

- +
+ + loading indicator +
{% include "/components/app.html" %} {% endblock %} diff --git a/templates/pages/signup.html b/templates/pages/signup.html index c706074..99d6021 100644 --- a/templates/pages/signup.html +++ b/templates/pages/signup.html @@ -7,6 +7,8 @@ + +

diff --git a/templates/pages/single-recipe.html b/templates/pages/single-recipe.html index 35c03c0..d8c334d 100644 --- a/templates/pages/single-recipe.html +++ b/templates/pages/single-recipe.html @@ -12,11 +12,23 @@ endblock %} {% block content %} {% endfor %}

Instructions

+ {% if single_recipe.has_subsections %} + {% for instruction in single_recipe.instructions %} +

{{ instruction.n }}

+ + {% endfor %} + {% else %} + {% endif %} +