changeset 245:10278ba367a2

bulma (photo/discover): design for the new theme + create button + delete button
author Goffi <goffi@goffi.org>
date Fri, 19 Jun 2020 17:57:13 +0200
parents a62822c6a114
children 1928ba66c194
files sat_templates/templates/bulma/components/block.html sat_templates/templates/bulma/photo/discover.html
diffstat 2 files changed, 35 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/bulma/components/block.html	Fri Jun 19 17:57:13 2020 +0200
+++ b/sat_templates/templates/bulma/components/block.html	Fri Jun 19 17:57:13 2020 +0200
@@ -50,10 +50,14 @@
 #}
 <div class="columns is-multiline">
     {% for interest in interests %}
-        <div class="column is-4">
-            <div class="card x-is-hoverable">
-                <a href="{{interest.url}}">
-                    <div class="card-image is-photo-thumbnail-container is-flex has-items-centered has-background-light">
+        <div class="column is-4 item" data-item='{{interest|tojson}}'>
+            <div class="card">
+                <div class="card-header">
+                    <div class="card-header-title"></div>
+                    <div class="card-header-icon"><button class="delete action_delete"></button></div>
+                </div>
+                <div class="card-image is-photo-thumbnail-container is-flex has-items-centered has-background-light">
+                    <a href="{{interest.url}}">
                         {% if interest.thumb_url %}
                             <img class="is-photo-thumbnail" src="{{interest.thumb_url}}">
                         {% else %}
@@ -61,11 +65,13 @@
                                 {{ icon(default_icon_name, "image is-128x128") }}
                             </div>
                         {% endif %}
-                    </div>
-                    <div class="card-content has-text-centered">
+                    </a>
+                </div>
+                <div class="card-content has-text-centered x-is-hoverable">
+                    <a href="{{interest.url}}">
                         <span><em>{{ interest.name|default(_("unnamed")) }}</em></span>
-                    </div>
-                </a>
+                    </a>
+                </div>
             </div>
         </div>
     {% endfor %}
--- a/sat_templates/templates/bulma/photo/discover.html	Fri Jun 19 17:57:13 2020 +0200
+++ b/sat_templates/templates/bulma/photo/discover.html	Fri Jun 19 17:57:13 2020 +0200
@@ -4,8 +4,24 @@
 {% import 'input/field.html' as field with context %}
 
 {% block body %}
-{{ icon_defs('file-image') }}
+{{ icon_defs('file-image', 'trash-empty') }}
 <section class="section">
+    <div class="content has-items-centered is-flex">
+        {{ component.action_button(url_photos_new) }}
+    </div>
+    {% if interests is defined %}
+        <div class="message is-info">
+            <div class="message-body">
+                {% trans nb_interests=interests|length%}
+                You have currently {{nb_interests}} album in your personal list
+                {% pluralize %}
+                You have currently {{nb_interests}} albums in your personal list
+                {% endtrans %}
+            </div>
+        </div>
+
+        {{block.interests_grid(interests, 'file-image')}}
+    {% endif %}
     <article class="message has-text-centered">
         <div class="message-body">
             {% trans %}
@@ -13,20 +29,9 @@
             {% endtrans %}
         </div>
     </article>
+    {% call form.form(class="form--single") %}
+        {{ field.text("jid", _("device full jid"), required=true)}}
+        {{ field.submit(_("Access")) }}
+    {% endcall %}
 </section>
-{% if interests is defined %}
-    <p class="message--note">
-        {% trans nb_interests=interests|length%}
-            You have currently {{nb_interests}} album in your personal list
-        {% pluralize %}
-            You have currently {{nb_interests}} albums in your personal list
-        {% endtrans %}
-    </p>
-
-    {{block.interests_grid(interests, 'file-image')}}
-{% endif %}
-{% call form.form(class="form--single") %}
-    {{ field.text("jid", _("device full jid"), required=true)}}
-    {{ field.submit(_("Access")) }}
-{% endcall %}
 {% endblock body %}