Allow markdown captions
This commit is contained in:
@@ -277,10 +277,10 @@ Captions are matched by key. For local images, use the filename (e.g. `01.jpg`).
|
|||||||
**Example 3:** Add captions
|
**Example 3:** Add captions
|
||||||
|
|
||||||
```md
|
```md
|
||||||
{{</* carousel images="gallery/*" captions="{01.jpg:First image,02.jpg:Second image}" */>}}
|
{{</* carousel images="gallery/*" captions="{01.jpg:First *image*,02.jpg:Second image with a [link](https://example.com)}" */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< carousel images="gallery/*" captions="{01.jpg:First image,02.jpg:Second image}" >}}
|
{{< carousel images="gallery/*" captions="{01.jpg:First *image*,02.jpg:Second image with a [link](https://example.com)}" >}}
|
||||||
|
|
||||||
<br/><br/><br/>
|
<br/><br/><br/>
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
{{ if not .Parent }}<div class="width-patch"></div>{{ end }}
|
{{ if not .Parent }}<div class="width-patch"></div>{{ end }}
|
||||||
<div
|
<div
|
||||||
id="{{ $id }}"
|
id="{{ $id }}"
|
||||||
class="relative not-prose"
|
class="relative"
|
||||||
data-twe-carousel-init
|
data-twe-carousel-init
|
||||||
data-twe-ride="carousel"
|
data-twe-ride="carousel"
|
||||||
data-twe-interval="{{ $interval }}">
|
data-twe-interval="{{ $interval }}">
|
||||||
@@ -83,7 +83,6 @@
|
|||||||
data-twe-carousel-item
|
data-twe-carousel-item
|
||||||
style="transition-duration: {{ $interval }}ms;"
|
style="transition-duration: {{ $interval }}ms;"
|
||||||
{{ if eq $index 0 }}data-twe-carousel-active{{ end }}>
|
{{ if eq $index 0 }}data-twe-carousel-active{{ end }}>
|
||||||
<figure class="m-0 relative">
|
|
||||||
<div class="single_hero_background relative overflow-hidden" style="aspect-ratio: {{ $aspectx }} / {{ $aspecty }};">
|
<div class="single_hero_background relative overflow-hidden" style="aspect-ratio: {{ $aspectx }} / {{ $aspecty }};">
|
||||||
<img
|
<img
|
||||||
src="{{ $resource.RelPermalink }}"
|
src="{{ $resource.RelPermalink }}"
|
||||||
@@ -92,11 +91,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ if $caption }}
|
{{ if $caption }}
|
||||||
<figcaption
|
<figcaption
|
||||||
class="absolute left-0 right-0 text-left text-sm text-neutral-500 not-prose leading-snug [&>p]:m-0"
|
class="absolute left-0 right-0"
|
||||||
style="top: calc(100% + 0.5rem);"
|
style="top: calc(100%);"
|
||||||
>{{ $caption | markdownify }}</figcaption>
|
>{{ $caption | markdownify }}</figcaption>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</figure>
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user