annotate sat_templates/templates/bulma/photo/item.html @ 287:7670752665e0

bulma (photo/album): added a `cover` button to change album cover
author Goffi <goffi@goffi.org>
date Sat, 05 Sep 2020 22:01:07 +0200
parents 671085989f2f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
243
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 <div class="column is-4 item" data-item='{{file|tojson}}'>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 <div class="card x-is-hoverable">
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 <div class="card-image is-photo-thumbnail-container is-flex has-items-centered has-background-light">
283
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
4 {% if file.mime_type[:5] == 'video' %}
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
5 <a href="{{file.url}}" class="is-video-thumbnail-wrapper is-wrapping photo_thumb_click">
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
6 <img class="is-photo-thumbnail" src="{{file.thumb_url}}">
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
7 <div class="media_overlay_play is-flex has-items-centered">
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
8 <span class="icon">
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
9 <i class="icon-play-circled"></i>
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
10 </span>
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
11 </div>
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
12 </a>
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
13 {% else %}
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
14 <a href="{{file.url}}" class="is-wrapping photo_thumb_click">
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
15 <img class="is-photo-thumbnail" src="{{file.thumb_url}}" alt="{{file.name}}">
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
16 </a>
a50075db625c bulma (photo/item): show videos and their thumbnails
Goffi <goffi@goffi.org>
parents: 257
diff changeset
17 {% endif %}
243
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 </div>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 <div class="card-content" onclick="clicked_mh_fix('{{'comments_panel'|next_gidx}}')">
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 <div class="level">
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 <div class="level-left">
284
671085989f2f bulma (photo/item): display delete icon when user is album owner and no affiliation is set
Goffi <goffi@goffi.org>
parents: 283
diff changeset
22 {% if file.affiliation == "owner" or not file.affiliation and directory_affiliation == "owner" %}
257
1a68c078a233 bulma (photo/item): only show delete icon if user is owner of the item
Goffi <goffi@goffi.org>
parents: 252
diff changeset
23 <div class="level-item is-size-7 x-is-hoverable-primary action_delete">
1a68c078a233 bulma (photo/item): only show delete icon if user is owner of the item
Goffi <goffi@goffi.org>
parents: 252
diff changeset
24 {{ icon('trash-empty', cls='icon is-small') }}
1a68c078a233 bulma (photo/item): only show delete icon if user is owner of the item
Goffi <goffi@goffi.org>
parents: 252
diff changeset
25 </div>
1a68c078a233 bulma (photo/item): only show delete icon if user is owner of the item
Goffi <goffi@goffi.org>
parents: 252
diff changeset
26 {% endif %}
287
7670752665e0 bulma (photo/album): added a `cover` button to change album cover
Goffi <goffi@goffi.org>
parents: 284
diff changeset
27 {% if directory_affiliation == "owner" %}
7670752665e0 bulma (photo/album): added a `cover` button to change album cover
Goffi <goffi@goffi.org>
parents: 284
diff changeset
28 <div class="level-item is-size-7 x-is-hoverable-primary action_cover">
7670752665e0 bulma (photo/album): added a `cover` button to change album cover
Goffi <goffi@goffi.org>
parents: 284
diff changeset
29 {{ icon('picture', cls='icon is-small') }}
7670752665e0 bulma (photo/album): added a `cover` button to change album cover
Goffi <goffi@goffi.org>
parents: 284
diff changeset
30 </div>
7670752665e0 bulma (photo/album): added a `cover` button to change album cover
Goffi <goffi@goffi.org>
parents: 284
diff changeset
31 {% endif %}
243
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
32 </div>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
33 <div class="level-right">
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 <div class="level-item is-size-7">
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 {% if file.comments_url is defined %}
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
36 {% if file.comments_count %}
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 <span class='comments__count'>{{file.comments_count}}</span>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 {% endif %}
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
39 {{ icon('comment-empty', cls='icon is-small') }}
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 {% endif %}
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 </div>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
42 </div>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
43 </div>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 </div>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
45 </div>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 {% if uploading %}
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
47 <progress class="progress is-info mt-4 has-background-white" value="0" max="100">0%</progress>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
48 {% else %}
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
49 <div id='{{'comments_panel'|cur_gidx}}' class="mt-4 panel-drawer">
247
40fccd3b7cf0 updated code to handle blog items following data structure change in backend/Libervia
Goffi <goffi@goffi.org>
parents: 243
diff changeset
50 {% if file.comments %}
40fccd3b7cf0 updated code to handle blog items following data structure change in backend/Libervia
Goffi <goffi@goffi.org>
parents: 243
diff changeset
51 {{ blog.show_items(file.comments['items'], expanded=true, dates_fmt='relative') }}
40fccd3b7cf0 updated code to handle blog items following data structure change in backend/Libervia
Goffi <goffi@goffi.org>
parents: 243
diff changeset
52 {% endif %}
243
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
53 <div class="comment_post mt-4">
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
54 {{- textbox.comment_or_login(service=file.comments_service, node=file.comments_node) -}}
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
55 </div>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
56 </div>
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
57 {% endif %}
2b8d18a9df00 bulma (photo/album): change for dynamic content:
Goffi <goffi@goffi.org>
parents:
diff changeset
58 </div>