init
This commit is contained in:
233
static/Vvvebjs/scss/vvvebjs-editor-helpers.scss
Normal file
233
static/Vvvebjs/scss/vvvebjs-editor-helpers.scss
Normal file
@@ -0,0 +1,233 @@
|
||||
@mixin webkit-scrollbar()
|
||||
{
|
||||
&::-webkit-scrollbar {
|
||||
width: 0.5rem;
|
||||
background-color: rgba(var(--bs-body-bg-rgb), 0.1);
|
||||
-webkit-box-shadow:none;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 1px rgba(var(--bs-body-color-rgb),0.05);
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(var(--bs-body-color-rgb), 0.15);
|
||||
outline: 1px solid slategrey;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin disabled-element() {
|
||||
pointer-events:none;
|
||||
position:relative;
|
||||
|
||||
&::after {
|
||||
content:"Non-editable area";
|
||||
position:absolute;
|
||||
left:0px;
|
||||
top:0px;
|
||||
width:100%;
|
||||
height:100%;
|
||||
padding-top:5px;
|
||||
font-weight:600;
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
background:rgba(252, 252, 252, 0.85);
|
||||
border:1px dashed #999;
|
||||
overflow:hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
scrollbar-color: rgba(var(--bs-body-color-rgb), 0.1) #fff;
|
||||
scrollbar-width: thin;
|
||||
@include webkit-scrollbar();
|
||||
}
|
||||
|
||||
|
||||
[data-vvveb-disabled] {
|
||||
@include disabled-element();
|
||||
}
|
||||
|
||||
//disable edit on all content except on edit-exception
|
||||
[data-vvveb-disabled-area] {
|
||||
|
||||
& *:not([data-vvveb-edit-exception]) {
|
||||
@include disabled-element();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Prevents iframe mouse events that prevents clicking on the component
|
||||
*/
|
||||
[data-component-lottie] > svg,
|
||||
[data-component-oembed] iframe,
|
||||
[data-component-oembed] > div,
|
||||
[data-component-video] > iframe,
|
||||
[data-component-maps] > iframe,
|
||||
[data-component-twitter] > iframe,
|
||||
[data-component-iframe] > iframe,
|
||||
[data-component-openstreetmap] > iframe {
|
||||
pointer-events:none;
|
||||
}
|
||||
|
||||
[contenteditable="true"] {
|
||||
outline:none;
|
||||
|
||||
&:focus-visible {
|
||||
outline:none;
|
||||
}
|
||||
}
|
||||
|
||||
.is-dragged {
|
||||
pointer-events:none;
|
||||
opacity:0.15;
|
||||
position:relative;
|
||||
/*
|
||||
&:after {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
background: rgba(255,255,0,0.1);
|
||||
content: " ";
|
||||
top: 0;
|
||||
}*/
|
||||
}
|
||||
|
||||
.vvveb-hidden {
|
||||
display:none !important;;
|
||||
}
|
||||
|
||||
body.vvveb-hidden {
|
||||
display:unset !important;
|
||||
|
||||
.vvveb-hidden, .d-none, .invisible {
|
||||
display:unset !important;
|
||||
visibility: visible !important;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content:"Hidden";
|
||||
position:absolute;
|
||||
left:0px;
|
||||
top:0px;
|
||||
width:100%;
|
||||
height:100%;
|
||||
padding-top:5px;
|
||||
font-weight:600;
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
background:rgba(252, 252, 252, 0.85);
|
||||
background:rgba(var(--bs-body-bg-rgb), 0.85);
|
||||
border:1px dashed #999;
|
||||
border:1px dashed var(--bs-border-color);
|
||||
overflow:hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&:hover::after {
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin col-empty-highlight {
|
||||
|
||||
> [class*="col-"],
|
||||
> .col {
|
||||
&:empty {
|
||||
background:var(--bs-tertiary-bg);
|
||||
min-height:200px;
|
||||
outline:1px solid var(--bs-border-color);
|
||||
outline-offset: -0.5rem;
|
||||
margin:0.5rem;
|
||||
display:flex;
|
||||
|
||||
&:after {
|
||||
content:'Drag elements here';
|
||||
font-size:85%;
|
||||
color:var(--bs-secondary);
|
||||
display:block;
|
||||
vertical-align: middle;
|
||||
display: flex;
|
||||
align-self: center;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@mixin col-hover {
|
||||
|
||||
> [class*="col-"],
|
||||
> .col {
|
||||
outline:1px dashed rgba(var(--bs-success-rgb), 0.35);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
section {
|
||||
.container, .container-fluid {
|
||||
div > .row,
|
||||
> .row {
|
||||
@include col-empty-highlight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
section:hover {
|
||||
.container, .container-fluid {
|
||||
div > .row, > .row {
|
||||
@include col-hover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.row:hover {
|
||||
@include col-hover;
|
||||
}
|
||||
|
||||
#vvvebjs-new-section {
|
||||
background: rgb(248, 249, 250);
|
||||
background: var(--bs-tertiary-bg);
|
||||
display:block;
|
||||
|
||||
.col {
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
background: var(--bs-body-bg);
|
||||
border: 1px dashed #ccc;
|
||||
}
|
||||
button {
|
||||
margin: 0.5rem;
|
||||
background: #0030C0;
|
||||
padding: 0.4rem 2.5rem;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
border-radius: 3px;
|
||||
border-color: #0030C0;
|
||||
border-width: 1px;
|
||||
&:hover {
|
||||
}
|
||||
}
|
||||
|
||||
.container,
|
||||
.row,
|
||||
.col {
|
||||
padding: 1rem;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user