diff --git a/RELEASE.rst b/RELEASE.rst index da6e6b997..80b553fc0 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -1,6 +1,13 @@ Release Notes ============= +Version 1.109.0 +--------------- + +- fix: rendering issues for migrated content (#1371) +- Add back content class in course content (#1374) +- Video pages layout width-fix (#1369) + Version 1.108.0 (Released March 20, 2024) --------------- diff --git a/base-offline/layouts/partials/video.html b/base-offline/layouts/partials/video.html index 28123b42c..07c5e121d 100644 --- a/base-offline/layouts/partials/video.html +++ b/base-offline/layouts/partials/video.html @@ -15,13 +15,15 @@
{{ .Content }}
- {{ partial "video_player.html" (dict "context" $context "youtubeKey" $youtubeKey "archiveUrl" $archiveUrl "downloadLink" $downloadLink "startTime" $startTime "endTime" $endTime) }} +
+ {{ partial "video_player.html" (dict "context" $context "youtubeKey" $youtubeKey "archiveUrl" $archiveUrl "downloadLink" $downloadLink "startTime" $startTime "endTime" $endTime) }} - {{ if $relatedResourses }} - {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "related-resource" "tabTitle" "Related Resources" "tabContent" $relatedResourses) }} - {{ end }} + {{ if $relatedResourses }} + {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "related-resource" "tabTitle" "Related Resources" "tabContent" $relatedResourses) }} + {{ end }} - {{ if and $optionalTabTitle $optionalTabContent }} - {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "optional-tab" "tabTitle" $optionalTabTitle "tabContent" $optionalTabContent) }} - {{end}} + {{ if and $optionalTabTitle $optionalTabContent }} + {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "optional-tab" "tabTitle" $optionalTabTitle "tabContent" $optionalTabContent) }} + {{end}} +
diff --git a/base-theme/assets/css/main.scss b/base-theme/assets/css/main.scss index d54e5df62..1cdca6907 100644 --- a/base-theme/assets/css/main.scss +++ b/base-theme/assets/css/main.scss @@ -349,10 +349,6 @@ article.content { #course-title { border-bottom: 1px solid $medium-gray; } - - @include media-breakpoint-down(xs) { - padding-right: 15px; - } } .download-file { diff --git a/base-theme/assets/css/variables.scss b/base-theme/assets/css/variables.scss index cfae2290d..d07099748 100644 --- a/base-theme/assets/css/variables.scss +++ b/base-theme/assets/css/variables.scss @@ -69,7 +69,7 @@ $resource-video-thumbnail-color: #494949; $resource-file-thumbnail-color: #0851bb; // video -$video-section-max-width: 100vh; +$video-player-max-width: 100vh; $video-tab-content-color: rgba(51, 51, 51, 0.87); $video-tab-title-color: rgba(255, 255, 255, 0.87); $transcript-hover-background-color: #e1e1e1; diff --git a/base-theme/layouts/partials/external_resource_link.html b/base-theme/layouts/partials/external_resource_link.html index da634d9e2..7497f89be 100644 --- a/base-theme/layouts/partials/external_resource_link.html +++ b/base-theme/layouts/partials/external_resource_link.html @@ -1,4 +1,4 @@ -{{- $text := default .title .text | htmlEscape | page.RenderString -}} +{{- $text := default .title .text -}} {{- $href := default "" .external_url -}} {{- $isBroken := default false .is_broken -}} {{- $backupUrl := default "" .backup_url -}} diff --git a/base-theme/layouts/partials/video.html b/base-theme/layouts/partials/video.html index ec58e894c..856325420 100644 --- a/base-theme/layouts/partials/video.html +++ b/base-theme/layouts/partials/video.html @@ -27,18 +27,20 @@
{{ .Content }}
- {{ partial "video_player.html" (dict "context" $context "youtubeKey" $youtubeKey "archiveUrl" $archiveUrl "captionsLocation" $captionsLocation "startTime" $startTime "endTime" $endTime "downloadLink" $downloadLink "transcriptLink" $transcriptPdfLocation)}} - {{ if $transcriptPdfLocation }} - {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "transcript" "tabTitle" "Transcript" "downloadLink" $downloadLink "transcriptLink" $transcriptPdfLocation) }} - {{ else }} - {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "" "tabTitle" "" "downloadLink" $downloadLink "transcriptLink" $transcriptPdfLocation) }} - {{end}} +
+ {{ partial "video_player.html" (dict "context" $context "youtubeKey" $youtubeKey "archiveUrl" $archiveUrl "captionsLocation" $captionsLocation "startTime" $startTime "endTime" $endTime "downloadLink" $downloadLink "transcriptLink" $transcriptPdfLocation)}} + {{ if $transcriptPdfLocation }} + {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "transcript" "tabTitle" "Transcript" "downloadLink" $downloadLink "transcriptLink" $transcriptPdfLocation) }} + {{ else }} + {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "" "tabTitle" "" "downloadLink" $downloadLink "transcriptLink" $transcriptPdfLocation) }} + {{end}} - {{ if $relatedResourses }} - {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "related-resource" "tabTitle" "Related Resources" "tabContent" $relatedResourses) }} - {{ end }} + {{ if $relatedResourses }} + {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "related-resource" "tabTitle" "Related Resources" "tabContent" $relatedResourses) }} + {{ end }} - {{ if and $optionalTabTitle $optionalTabContent }} - {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "optional-tab" "tabTitle" $optionalTabTitle "tabContent" $optionalTabContent) }} - {{end}} + {{ if and $optionalTabTitle $optionalTabContent }} + {{ partial "video_expandable_tab.html" (dict "context" $context "tabClass" "optional-tab" "tabTitle" $optionalTabTitle "tabContent" $optionalTabContent) }} + {{end}} +
diff --git a/base-theme/layouts/partials/video_embed.html b/base-theme/layouts/partials/video_embed.html index 4d62250e8..763b61fec 100644 --- a/base-theme/layouts/partials/video_embed.html +++ b/base-theme/layouts/partials/video_embed.html @@ -15,7 +15,7 @@ {{ $downloadLink = partial "resource_url.html" (dict "context" $context "url" $downloadLink) }} {{ end }} -
+
{{ partial "video_player.html" (dict "context" $context "youtubeKey" $youtubeKey "archiveUrl" $archiveUrl "captionsLocation" $captionsLocation "startTime" $startTime "endTime" $endTime "downloadLink" $downloadLink) }} {{ range where site.Pages "Params.uid" $uid }} {{ $resourceUrl := partial "page_url.html" (dict "context" $context "url" .Permalink) }} diff --git a/base-theme/layouts/shortcodes/resource_link.html b/base-theme/layouts/shortcodes/resource_link.html index a07957158..1698ca18c 100644 --- a/base-theme/layouts/shortcodes/resource_link.html +++ b/base-theme/layouts/shortcodes/resource_link.html @@ -2,7 +2,10 @@ {{- $title := index .Params 1 | safeHTML -}} {{- $anchor_id := index .Params 2 | default ""}} {{- range where $.Site.Pages "Params.uid" $uuid -}} -{{- if eq .Params.content_type "external-resource" -}} + {{- if eq .Params.content_type "external-resource" -}} + {{- if findRE "^(?:http|https|ftp|mailto)" $title -}} + {{- $title = (replace $title "/" "\\/") -}} + {{- end -}} {{- partial "external_resource_link" (merge .Params (dict "text" $title)) -}} diff --git a/course-v2/assets/css/instructor-insights.scss b/course-v2/assets/css/instructor-insights.scss index 7f2c4f27a..454342703 100644 --- a/course-v2/assets/css/instructor-insights.scss +++ b/course-v2/assets/css/instructor-insights.scss @@ -1,5 +1,8 @@ @import "../../../base-theme/assets/css/variables.scss"; #course-content-section { + margin-top: 20px; + padding-right: 1.5rem; + p { margin-bottom: 1.25rem; } diff --git a/course-v2/assets/css/video.scss b/course-v2/assets/css/video.scss index 79d0c90c3..4e6eb7849 100644 --- a/course-v2/assets/css/video.scss +++ b/course-v2/assets/css/video.scss @@ -72,12 +72,14 @@ } .video-embed { - max-width: $video-section-max-width; margin-bottom: 15px; } +.video-player-wrapper { + max-width: $video-player-max-width; +} + .video-page { - max-width: $video-section-max-width; margin-bottom: 15px; .video-container { diff --git a/course-v2/layouts/partials/course_description.html b/course-v2/layouts/partials/course_description.html index 59ff5a24e..e439c574a 100644 --- a/course-v2/layouts/partials/course_description.html +++ b/course-v2/layouts/partials/course_description.html @@ -9,7 +9,7 @@

{{ if $shouldCollapseDescription }}
- {{- .context.RenderString (truncate 320 $courseData.course_description) -}} + {{- truncate 320 (.context.RenderString $courseData.course_description) -}} {{- partial "link_button.html" (dict "text" "Show more" "id" "expand-description") -}}
diff --git a/package.json b/package.json index 72f9ee1cb..14931d191 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ocw-hugo-themes", - "version": "1.108.0", + "version": "1.109.0", "description": "A Hugo theme for building OCW websites", "repository": "mitodl/ocw-hugo-themes", "main": "base-theme/assets/index.js",