From 2c682520ca2a2ad8713a6d6a189a358016545287 Mon Sep 17 00:00:00 2001 From: kuro610 Date: Tue, 31 May 2022 18:25:41 +0200 Subject: [PATCH 1/2] Style import btn on public recipe page --- root/templates/browse/recipe/show.tt | 26 +++++++++++++++----------- root/templates/wrapper.tt | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/root/templates/browse/recipe/show.tt b/root/templates/browse/recipe/show.tt index a7a7db38..c8b1ad27 100644 --- a/root/templates/browse/recipe/show.tt +++ b/root/templates/browse/recipe/show.tt @@ -1,17 +1,21 @@ [% escape_title( 'Recipe', recipe.name ) %] -[% IF project_url %] -

- from project [% recipe.project.name | html %] - [% IF import_url %] -

- -
+
+
+ [% IF project_url %] +

from project [% recipe.project.name | html %]

+ [% IF import_url %] +
+ +
+ [% END %] + [% ELSE %] +

from a private project

[% END %] -

-[% ELSE %] -

from a private project

-[% END %] +
+
Servings: diff --git a/root/templates/wrapper.tt b/root/templates/wrapper.tt index 1eb68bb3..e1407da9 100644 --- a/root/templates/wrapper.tt +++ b/root/templates/wrapper.tt @@ -131,7 +131,7 @@ END %]
-
+

[% name | html; IF project %]: [% project.name | html; END %]

From 5afee82c1a5dc92dd7b85efee1f13125a1524f85 Mon Sep 17 00:00:00 2001 From: kuro610 Date: Tue, 31 May 2022 18:31:56 +0200 Subject: [PATCH 2/2] Add shortlink to used section closes #131 --- root/static/css/style.css | 2 +- root/templates/recipe/edit.tt | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/root/static/css/style.css b/root/static/css/style.css index 415ec984..ef43ac18 100644 --- a/root/static/css/style.css +++ b/root/static/css/style.css @@ -173,7 +173,7 @@ main a[href]:active { color: #333333; } -a.btn-secondary { +a.btn-secondary, a.btn-primary { color: #fff !important; } diff --git a/root/templates/recipe/edit.tt b/root/templates/recipe/edit.tt index ebe9a7dd..5aef54bc 100644 --- a/root/templates/recipe/edit.tt +++ b/root/templates/recipe/edit.tt @@ -3,8 +3,11 @@
+ + Used in [% dishes.size %] dish[% IF dishes.size != 1 %]es[% END %] + [% IF import_url %] - + @@ -82,7 +85,7 @@ [% INCLUDE 'includes/forms/ingredients_add.tt' %] -

Where [% recipe.name | html %] is used

+

Where [% recipe.name | html %] is used

    [% FOR dish IN dishes %]