things
This commit is contained in:
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#FFFFFF"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-480H200v480Zm280-80q-82 0-146.5-44.5T240-440q29-71 93.5-115.5T480-600q82 0 146.5 44.5T720-440q-29 71-93.5 115.5T480-280Zm0-60q56 0 102-26.5t72-73.5q-26-47-72-73.5T480-540q-56 0-102 26.5T306-440q26 47 72 73.5T480-340Zm0-100Zm0 60q25 0 42.5-17.5T540-440q0-25-17.5-42.5T480-500q-25 0-42.5 17.5T420-440q0 25 17.5 42.5T480-380Z"/></svg>
|
||||
|
After Width: | Height: | Size: 577 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-480H200v480Zm280-80q-82 0-146.5-44.5T240-440q29-71 93.5-115.5T480-600q82 0 146.5 44.5T720-440q-29 71-93.5 115.5T480-280Zm0-60q56 0 102-26.5t72-73.5q-26-47-72-73.5T480-540q-56 0-102 26.5T306-440q26 47 72 73.5T480-340Zm0-100Zm0 60q25 0 42.5-17.5T540-440q0-25-17.5-42.5T480-500q-25 0-42.5 17.5T420-440q0 25 17.5 42.5T480-380Z"/></svg>
|
||||
|
After Width: | Height: | Size: 577 B |
@@ -0,0 +1,5 @@
|
||||
name: Block Content Preview
|
||||
description: 'Allows loading of preview images for inline blocks.'
|
||||
core_version_requirement: ^10 || ^11
|
||||
type: module
|
||||
package: Layout Builder
|
||||
@@ -0,0 +1,11 @@
|
||||
assets:
|
||||
css:
|
||||
theme:
|
||||
css/block-content-preview.css: {}
|
||||
js:
|
||||
js/contentBlockPreview.js: { defer: true }
|
||||
dependencies:
|
||||
- core/jquery
|
||||
- core/once
|
||||
- core/drupal
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Implements hook form alter.
|
||||
*/
|
||||
function content_block_preview_element_info_alter(array &$types) {
|
||||
if (isset($types['layout_builder'])) {
|
||||
$types['layout_builder']['#attached']['library'][] = 'content_block_preview/assets';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#drupal-off-canvas .inline-block-list li a:hover:after {
|
||||
background-image: url('/modules/custom/content_block_preview/assets/preview-white.svg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
content: '';
|
||||
display: block;
|
||||
max-width: 25px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 10px;
|
||||
transform: translateY(-50%);
|
||||
z-index: 99999999;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
(function (Drupal, once) {
|
||||
Drupal.behaviors.dialog = {
|
||||
attach: function (context, settings) {
|
||||
let settingsTray = once('contentBlockPreview', '#drupal-off-canvas', context);
|
||||
console.log(settingsTray);
|
||||
settingsTray.forEach((tray) => {
|
||||
console.log("hello");
|
||||
});
|
||||
}
|
||||
};
|
||||
})(Drupal, once);
|
||||
Reference in New Issue
Block a user