Refactor and renaming
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
$max-editor-width: 800px;
|
||||
$top-bar-height: 55px;
|
||||
$bottom-bar-height: 30px;
|
||||
@@ -0,0 +1,256 @@
|
||||
@import "constants.scss";
|
||||
|
||||
//div.rhs-open #editor .cm-editor .cm-content {
|
||||
// max-width: 550px;
|
||||
//}
|
||||
|
||||
.cm-editor {
|
||||
font-size: var(--ident);
|
||||
//overflow-y: hidden;
|
||||
padding: 0 20px;
|
||||
|
||||
.cm-content {
|
||||
font-family: var(--editor-font);
|
||||
margin: auto;
|
||||
max-width: $max-editor-width;
|
||||
}
|
||||
|
||||
&.cm-focused {
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
.cm-selectionBackground {
|
||||
background-color: #d7e1f6 !important;
|
||||
}
|
||||
|
||||
.line-h1,
|
||||
.line-h2,
|
||||
.line-h3 {
|
||||
background-color: rgba(0, 30, 77, 0.5);
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
padding: 2px 2px;
|
||||
|
||||
.meta {
|
||||
color: orange;
|
||||
}
|
||||
}
|
||||
|
||||
.line-h1 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.line-h2 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.line-h3 {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
/* Color list item this way */
|
||||
.line-li .meta {
|
||||
color: rgb(0, 123, 19);
|
||||
}
|
||||
/* Then undo other meta */
|
||||
.line-li .meta ~ .meta {
|
||||
color: #650007;
|
||||
}
|
||||
|
||||
.line-code {
|
||||
background-color: rgba(72, 72, 72, 0.1);
|
||||
|
||||
.code {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.line-tbl-header {
|
||||
font-weight: bold;
|
||||
|
||||
.meta {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.struct {
|
||||
color: darkred;
|
||||
}
|
||||
|
||||
.code {
|
||||
background-color: rgba(72, 72, 72, 0.1);
|
||||
}
|
||||
|
||||
.line-fenced-code {
|
||||
background-color: rgba(72, 72, 72, 0.1);
|
||||
|
||||
.code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
// Set this to defaults
|
||||
.comment {
|
||||
color: #989797;
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
font-style: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.keyword {
|
||||
color: #830000;
|
||||
}
|
||||
|
||||
.variableName {
|
||||
color: #036d9b;
|
||||
}
|
||||
|
||||
.typeName {
|
||||
color: #038138;
|
||||
}
|
||||
|
||||
.string,.string2 {
|
||||
color: #440377;
|
||||
}
|
||||
|
||||
//.code-info {
|
||||
// background: black;
|
||||
// border-radius: 3px;
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
.meta {
|
||||
color: #650007;
|
||||
}
|
||||
|
||||
.line-blockquote {
|
||||
background-color: rgba(220, 220, 220, 0.5);
|
||||
color: #676767;
|
||||
text-indent: -2ch;
|
||||
padding-left: 2ch;
|
||||
}
|
||||
|
||||
.emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.strong {
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.link:not(.meta, .url) {
|
||||
color: #0330cb;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.link.url {
|
||||
color: #7e7d7d;
|
||||
}
|
||||
|
||||
.url:not(.link) {
|
||||
color: #0330cb;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.atom {
|
||||
color: darkred;
|
||||
}
|
||||
|
||||
.wiki-link-page {
|
||||
color: #0330cb;
|
||||
background-color: rgba(77,141,255,0.07);
|
||||
border-radius: 5px;
|
||||
padding: 0 5px;
|
||||
//text-decoration: underline;
|
||||
}
|
||||
.wiki-link {
|
||||
color: #a8abbd;
|
||||
//background-color: rgba(77,141,255,0.07);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Indentation of follow-up lines
|
||||
@mixin lineOverflow($baseIndent) {
|
||||
text-indent: -1 * ($baseIndent + 2ch);
|
||||
padding-left: $baseIndent + 2ch;
|
||||
|
||||
&.line-task {
|
||||
text-indent: -1 * ($baseIndent + 6ch);
|
||||
padding-left: $baseIndent + 6ch;
|
||||
}
|
||||
|
||||
&.line-blockquote {
|
||||
text-indent: -1 * ($baseIndent + 4ch);
|
||||
padding-left: $baseIndent + 4ch;
|
||||
}
|
||||
}
|
||||
|
||||
.line-ul {
|
||||
&.line-li-1 {
|
||||
@include lineOverflow(0);
|
||||
}
|
||||
|
||||
&.line-li-1.line-li-2 {
|
||||
@include lineOverflow(2);
|
||||
}
|
||||
|
||||
&.line-li-1.line-li-2.line-li-3 {
|
||||
@include lineOverflow(4);
|
||||
}
|
||||
|
||||
&.line-li-1.line-li-2.line-li-3.line-li-4 {
|
||||
@include lineOverflow(6);
|
||||
}
|
||||
|
||||
&.line-li-1.line-li-2.line-li-3.line-li-4.line-li-5 {
|
||||
@include lineOverflow(8);
|
||||
}
|
||||
}
|
||||
|
||||
.line-ol {
|
||||
&.line-li-1 {
|
||||
@include lineOverflow(1);
|
||||
}
|
||||
|
||||
&.line-li-1.line-li-2 {
|
||||
@include lineOverflow(2);
|
||||
}
|
||||
|
||||
&.line-li-1.line-li-2.line-li-3 {
|
||||
@include lineOverflow(4);
|
||||
}
|
||||
|
||||
&.line-li-1.line-li-2.line-li-3.line-li-4 {
|
||||
@include lineOverflow(6);
|
||||
}
|
||||
|
||||
&.line-li-1.line-li-2.line-li-3.line-li-4.line-li-5 {
|
||||
@include lineOverflow(8);
|
||||
}
|
||||
}
|
||||
|
||||
.line-comment {
|
||||
text-indent: -1 * 3ch;
|
||||
padding-left: 3ch;
|
||||
}
|
||||
|
||||
.task-marker {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.line-comment {
|
||||
background-color: rgba(255, 255, 0, 0.5);
|
||||
}
|
||||
|
||||
.comment {
|
||||
color: #989797;
|
||||
background-color: rgba(210, 210, 210, 0.2);
|
||||
border-radius: 5px;
|
||||
font-style: italic;
|
||||
font-size: 75%;
|
||||
line-height: 75%;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
.filter-box {
|
||||
position: absolute;
|
||||
font-family: var(--ui-font);
|
||||
margin: auto;
|
||||
max-width: 500px;
|
||||
height: 600px;
|
||||
background-color: #fff;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
max-height: 290px;
|
||||
overflow: auto;
|
||||
z-index: 100;
|
||||
border: rgb(103, 103, 103) 1px solid;
|
||||
border-radius: 8px;
|
||||
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
|
||||
|
||||
.header {
|
||||
border-bottom: 1px rgb(108, 108, 108) solid;
|
||||
padding: 13px 10px 10px 10px;
|
||||
display: flex;
|
||||
label {
|
||||
color: var(--highlight-color);
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
input {
|
||||
font-family: "Arial";
|
||||
background: transparent;
|
||||
color: #000;
|
||||
border: 0;
|
||||
padding: 3px;
|
||||
outline: 0;
|
||||
font-size: 1em;
|
||||
flex-grow: 100;
|
||||
}
|
||||
input::placeholder {
|
||||
color: rgb(199, 199, 199);
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.help-text {
|
||||
background-color: #eee;
|
||||
border-bottom: 1px rgb(108, 108, 108) solid;
|
||||
padding: 5px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.result-list {
|
||||
max-height: 200px;
|
||||
overflow-y: scroll;
|
||||
background-color: white;
|
||||
|
||||
.icon {
|
||||
padding: 0 8px 0 5px;
|
||||
}
|
||||
.name {
|
||||
padding-top: -3px;
|
||||
}
|
||||
}
|
||||
|
||||
.option,
|
||||
.selected-option {
|
||||
padding: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selected-option {
|
||||
background-color: var(--highlight-color);
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.option .hint,
|
||||
.selected-option .hint {
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
margin-top: -4px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
color: #eee;
|
||||
background-color: #212476;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
@use "editor.scss";
|
||||
@use "filter_box.scss";
|
||||
@import "constants";
|
||||
|
||||
|
||||
:root {
|
||||
--ident: 18px;
|
||||
/* --editor-font: "Avenir"; */
|
||||
--editor-font: "Menlo";
|
||||
--ui-font: "Arial";
|
||||
--top-bar-bg: rgb(41, 41, 41);
|
||||
--highlight-color: #464cfc;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#root {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#top {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
height: $top-bar-height;
|
||||
background-color: rgb(213, 213, 213);
|
||||
border-bottom: rgb(193, 193, 193) 1px solid;
|
||||
color: rgb(55, 55, 55);
|
||||
|
||||
.main {
|
||||
flex: 2;
|
||||
|
||||
.inner {
|
||||
max-width: $max-editor-width;
|
||||
margin: auto;
|
||||
font-size: 28px;
|
||||
padding: 10px 20px;
|
||||
|
||||
|
||||
.status {
|
||||
float: right;
|
||||
border: rgb(41, 41, 41) 1px solid;
|
||||
border-radius: 5px;
|
||||
padding: 3px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.current-page {
|
||||
font-family: var(--ui-font);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.icon {
|
||||
padding-left: 5px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.saved {
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.unsaved {
|
||||
color: #5e5e5e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.panel {
|
||||
flex: 1;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#main {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-grow: 1;
|
||||
height: 0;
|
||||
|
||||
.panel {
|
||||
flex: 1;
|
||||
border-left: 1px solid #eee;
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#editor {
|
||||
overflow-y: scroll;
|
||||
flex: 2;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#bottom {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding: 0 10px;
|
||||
text-align: right;
|
||||
background-color: rgb(213, 213, 213);
|
||||
border-top: rgb(193, 193, 193) 1px solid;
|
||||
.inner {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user