diff options
author | Jonathan Tschanter <jmtw@tutanota.de> | 2022-01-22 21:24:24 +0100 |
---|---|---|
committer | Jonathan Tschanter <jmtw@tutanota.de> | 2022-01-22 21:24:24 +0100 |
commit | 10c86197f1f63e222dfc9e937911e35ab500a208 (patch) | |
tree | 388ca37920808a66697385c6d69cf6a76e5aaf7b /templates/artwork | |
parent | 432bba3dee1d9be25b9626ac45115929a6422961 (diff) |
Adds edit cards and templates to include
Diffstat (limited to 'templates/artwork')
-rw-r--r-- | templates/artwork/artwork_template.twig | 54 | ||||
-rw-r--r-- | templates/artwork/artwork_view.twig | 10 |
2 files changed, 64 insertions, 0 deletions
diff --git a/templates/artwork/artwork_template.twig b/templates/artwork/artwork_template.twig new file mode 100644 index 0000000..fe55f6a --- /dev/null +++ b/templates/artwork/artwork_template.twig @@ -0,0 +1,54 @@ +{% if artworkSettings.isPreview == true %} + <div class="content"> + {% if artworkSettings.artworkHeader != "" %} + <h4>{{ artworkSettings.artworkHeader }}</h4> + {% endif %} + + <div class="row"> + <div class="column column-5"> + {% if artworkSettings.isVotable == true %} + <!--TODO: vote artworks--> + <button class="vote"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i></button> + {{ artwork.getVotesTotal() }} + <button class="vote"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i></button> + {% endif %} + </div> + <div class="column column-95"> + <div> + <img class="image" src='{{ artwork.path }}'> + </div> + <div> + <button onclick="location.href='/card/{{ card.id }}/artwork/{{ artwork.id }}'">View Artwork</button> + </div> + </div> + </div> + </div> +{% else %} + <section id="artwork" class="content"> + <h3>Artwork</h3> + </section> + + <div class="content"> + <!-- TODO: what is there to edit? or just remove? and add new? --> + <button onclick="location.href='/card/{{ card.id }}'">Goto Card</button> + <button>Remove Artwork</button> + </div> + + <div class="content"> + <div class="row"> + <div class="column column-5"> + {% if artworkSettings.isVotable == true %} + <!--TODO: vote artworks--> + <button class="vote"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i></button> + {{ artwork.getVotesTotal() }} + <button class="vote"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i></button> + {% endif %} + </div> + <div class="column column-95"> + <div> + <img class="image" src='{{ artwork.path }}'> + </div> + </div> + </div> + </div> +{% endif %} diff --git a/templates/artwork/artwork_view.twig b/templates/artwork/artwork_view.twig new file mode 100644 index 0000000..3eb1c65 --- /dev/null +++ b/templates/artwork/artwork_view.twig @@ -0,0 +1,10 @@ +{% extends 'card/card.twig' %} + +{% block pagecontent %} + {% set artworkSettings = { + "artworkHeader": "", + "isPreview": false, + "isVotable": true + } %} + {{ include('artwork/artwork_template.twig') }} +{% endblock %}
\ No newline at end of file |