Skip to content

Commit

Permalink
fix(gcores): correct templates for images and videos (#18286)
Browse files Browse the repository at this point in the history
  • Loading branch information
nczitzk authored Feb 5, 2025
1 parent 8befd48 commit d2d3472
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions lib/routes/gcores/templates/description.art
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{{ if images }}
{{ each images image }}
{{ if image?.src }}
<img
{{ if image.alt }}
alt="{{ image.alt }}"
{{ /if }}
src="{{ image.src }}"
>
<figure>
<img
{{ if image.alt }}
alt="{{ image.alt }}"
{{ /if }}
{{ if image.width }}
width="{{ image.width }}"
{{ /if }}
{{ if image.height }}
height="{{ image.height }}"
{{ /if }}
src="{{ image.src }}">
</figure>
{{ /if }}
{{ /each }}
{{ /if }}
Expand All @@ -27,18 +34,26 @@
{{ /each }}
{{ /if }}

{{ if video }}
{{ if videos }}
{{ each videos video }}
{{ if video?.src }}
<video
controls>
<source
{{ if video?.type?.endsWith('taptap') }}
<iframe
src="{{ video.src }}"
type="{{ video.type }}">
<object data="{{ video.src }}">
<embed src="{{ video.src }}">
</object>
</video>
frameborder="0"
allowfullscreen>
</iframe>
{{ else }}
<video
controls>
<source
src="{{ video.src }}"
type="{{ video.type }}">
<object data="{{ video.src }}">
<embed src="{{ video.src }}">
</object>
</video>
{{ /if }}
{{ /if }}
{{ /each }}
{{ /if }}
Expand Down

0 comments on commit d2d3472

Please sign in to comment.