Mostly working
This commit is contained in:
parent
eaf5e2fb95
commit
58ddc86635
8 changed files with 751 additions and 78 deletions
|
|
@ -19,15 +19,82 @@ html, body {
|
|||
font-size: @fontsize;
|
||||
|
||||
background-color: @background;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: @accent_1;
|
||||
}
|
||||
|
||||
#app {
|
||||
.layout-crumbs {
|
||||
grid-template-areas:
|
||||
"header"
|
||||
"crumbs"
|
||||
"child-nodes"
|
||||
"name"
|
||||
"content"
|
||||
"files"
|
||||
"blank"
|
||||
;
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows:
|
||||
min-content /* header */
|
||||
min-content /* crumbs */
|
||||
min-content /* child-nodes */
|
||||
min-content /* name */
|
||||
min-content /* content */
|
||||
min-content /* files */
|
||||
1fr; /* blank */
|
||||
#tree { display: none }
|
||||
}
|
||||
|
||||
.layout-tree {
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"header header"
|
||||
"tree crumbs"
|
||||
"tree child-nodes"
|
||||
"tree name"
|
||||
"tree content"
|
||||
"tree files"
|
||||
"tree blank"
|
||||
;
|
||||
grid-template-columns: min-content 1fr;
|
||||
grid-template-rows:
|
||||
min-content /* header */
|
||||
min-content /* crumbs */
|
||||
min-content /* child-nodes */
|
||||
min-content /* name */
|
||||
min-content /* content */
|
||||
min-content /* files */
|
||||
1fr; /* blank */
|
||||
color: #fff;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.layout-tree-only {
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"header"
|
||||
"tree"
|
||||
;
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows:
|
||||
min-content /* header */
|
||||
1fr; /* blank */
|
||||
color: #fff;
|
||||
height: 100%;
|
||||
|
||||
#crumbs { display: none }
|
||||
.child-nodes { display: none }
|
||||
.node-name { display: none }
|
||||
.node-content { display: none }
|
||||
#file-section { display: none }
|
||||
}
|
||||
|
||||
#app {
|
||||
.layout-tree();
|
||||
|
||||
}
|
||||
|
||||
#blackout {
|
||||
|
|
@ -129,17 +196,34 @@ h1 {
|
|||
|
||||
header {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr min-content min-content;
|
||||
grid-area: header;
|
||||
grid-template-columns: min-content 1fr min-content min-content;
|
||||
align-items: center;
|
||||
background: @accent_1;
|
||||
//background: @accent_1;
|
||||
padding: 0px;
|
||||
color: darken(@accent_1, 35%);
|
||||
background: linear-gradient(to right, #009fff, #ec2f4b);
|
||||
background: linear-gradient(to right, #f5af19, #f12711);
|
||||
background: linear-gradient(to right, #fdc830, #f37335);
|
||||
background: linear-gradient(to right, #8a2387, #e94057, #f27121);
|
||||
background: linear-gradient(to right, #659999, #f4791f);
|
||||
background: linear-gradient(to right, #3e5151, #decba4);
|
||||
color: #fff;
|
||||
|
||||
&.modified {
|
||||
background: @accent_3;
|
||||
color: lighten(@accent_3, 45%);
|
||||
}
|
||||
|
||||
.tree {
|
||||
padding-left: 16px;
|
||||
img {
|
||||
display: block;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
padding-left: 16px;
|
||||
|
|
@ -160,12 +244,68 @@ header {
|
|||
}
|
||||
}
|
||||
|
||||
#tree {
|
||||
grid-area: tree;
|
||||
padding: 16px;
|
||||
background-color: #333;
|
||||
color: #ddd;
|
||||
font-size: 0.85em;
|
||||
|
||||
.node {
|
||||
display: grid;
|
||||
grid-template-columns: 24px min-content;
|
||||
grid-template-rows:
|
||||
min-content
|
||||
1fr;
|
||||
margin-top: 12px;
|
||||
|
||||
|
||||
.expand-toggle {
|
||||
img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: @accent_2;
|
||||
}
|
||||
&.selected {
|
||||
color: @accent_2;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.children {
|
||||
padding-left: 24px;
|
||||
margin-left: 8px;
|
||||
border-left: 1px solid #555;
|
||||
grid-column: 1 / -1;
|
||||
|
||||
&.collapsed {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#crumbs {
|
||||
grid-area: crumbs;
|
||||
background: linear-gradient(to right, #fdc830, #f37335);
|
||||
}
|
||||
|
||||
.crumbs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 16px;
|
||||
background: #333;
|
||||
padding: 8px 16px;
|
||||
background: #505050;
|
||||
color: #fff;
|
||||
box-shadow: 0px 5px 8px 0px rgba(128, 128, 128, 0.5);
|
||||
|
||||
.crumb {
|
||||
margin-right: 8px;
|
||||
|
|
@ -192,16 +332,15 @@ header {
|
|||
}
|
||||
|
||||
.child-nodes {
|
||||
grid-area: child-nodes;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
padding: 16px 16px 0px 16px;
|
||||
background-color: #505050;
|
||||
|
||||
.child-node {
|
||||
padding: 8px;
|
||||
border-radius: 8px;
|
||||
background-color: #2f2f2f;
|
||||
background-color: #333;
|
||||
margin-right: 12px;
|
||||
margin-bottom: 16px;
|
||||
white-space: nowrap;
|
||||
|
|
@ -213,36 +352,86 @@ header {
|
|||
}
|
||||
|
||||
.node-name {
|
||||
margin: 32px 0 16px 0;
|
||||
grid-area: name;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.node-content {
|
||||
grid-area: content;
|
||||
justify-self: center;
|
||||
padding: 16px 32px;
|
||||
word-wrap: break-word;
|
||||
font-family: monospace;
|
||||
font-size: 0.85em;
|
||||
color: #333;
|
||||
width: 900px;
|
||||
width: calc(100% - 32px);
|
||||
max-width: 900px;
|
||||
resize: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
||||
&:invalid {
|
||||
background: #f5f5f5;
|
||||
padding-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
#file-section {
|
||||
/* ============================================================= *
|
||||
* Textarea replicates the height of an element expanding height *
|
||||
* ============================================================= */
|
||||
.grow-wrap {
|
||||
/* easy way to plop the elements on top of each other and have them both sized based on the tallest one's height */
|
||||
display: grid;
|
||||
grid-area: content;
|
||||
}
|
||||
.grow-wrap::after {
|
||||
/* Note the weird space! Needed to preventy jumpy behavior */
|
||||
content: attr(data-replicated-value) " ";
|
||||
|
||||
/* This is how textarea text behaves */
|
||||
width: calc(100% - 32px);
|
||||
max-width: 900px;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
color: #f0f;
|
||||
background: rgba(0, 255, 255, 0.5);
|
||||
justify-self: center;
|
||||
width: 900px;
|
||||
margin-top: 16px;
|
||||
|
||||
/* Hidden from view, clicks, and screen readers */
|
||||
visibility: hidden;
|
||||
}
|
||||
.grow-wrap > textarea {
|
||||
/* You could leave this, but after a user resizes, then it ruins the auto sizing */
|
||||
resize: none;
|
||||
|
||||
/* Firefox shows scrollbar on growth, you can hide like this. */
|
||||
overflow: hidden;
|
||||
}
|
||||
.grow-wrap > textarea,
|
||||
.grow-wrap::after {
|
||||
/* Identical styling required!! */
|
||||
padding: 0.5rem;
|
||||
font: inherit;
|
||||
|
||||
/* Place on top of each other */
|
||||
grid-area: 1 / 1 / 2 / 2;
|
||||
}
|
||||
/* ============================================================= */
|
||||
|
||||
#file-section {
|
||||
grid-area: files;
|
||||
justify-self: center;
|
||||
width: calc(100% - 32px);
|
||||
max-width: 900px;
|
||||
padding: 32px;
|
||||
background: #f5f5f5;
|
||||
border-radius: 8px;
|
||||
margin-top: 32px;
|
||||
margin-bottom: 32px;
|
||||
|
||||
.header {
|
||||
font-weight: bold;
|
||||
|
|
@ -275,13 +464,12 @@ header {
|
|||
}
|
||||
}
|
||||
|
||||
.tree {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 932px) {
|
||||
#app {
|
||||
.layout-crumbs();
|
||||
}
|
||||
|
||||
.node-content {
|
||||
width: calc(100% - 32px);
|
||||
margin-left: 16px;
|
||||
padding: 16px;
|
||||
justify-self: start;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue