diff --git a/common/static/common/styles/studio/_custom.sass b/common/static/common/styles/studio/_custom.sass index 415af399..8219b9e9 100644 --- a/common/static/common/styles/studio/_custom.sass +++ b/common/static/common/styles/studio/_custom.sass @@ -655,10 +655,88 @@ button, filter: blur(var(--filter-blur-value)) transform: scale(1.1) +.training-group + --training-group-item-content-width: 100% + --training-group-item-nav-width: 100% + + +media-xl + --training-group-item-content-width: 40.0rem + --training-group-item-nav-width: 30.0rem + + +media-xxl + --training-group-item-content-width: 54.0rem + --training-group-item-nav-width: 40.0rem + + .training-group-item + +padding(3, x) + + &:last-child + +media-xl + padding-right: 0 + + .training-group-item-content + width: var(--training-group-item-content-width) + + .box + background-color: var(--color-bg-tertiary) + +padding(3) + + .comment-input-div + &.form-control + background-color: var(--color-bg-primary) + + .replies + .comment + background-color: var(--color-bg-secondary) + + .top-level-comment + background-color: var(--color-bg-primary) + + .training-group-item-content-detail + width: 100% + + .cards-item-title + font-size: var(--fs-h4) + line-height: var(--lh-base) + + +media-lg + .training-group-item-content-detail-inner + max-width: 114.0rem + + +media-xl + width: calc(100% - var(--training-group-item-nav-width)) + + .cards + --cards-items-per-row: 4 + + +media-xxl + .cards + --cards-items-per-row: 5 + + // 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) + + .training-group-item-video + background-color: black + +margin(3, bottom) + padding: 0 + width: 100% + + +media-xl + align-items: center + display: flex + height: 100vh + justify-content: center + left: 0 + margin-bottom: 0 + position: sticky + top: 0 + width: calc(100% - var(--training-group-item-content-width) - var(--training-group-item-nav-width)) + .training-header-img-helper align-items: center - display: flex - max-height: calc(var(--spacer) * 25) overflow: hidden img diff --git a/common/static/common/styles/studio/_variables.sass b/common/static/common/styles/studio/_variables.sass index e8671a25..77303540 100644 --- a/common/static/common/styles/studio/_variables.sass +++ b/common/static/common/styles/studio/_variables.sass @@ -1,5 +1,8 @@ $container-max-widths: (sm: 100%, md: 100%, lg: 100%, xl: 1320px, xxl: 1600px) +// Redeclare $grid-breakpoints 'xl' and 'xxl' with web-assets defaults to override obsolete Bootstrap breakpoints coming from flat, pre-compiled vendor files +$grid-breakpoints: (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1320px, xxl: 1680px) + $container-width: map-get($container-max-widths, 'xl') $font-path: "/static/assets/fonts" diff --git a/common/static/common/styles/studio/_web-assets-overrides.sass b/common/static/common/styles/studio/_web-assets-overrides.sass index d9276a42..47dc3b5c 100644 --- a/common/static/common/styles/studio/_web-assets-overrides.sass +++ b/common/static/common/styles/studio/_web-assets-overrides.sass @@ -168,6 +168,10 @@ textarea /* Grid. */ // TODO: consider moving to web-assets +.container-fluid + .row + +margin(0, x) + .row width: 100% diff --git a/training/templates/training/base_training.html b/training/templates/training/base_training.html index f326b93a..dd3b18c9 100644 --- a/training/templates/training/base_training.html +++ b/training/templates/training/base_training.html @@ -7,28 +7,22 @@ {% endblock %} {% block content %} - {% block training_header_image %} - {% endblock training_header_image %} - -
+
-
- {% endblock content %} diff --git a/training/templates/training/chapter.html b/training/templates/training/chapter.html index 91b61ed7..579490cc 100644 --- a/training/templates/training/chapter.html +++ b/training/templates/training/chapter.html @@ -19,64 +19,70 @@ {% endblock %} {% block nexted_content %} - {% if chapter.thumbnail %} -
-
- {% 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 %} -
+
+
+ {% if chapter.thumbnail %} +
+
+ {% 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 %} +
+
+ {% endif %} + +
+
+
+

