Redesign idea (#343)

* Redisign idea

* Code cleanup

* Fixed to right container

* Reoredered layout

* Reordering panels

* Export dialog

* Removed redunant code

* Fixed not removing temp canvas

* Fixed preview not using only selected elements

* Returned file name on export

* Toggle export selected/all elements

* Hide copy to clipboard button if no support of clipboard

* Added border to swatches

* Fixed modal flickering
This commit is contained in:
Timur Khazamov 2020-01-15 20:42:02 +05:00 committed by Christopher Chedeau
parent 8104c8525d
commit 79aee53ff6
37 changed files with 1043 additions and 746 deletions

View file

@ -1,3 +1,5 @@
@import "./theme.css";
/* http://www.eaglefonts.com/fg-virgil-ttf-131249.htm */
@font-face {
font-family: "Virgil";
@ -8,6 +10,7 @@
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
color: var(--text-color-primary);
}
.container {
@ -19,138 +22,39 @@ body {
right: 0;
}
.sidePanel {
width: 230px;
background-color: #eee;
padding: 10px;
overflow-y: auto;
position: relative;
.panelColumn {
display: flex;
flex-direction: column;
h4 {
margin: 10px 0 10px 0;
h5 {
margin-top: 4px;
margin-bottom: 4px;
font-size: 12px;
color: #333;
}
.panel {
position: relative;
.btn-panel-collapse {
position: absolute;
top: -2px;
right: 5px;
background: none;
margin: 0px;
color: black;
}
.btn-panel-collapse-icon {
transform: none;
display: inline-block;
}
.btn-panel-collapse-icon-closed {
transform: rotateZ(90deg);
}
h5:first-child {
margin-top: 0;
}
.panelTools {
display: flex;
.buttonList {
flex-wrap: wrap;
justify-content: space-between;
label {
margin: 2px 0;
}
}
.panelColumn {
display: flex;
flex-direction: column;
h5 {
margin-top: 4px;
margin-bottom: 4px;
font-size: 12px;
color: #333;
}
h5:first-child {
margin-top: 0;
}
.buttonList {
flex-wrap: wrap;
button {
margin-right: 4px;
}
button {
margin-right: 4px;
}
}
}
.tool {
position: relative;
input[type="radio"] {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
input[type="radio"] {
& + .toolIcon {
background-color: #ddd;
width: 41px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 3px;
svg {
height: 1em;
}
}
&:hover + .toolIcon {
background-color: #e7e5e5;
}
&:checked + .toolIcon {
background-color: #bdbebc;
}
&:focus + .toolIcon {
box-shadow: 0 0 0 2px steelblue;
}
}
.divider {
width: 1px;
background-color: #ddd;
margin: 1px;
}
label {
margin-right: 6px;
span {
display: inline-block;
}
}
input[type="number"] {
width: 30px;
}
input[type="color"] {
margin: 2px;
}
input[type="range"] {
width: 230px;
}
input {
margin-right: 5px;
&:focus {
outline: transparent;
box-shadow: 0 0 0 2px steelblue;
}
input:focus {
outline: transparent;
box-shadow: 0 0 0 2px steelblue;
}
button {
@ -170,8 +74,7 @@ button {
border-color: #d6d4d4;
}
&:active,
&.active {
&:active {
background-color: #bdbebc;
border-color: #bdbebc;
}
@ -181,40 +84,39 @@ button {
}
}
.popover {
position: absolute;
z-index: 2;
.cover {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.App-menu {
display: grid;
}
.swatch {
height: 24px;
width: 24px;
display: inline;
margin-right: 4px;
.App-menu_top {
grid-template-columns: 1fr auto 1fr;
align-items: flex-start;
cursor: default;
pointer-events: none !important;
}
.swatch-input {
font-size: 16px;
display: inline;
width: 100px;
border-radius: 2px;
padding: 2px 4px;
border: 1px solid #ddd;
}
.project-name {
font-size: 14px;
cursor: pointer;
.App-menu_top > * {
pointer-events: all;
}
.project-name-input {
width: 200px;
font: inherit;
.App-menu_top > *:first-child {
justify-self: flex-start;
}
.App-menu_top > *:last-child {
justify-self: flex-end;
}
.App-menu_left {
grid-template-rows: 1fr auto 1fr;
height: 100%;
}
.App-menu_right {
grid-template-rows: 1fr;
height: 100%;
}
.App-right-menu {
width: 220px;
}