mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
updates
This commit is contained in:
parent
37c758d455
commit
d899929816
@ -1,6 +1,8 @@
|
|||||||
$base-color: #332f35;
|
$base-color: #332f35;
|
||||||
$shop: #b63831;
|
$shop: #b63831;
|
||||||
$red: #e3474a;
|
$red: #e3474a;
|
||||||
|
$orange: #df7c25;
|
||||||
|
$green: #70a630;
|
||||||
|
|
||||||
$palettes: (
|
$palettes: (
|
||||||
base: (
|
base: (
|
||||||
@ -28,9 +30,13 @@ $palettes: (
|
|||||||
background: (
|
background: (
|
||||||
default: darken($base-color, 3%),
|
default: darken($base-color, 3%),
|
||||||
hover: darken($base-color, 1.5%),
|
hover: darken($base-color, 1.5%),
|
||||||
|
highlight: lighten($base-color, 3%),
|
||||||
|
highlight-hover: lighten($base-color, 5%),
|
||||||
),
|
),
|
||||||
foreground: (
|
foreground: (
|
||||||
default: lighten($base-color, 50%),
|
default: lighten($base-color, 50%),
|
||||||
|
symbol: lighten($base-color, 8%),
|
||||||
|
text: lighten($base-color, 50%),
|
||||||
hover: lighten($base-color, 100%),
|
hover: lighten($base-color, 100%),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -48,11 +54,16 @@ $palettes: (
|
|||||||
background: (
|
background: (
|
||||||
default: lighten($base-color, 10%),
|
default: lighten($base-color, 10%),
|
||||||
hover: lighten($base-color, 15%),
|
hover: lighten($base-color, 15%),
|
||||||
|
weak: lighten($base-color, 5%),
|
||||||
),
|
),
|
||||||
foreground: (
|
foreground: (
|
||||||
default: lighten($base-color, 80%),
|
default: lighten($base-color, 50%),
|
||||||
dropdown: lighten($base-color, 50%),
|
dropdown: lighten($base-color, 50%),
|
||||||
text: lighten($base-color, 100%),
|
text: lighten($base-color, 60%),
|
||||||
|
symbol: lighten($base-color, 50%),
|
||||||
|
indent: lighten($base-color, 5%),
|
||||||
|
weak: lighten($base-color, 25%),
|
||||||
|
hover: lighten($base-color, 75%),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
selectedTool: (
|
selectedTool: (
|
||||||
@ -81,6 +92,7 @@ $palettes: (
|
|||||||
),
|
),
|
||||||
foreground: (
|
foreground: (
|
||||||
default: #fff,
|
default: #fff,
|
||||||
|
text: lighten($base-color, 40%),
|
||||||
symbol: lighten($base-color, 5%),
|
symbol: lighten($base-color, 5%),
|
||||||
symbol-hover: lighten($base-color, 20%),
|
symbol-hover: lighten($base-color, 20%),
|
||||||
weak: lighten($base-color, 20%),
|
weak: lighten($base-color, 20%),
|
||||||
@ -102,9 +114,19 @@ $palettes: (
|
|||||||
button-hover: lighten($base-color, 70%),
|
button-hover: lighten($base-color, 70%),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
indent-darker: (
|
||||||
|
background: (
|
||||||
|
default: darken($base-color, 8%),
|
||||||
|
|
||||||
|
),
|
||||||
|
foreground: (
|
||||||
|
default: lighten($base-color, 15%),
|
||||||
|
)
|
||||||
|
),
|
||||||
footer: (
|
footer: (
|
||||||
background: (
|
background: (
|
||||||
default: darken($base-color, 9%),
|
default: darken($base-color, 9%),
|
||||||
|
hover: darken($base-color, 2%),
|
||||||
),
|
),
|
||||||
foreground: (
|
foreground: (
|
||||||
default: lighten($base-color, 20%),
|
default: lighten($base-color, 20%),
|
||||||
|
@ -127,7 +127,7 @@ svg {
|
|||||||
float: left;
|
float: left;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
li button {
|
li button, li a {
|
||||||
color: color(menu, foreground);
|
color: color(menu, foreground);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 17px;
|
padding: 17px;
|
||||||
@ -156,15 +156,21 @@ svg {
|
|||||||
padding-bottom: 2px;
|
padding-bottom: 2px;
|
||||||
li {
|
li {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
button {
|
button, a {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 8px 32px 8px 16px;
|
padding: 8px 32px 8px 16px;
|
||||||
|
font-size: 1em;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: color(menu, background, hover);
|
background-color: color(menu, background, hover);
|
||||||
color: color(menu, foreground, hover);
|
color: color(menu, foreground, hover);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
a {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.disabled {
|
.disabled {
|
||||||
|
@ -26,7 +26,7 @@ for (var i = 1; i < mainMenuItems.length; i++) {
|
|||||||
var subMenuItem = subMenuItems[j];
|
var subMenuItem = subMenuItems[j];
|
||||||
var subMenuButton = subMenuItem.children[0];
|
var subMenuButton = subMenuItem.children[0];
|
||||||
|
|
||||||
subMenuButton.addEventListener("click", function () {
|
subMenuButton.addEventListener("click", function (e) {
|
||||||
|
|
||||||
switch(this.textContent) {
|
switch(this.textContent) {
|
||||||
|
|
||||||
@ -77,23 +77,19 @@ for (var i = 1; i < mainMenuItems.length; i++) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Exit':
|
case 'Exit':
|
||||||
|
|
||||||
|
console.log('exit')
|
||||||
//if a document exists, make sure they want to delete it
|
//if a document exists, make sure they want to delete it
|
||||||
if (documentCreated && confirm('Exiting will discard your current pixel. Are you sure you want to do that?')) {
|
if (documentCreated) {
|
||||||
|
|
||||||
//skip onbeforeunload prompt
|
//ask user if they want to leave
|
||||||
window.onbeforeunload = null;
|
if (confirm('Exiting will discard your current pixel. Are you sure you want to do that?'))
|
||||||
|
//skip onbeforeunload prompt
|
||||||
//go back to main site
|
window.onbeforeunload = null;
|
||||||
window.location.href = "https://lospec.com/pixel-editor";
|
else
|
||||||
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
|
|
||||||
//skip onbeforeunload prompt
|
|
||||||
window.onbeforeunload = null;
|
|
||||||
|
|
||||||
//go back to main site
|
|
||||||
window.location.href = "https://lospec.com/pixel-editor";
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
//Edit Menu
|
//Edit Menu
|
||||||
case 'Undo':
|
case 'Undo':
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
<li><button>New</button></li>
|
<li><button>New</button></li>
|
||||||
<li><button>Open</button></li>
|
<li><button>Open</button></li>
|
||||||
<li><button id="save-as-button" class="disabled">Save as...</button></li>
|
<li><button id="save-as-button" class="disabled">Save as...</button></li>
|
||||||
<li><button>Exit</button></li>
|
<li><a href="/pixel-editor">Exit</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@ -215,12 +215,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
palettes = { {{#palettes}}
|
palettes = { {{#palettes}}
|
||||||
'{{name}}': {
|
'{{title}}': {
|
||||||
colors: '{{colors}}'.split(',')
|
colors: '{{colors}}'.split(',')
|
||||||
},
|
},
|
||||||
{{/palettes}}
|
{{/palettes}}
|
||||||
{{#specifiedPalette}}
|
{{#specifiedPalette}}
|
||||||
'{{name}}': {
|
'{{title}}': {
|
||||||
colors: '{{colors}}'.split(','),
|
colors: '{{colors}}'.split(','),
|
||||||
specified: true
|
specified: true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user