{{ training.name }}

+

{{ chapter.name }}

+
+
+
+
+
+ {% if user.is_staff %} + + + Edit + + {% endif %} + + + +
+
+
+
+ + {% if chapter.description %} +
+
+
+ {% with_shortcodes chapter.description|markdown %} +
+
+
+ {% endif %}
- {% endif %} -
-
-
-
-
-

{{ training.name }}

-

{{ chapter.name }}

-
-
-
-
-
- {% if user.is_staff %} - - - Edit - - {% endif %} - - - -
-
-
-
- - {% if chapter.description %} -
{% with_shortcodes chapter.description|markdown %}
- {% endif %} - -
-
-
- {% for section in chapter.sections.all %} - {% if section.is_published %} - {% include "common/components/file_section.html" with section=section %} - {% endif %} - {% endfor %} -
+
+
+
+ {% for section in chapter.sections.all %} + {% if section.is_published %} + {% include "common/components/file_section.html" with section=section %} + {% endif %} + {% endfor %}
diff --git a/training/templates/training/section.html b/training/templates/training/section.html index 76c80440..e0e66805 100644 --- a/training/templates/training/section.html +++ b/training/templates/training/section.html @@ -19,45 +19,35 @@ {% endblock %} {% block nexted_content %} -
+
{% if section.preview_youtube_link %} -
-
- {% include 'common/components/video_player_embed.html' with url=section.preview_youtube_link rounded=True %} -
-
+ {% include 'common/components/video_player_embed.html' with url=section.preview_youtube_link rounded=True %} {% elif video %} -
-
- {% 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 %} - {% else %} - {% include 'common/components/video_player.html' with url=video.source.url progress_url=video.progress_url start_position=video.start_position poster=section.thumbnail_m_url tracks=section.static_asset.video.tracks.all loop=section.static_asset.video.loop %} - {% endif %} - {% else %} - {% include 'common/components/content_locked.html' with background=section.thumbnail_m_url %} - {% endif %} -
-
+ {% 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 %} + {% else %} + {% include 'common/components/video_player.html' with url=video.source.url progress_url=video.progress_url start_position=video.start_position poster=section.thumbnail_m_url tracks=section.static_asset.video.tracks.all loop=section.static_asset.video.loop %} + {% endif %} + {% else %} + {% include 'common/components/content_locked.html' with background=section.thumbnail_m_url %} + {% endif %} {% else %} -
-
- {% 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" %} - {% endif %} - {% else %} - {% include 'common/components/content_locked.html' with background=training.picture_header %} - {% endif %} + {% 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" img_source=section.thumbnail xsmall_width="600" small_width="800" medium_width="1000" large_width="1200" xlarge_width="1920" %} + {% endif %} + {% else %} +
+ {% include 'common/components/content_locked.html' with background=training.picture_header %}
-
+ {% endif %} {% endif %}
-
-
-
-
+
+
+
+

{{ chapter.name }}

{{ section.name }}

@@ -92,7 +82,7 @@
{% with_shortcodes section.text|markdown_unsafe %}
-
+
{% include 'comments/components/comment_section.html' %}
diff --git a/training/templates/training/training.html b/training/templates/training/training.html index b2ecebb6..40a1d47c 100644 --- a/training/templates/training/training.html +++ b/training/templates/training/training.html @@ -11,24 +11,23 @@ {% javascript 'training' %} {% endblock scripts %} -{% block training_header_image %} - {% if training.picture_header_url %} -
-
-
- {{ training.name }} -
-
-
- {% endif %} -{% endblock training_header_image %} - {% block nexted_content %} -
-
-
-
-
+ +
+
+
+ {% if training.picture_header_url %} +
+
+
+ {{ training.name }} +
+
+
+ {% endif %} + +
+

{{ training.name }}

@@ -75,7 +74,13 @@
{% endif %} -
{% with_shortcodes training.summary_rendered %}
+
+
+
+ {% with_shortcodes training.summary_rendered %} +
+
+