dynamicweb/ungleich_page/templates/ungleich_page/ungleich/_header_with_background_vid...

28 lines
908 B
HTML

{% load i18n %}
{% if instance.image %}
<div class="bg_img" style="background-image:url({{ instance.image.url }})"></div>
{% endif %}
{% if instance.video %}
<div class="bg_vid bg_vid_back">
{% comment %}
use attribute poster="{{ instance.image.url }}" after cross browser testing
in place of .bg_img
{% endcomment %}
<video autoplay muted loop>
<source type="video/mp4" src="{{ instance.video.url }}">
</video>
</div>
{% endif %}
<div class="container">
{% if instance.heading %}
<div class="intro-cap">{{ instance.heading }}</div>
{% endif %}
{% if instance.description %}
<p class="intro_lead">{{ instance.description }}</p>
{% endif %}
{% if instance.btn_link %}
{% trans "Learn More" as default_btn_text %}
<a class="btn btn-trans" href="{{ instance.btn_link }}">{{ instance.btn_text|default:default_btn_text }}</a>
{% endif %}
</div>