diff --git a/assets/scss/_videos.scss b/assets/scss/_videos.scss index b7c75310..9071407b 100644 --- a/assets/scss/_videos.scss +++ b/assets/scss/_videos.scss @@ -45,4 +45,36 @@ font-size: .9rem; margin-top: .5rem; font-style: italic; - } \ No newline at end of file + } + related-videos { + margin: 2rem 0; +} +.carousel-item { + padding: 1rem; +} + +.carousel-control-prev, +.carousel-control-next { + width: 5%; + opacity: 0.7; +} + +.carousel-control-prev:hover, +.carousel-control-next:hover { + opacity: 1; +} + +.carousel-indicators { + bottom: -40px; +} + +.carousel-indicators button { + background-color: #666; + height: 3px; + opacity: 0.5; +} + +.carousel-indicators button.active { + background-color: #fff; + opacity: 1; +} \ No newline at end of file diff --git a/content/en/videos/advanced/advanced-videos/video.md b/content/en/videos/advanced/advanced-videos/video.md index ef67d21c..67be6270 100644 --- a/content/en/videos/advanced/advanced-videos/video.md +++ b/content/en/videos/advanced/advanced-videos/video.md @@ -3,6 +3,7 @@ title: "Local video 1" description: "Birth of Kanvas logo from Meshery Birth of Kanvas logo from Meshery" src: "/videos/pattern-import.mp4" videoType: local +video_id: "Do7htKrRzdA" muted: true # optional autoplay: true # optional loop: true #optional diff --git a/content/en/videos/getting-started/comments/adding-c.md b/content/en/videos/getting-started/comments/adding-c.md new file mode 100644 index 00000000..9613a6c5 --- /dev/null +++ b/content/en/videos/getting-started/comments/adding-c.md @@ -0,0 +1,15 @@ +--- +title: "Design Reviews: Adding Comments" +description: > + Add comments to your designs in Kanvas's Designer Mode to enhance collaboration and streamline design reviews. +video_id: "bb6J--aApk8" +videoType: youtube # or "local" +muted: true # optional +autoplay: true # optional +loop: true #optional +categories: [Designer] +formats: [video] +tags: [review, collaboration, comments] +--- + +{{< youtube bb6J--aApk8 >}} \ No newline at end of file diff --git a/content/en/videos/getting-started/comments/adding-cm2.md b/content/en/videos/getting-started/comments/adding-cm2.md new file mode 100644 index 00000000..9613a6c5 --- /dev/null +++ b/content/en/videos/getting-started/comments/adding-cm2.md @@ -0,0 +1,15 @@ +--- +title: "Design Reviews: Adding Comments" +description: > + Add comments to your designs in Kanvas's Designer Mode to enhance collaboration and streamline design reviews. +video_id: "bb6J--aApk8" +videoType: youtube # or "local" +muted: true # optional +autoplay: true # optional +loop: true #optional +categories: [Designer] +formats: [video] +tags: [review, collaboration, comments] +--- + +{{< youtube bb6J--aApk8 >}} \ No newline at end of file diff --git a/content/en/videos/getting-started/comments/adding-cm4.md b/content/en/videos/getting-started/comments/adding-cm4.md new file mode 100644 index 00000000..9613a6c5 --- /dev/null +++ b/content/en/videos/getting-started/comments/adding-cm4.md @@ -0,0 +1,15 @@ +--- +title: "Design Reviews: Adding Comments" +description: > + Add comments to your designs in Kanvas's Designer Mode to enhance collaboration and streamline design reviews. +video_id: "bb6J--aApk8" +videoType: youtube # or "local" +muted: true # optional +autoplay: true # optional +loop: true #optional +categories: [Designer] +formats: [video] +tags: [review, collaboration, comments] +--- + +{{< youtube bb6J--aApk8 >}} \ No newline at end of file diff --git a/layouts/partials/video-section-related.html b/layouts/partials/video-section-related.html index 292c84d5..51c5a549 100644 --- a/layouts/partials/video-section-related.html +++ b/layouts/partials/video-section-related.html @@ -1,19 +1,97 @@
- {{ $page := .Page -}} - - {{ $pages := (where .Site.Pages ".Params.video_id" "!=" nil) -}} - - {{ if or $page.Params.no_list (eq (len $pages) 0) -}} - -
- {{ range $pages -}} - {{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) -}} -
-
- {{- .Title -}} -
-

{{ .Description | markdownify -}}

+ {{ $currentPage := .Page }} + {{ $currentTags := .Params.tags }} + {{ $currentCategories := .Params.categories }} + + {{ $videoPages := (where .Site.Pages ".Params.video_id" "!=" nil) }} + + {{ $matchingVideos := slice }} + + {{ range $videoPages }} + {{ $page := . }} + {{ $matchScore := 0 }} + + {{ range $currentTags }} + {{ if in $page.Params.tags . }} + {{ $matchScore = add $matchScore 1 }} + {{ end }} + {{ end }} + + {{ range $currentCategories }} + {{ if in $page.Params.categories . }} + {{ $matchScore = add $matchScore 2 }} + {{ end }} + {{ end }} + + {{ if gt $matchScore 0 }} + {{ $matchingVideos = $matchingVideos | append (dict "page" $page "score" $matchScore) }} + {{ end }} + + {{ end }} + + {{ $sortedVideos := sort $matchingVideos "score" "desc" }} + + + {{ if gt (len $sortedVideos) 0 }} + + {{ end }}
+ + + \ No newline at end of file