Skip to content

Commit 8ea099d

Browse files
authored
Fix iframe icons (#1405)
+ Bootstrap Icons were not displayed in iframe display. (css not loaded) + Replace old modals in "iframe" mode by BS5 modals. + Display icons on video metadatas
1 parent 20a8080 commit 8ea099d

File tree

11 files changed

+503
-503
lines changed

11 files changed

+503
-503
lines changed

pod/live/templates/live/event-iframe.html

Lines changed: 161 additions & 155 deletions
Large diffs are not rendered by default.

pod/live/templates/live/event-info.html

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313

1414
<div id="video-meta">
1515
<div id="info" class="pod-info-video__info">
16-
<h2 class="tab-title visually-hidden"><i class=" bi bi-info-circle"></i>&nbsp;{% trans 'Infos' %}</h2>
16+
<h2 class="tab-title visually-hidden">{% trans 'Infos' %}</h2>
1717
<ul class="list-inline d-flex flex-wrap">
1818
<li class="col-6 col-md-4">
19-
<span class="pod-meta-title">{% trans 'Broadcasted on:' %}</span>
19+
<span class="pod-meta-title">
20+
<i class="bi bi-calendar-event" aria-hidden="true"></i>
21+
{% trans 'Broadcasted on:' %}
22+
</span>
2023
<div>
2124
{% if event.start_date|date:"d/m/Y" == event.end_date|date:"d/m/Y" %}
2225
{% blocktrans with start_date=event.start_date|date:"d/m/Y" start_time=event.start_date|time:"H:i" end_time=event.end_date|time:"H:i" %}{{start_date}} from {{start_time}} to {{end_time}}{% endblocktrans %}
@@ -26,23 +29,34 @@ <h2 class="tab-title visually-hidden"><i class=" bi bi-info-circle"></i>&nbsp;{%
2629
</div>
2730
</li>
2831
<li class="col-6 col-md-4">
29-
<span class="pod-meta-title">{% trans 'Location:' %}</span>
30-
<div>{{ event.broadcaster.building.name }} - {{ event.broadcaster.name }}</div>
32+
<span class="pod-meta-title">
33+
<i class="bi bi-geo" aria-hidden="true"></i>
34+
{% trans 'Location:' %}
35+
</span>
36+
<div>{{ event.broadcaster.building.name }} - {{ event.broadcaster.name }}</div>
3137
</li>
3238
<li class="col-6 col-md-4">
33-
<span class="pod-meta-title">{% trans 'Added by:' %}</span>
34-
<a class="btn btn-link btn-sm px-0" href="{% url 'videos:videos' %}?owner={{ event.owner.get_username}}" {% if request.GET.is_iframe %}target="_blank" {% endif %} title="{% blocktrans with video_user_name=video.owner %}Show video list of user “{{ video_user_name }}”{% endblocktrans %}" data-bs-toggle="tooltip" data-bs-placement="bottom">
39+
<span class="pod-meta-title">
40+
<i class="bi bi-person-circle" aria-hidden="true"></i>
41+
{% trans 'Added by:' %}
42+
</span>
43+
<a class="btn btn-link btn-sm px-0" href="{% url 'videos:videos' %}?owner={{ event.owner.get_username}}" {% if request.GET.is_iframe %}target="_blank" {% endif %} title="{% blocktrans with video_user_name=video.owner %}Show video list of user “{{ video_user_name }}”{% endblocktrans %}" data-bs-toggle="tooltip" data-bs-placement="bottom">
3544
{% if event.owner.owner.userpicture.file %}
3645
{% thumbnail event.owner.owner.userpicture.file "x34" as im %}
3746
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class='userpicture rounded' alt="" loading="lazy">
3847
{% endthumbnail %}
3948
{% endif %}
4049
{{ event.owner }}
41-
</a>
50+
</a>
4251
</li>
4352
<li class="col-6 col-md-4">
44-
<span class="pod-meta-title">{% trans 'Type:' %}</span>
45-
<a class="btn btn-link btn-sm px-0" href="{% url 'videos:videos' %}?type={{ event.type.slug }}" {% if request.GET.is_iframe %}target="_blank"{% endif %}>{{ event.type.title }}</a>
53+
<span class="pod-meta-title">
54+
<i class="bi bi-file-earmark" aria-hidden="true"></i>
55+
{% trans 'Type:' %}
56+
</span>
57+
<a class="btn btn-link btn-sm px-0" href="{% url 'videos:videos' %}?type={{ event.type.slug }}" {% if request.GET.is_iframe %}target="_blank"{% endif %}>
58+
{{ event.type.title }}
59+
</a>
4660
</li>
4761
</ul>
4862
</div>
@@ -55,7 +69,8 @@ <h2 class="tab-title visually-hidden"><i class=" bi bi-info-circle"></i>&nbsp;{%
5569
<div class="modal-content">
5670
<div class="modal-header">
5771
<h2 class="modal-title h5" id="shareLabel">
58-
<i class="bi bi-share" aria-hidden="true"></i>&nbsp;{% if event.is_draft %}{% trans 'Embed/Share (Draft Mode)' %}{% else %}{% trans 'Embed/Share' %}{% endif %}
72+
<i class="bi bi-share" aria-hidden="true"></i>&nbsp;
73+
{% if event.is_draft %}{% trans 'Embed/Share (Draft Mode)' %}{% else %}{% trans 'Embed/Share' %}{% endif %}
5974
</h2>
6075
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Close' %}"></button>
6176
</div>
@@ -103,20 +118,23 @@ <h2 class="modal-title h5" id="shareLabel">
103118
{% endif %}
104119

105120
<fieldset class="pod-share-fieldset">
106-
<legend><i class="bi bi-link-45deg" aria-hidden="true"></i>&nbsp;{% trans 'Share the link' %}</legend>
107-
<div class="form-group">
108-
<label for="txtpartage">{% trans 'Use this link to share the event:' %}</label>
109-
<input class="form-control" type="text" name="txtpartage" id="txtpartage" value="{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.META.HTTP_HOST }}{% url 'live:event' slug=event.slug %}{% if event.is_draft == True %}{{ event.get_hashkey }}/{% endif %}">
110-
</div>
111-
<div class="form-group m-2">
112-
{% get_event_qrcode event.id as qrcode %}
113-
<label>{% trans 'QR code for this link:' %}</label><br>
114-
{{ qrcode }}
115-
<br>
116-
<button id="btn-download-qr-code" type="submit" data-slug="{{ event.slug }}"
117-
class="btn btn-primary my-2"
118-
title="{% trans 'Download this QR code' %}">{% trans 'Download' %}</button>
119-
</div>
121+
<legend>
122+
<i class="bi bi-link-45deg" aria-hidden="true"></i>
123+
{% trans 'Share the link' %}
124+
</legend>
125+
<div class="form-group">
126+
<label for="txtpartage">{% trans 'Use this link to share the event:' %}</label>
127+
<input class="form-control" type="text" name="txtpartage" id="txtpartage" value="{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.META.HTTP_HOST }}{% url 'live:event' slug=event.slug %}{% if event.is_draft == True %}{{ event.get_hashkey }}/{% endif %}">
128+
</div>
129+
<div class="form-group m-2">
130+
{% get_event_qrcode event.id as qrcode %}
131+
<label>{% trans 'QR code for this link:' %}</label><br>
132+
{{ qrcode }}
133+
<br>
134+
<button id="btn-download-qr-code" type="submit" data-slug="{{ event.slug }}"
135+
class="btn btn-primary my-2"
136+
title="{% trans 'Download this QR code' %}">{% trans 'Download' %}</button>
137+
</div>
120138
</fieldset>
121139
</div> <!-- End modal body-->
122140
</div> <!-- End modal content-->

pod/locale/fr/LC_MESSAGES/django.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10087,8 +10087,8 @@ msgid "Original version"
1008710087
msgstr "Version originale"
1008810088

1008910089
#: pod/video/templates/videos/link_video_dropdown_menu.html
10090-
msgid "Enhance the video with AI"
10091-
msgstr "Améliorer la vidéo avec l’IA"
10090+
msgid "Complete the video with AI"
10091+
msgstr "Compléter la vidéo avec l’IA"
1009210092

1009310093
#: pod/video/templates/videos/link_video_dropdown_menu.html
1009410094
msgid "Complete the video"

pod/main/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@
321321
SOCIAL_SHARE = ["X", "FACEBOOK", "LINKEDIN", "BLUESKY", "MASTODON"]
322322

323323
# Disable TinyMCE relative_urls to avoid auto replace self domain urls
324-
# i.e : http://pod.localhost:8000/video/0001-podmp4/ become ../../0001-podmp4/
324+
# i.e : http://pod.localhost/video/0001-podmp4/ become ../../0001-podmp4/
325325
TINYMCE_DEFAULT_CONFIG = {
326326
"theme": "silver",
327327
"height": 500,

pod/main/static/css/pod.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,10 +1336,8 @@ main {
13361336
}
13371337

13381338
.video-info_duration-view-share {
1339-
display: flex;
13401339
font-size: 90%;
13411340
gap: 0.75rem;
1342-
align-items: center;
13431341
justify-content: flex-start;
13441342
border-bottom: 1px solid var(--pod-background-neutre1-bloc);
13451343
padding-bottom: 0.75rem;
@@ -1383,10 +1381,6 @@ main {
13831381
margin-left: auto;
13841382
}
13851383

1386-
.pod-info-video__buttons {
1387-
margin-left: auto;
1388-
}
1389-
13901384
.pod-btn-share i,
13911385
.pod-info-video__signal i {
13921386
transition: all 0.2s ease-in;

pod/main/static/js/videojs-info-controlbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function showInfoVideo() {
4848
* Resize responsively the Pod video Information panel
4949
*/
5050
function resizeInfo() {
51-
const ihead = document.querySelector("#info-video-wrapper > .iframe-header");
51+
const ihead = document.querySelector("#info-video-wrapper .iframe-header");
5252
const ph = player.el().offsetHeight;
5353
const pb = parseInt(player.el().style.top, 10) + ph - 30;
5454
const pw = ph * hdres; // ('#podvideoplayer .vjs-poster').width()

pod/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
##
2020
# Version of the project
2121
#
22-
VERSION = "4.1.0"
22+
VERSION = "4.2.0"
2323

2424
##
2525
# Installed applications list

pod/video/static/css/video-iframe.css

Lines changed: 6 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -24,44 +24,18 @@ body {
2424
margin-right: auto;
2525
}
2626

27-
#info-video-wrapper {
28-
overflow: hidden;
29-
position: absolute;
30-
top: 0;
31-
left: 0;
32-
bottom: 30px;
33-
width: 100%;
34-
border-radius: 0;
35-
padding: 0;
36-
margin: 0;
37-
background-color: rgb(250 250 250 / 90%);
38-
z-index: 10;
39-
}
40-
41-
#info-video {
42-
padding: 1em;
43-
box-sizing: border-box;
44-
overflow: auto;
45-
position: absolute;
46-
47-
/* top: 3em; */
48-
width: 100%;
49-
bottom: 0;
50-
z-index: 1000;
51-
border-radius: 0;
52-
margin: 0;
27+
.video-info_duration-view-share {
28+
font-size: 90%;
29+
gap: 0.75rem;
30+
justify-content: flex-start;
31+
border-bottom: 1px solid #DDD;
32+
padding-bottom: 0.75rem;
5333
}
5434

5535
.tab-title {
5636
font-size: 1.5em;
5737
}
5838

59-
/*
60-
.meta-title {
61-
font-size: 1.2rem;
62-
}
63-
*/
64-
6539
.list-group-item {
6640
background-color: rgb(250 250 250 / 90%) !important;
6741
}
@@ -79,31 +53,6 @@ body {
7953
padding: 0.25em 5em 0 0;
8054
}
8155

82-
.iframe-header .close {
83-
/*
84-
position: absolute;
85-
top: .5em;
86-
right: .5em;
87-
margin: .395em 0 0 .75em;
88-
padding: 0 .25em .15em;
89-
overflow: hidden;
90-
opacity: 1;
91-
font-size: 1.1em;
92-
*/
93-
float: right;
94-
border: 1px solid var(--bs-light);
95-
color: var(--bs-light);
96-
background-color: var(--bs-dark);
97-
border-radius: 2px;
98-
}
99-
100-
.iframe-header .close:hover {
101-
background-color: var(--bs-light);
102-
color: var(--bs-dark);
103-
104-
/* opacity: 1; */
105-
}
106-
10756
#div-video-wrapper #overlay-footer {
10857
/* bottom: 0; */
10958
position: absolute;
@@ -158,24 +107,6 @@ body {
158107
width: 1px;
159108
}
160109

161-
/*
162-
#overlay-footer .vjs-info-button::before,
163-
.video-js .vjs-info-button::before {
164-
content: '';
165-
display: block;width: 100%;height: 100%;
166-
background-color: #FFF;
167-
mask-size: 20px;
168-
-webkit-mask-size: 20px;
169-
}
170-
*/
171-
172-
/*
173-
%3Csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16"%3E%3Cpath d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/%3E %3Cpath d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/%3E%3C/svg%3E
174-
*/
175-
#div-video-wrapper #info-video-wrapper {
176-
display: none;
177-
}
178-
179110
#div-video-wrapper.overlay.info #info-video-wrapper,
180111
#div-video-wrapper.overlay #overlay-footer,
181112
#div-video-wrapper.vjs-not-started #overlay-footer {

pod/video/templates/videos/link_video_dropdown_menu.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
{% if can_enhance_video_with_ai and not enr_is_already_asked and video.encoded and video.encoding_in_progress is False %}
2525
<li>
2626
<a href="{% url 'ai_enhancement:enhance_video' video_slug=video.slug %}"
27-
title="{% trans 'Enhance the video with AI' %} — {{ video.title }}"
27+
title="{% trans 'Complete the video with AI' %} — {{ video.title }}"
2828
class="dropdown-item"
2929
data-bs-toggle="tooltip"
30-
aria-label="{% trans 'Enhance the video with AI' %} — {{ video.title }}"
31-
data-bs-original-title="{% trans 'Enhance the video with AI' %} — {{ video.title }}"
30+
aria-label="{% trans 'Complete the video with AI' %} — {{ video.title }}"
31+
data-bs-original-title="{% trans 'Complete the video with AI' %} — {{ video.title }}"
3232
>
3333
<i class="bi bi-robot card-footer-link-i" aria-hidden="true"></i>
34-
{% trans 'Enhance the video with AI' %}
34+
{% trans 'Complete the video with AI' %}
3535
</a>
3636
</li>
3737
{% endif %}

pod/video/templates/videos/video-iframe.html

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<script src="{% static 'js/videojs-info-controlbar.js' %}?ver={{VERSION}}"></script>
2222

2323
<link rel="stylesheet" href="{% static 'bootstrap/dist/css/bootstrap.min.css' %}?ver={{VERSION}}" crossorigin="anonymous">
24+
<link rel="stylesheet" href="{% static 'bootstrap-icons/font/bootstrap-icons.css' %}?ver={{VERSION}}" crossorigin="anonymous">
25+
2426
<script src="{% static 'bootstrap/dist/js/bootstrap.bundle.min.js' %}?ver={{VERSION}}"></script>
2527
<script id="jsi18n" src="{% url 'javascript-catalog' %}?ver={{VERSION}}"></script>
2628

@@ -44,16 +46,19 @@
4446
{% include 'videos/video-element.html' %}
4547
{% endblock video-element %}
4648

47-
<div id="info-video-wrapper" class="pod-inner">
48-
<div class="iframe-header bg-dark text-white">
49-
<h2 class="video-title">{{ video.title }}</h2>
50-
<button type="button" class="close" aria-label="{% trans 'Close' %}">
51-
<span aria-hidden="true">&times;</span>
52-
</button>
49+
<div id="info-video-wrapper" class="modal pod-inner">
50+
<div class="modal-dialog modal-lg">
51+
<div id="info-video" class="modal-content">
52+
<div class="iframe-header modal-header">
53+
<h2 class="video-title">{{ video.title }}</h2>
54+
<button type="button" class="close btn-close" data-bs-dismiss="modal"
55+
aria-label="{% trans 'Close' %}"></button>
56+
</div>
57+
<div class="pod-info-video modal-body">
58+
{% include 'videos/video-info.html'%}
59+
</div>
60+
</div>
5361
</div>
54-
<div id="info-video" class="pod-info-video">
55-
{% include 'videos/video-info.html'%}
56-
</div>
5762
</div>
5863

5964
</div>

0 commit comments

Comments
 (0)