Skip to content

Commit

Permalink
Add full content image for glossar detail page.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogoit committed Apr 24, 2024
1 parent d6110e8 commit e5646e2
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 14 deletions.
18 changes: 12 additions & 6 deletions config/image-formats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,22 @@
<option name="png_compression_level">6</option>
</options>
</format>
<format key="content-full">
<meta>
<title lang="en">Content Full</title>
</meta>
<scale x="1200" y="675"/>
</format>
<format key="tailwind-training-overview-header">
<meta>
<title lang="en">Tailwind Training overview header</title>
</meta>
<scale x="912" />
</format>
<format key="tailwind-daisyui-training-overview-card">
<meta>
<title lang="en">Tailwind Daisy UI Training Overview Card</title>
</meta>
<scale x="200" y="280"/>
</format>
<format key="tailwind-daisyui-training-overview-card">
<meta>
<title lang="en">Tailwind Daisy UI Training Overview Card</title>
</meta>
<scale x="200" y="280"/>
</format>
</formats>
18 changes: 10 additions & 8 deletions config/templates/includes/tailwind/blocks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,28 @@
</meta>

<types>
<xi:include href="blocks/image.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/hero.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/hero-startpage.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/introduction.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/button.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/cta-button.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/feature.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/formats.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/team.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/logo-gallery.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
<xi:include href="blocks/subpages-overview.xml"
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
xpointer="xmlns(sulu=http://schemas.sulu.io/template/template)xpointer(/sulu:properties/sulu:block/sulu:types/sulu:type)"/>
</types>
</block>
</properties>
25 changes: 25 additions & 0 deletions config/templates/includes/tailwind/blocks/image.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<properties xmlns="http://schemas.sulu.io/template/template"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xi="http://www.w3.org/2001/XInclude"
xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/template-1.0.xsd">
<block name="blocks" default-type="image">
<!-- @see https://docs.sulu.io/en/2.1/reference/content-types/block.html -->
<types>
<type name="image">
<meta>
<title>Image</title>
</meta>
<properties>
<property name="image" type="media_selection" maxOccurs="1">
<meta>
<title>Bild</title>
</meta>
<params>
<param name="types" value="image"/>
</params>
</property>
</properties>
</type>
</types>
</block>
</properties>
2 changes: 2 additions & 0 deletions templates/includes/tailwind/blocks/image.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% set source = content.image[0].thumbnails['content-full.webp'] %}
<img class="h-auto max-w-full" src="{{ source }}" alt="{{ content.image[0].title }}">

0 comments on commit e5646e2

Please sign in to comment.