Skip to content

Commit

Permalink
Add caption to excerpt image.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogoit committed May 10, 2024
1 parent 7e1272e commit 6ece4d3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/build/website/entrypoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"/build/website/app.f7350905.js"
],
"css": [
"/build/website/960.89a5c84e.css"
"/build/website/960.38ee983a.css"
]
},
"style": {
"js": [
"/build/website/runtime.d33663a3.js"
],
"css": [
"/build/website/960.89a5c84e.css"
"/build/website/960.38ee983a.css"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion public/build/website/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"build/website/app.js": "/build/website/app.f7350905.js",
"build/website/runtime.js": "/build/website/runtime.d33663a3.js",
"build/website/236.31bcff30.js": "/build/website/236.31bcff30.js",
"build/website/960.89a5c84e.css": "/build/website/960.89a5c84e.css"
"build/website/960.38ee983a.css": "/build/website/960.38ee983a.css"
}
5 changes: 4 additions & 1 deletion templates/includes/tailwind/blocks/excerpt-image.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{% if extensionexcerpt.images[0] is defined and extensionexcerpt.images[0] is not empty %}
{% set source = extensionexcerpt.images[0].thumbnails['content-full.webp'] %}
{% set alt = extensionexcerpt.images[0].description %}
<img class="h-auto max-w-full" src="{{ source }}" alt="{{ alt }}">
<figure class="text-center">
<img class="h-auto max-w-full mx-auto" src="{{ source }}" alt="">
<figcaption class="pt-4">{{ alt }}</figcaption>
</figure>
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<img src="{{ source }}"
srcset="{{ sourceSet }} 1023w"
class="h-auto max-w-full"
alt="{{ item.excerptImages[0].description }}"
alt=""
>
{% endif %}
<h3 class="mt-3 text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-600">
Expand Down

0 comments on commit 6ece4d3

Please sign in to comment.