Work on sync element, now a custom HTML element
This commit is contained in:
parent
99063d34be
commit
9fc4a14ce3
10 changed files with 190 additions and 1001 deletions
|
|
@ -1,365 +0,0 @@
|
|||
@import "theme.less";
|
||||
|
||||
html {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#notes2 {
|
||||
min-height: 100vh;
|
||||
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"tree crumbs"
|
||||
"tree sync"
|
||||
"tree name"
|
||||
"tree content"
|
||||
//"tree checklist"
|
||||
//"tree schedule"
|
||||
//"tree files"
|
||||
"tree blank"
|
||||
;
|
||||
grid-template-columns: min-content 1fr;
|
||||
grid-template-rows:
|
||||
48px
|
||||
56px
|
||||
48px
|
||||
min-content
|
||||
1fr;
|
||||
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
grid-template-areas:
|
||||
"crumbs"
|
||||
"sync"
|
||||
"name"
|
||||
"content"
|
||||
//"checklist"
|
||||
//"schedule"
|
||||
//"files"
|
||||
"blank"
|
||||
;
|
||||
grid-template-columns: 1fr;
|
||||
|
||||
#tree {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#tree {
|
||||
grid-area: tree;
|
||||
display: grid;
|
||||
padding: 16px 0px 16px 16px;
|
||||
color: #ddd;
|
||||
z-index: 100; // Over crumbs shadow
|
||||
border-left: 2px solid #333;
|
||||
|
||||
&:focus {
|
||||
border-left: 2px solid #FE5F55;
|
||||
}
|
||||
|
||||
#logo {
|
||||
display: grid;
|
||||
position: relative;
|
||||
justify-items: center;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
margin-left: 24px;
|
||||
margin-right: 24px;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
width: 128px;
|
||||
left: -20px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.icons {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 32px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.node {
|
||||
display: grid;
|
||||
grid-template-columns: 24px min-content;
|
||||
grid-template-rows:
|
||||
min-content
|
||||
1fr;
|
||||
margin-top: 12px;
|
||||
|
||||
|
||||
.expand-toggle {
|
||||
user-select: none;
|
||||
img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.name {
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
|
||||
&:hover {
|
||||
color: @color1;
|
||||
}
|
||||
&.selected {
|
||||
color: @color1;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.children {
|
||||
padding-left: 24px;
|
||||
margin-left: 8px;
|
||||
border-left: 1px solid #444;
|
||||
grid-column: 1 / -1;
|
||||
|
||||
&.collapsed {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#tree-nodes {
|
||||
padding: 16px 32px;
|
||||
background-color: #333;
|
||||
border-radius: 8px;
|
||||
box-shadow: 5px 5px 10px -5px rgba(0,0,0,0.75);
|
||||
}
|
||||
|
||||
#crumbs {
|
||||
grid-area: crumbs;
|
||||
display: grid;
|
||||
align-items: start;
|
||||
justify-items: center;
|
||||
margin: 16px 16px;
|
||||
|
||||
.crumbs {
|
||||
background: #e4e4e4;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 8px 16px;
|
||||
background: #e4e4e4;
|
||||
color: #333;
|
||||
border-bottom-left-radius: 5px;
|
||||
border-bottom-right-radius: 5px;
|
||||
|
||||
&.node-modified {
|
||||
background-color: @color1;
|
||||
color: @color2;
|
||||
.crumb:after {
|
||||
color: @color2;
|
||||
}
|
||||
}
|
||||
|
||||
.crumb {
|
||||
margin-right: 8px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.crumb:after {
|
||||
content: "•";
|
||||
margin-left: 8px;
|
||||
color: @color1
|
||||
}
|
||||
|
||||
.crumb:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.crumb:last-child:after {
|
||||
content: '';
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#sync-progress {
|
||||
grid-area: sync;
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
|
||||
width: 100%;
|
||||
height: 56px;
|
||||
position: relative;
|
||||
|
||||
progress {
|
||||
width: 100%;
|
||||
padding: 0 7px;
|
||||
max-width: 900px;
|
||||
height: 16px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
progress[value]::-webkit-progress-bar {
|
||||
background-color: #eee;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) inset;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
progress[value]::-moz-progress-bar {
|
||||
background-color: #eee;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25) inset;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
progress[value]::-webkit-progress-value {
|
||||
background: rgb(186,95,89);
|
||||
background: linear-gradient(180deg, rgba(186,95,89,1) 0%, rgba(254,95,85,1) 50%, rgba(186,95,89,1) 100%);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
// TODO: style the progress value for Firefox
|
||||
progress[value]::-moz-progress-value {
|
||||
background: rgb(186,95,89);
|
||||
background: linear-gradient(180deg, rgba(186,95,89,1) 0%, rgba(254,95,85,1) 50%, rgba(186,95,89,1) 100%);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.count {
|
||||
width: min-content;
|
||||
white-space: nowrap;
|
||||
margin-top: 0px;
|
||||
color: #888;
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
}
|
||||
|
||||
&.hidden {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: visibility 0s 500ms, opacity 500ms linear;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#name {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
font-size: 1.15em;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
/* ============================================================= *
|
||||
* 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;
|
||||
font-size: 1.0em;
|
||||
}
|
||||
.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;
|
||||
background: rgba(0, 255, 255, 0.5);
|
||||
justify-self: center;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
/* ============================================================= */
|
||||
|
||||
#node-content {
|
||||
justify-self: center;
|
||||
word-wrap: break-word;
|
||||
font-family: monospace;
|
||||
color: #333;
|
||||
width: calc(100% - 32px);
|
||||
max-width: 900px;
|
||||
resize: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
|
||||
&:invalid {
|
||||
background: #f5f5f5;
|
||||
padding-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
#blank {
|
||||
grid-area: blank;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
dialog.op {
|
||||
&::backdrop {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.header {
|
||||
font-weight: bold;
|
||||
margin-top: 16px;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#op-search {
|
||||
.results {
|
||||
display: grid;
|
||||
grid-template-columns: min-content min-content;
|
||||
grid-gap: 6px 16px;
|
||||
|
||||
div {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.ancestors {
|
||||
display: flex;
|
||||
|
||||
.ancestor::after {
|
||||
content: ">";
|
||||
margin: 0px 8px;
|
||||
color: #a00;
|
||||
}
|
||||
|
||||
.ancestor:last-child::after {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue