Skip to content

Commit

Permalink
fix compatibility with Contao 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyborn committed Feb 23, 2024
1 parent 8a28300 commit 6abfe43
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Contao OpenGraph3

About
--
Implementation of OpenGraph tags and Twitter Cards for Contao. [Read more](https://www.numero2.de/contao/erweiterungen/opengraph3.html)
Implementation of OpenGraph tags and X / Twitter Cards for Contao. [Read more](https://www.numero2.de/contao/erweiterungen/opengraph3.html)

System requirements
--
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "numero2/contao-opengraph3",
"type": "contao-bundle",
"description": "Implementation of OpenGraph tags and Twitter Cards for Contao",
"description": "Implementation of OpenGraph tags and X / Twitter Cards for Contao",
"license": "LGPL-3.0+",
"authors": [
{
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/contao/languages/de/opengraph_fields.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file>
<body>
<trans-unit id="opengraph_fields.legends.opengraph_legend">
<target><![CDATA[<img src="bundles/opengraph3/icon-ogp.svg" alt="" style="display: block; float:left; margin-right: 4px;" /><span style="display: block; width: 100px;">Open Graph</span>]]></target>
<target>Open Graph</target>
</trans-unit>
<!-- __basic__ fields -->
<trans-unit id="opengraph_fields.og_title.0">
Expand Down Expand Up @@ -486,7 +486,7 @@
<target>männlich</target>
</trans-unit>
<trans-unit id="opengraph_fields.legends.twitter_legend">
<target><![CDATA[<img src="bundles/opengraph3/icon-twitter.svg" alt="" style="display: block; float:left; margin-right: 4px;" /><span style="display: block; width: 100px;">Twitter</span>]]></target>
<target>X / Twitter</target>
</trans-unit>
<trans-unit id="opengraph_fields.twitter_site.0">
<target>twitter:site</target>
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/contao/languages/de/tl_settings.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<body>
<!-- LEGENDS -->
<trans-unit id="tl_settings.opengraph_twitter_legend">
<target>Open Graph / Twitter Einstellungen</target>
<target>Open Graph / X / Twitter Einstellungen</target>
</trans-unit>
<!-- FIELDS -->
<trans-unit id="tl_settings.og_image_size.0">
Expand All @@ -14,7 +14,7 @@
<target>Hier können Sie die Abmessungen des Bildes und den Skalierungsmodus für og:image festlegen.</target>
</trans-unit>
<trans-unit id="tl_settings.twitter_image_size.0">
<target>Twitter Bildgröße</target>
<target>X / Twitter Bildgröße</target>
</trans-unit>
<trans-unit id="tl_settings.twitter_image_size.1">
<target>Hier können Sie die Abmessungen des Bildes und den Skalierungsmodus für twitter:image festlegen.</target>
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/contao/languages/en/opengraph_fields.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<file>
<body>
<trans-unit id="opengraph_fields.legends.opengraph_legend">
<target><![CDATA[<img src="bundles/opengraph3/icon-ogp.svg" alt="" style="display: block; float:left; margin-right: 4px;" /><span style="display: block; width: 100px;">Open Graph</span>]]></target>
<target>Open Graph</target>
</trans-unit>
<!-- __basic__ fields -->
<trans-unit id="opengraph_fields.og_title.0">
Expand Down Expand Up @@ -484,7 +484,7 @@
<target>male</target>
</trans-unit>
<trans-unit id="opengraph_fields.legends.twitter_legend">
<target><![CDATA[<img src="bundles/opengraph3/icon-twitter.svg" alt="" style="display: block; float:left; margin-right: 4px;" /><span style="display: block; width: 100px;">Twitter</span>]]></target>
<target>X / Twitter</target>
</trans-unit>
<trans-unit id="opengraph_fields.twitter_site.0">
<target>twitter:site</target>
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/contao/languages/en/tl_settings.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<body>
<!-- LEGENDS -->
<trans-unit id="tl_settings.opengraph_twitter_legend">
<target>Open Graph / Twitter settings</target>
<target>Open Graph / X / Twitter settings</target>
</trans-unit>
<!-- FIELDS -->
<trans-unit id="tl_settings.og_image_size.0">
Expand All @@ -14,7 +14,7 @@
<target>Here you can set the image dimensions and the resize mode for the og:image.</target>
</trans-unit>
<trans-unit id="tl_settings.twitter_image_size.0">
<target>Twitter image size</target>
<target>X / Twitter image size</target>
</trans-unit>
<trans-unit id="tl_settings.twitter_image_size.1">
<target>Here you can set the image dimensions and the resize mode for the twitter:image.</target>
Expand Down
32 changes: 32 additions & 0 deletions src/Resources/public/backend.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,35 @@
pointer-events: none;
opacity: 0.5;
}

fieldset[data-contao--toggle-fieldset-id-value="opengraph_legend"] legend,
#pal_opengraph_legend legend {
display: flex;
}

fieldset[data-contao--toggle-fieldset-id-value="opengraph_legend"] legend:before,
#pal_opengraph_legend legend:before {
content: "";
display: block;
margin-right: 1ch;
width: 1em;
height: 1em;
background: url("/bundles/opengraph3/icon-ogp.svg") no-repeat scroll 50% 50%;
background-size: contain;
}

fieldset[data-contao--toggle-fieldset-id-value="twitter_legend"] legend,
#pal_twitter_legend legend {
display: flex;
}

fieldset[data-contao--toggle-fieldset-id-value="twitter_legend"] legend:before,
#pal_twitter_legend legend:before {
content: "";
display: block;
margin-right: 1ch;
width: 1em;
height: 1em;
background: url("/bundles/opengraph3/icon-twitter.svg") no-repeat scroll 50% 50%;
background-size: contain;
}
32 changes: 32 additions & 0 deletions src/Resources/public/backend.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,35 @@
}
}
}

fieldset[data-contao--toggle-fieldset-id-value="opengraph_legend"] legend,
#pal_opengraph_legend legend {

display: flex;

&:before {
content: "";
display: block;
margin-right: 1ch;
width: 1em;
height: 1em;
background: url('/bundles/opengraph3/icon-ogp.svg') no-repeat scroll 50% 50%;
background-size: contain;
}
}

fieldset[data-contao--toggle-fieldset-id-value="twitter_legend"] legend,
#pal_twitter_legend legend {

display: flex;

&:before {
content: "";
display: block;
margin-right: 1ch;
width: 1em;
height: 1em;
background: url('/bundles/opengraph3/icon-twitter.svg') no-repeat scroll 50% 50%;
background-size: contain;
}
}
22 changes: 11 additions & 11 deletions src/Resources/public/icon-twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6abfe43

Please sign in to comment.