Skip to content

Commit

Permalink
XCORNER-24 Make image banner clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
mgbelegu committed Mar 19, 2024
1 parent 1555ad6 commit ea8e865
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions assets/scss/widgets/image-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
gap: rem-calc(12px);
padding: rem-calc(24px);

text-decoration: none;

@include bp(small) {
height: rem-calc(484px);
}
Expand Down
6 changes: 6 additions & 0 deletions widget-templates/image-banner/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
"label": "Text",
"default": "I am a sample text"
},
{
"type": "input",
"id": "url",
"label": "URL",
"default": "#"
},
{
"type": "imageManager",
"label": "Background Image",
Expand Down
4 changes: 2 additions & 2 deletions widget-templates/image-banner/widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
</style>

<div class="{{#if has_container}}o-container{{/if}}">
<div class='c-image-banner c-image-banner-{{_.id}}' style="background-image: url('{{image.src}}')">
<a href="{{url}}" class='c-image-banner c-image-banner-{{_.id}}' style="background-image: url('{{image.src}}')">
{{#if title}}
<h2 class="c-image-banner__title">{{title}}</h2>
{{/if}}
{{#if text}}
<p class="c-image-banner__text">{{text}}</p>
{{/if}}
</div>
</a>
</div>

0 comments on commit ea8e865

Please sign in to comment.