Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions resources/css/blocks.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions resources/css/blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ body {
}
.c-header,
.c-footer {
display:table;
background:#E44D4D;
padding:5px 10px;
position:relative;
Expand All @@ -103,10 +102,15 @@ body {
}
.c-header {
border-bottom-left-radius:0px;
box-shadow: -1px -1px 0px #A9A9A9;
display:table;
}
.c-footer {
border-top-left-radius:0px;
margin-bottom:1px;
max-height: 18px;
display:block;
box-shadow: -1px 1px 0px #A9A9A9;
}
.c-content {
background:#E44D4D;
Expand All @@ -118,11 +122,23 @@ body {
position:relative; /* For z-index (appear on top of .c-header, which in turn puts it on top of the extra border-bottom when attaching a block) */
box-shadow: -1px 0px 0px #A9A9A9;
}
.c-header {
box-shadow: -1px -1px 0px #A9A9A9;
}
.c-footer {
box-shadow: -1px 1px 0px #A9A9A9;
.c-quicktext {
background: #914DE4;
padding: 7px;
font-size: 10pt;
border-radius: 100%;
cursor: pointer;
opacity: .7;
position: relative;
top: -20px;
right: -25px;
display: none;
&:hover {
opacity: .9;
}
}
.scriptingArea .c-content:empty + .c-footer .c-quicktext {
display: inline-block;
}
.drop-area {
border-bottom: 5px solid white;
Expand Down
29 changes: 22 additions & 7 deletions resources/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions resources/js/blockFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var filter = {
'<li class="c-header">' + block.name + ' <span class="attr-controls"><span class="remove-attr"></span><span class="add-attr"></span></span></li>',
'<ul class="c-content">',
'</ul>',
'<li class="c-footer">&nbsp;</li>',
'<ul class="c-footer"><li class="c-quicktext">Aa</li></ul>',
'</ul>'
].join('');
} else {
Expand All @@ -51,7 +51,7 @@ var filter = {
'<li class="c-header">' + block.name + ' <span class="script-input" contenteditable="true">&nbsp;</span></li>',
'<ul class="c-content">',
'</ul>',
'<li class="c-footer">&nbsp;</li>',
'<ul class="c-footer"></ul>',
'</ul>'
].join('');
}
Expand Down
7 changes: 7 additions & 0 deletions resources/js/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,13 @@ SCRIPTING_AREA.addEventListener('input', function(ev) {
}
});

SCRIPTING_AREA.addEventListener('click', function(ev) {
if (ev.target.matches('.c-quicktext')) {
ev.target.parentNode.parentNode.querySelector('.c-content').innerHTML = '<li class="stack e-text"><span contenteditable="true" class="script-input text">breadfish.gif</span></li>';
setFrameContent();
}
});

var SCRIPT_MENU = document.querySelector('.context-menu.scripts');
var RIGHT_CLICKED_SCRIPT = undefined;

Expand Down
2 changes: 1 addition & 1 deletion resources/js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function generateWrapperBlocks(jsonData) {
}

wrapperHtml.push(
'</ul><li class="c-footer">&nbsp;</li></ul>'
'</ul><ul class="c-footer"><li class="c-quicktext">Aa</li></ul></ul>'
);

return wrapperHtml.join('');
Expand Down