From 432bba3dee1d9be25b9626ac45115929a6422961 Mon Sep 17 00:00:00 2001 From: Jonathan Tschanter Date: Fri, 21 Jan 2022 15:13:35 +0100 Subject: Add layout based on list entries --- templates/card/card.twig | 8 +++--- templates/card/card_add.twig | 18 +++++++++++++ templates/card/card_display.twig | 51 ++++++++++++++++++++++++++---------- templates/card/card_edit.twig | 40 +++++++++++++++++----------- templates/card/card_list.twig | 56 ++++++++++++++++++++-------------------- 5 files changed, 113 insertions(+), 60 deletions(-) (limited to 'templates/card') diff --git a/templates/card/card.twig b/templates/card/card.twig index 9a91bfa..fcf6bd0 100644 --- a/templates/card/card.twig +++ b/templates/card/card.twig @@ -4,9 +4,11 @@ Cards {% endblock %} {% block main %} -
- - +
+ + +
+

{% block pagetitle %}{% endblock %}

diff --git a/templates/card/card_add.twig b/templates/card/card_add.twig index ef01632..db91fc4 100644 --- a/templates/card/card_add.twig +++ b/templates/card/card_add.twig @@ -1,5 +1,23 @@ {% extends 'card/card.twig' %} +{% block pagetitle %} + Edit Card +{% endblock %} +{% block pagecontent %} +
+
+ {% for meta in card.meta %} +

+
+ +

+ {% endfor %} + + +
+
+{% endblock %} + {% block pagetitle %} Add Card {% endblock %} diff --git a/templates/card/card_display.twig b/templates/card/card_display.twig index 27d5bea..7b2ed3e 100644 --- a/templates/card/card_display.twig +++ b/templates/card/card_display.twig @@ -4,22 +4,45 @@ Show Card {% endblock %} {% block pagecontent %} - {% for meta in card.meta %} -

-
- -

- {% endfor %} +
+ +
+ +
+
+
+ + {{ card.getVotesTotal() }} + +
+
+ {% for meta in card.meta %} +

+
+ +

+ {% endfor %} +
+
+
- +
+

Artworks

+
-

Artworks

{% for artwork in card.artworks %} -

- - - - -

+
+
+
+ + {{ artwork.getVotesTotal() }} + +
+
+ + +
+
+
{% endfor %} {% endblock %} diff --git a/templates/card/card_edit.twig b/templates/card/card_edit.twig index a7f9aa7..b066437 100644 --- a/templates/card/card_edit.twig +++ b/templates/card/card_edit.twig @@ -4,23 +4,33 @@ Edit Card {% endblock %} {% block pagecontent %} -
- {% for meta in card.meta %} -

-
- -

- {% endfor %} +
+ + {% for meta in card.meta %} +

+
+ +

+ {% endfor %} - - + + +
+ +
+

Edit Artworks

+
+ +
+ +
-

Artworks

{% for artwork in card.artworks %} -

- +

+ - -

+ +
{% endfor %} -{% endblock %} + +{% endblock %} \ No newline at end of file diff --git a/templates/card/card_list.twig b/templates/card/card_list.twig index 1714fc8..b6d8bbe 100644 --- a/templates/card/card_list.twig +++ b/templates/card/card_list.twig @@ -4,35 +4,35 @@ List {% endblock %} {% block pagecontent %} - - - - - {% for meta in cards[0].getAllMeta() %} - - {% endfor %} - - - - - - {% for card in cards %} - - - {% for meta in card.getAllMeta() %} - - {% endfor %} - - - - {% endfor %} - -
ID{{ meta.key }}Votes
{{ card.id }}{{ meta.value }} + {% for card in cards %} +
+
+
+ {{ card.getVotesTotal() }} - - -
+ + +
+ + + + {% for meta in card.getAllMeta() %} + + {% endfor %} + + + + + {% for meta in card.getAllMeta() %} + + {% endfor %} + + +
{{ meta.key }}
{{ meta.value }}
-
+
+ + + {% endfor %} {% endblock %} -- cgit v1.2.3