diff options
author | Seb Harrington <seb@cdal.co.uk> | 2022-02-18 02:25:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 02:25:35 +0300 |
commit | d2ddc8c857fe965c97edaa09ec380761820ce6d8 (patch) | |
tree | 36863db199f3d0ce248692dec8c9589ba3e3011c /layouts | |
parent | f3a7e92a67d61372da0d5381dedea03e7fcc2f5b (diff) |
Fix for issue #154 - Carousel item can be a link (#343)1.3
* Fix for issue #154 - .href in md file specifies link for entire carousel item.
* Fix for issue #154 - .href in md file specifies link for entire carousel item.
* Updated README.md to include new href functionality.
Updated customizable.yaml and features.yaml in exampleSite to provide examples.
* Update faq link to be correct in features.yaml
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/carousel.html | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/layouts/partials/carousel.html b/layouts/partials/carousel.html index be6c6f0..a329dc2 100644 --- a/layouts/partials/carousel.html +++ b/layouts/partials/carousel.html @@ -10,15 +10,21 @@ data-pagination-speed="{{ default 1000 .Site.Params.CarouselHomepage.pagination_speed }}"> {{ range sort .Site.Data.carousel "weight" }} <div class="item"> - <div class="row"> - <div class="col-sm-5 right"> - <h1>{{ .title }}</h1> - {{ .description | safeHTML }} + {{ if .href }} + <a href="{{ .href }}"> + {{ end }} + <div class="row"> + <div class="col-sm-5 right"> + <h1>{{ .title }}</h1> + {{ .description | safeHTML }} + </div> + <div class="col-sm-7"> + <img class="img-responsive" src="{{ .image }}" alt=""> + </div> </div> - <div class="col-sm-7"> - <img class="img-responsive" src="{{ .image }}" alt=""> - </div> - </div> + {{ if .href }} + </a> + {{ end }} </div> {{ end }} </div> |