Merge pull request #385 from amrutadotorg/patch-9

adding poster parameter to the hero component
This commit is contained in:
Ophir LOJKINE
2024-06-09 20:59:20 +02:00
committed by GitHub
2 changed files with 17 additions and 5 deletions
@@ -66,6 +66,13 @@ FROM (
TRUE,
TRUE
),
(
'poster',
'URL of the image to be displayed before the video starts.',
'URL',
TRUE,
TRUE
),
-- item level
(
'title',
+10 -5
View File
@@ -4,7 +4,7 @@
<div class="fs-1 mx-5 text-muted">
{{~description~}}
{{~#if description_md~}}
{{{markdown description_md}}}
{{{markdown description_md}}}
{{~/if~}}
</div>
{{#if link}}
@@ -15,7 +15,12 @@
<img src="{{image}}" alt="{{title}}" class="hero-image img-fluid col-lg-6" />
{{/if}}
{{#if video}}
<video src="{{video}}" alt="{{title}}" class="hero-image img-fluid col-lg-6" controls />
<video src="{{video}}" alt="{{title}}" class="hero-image img-fluid col-lg-6" controls
{{#if poster}}
preload="none"
poster="{{poster}}"
{{/if}}>
</video>
{{/if}}
</header>
@@ -28,7 +33,7 @@
<div class="card-body text-center p-4 p-lg-5 pt-0 pt-lg-0">
{{#if icon}}
<div style="margin-top: -1.5rem;" class="badge bg-{{default color 'success'}} text-{{default color 'success'}}-fg fs-1 mb-4 p-2">
{{~icon_img icon 30~}}
{{~icon_img icon 30~}}
</div>
{{/if}}
<h2>
@@ -39,11 +44,11 @@
{{#if link}}
</a>
{{/if}}
</h2>
</h2>
<div class="mb-0">
{{~description~}}
{{~#if description_md~}}
{{{markdown description_md}}}
{{{markdown description_md}}}
{{~/if~}}
</div>
</div>