Skip to content

Commit

Permalink
Add half content full image format and build webpack.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogoit committed May 1, 2024
1 parent bd6a9d8 commit 980ffa8
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 12 deletions.
12 changes: 12 additions & 0 deletions config/image-formats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@
</format>

<!-- Tailwind -->
<format key="tailwind-subpage-overview">
<meta>
<title lang="en">Tailwind Subpage Overview</title>
</meta>
<scale x="203" y="114"/>
</format>
<format key="logos">
<meta>
<title lang="en">Logos</title>
Expand Down Expand Up @@ -192,6 +198,12 @@
<option name="png_compression_level">6</option>
</options>
</format>
<format key="content-full-half">
<meta>
<title lang="en">Content Full</title>
</meta>
<scale x="600" y="338"/>
</format>
<format key="content-full">
<meta>
<title lang="en">Content Full</title>
Expand Down
7 changes: 0 additions & 7 deletions public/build/website/960.9eb8870c.css

This file was deleted.

7 changes: 7 additions & 0 deletions public/build/website/960.f1189207.css

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.9eb8870c.css"
"/build/website/960.f1189207.css"
]
},
"style": {
"js": [
"/build/website/runtime.d33663a3.js"
],
"css": [
"/build/website/960.9eb8870c.css"
"/build/website/960.f1189207.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.9eb8870c.css": "/build/website/960.9eb8870c.css"
"build/website/960.f1189207.css": "/build/website/960.f1189207.css"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
<article class="flex max-w-xl flex-col items-start justify-between">
<div class="group relative">
{% if item.excerptImages[0] is defined and item.excerptImages[0] is not empty %}
{% set source = item.excerptImages[0].formats['content-full.webp'] %}
<img class="h-auto max-w-full" src="{{ source }}" alt="{{ item.excerptImages[0].description }}">
{% set source = item.excerptImages[0].formats['tailwind-subpage-overview.webp'] %}
{% set sourceSet = item.excerptImages[0].formats['content-full-half.webp'] %}
<img src="{{ source }}"
srcset="{{ sourceSet }} 1023w"
class="h-auto max-w-full"
alt="{{ item.excerptImages[0].description }}"
>
{% endif %}
<h3 class="mt-3 text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-600">
<a href="{{ sulu_content_path(item.url) }}">
Expand Down

0 comments on commit 980ffa8

Please sign in to comment.