Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/chipsenkbeil/grid-side.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Senkbeil <chip.senkbeil@gmail.com>2015-09-28 04:19:31 +0300
committerChip Senkbeil <chip.senkbeil@gmail.com>2015-09-28 04:19:31 +0300
commit32849091a6ff3489c8bd987d017de450b1a67f89 (patch)
tree938df7d6d149a62fc7566c00cd05af680c7812c2
parent76c8fd71a5eb0ec5266f7aa02035c8b77e969d87 (diff)
Updated project items to enable video preview, added poster to video partial
-rw-r--r--layouts/partials/extra/video.html2
-rw-r--r--layouts/partials/project/item.html7
2 files changed, 7 insertions, 2 deletions
diff --git a/layouts/partials/extra/video.html b/layouts/partials/extra/video.html
index 20418d0..14b912e 100644
--- a/layouts/partials/extra/video.html
+++ b/layouts/partials/extra/video.html
@@ -1,4 +1,4 @@
-<video preload="auto" autoplay loop muted>
+<video preload="auto" autoplay loop muted {{ with .Params.video_preview_fallback }}poster="{{ . }}"{{ end }} class="{{ .Scratch.Get "class" }}">
{{ with .Params.video_preview_mp4 }}
<source type="video/mp4" src="{{ . }}">
{{ end }}
diff --git a/layouts/partials/project/item.html b/layouts/partials/project/item.html
index 1706760..c4747a7 100644
--- a/layouts/partials/project/item.html
+++ b/layouts/partials/project/item.html
@@ -16,7 +16,12 @@
<a href="{{ $link }}">
<div class="project-container rounded-corners z-depth-1">
<div class="project-container-image rounded-corners-top">
- <img src="{{ $image }}" class="fill-container-width rounded-corners-top" />
+ {{ if or (isset .Params "video_preview_mp4") (isset .Params "video_preview_ogv") }}
+ {{ .Scratch.Set "class" "rounded-corners-top fill-container-width" }}
+ {{ partial "extra/video.html" . }}
+ {{ else }}
+ <img src="{{ $image }}" class="fill-container-width rounded-corners-top" />
+ {{ end }}
</div>
<div class="rounded-corners-bottom center-text project-container-title">
<h4 class="white-text">{{ $title }}</h4>