2019-09-11 06:19:34 +02:00
|
|
|
{%- include functions.html func='log' level='debug' msg='Get banner_html value' -%}
|
|
|
|
{% assign name = 'banner_html' %}
|
|
|
|
{%- include functions.html func='get_value' -%}
|
|
|
|
{% assign banner_html = return %}
|
|
|
|
|
|
|
|
{%- include functions.html func='log' level='debug' msg='Get heading value' -%}
|
|
|
|
{% assign name = 'heading' %}
|
|
|
|
{%- include functions.html func='get_value' -%}
|
|
|
|
{% assign heading = return %}
|
|
|
|
|
|
|
|
{%- include functions.html func='log' level='debug' msg='Get subheading value' -%}
|
|
|
|
{% assign name = 'subheading' %}
|
|
|
|
{%- include functions.html func='get_value' -%}
|
|
|
|
{% assign subheading = return %}
|
|
|
|
|
2021-06-17 14:39:11 +02:00
|
|
|
{%- include functions.html func='get_banner' -%}
|
|
|
|
|
2021-06-26 06:05:19 +02:00
|
|
|
{%- if has_banner -%}
|
2021-06-25 08:19:46 +02:00
|
|
|
{%- if banner_background -%}
|
2021-06-17 15:07:40 +02:00
|
|
|
<style>
|
|
|
|
html .page-banner {
|
|
|
|
background: {{ banner_background }};
|
|
|
|
}
|
|
|
|
</style>
|
2021-06-25 08:19:46 +02:00
|
|
|
{%- endif -%}
|
|
|
|
{%- if banner_height -%}
|
2021-06-17 14:39:11 +02:00
|
|
|
<style>
|
2021-06-25 08:19:46 +02:00
|
|
|
{%- assign num = banner_height | times: 1 -%}
|
|
|
|
{%- assign unit = banner_height | replace_first: num -%}
|
|
|
|
{%- assign banner_min_height = banner_min_height | default: banner_height -%}
|
2021-06-17 14:39:11 +02:00
|
|
|
html .page-banner {
|
2021-06-17 15:32:19 +02:00
|
|
|
height: {{ banner_height | times: 0.368 | append: unit }};
|
|
|
|
min-height: {{ banner_min_height }};
|
|
|
|
}
|
|
|
|
html[data-scroll-status="top"] .page-banner {
|
2021-06-17 14:39:11 +02:00
|
|
|
height: {{ banner_height }};
|
|
|
|
}
|
2021-06-17 14:54:49 +02:00
|
|
|
</style>
|
2021-06-25 08:19:46 +02:00
|
|
|
{%- endif -%}
|
2021-06-17 14:39:11 +02:00
|
|
|
|
2021-06-25 08:19:46 +02:00
|
|
|
{%- if banner_opacity -%}
|
2021-06-17 14:54:49 +02:00
|
|
|
<style>
|
2021-06-17 14:39:11 +02:00
|
|
|
html .page-banner .page-banner-img > *:first-child {
|
|
|
|
opacity: {{ banner_opacity }};
|
|
|
|
}
|
|
|
|
|
|
|
|
html[data-theme="dark"] .page-banner .page-banner-img > *:first-child {
|
2021-06-17 14:54:49 +02:00
|
|
|
opacity: {{ banner_opacity | times: 0.718 }};
|
2021-06-17 14:39:11 +02:00
|
|
|
}
|
|
|
|
</style>
|
2021-06-25 08:19:46 +02:00
|
|
|
{%- endif -%}
|
2021-06-25 08:16:44 +02:00
|
|
|
{%- if banner_heading_style -%}
|
|
|
|
<style>
|
|
|
|
html .page-banner .page-banner-inner > *:first-child > *:nth-child(1) {
|
|
|
|
{{ banner_heading_style }}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{%- endif -%}
|
|
|
|
{%- if banner_subheading_style -%}
|
|
|
|
<style>
|
|
|
|
html .page-banner .page-banner-inner > *:first-child > *:nth-child(2) {
|
|
|
|
{{ banner_subheading_style }}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{%- endif -%}
|
2019-09-11 06:19:34 +02:00
|
|
|
<section class="page-banner">
|
|
|
|
<div class="page-banner-img">
|
2021-06-26 06:05:19 +02:00
|
|
|
{%- if banner_video -%}
|
|
|
|
<video
|
|
|
|
autoplay=""
|
|
|
|
poster="{{ banner_image }}"
|
|
|
|
>
|
|
|
|
<source src="{{ banner_video }}">
|
|
|
|
</video>
|
|
|
|
<script>
|
|
|
|
(function() {
|
|
|
|
var video = document.querySelector('.page-banner .page-banner-img > video');
|
|
|
|
var videoPlay = function() {
|
|
|
|
try {
|
|
|
|
video.play();
|
|
|
|
} catch (e) {
|
|
|
|
console.error(e);
|
|
|
|
}
|
|
|
|
window.removeEventListener('focus', videoPlay);
|
|
|
|
}
|
|
|
|
|
|
|
|
window.addEventListener('focus', videoPlay);
|
|
|
|
|
|
|
|
video.onloadstart = function() {
|
|
|
|
video.volume = {{ banner_volume }};
|
|
|
|
video.currentTime = {{ banner_start_at }};
|
|
|
|
}
|
|
|
|
|
|
|
|
video.onended = function() {
|
|
|
|
video.currentTime = {{ banner_start_at }};
|
|
|
|
video.volume = 0;
|
|
|
|
{%- if banner_loop -%}
|
|
|
|
video.play();
|
|
|
|
{%- endif -%}
|
|
|
|
}
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
{%- else -%}
|
|
|
|
<div style="background-image: url({{ banner_image }})"></div>
|
|
|
|
<img class="img-placeholder" src="{{ banner_image }}">
|
|
|
|
{%- endif -%}
|
2019-09-11 06:19:34 +02:00
|
|
|
</div>
|
|
|
|
<div class="wrapper">
|
|
|
|
<div class="page-banner-inner">
|
|
|
|
|
|
|
|
{%- if banner_html -%}
|
|
|
|
|
|
|
|
{%- assign banner_html = 'views/' | append: banner_html -%}
|
|
|
|
{%- include {{ banner_html }} -%}
|
|
|
|
|
|
|
|
{%- else -%}
|
|
|
|
|
2019-09-20 06:40:14 +02:00
|
|
|
<div class="page-banner-default">
|
|
|
|
<h1 class="page-banner-heading">
|
|
|
|
{{ heading | default: page.title | escape }}
|
|
|
|
</h1>
|
2020-07-10 16:30:32 +02:00
|
|
|
<h2 class="page-banner-subheading">
|
2019-09-20 06:40:14 +02:00
|
|
|
{{ subheading | default: page.subtitle | escape }}
|
2020-07-10 16:30:32 +02:00
|
|
|
</h2>
|
2019-09-20 09:45:37 +02:00
|
|
|
</div>
|
2019-09-11 06:19:34 +02:00
|
|
|
|
|
|
|
{%- endif -%}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{%- endif -%}
|
|
|
|
|