From 5e8841e650fb3aeb23066d6877158b70d5bef316 Mon Sep 17 00:00:00 2001
From: Christian Mendoza <christian.mendoza@gmail.com>
Date: Wed, 20 Dec 2017 18:39:24 +0000
Subject: [PATCH] Add image and video to config
---
layouts/index.html | 15 ++++++++++++---
layouts/partials/head.html | 7 ++++---
layouts/partials/video.html | 19 +++++++++++++++++++
3 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/layouts/index.html b/layouts/index.html
index 0ebc588..c9bf053 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -9,10 +9,19 @@
<div class="fs-split">
- <!-- Image Side -->
- <div class="split-image">
+ <!-- Image -->
+ {{ if .Site.Params.split.image.enable }}
+
+ <div class="split-image">
- </div>
+ </div>
+
+ <!-- Video -->
+ {{ else if .Site.Params.split.video.enable }}
+
+ {{ partial "video" . }}
+
+ {{ end }}
<!-- Content Side -->
<div class="split-content">
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index acdb868..7166ccc 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -24,10 +24,11 @@
<link rel="stylesheet" href="assets/css/split.css" type="text/css" media="screen" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
-{{ if .Site.Params.background.image.enable }}
+<!-- Image Styles -->
+{{ if .Site.Params.split.image.enable }}
<style type="text/css">
- {{ if .Site.Params.background.image.file }}
- .fs-split .split-image { background-image: url("{{ .Site.Params.background.image.file }}"); background-position: {{ if .Site.Params.background.image.position }}{{ .Site.Params.background.image.position }}{{ else }}center center{{ end }}; }
+ {{ if .Site.Params.split.image.file }}
+ .fs-split .split-image { background-image: url("{{ .Site.Params.split.image.file }}"); background-position: {{ if .Site.Params.split.image.position }}{{ .Site.Params.split.image.position }}{{ else }}center center{{ end }}; }
{{ end }}
</style>
{{ end }}
diff --git a/layouts/partials/video.html b/layouts/partials/video.html
new file mode 100644
index 0000000..0f0785a
--- /dev/null
+++ b/layouts/partials/video.html
@@ -0,0 +1,19 @@
+<div class="split-image split-video">
+
+ <!-- YouTube Video -->
+ {{ if .Site.Params.split.video.youtubeId }}
+
+ <div class="video-wrap">
+ <div class="video-container">
+ <iframe class="video-content" src="https://www.youtube.com/embed/{{ .Site.Params.split.video.youtubeId }}?rel=0&controls=0&showinfo=0&loop=1&playlist={{ .Site.Params.split.video.youtubeId }}&autoplay=1{{ if .Site.Params.split.video.mute }}&mute=1{{ end }}" frameborder="0" allowfullscreen></iframe>
+ </div>
+ </div>
+
+ <!-- Self-Hosted Video -->
+ {{ else if .Site.Params.split.video.file }}
+
+ <video class="video" src="{{ .Site.Params.split.video.file }}" loop autoplay{{ if .Site.Params.split.video.mute }} muted{{ end }}></video>
+
+ {{ end }}
+
+</div>
--
Gitblit v1.10.0