Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add /videos #420

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
10 changes: 10 additions & 0 deletions content/en/videos/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Videos
description: >
Videos on Cloud and Kanvas
linkTitle: Videos
type: video
cascade:
type: video
---

9 changes: 9 additions & 0 deletions content/en/videos/advanced/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Advanced Videos
description: >
Advanced Videos on Cloud and Kanvas
linkTitle: Advanced Videos
weight: 4
videoGrid: true
---

11 changes: 11 additions & 0 deletions content/en/videos/advanced/advanced-videos/video.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Local video 1"
description: "Birth of Kanvas logo from Meshery Birth of Kanvas logo from Meshery"
src: "/videos/pattern-import.mp4"
videoType: local
muted: true # optional
autoplay: true # optional
loop: true #optional
---

{{< local-video src="/videos/pattern-import.mp4" muted="true" autoplay="true" loop="true" >}}
9 changes: 9 additions & 0 deletions content/en/videos/getting-started/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Getting Started Videos
description: >
Getting started Video on Cloud and Kanvas
linkTitle: Getting Started
weight: 2
videoGrid: true
---

10 changes: 10 additions & 0 deletions content/en/videos/getting-started/logo/birth-of-kanvas-logo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Birth of Kanvas"
description: "Birth of Kanvas logo from Meshery"
video_id: "4WcofErPTx4"
videoType: youtube # or "local"
muted: true # optional
autoplay: true # optional
loop: true #optional
---
{{< youtube 4WcofErPTx4 >}}
9 changes: 9 additions & 0 deletions content/en/videos/intermediate/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Intermediate Videos
description: >
Intermediate videos
linkTitle: Intermediate vidoes
weight: 3
videoGrid: true
---

10 changes: 10 additions & 0 deletions content/en/videos/intermediate/layer5/kanvas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Layer5 kanvas Video"
description: "Layer5 kanvas - figma for DevOps. Design, deploy and manage your cloudnative infrastructure."
video_id: "Do7htKrRzDA"
videoType: youtube # or "local"
muted: true # optional
autoplay: true # optional
loop: true #optional
---
{{< youtube Do7htKrRzDA >}}
10 changes: 10 additions & 0 deletions content/en/videos/intermediate/meshery/meshery-teaser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Meshery Playground Teaser Video"
description: "Meshery Playground - Explore features and capabilities of Meshery."
video_id: "Do7htKrRzDA"
videoType: youtube # or "local"
muted: true # optional
autoplay: true # optional
loop: true #optional
---
{{< youtube Do7htKrRzDA >}}
81 changes: 81 additions & 0 deletions layouts/partials/video-section-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<div class="section-index">
{{ $page := .Page -}}
{{ $pages := (where .Site.Pages "Section" .Section).ByWeight -}}
{{ $pages = (where $pages "Type" "!=" "search") }}
{{ $pages = (where $pages ".Params.hide_summary" "!=" true) -}}
{{ $pages = (where $pages ".Parent" "!=" nil) -}}
{{ $pages = (where $pages ".Parent.File" "!=" nil) -}}
{{ if $page.File -}}
{{ $pages = (where $pages "Parent.File.UniqueID" "==" $page.File.UniqueID) -}}
{{ end -}}
{{ if or $page.Params.no_list (eq (len $pages) 0) -}}
{{/* If no_list is true or we don't have subpages we don't show a list of subpages */}}
{{ else if $page.Params.simple_list -}}
{{/* If simple_list is true we show a bulleted list of subpages */}}
<ul>
{{ range $pages -}}
{{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) }}
<li><a href="{{ $manualLink }}"{{ with .Params.manualLinkTitle }} title="{{ . }}"{{ end }}{{ with .Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }}>{{- .Title -}}</a></li>
{{ end -}}
</ul>
{{ else if $page.Params.videoGrid -}}
<div class="container">
<div class="row">
{{ range $pages -}}
{{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) }}
<a href="{{ $manualLink }}"
{{ with .Params.manualLinkTitle }} title="{{ . }}"{{ end }}
{{ with .Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }} class="col-md-4 mb-4">
<!-- <div > -->
<div class="card h-100 bg-dark text-white border border-secondary shadow-lg">
<div class="video-container position-relative" style="height: 250px; overflow: hidden;">
{{ if .Params.videoType }}
{{ if eq .Params.videoType "local" }}
<video
src="{{ .Params.src }}"
class="card-img-top w-100 h-100 object-fit-cover"
{{ if .Params.muted }}muted{{ end }}
{{ if .Params.autoplay }}autoplay{{ end }}
{{ if .Params.loop }}loop{{ end }}
controls
></video>
{{ else if eq .Params.videoType "youtube" }}
<div class="ratio ratio-16x9 h-100">
<iframe
src="https://www.youtube.com/embed/{{ .Params.video_id }}"
title="{{ .Title }}"
frameborder="0"
class="w-100 h-100"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
</div>
{{ end }}
<div class="position-absolute top-0 start-0 w-100 h-100 bg-gradient-overlay"></div>
{{ end }}
</div>

