a new start
This commit is contained in:
21
_includes/body/sidebar-bg.html
Normal file
21
_includes/body/sidebar-bg.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% assign image = include.image %}
|
||||
{% assign video = include.video %}
|
||||
{% assign color = include.color %}
|
||||
{% assign theme_color = include.theme_color %}
|
||||
|
||||
{% if image.background %}
|
||||
{% capture bg_style %}background:{{ image.style }}{% endcapture %}
|
||||
{% capture bg_class %}sidebar-bg {% if image.overlay %}sidebar-overlay{% endif %}{% endcapture %}
|
||||
{% else %}
|
||||
{% assign bg_color = theme_color | default:site.theme_color | default:color %}
|
||||
{% capture bg_style %}background-color:{{ bg_color }};{% if image != 'none' %}background-image:url({% include_cached smart-url url=image %}){% endif %};overflow: hidden;{% endcapture %}
|
||||
{% capture bg_class %}sidebar-bg {% if image != 'none' %}sidebar-overlay{% endif %}{% endcapture %}
|
||||
{% endif %}
|
||||
<div class="{{ bg_class }}" style="{{ bg_style }}">
|
||||
{% if video %}
|
||||
<video id="_video" style="min-width: 100%; height: 100%; object-fit: cover" autoplay muted loop>
|
||||
<source src="{% include_cached smart-url url=video %}" type="video/mp4">
|
||||
</video>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user