From 11edca189059cf5bbe78443afbb191e740c6fa60 Mon Sep 17 00:00:00 2001 From: jeffreytse Date: Sat, 26 Jun 2021 12:05:19 +0800 Subject: [PATCH] feat: support video banner --- _includes/functions/get_banner.html | 24 ++++++++++++++++ _includes/views/banner.html | 43 +++++++++++++++++++++++++++-- _includes/views/header.html | 2 +- _sass/yat/_layout.scss | 5 ++++ 4 files changed, 70 insertions(+), 4 deletions(-) diff --git a/_includes/functions/get_banner.html b/_includes/functions/get_banner.html index 6d07f10..502d7fc 100644 --- a/_includes/functions/get_banner.html +++ b/_includes/functions/get_banner.html @@ -42,3 +42,27 @@ {%- include functions.html func='get_value' -%} {% assign banner_subheading_style = return %} +{%- include functions.html func='log' level='debug' msg='Get banner_video value' -%} +{% assign name = 'banner.video' %} +{%- include functions.html func='get_value' -%} +{% assign banner_video = return %} + +{%- include functions.html func='log' level='debug' msg='Get banner_loop value' -%} +{% assign name = 'banner.loop' %} +{%- include functions.html func='get_value' default=true -%} +{% assign banner_loop = return %} + +{%- include functions.html func='log' level='debug' msg='Get banner_volume value' -%} +{% assign name = 'banner.volume' %} +{%- include functions.html func='get_value' default=0 -%} +{% assign banner_volume = return %} + +{%- include functions.html func='log' level='debug' msg='Get banner_start_at value' -%} +{% assign name = 'banner.start_at' %} +{%- include functions.html func='get_value' default=0 -%} +{% assign banner_start_at = return %} + +{% if banner_image or banner_video %} + {% assign has_banner = true %} +{% endif %} + diff --git a/_includes/views/banner.html b/_includes/views/banner.html index b852fb0..554a915 100644 --- a/_includes/views/banner.html +++ b/_includes/views/banner.html @@ -15,7 +15,7 @@ {%- include functions.html func='get_banner' -%} -{%- if banner_image -%} +{%- if has_banner -%} {%- if banner_background -%}