diff --git a/Classes/Resource/Rendering/VimeoRenderer.php b/Classes/Resource/Rendering/VimeoRenderer.php
index 8b9fa7b..5b20ea6 100644
--- a/Classes/Resource/Rendering/VimeoRenderer.php
+++ b/Classes/Resource/Rendering/VimeoRenderer.php
@@ -157,6 +157,11 @@ protected function renderPlaceholder(FileInterface $file, $width, $height, array
$placeholderContent = $title . $placeholderContent;
}
+ if (!empty($placeholderContentObject['allWrap'])) {
+ $wrapArr = explode('|', $placeholderContentObject['allWrap']);
+ $placeholderContent = trim($wrapArr[0] ?? '') . $placeholderContent . trim($wrapArr[1] ?? '');
+ }
+
$placeholderContent = '
' . $placeholderContent . '
';
return $placeholderContent;
diff --git a/Classes/Resource/Rendering/YouTubeRenderer.php b/Classes/Resource/Rendering/YouTubeRenderer.php
index 51126ed..9bf6754 100644
--- a/Classes/Resource/Rendering/YouTubeRenderer.php
+++ b/Classes/Resource/Rendering/YouTubeRenderer.php
@@ -161,6 +161,11 @@ protected function renderPlaceholder(FileInterface $file, $width, $height, array
$placeholderContent = $title . $placeholderContent;
}
+ if (!empty($placeholderContentObject['allWrap'])) {
+ $wrapArr = explode('|', $placeholderContentObject['allWrap']);
+ $placeholderContent = trim($wrapArr[0] ?? '') . $placeholderContent . trim($wrapArr[1] ?? '');
+ }
+
$placeholderContent = '' . $placeholderContent . '
';
return $placeholderContent;
diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript
index f351295..c12485a 100644
--- a/Configuration/TypoScript/constants.typoscript
+++ b/Configuration/TypoScript/constants.typoscript
@@ -3,17 +3,20 @@ plugin {
#cat=content/enable/a; type=boolean; label=Enable 2-click for external media
enable = 0
- #cat=content/enable/b; type=boolean; label=Show the video's title as the placeholder's title
+ #cat=content/enable/b; type=wrap; label=Additional warp to all placeholder content
+ allWrap = |
+
+ #cat=content/enable/c; type=boolean; label=Show the video's title as the placeholder's title
showTitle = 1
- #cat=content/enable/c; type=boolean; label=Show the video's preview image
+ #cat=content/enable/d; type=boolean; label=Show the video's preview image
showPreviewImage = 1
showPreviewImage {
- #cat=content/enable/d; type=int+; label=Show the video's preview image
+ #cat=content/enable/e; type=int+; label=Show the video's preview image
maxWidth = 0
- #cat=content/enable/e; type=int+; label=Show the video's preview image
+ #cat=content/enable/f; type=int+; label=Show the video's preview image
maxHeight = 0
}
}
diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript
index 60cce7f..202cc4c 100644
--- a/Configuration/TypoScript/setup.typoscript
+++ b/Configuration/TypoScript/setup.typoscript
@@ -15,6 +15,8 @@ lib {
media {
additionalConfig {
placeholderContent {
+ allWrap = {$plugin.media2click.allWrap}
+
wrap = |
value = Click to load external video!
lang {
diff --git a/Documentation/Configuration/Index.rst b/Documentation/Configuration/Index.rst
index 458fbbe..fddb140 100644
--- a/Documentation/Configuration/Index.rst
+++ b/Documentation/Configuration/Index.rst
@@ -33,6 +33,22 @@ enable
:aspect:`Default:`
0
+.. _constants-allwrap:
+
+allWrap
+"""""""
+
+:aspect:`Property`
+ allWrap
+
+:aspect:`Data type:`
+ wrap
+
+:aspect:`Description`
+ Additional wrap to all placeholder content
+
+:aspect:`Default:`
+ |
.. _constants-showtitle:
@@ -125,6 +141,9 @@ placeholderContent
Properties:
+ :ts:`.allWrap:`
+ This wraps the whole placeholder content.
+
:ts:`.value:` String
Default text
diff --git a/Resources/Public/Css/media2click.css b/Resources/Public/Css/media2click.css
index 4bd9703..dfc0677 100644
--- a/Resources/Public/Css/media2click.css
+++ b/Resources/Public/Css/media2click.css
@@ -24,10 +24,26 @@
margin-bottom: .5em;
}
+.media2click-placeholder-inner {
+ width: 100%;
+ height: 100%;
+
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
+
+.media2click-placeholder.media2click-haspreview .media2click-placeholder-inner {
+ background-image: url(../Images/videobutton.png);
+ background-size: 30% auto;
+ background-position: center center;
+ background-repeat: no-repeat;
+}
+
.media2click-content {
display: block;
}
.media2click-wrap iframe {
display: none;
-}
\ No newline at end of file
+}
diff --git a/Resources/Public/Images/videobutton.png b/Resources/Public/Images/videobutton.png
new file mode 100644
index 0000000..4b6be0e
Binary files /dev/null and b/Resources/Public/Images/videobutton.png differ
diff --git a/ext_emconf.php b/ext_emconf.php
index b1a543e..247af32 100644
--- a/ext_emconf.php
+++ b/ext_emconf.php
@@ -22,5 +22,5 @@
],
],
'state' => 'beta',
- 'version' => '0.2.3',
+ 'version' => '0.2.4',
];