<div class="card-body">
<h5 class="card-title">{{ .Title }}</h5>
<p class="card-text">{{ .Description }}</p>
</div>
</div>
<!-- </div> -->
</a>
{{ end -}}
</div>
</div>
{{ else -}}
{{/* Otherwise we show a nice formatted list of subpages with page descriptions */}}
<hr class="panel-line">
{{ range $pages -}}
{{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) -}}
<div class="entry">
<h5>
<a href="{{ $manualLink }}"{{ with .Params.manualLinkTitle }} title="{{ . }}"{{ end }}{{ with .Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }}>{{- .Title -}}</a>
</h5>
<p>{{ .Description | markdownify -}}</p>
</div>
{{ end -}}
{{ end -}}
</div>
8 changes: 8 additions & 0 deletions layouts/shortcodes/local-video.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<video
src="{{ .Get "src" }}"
class="card-img-top w-100 h-100 object-fit-cover"
{{ if .Get "muted" }}muted{{ end }}
{{ if .Get "autoplay" }}autoplay{{ end }}
{{ if .Get "loop" }}loop{{ end }}
controls>
</video>
36 changes: 36 additions & 0 deletions layouts/video/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html
itemscope
itemtype="http://schema.org/WebPage"
lang="{{ .Site.Language.Lang }}"
class="no-js"
>
<head>
{{ partial "head.html" . }}
</head>
<body
class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}"
>
<header>{{ partial "navbar.html" . }}</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
{{ partial "sidebar.html" . }}
</aside>
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
{{ partial "page-meta-links.html" . }} {{ partial "toc.html" . }} {{
partial "taxonomy_terms_clouds.html" . }}
</aside>
<main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
{{ partial "version-banner.html" . }} {{ if not
.Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" .
}}{{ end }} {{ block "main" . }}{{ end }}
</main>
</div>
</div>
{{ partial "footer.html" . }}
</div>
{{ partial "scripts.html" . }} {{ partial "image-modal.html" . }}
</body>
</html>
25 changes: 25 additions & 0 deletions layouts/video/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{ define "main" }}
<div class="td-content">
<h1>{{ .Title }}</h1>
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
<header class="article-meta{{ if or .Params.categories .Params.tags }} article-meta-bg{{ end }}">
{{ partial "taxonomy_terms_article_wrapper.html" . -}}
{{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) -}}
{{ partial "reading-time.html" . -}}
{{ end -}}
</header>
{{ with .Params.plan }}
{{ partial "plan-info.html" (dict "plan" .) }}
{{ end }}
{{- partial "feature-info.html" . -}}
{{ .Content }}
{{ partial "video-section-index.html" . -}}

{{ if (.Site.Config.Services.Disqus.Shortname) -}}
<br />
{{- partial "disqus-comment.html" . -}}
{{ end -}}{{ partial "pager.html" . }}
{{ partial "page-meta-lastmod.html" . -}}
{{ partial "recent-discussions.html" . -}}
</div>
{{ end -}}
7 changes: 7 additions & 0 deletions layouts/video/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ define "main" }}
{{ partial "feature-info.html" . }}
{{ .Render "content" }}
<div style="margin-top:2rem;">
{{ partial "recent-discussions.html" . }}
</div>
{{ end }}
Binary file added static/videos/comment.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/videos/pattern-import.mp4
Binary file not shown.