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/base.twig | 8 +++++- 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 ++++++++++++++++++++-------------------- templates/dashboard.twig | 40 ++++++++++++++++++++++++---- 7 files changed, 155 insertions(+), 66 deletions(-) (limited to 'templates') diff --git a/templates/base.twig b/templates/base.twig index a27b5d7..758b6f8 100644 --- a/templates/base.twig +++ b/templates/base.twig @@ -2,9 +2,13 @@ {% block css %} {{ parent() }} + + + + {% endblock %} {% block body %} @@ -12,7 +16,9 @@

Elements

{% block subtitle %}{% endblock %}

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 %} diff --git a/templates/dashboard.twig b/templates/dashboard.twig index 31f2353..97534bf 100644 --- a/templates/dashboard.twig +++ b/templates/dashboard.twig @@ -4,9 +4,39 @@ Dashboard {% endblock %} {% block main %} -

Home?

-

Updates to own cards?

-

Card of the day?

-

Events?

-

News?

+
+

Hello World

+
+
+

Cards

+
+
+

Card of the day

+
+
+ + {{ cardOfTheDay.getVotesTotal() }} + +
+
+ {% for meta in cardOfTheDay.meta %} +

+
+ +

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

Updates to my cards

+
+
+

Events

+
+
+

News

+
{% endblock %} -- cgit v1.2.3