Skip to content

Commit

Permalink
Merge pull request nevercodealone#92 from rogoit/main
Browse files Browse the repository at this point in the history
Main
  • Loading branch information
rogoit authored May 1, 2024
2 parents deda013 + 980ffa8 commit 4e7f7b4
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ build:
- DB_NAME=${PREFIX}_${DB_NAME} docker compose -f docker-compose.conversis.yml -p $SHORTCODE1 up -d --remove-orphans
- docker cp $SHORTCODE-web:/var/www/html/var/uploads /tmp/
- docker cp /tmp/uploads $SHORTCODE1-web:/var/www/html/var/
- docker exec $SHORTCODE1-web rm -rf /var/www/html/var/cache/*
- docker exec $SHORTCODE1-web rm -rf /var/www/html/var/cache
- docker exec $SHORTCODE1-web chown www-data:www-data -R /var/www/html/var/

deploy_stage:
Expand Down Expand Up @@ -103,7 +103,7 @@ deploy_live:
- docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- docker compose -f docker-compose.conversis.yml -p $SHORTCODE1 up -d --remove-orphans
- docker exec $SHORTCODE1-web rm -rf /var/www/html/var/cache/*
- docker exec $SHORTCODE1-web rm -rf /var/www/html/var/cache
- docker exec $SHORTCODE1-web chown www-data:www-data -R /var/www/html/var/
environment:
name: live
Expand Down
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
2 changes: 2 additions & 0 deletions config/templates/includes/tailwind/blocks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<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/excerpt-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"
Expand Down
25 changes: 25 additions & 0 deletions config/templates/includes/tailwind/blocks/excerpt-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="excerpt-image">
<!-- @see https://docs.sulu.io/en/2.1/reference/content-types/block.html -->
<types>
<type name="excerpt-image">
<meta>
<title>Excerpt Image</title>
</meta>
<properties>
<property name="headline" type="text_line">
<meta>
<title>Überschrift</title>
</meta>
<params>
<param name="headline" value="true"/>
</params>
</property>
</properties>
</type>
</types>
</block>
</properties>
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"
}
3 changes: 2 additions & 1 deletion templates/includes/tailwind/blocks.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
{% for block in content.blocks %}
<section aria-label="{{ block.type|capitalize }}" class="mx-auto max-w-7xl px-4 pt-12 pb-4">
{% include 'includes/tailwind/blocks/' ~ block.type ~ '.html.twig' with {
content: block
content: block,
extensionexcerpt: extension.excerpt
} only %}
</section>
{% endfor %}
Expand Down
5 changes: 5 additions & 0 deletions templates/includes/tailwind/blocks/excerpt-image.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% 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 }}">
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
{% for item in content.items %}
<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['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) }}">
<span class="absolute inset-0"></span>
Expand Down

0 comments on commit 4e7f7b4

Please sign in to comment.