ShowerLoop-cc/docker/showerloop/public/themes/chocolate/layouts/partials/hero-h.html

35 lines
2.0 KiB
HTML

<div class="chocolate-hero-section" style="background-image: url('{{ .Params.hero_image }}')">
<div class="hero-row-group">
<div class="hero-row">
<div class="hero-row-item hero-text-info">
<h1 class="mdl-typography--display-3">{{.Params.hero_title}}</h1>
<h2>{{.Params.hero_subtitle}}</h2>
<p>
{{.Params.hero_content}}
</p>
</div>
<div class="hero-row-item hero-video">
{{ if .Params.hero_video_url }}
{{ $videoId := index (last 1 (split (strings.TrimSuffix "\"" .Params.hero_video_url) "/")) 0 }}
<div class="video-container">
<video
id="video-hero-{{ now.Unix }}"
class="video-js vjs-default-skin vjs-big-play-centered"
controls
preload="none"
width="100%"
height="auto"
poster="/videos/thumbnails/video1.webp"
data-setup='{"fluid": true, "responsive": true, "html5": {"vhs": {"overrideNative": true, "enableLowInitialPlaylist": true, "limitRenditionsByPlayerDimensions": true}}, "controlBar": {"pictureInPictureToggle": false}, "playbackRates": [0.75, 1, 1.25, 1.5, 2], "preload": "none"}'>
<source src="/videos/hls/video1/index.m3u8" type="video/mp4">
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a
web browser that <a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
</div>
{{ end }}
</div>
</div>
</div>
</div>