UI: Training templates fluid video layouts #104435

Merged
Márton Lente merged 13 commits from ui/training-layout-fluid into main 2024-08-23 16:50:27 +02:00
2 changed files with 14 additions and 22 deletions
Showing only changes of commit 432adbe51b - Show all commits

View File

@ -698,8 +698,6 @@ button,
width: var(--training-group-item-nav-width)
.training-group-item-video
@extend .box
background-color: black
+margin(3, bottom)
padding: 0

View File

@ -21,11 +21,8 @@
{% block nexted_content %}
<div class="training-group-item training-group-item-video">
{% if section.preview_youtube_link %}
<div class="overflow-hidden rounded">
{% include 'common/components/video_player_embed.html' with url=section.preview_youtube_link rounded=True %}
</div>
{% elif video %}
<div class="overflow-hidden rounded">
{% if section.is_free or request.user|has_active_subscription %}
{% if user.is_anonymous %}
{% include 'common/components/video_player.html' with url=video.source.url poster=section.thumbnail_m_url tracks=section.static_asset.video.tracks.all loop=section.static_asset.video.loop %}
@ -35,10 +32,8 @@
{% else %}
{% include 'common/components/content_locked.html' with background=section.thumbnail_m_url %}
{% endif %}
</div>
{% else %}
<div class="col">
<div class="overflow-hidden rounded">
{% if section.is_free or request.user|has_active_subscription %}
{% if section.thumbnail %}
{% include "common/components/helpers/image_set.html" with alt=section.name classes="img-fluid img-width-100 rounded" img_source=section.thumbnail xsmall_width="600" small_width="800" medium_width="1000" large_width="1200" xlarge_width="1920" %}
@ -47,7 +42,6 @@
{% include 'common/components/content_locked.html' with background=training.picture_header %}
{% endif %}
</div>
</div>
{% endif %}
</div>
<div class="training-group-item training-group-item-content">