UI: Training templates fluid video layouts #104435
@ -692,7 +692,15 @@ button,
|
||||
.top-level-comment
|
||||
background-color: var(--color-bg-primary)
|
||||
|
||||
// TODO: revise training-group-item-nav display toggle on medium and small screens
|
||||
.training-group-item-content-detail
|
||||
+margin(auto, x)
|
||||
width: 100%
|
||||
|
||||
+media-xl
|
||||
max-width: var(--container-width)
|
||||
width: calc(100% - var(--training-group-item-nav-width))
|
||||
|
||||
// TODO: revise training-group-item-nav display toggle on medium and small screens
|
||||
.training-group-item-nav
|
||||
+margin(3, bottom)
|
||||
width: var(--training-group-item-nav-width)
|
||||
@ -715,8 +723,6 @@ button,
|
||||
|
||||
.training-header-img-helper
|
||||
align-items: center
|
||||
display: flex
|
||||
max-height: calc(var(--spacer) * 25)
|
||||
overflow: hidden
|
||||
|
||||
img
|
||||
|
@ -7,9 +7,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block training_header_image %}
|
||||
{% endblock training_header_image %}
|
||||
|
||||
<div class="container-fluid pt-2 pt-md-3">
|
||||
<div class="d-md-none mb-3 pt-2 row">
|
||||
<div class="col-12">
|
||||
|
@ -19,65 +19,70 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block nexted_content %}
|
||||
{% if chapter.thumbnail %}
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
{% if section.is_free or request.user|has_active_subscription %}
|
||||
{% firstof chapter.picture_header chapter.thumbnail as header %}
|
||||
{% include "common/components/helpers/image_set.html" with alt=chapter.name classes="img-fluid img-width-100 rounded" img_source=header xsmall_width="600" small_width="800" medium_width="1000" large_width="1200" xlarge_width="1920" %}
|
||||
{% else %}
|
||||
{% include 'common/components/content_locked.html' with background=training.picture_header %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="mb-3 row ">
|
||||
<div class="col">
|
||||
<div class="align-items-start row">
|
||||
<div class="col-12 col-md mb-3">
|
||||
<div class="d-md-block d-none">
|
||||
<p class="small text-muted">{{ training.name }}</p>
|
||||
<h2 class="mb-0">{{ chapter.name }}</h2>
|
||||
</div>
|
||||
<div class="training-group-item-content-detail">
|
||||
{% if chapter.thumbnail %}
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
{% if section.is_free or request.user|has_active_subscription %}
|
||||
{% firstof chapter.picture_header chapter.thumbnail as header %}
|
||||
{% include "common/components/helpers/image_set.html" with alt=chapter.name classes="img-fluid img-width-100 rounded" img_source=header xsmall_width="600" small_width="800" medium_width="1000" large_width="1200" xlarge_width="1920" %}
|
||||
{% else %}
|
||||
{% include 'common/components/content_locked.html' with background=training.picture_header %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-12 col-md-auto mb-2 mb-md-0 mt-0 mt-md-3">
|
||||
<div class="button-toolbar-container">
|
||||
<div class="button-toolbar">
|
||||
{% if user.is_staff %}
|
||||
<a href="{{ chapter.admin_url }}" class="btn btn-admin">
|
||||
<i class="i-edit"></i>
|
||||
<span>Edit</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<button data-bs-toggle="dropdown" class="btn btn-link">
|
||||
<i class="i-more-vertical"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a href="https://projects.blender.org/studio/blender-studio/issues/new" target="_blank" class="dropdown-item">
|
||||
<i class="i-flag"></i>
|
||||
<span>Report Problem</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="align-items-start row">
|
||||
<div class="col-12 col-md mb-3">
|
||||
<div class="d-md-block d-none">
|
||||
<p class="small text-muted">{{ training.name }}</p>
|
||||
<h2 class="mb-0">{{ chapter.name }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto mb-2 mb-md-0 mt-0 mt-md-3">
|
||||
<div class="button-toolbar-container">
|
||||
<div class="button-toolbar">
|
||||
{% if user.is_staff %}
|
||||
<a href="{{ chapter.admin_url }}" class="btn btn-admin">
|
||||
<i class="i-edit"></i>
|
||||
<span>Edit</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<button data-bs-toggle="dropdown" class="btn btn-link">
|
||||
<i class="i-more-vertical"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a href="https://projects.blender.org/studio/blender-studio/issues/new" target="_blank" class="dropdown-item">
|
||||
<i class="i-flag"></i>
|
||||
<span>Report Problem</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if chapter.description %}
|
||||
<section class="markdown-text mb-3">{% with_shortcodes chapter.description|markdown %}</section>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="cards card-layout-card-transparent files">
|
||||
{% for section in chapter.sections.all %}
|
||||
{% if section.is_published %}
|
||||
{% include "common/components/file_section.html" with section=section %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if chapter.description %}
|
||||
<section class="mb-3 row">
|
||||
<div class="col col-lg-9">
|
||||
<div class="markdown-text">
|
||||
{% with_shortcodes chapter.description|markdown %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<div class="mb-3 row">
|
||||
<div class="col-12">
|
||||
<div class="cards card-layout-card-transparent files">
|
||||
{% for section in chapter.sections.all %}
|
||||
{% if section.is_published %}
|
||||
{% include "common/components/file_section.html" with section=section %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -11,24 +11,22 @@
|
||||
{% javascript 'training' %}
|
||||
{% endblock scripts %}
|
||||
|
||||
{% block training_header_image %}
|
||||
{% if training.picture_header_url %}
|
||||
<div class="container">
|
||||
<div class="mt-3 row">
|
||||
<div class="col training-header-img-helper">
|
||||
<img src="{{ training.picture_header_url }}" class="img-fluid img-width-100 rounded" alt="{{ training.name }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock training_header_image %}
|
||||
|
||||
{% block nexted_content %}
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row align-items-start mb-2">
|
||||
<div class="col-12 col-md">
|
||||
|
||||
<section class="training-group-item training-group-item-content-detail">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="mb-3 row">
|
||||
martonlente marked this conversation as resolved
Outdated
|
||||
<div class="col">
|
||||
{% if training.picture_header_url %}
|
||||
<div class="training-header-img-helper">
|
||||
<img src="{{ training.picture_header_url }}" class="img-fluid img-width-100 rounded" alt="{{ training.name }}">
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="align-items-start mb-3 row">
|
||||
<div class="col-12 col-md">
|
||||
<h1 class="mb-0">{{ training.name }}</h1>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto">
|
||||
@ -75,7 +73,13 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<section class="markdown-text mb-3">{% with_shortcodes training.summary_rendered %}</section>
|
||||
<section class="row">
|
||||
<div class="col-12 col-lg-9">
|
||||
<div class="markdown-text">
|
||||
{% with_shortcodes training.summary_rendered %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user
This entire div can be empty if
{% if training.picture_header_url %}
is false.Adding a gap because of
mb-3
without anything inside.Move the check up here.
Thanks, it has been fixed.