Sha256: faff89dc6e5db25baa5eb2888892300c94cc98fd8c6c8f7ab10000b437056666

Contents?: true

Size: 1009 Bytes

Versions: 12

Compression:

Stored size: 1009 Bytes

Contents

{% if page.banner %}
	{% assign banner_path = "/assets/images/banners/" | append: page.banner  | append: "/" | append: page.banner %}
	<video id="banner" autoplay loop muted playsinline poster="{{ banner_path | append: '.webp' | relative_url }}" style="background-image: url({{ banner_path | append: '.webp' | relative_url }});">
		{% if page.banner_video %}
			<source src="{{ banner_path | append: '.webm' | relative_url }}" type="video/webm">
			<source src="{{ banner_path | append: '.mp4' | relative_url }}" type="video/mp4">
			Your browser does not support the video tag.
		{% endif %}
	</video>

	<!-- Updates scrolling attribute to change nav bar opacity -->
	<script>
		function scrollUpdate() {
			if (document.getElementById("banner") != null) { /* Required for Turbolinks */
				document.getElementsByTagName("nav")[0].id = this.scrollY > 0 ? "scrolled" : "";
			}
		}

		window.addEventListener("scroll", scrollUpdate, false);
	</script>
{% else %}
	<div style="height: 105px"></div>
{% endif %}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cafe-theme-0.1.21 _includes/banner.html
cafe-theme-0.1.20 _includes/banner.html
cafe-theme-0.1.19 _includes/banner.html
cafe-theme-0.1.18 _includes/banner.html
cafe-theme-0.1.17 _includes/banner.html
cafe-theme-0.1.16 _includes/banner.html
cafe-theme-0.1.15 _includes/banner.html
cafe-theme-0.1.14 _includes/banner.html
cafe-theme-0.1.13 _includes/banner.html
cafe-theme-0.1.12 _includes/banner.html
cafe-theme-0.1.11 _includes/banner.html
cafe-theme-0.1.10 _includes/banner.html