Work on #10 theming

This commit is contained in:
Zef Hemel
2022-08-02 14:40:04 +02:00
parent ce83680ac5
commit 1e574a81c3
12 changed files with 381 additions and 346 deletions
-5
View File
@@ -1,5 +0,0 @@
$max-editor-width: 800px;
$top-bar-height: 55px;
$bottom-bar-height: 30px;
$editor-font: "iA-Mono", "Menlo";
$ui-font: "Arial";
+17 -196
View File
@@ -1,257 +1,78 @@
@import "constants.scss";
.cm-editor {
font-size: var(--ident);
font-size: 18px;
padding: 0 20px;
.cm-content {
font-family: $editor-font;
margin: auto;
max-width: $max-editor-width;
max-width: 800px;
}
&.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(150, 150, 150);
}
/* 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);
}
.highlight {
background-color: rgba(255, 255, 0, 0.5);
}
.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 {
cursor: pointer;
}
.link:not(.meta, .url) {
color: #0330cb;
text-decoration: underline;
}
.link.url {
color: #7e7d7d;
}
.url:not(.link) {
color: #0330cb;
text-decoration: underline;
cursor: pointer;
}
.atom {
color: darkred;
}
.wiki-link-page {
color: #0330cb;
background-color: rgba(77, 141, 255, 0.07);
border-radius: 5px;
padding: 0 5px;
cursor: pointer;
}
.wiki-link {
cursor: pointer;
color: #a8abbd;
}
// Indentation of follow-up lines
@mixin lineOverflow($baseIndent) {
text-indent: -1 * ($baseIndent + 2ch);
padding-left: $baseIndent + 2ch;
&.line-task {
&.sb-line-task {
text-indent: -1 * ($baseIndent + 6ch);
padding-left: $baseIndent + 6ch;
}
&.line-blockquote {
&.sb-line-blockquote {
text-indent: -1 * ($baseIndent + 4ch);
padding-left: $baseIndent + 4ch;
}
}
.line-ul {
&.line-li-1 {
.sb-line-ul {
&.sb-line-li-1 {
@include lineOverflow(0);
}
&.line-li-1.line-li-2 {
&.sb-line-li-1.sb-line-li-2 {
@include lineOverflow(2);
}
&.line-li-1.line-li-2.line-li-3 {
&.sb-line-li-1.sb-line-li-2.sb-line-li-3 {
@include lineOverflow(4);
}
&.line-li-1.line-li-2.line-li-3.line-li-4 {
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4 {
@include lineOverflow(6);
}
&.line-li-1.line-li-2.line-li-3.line-li-4.line-li-5 {
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4.sb-line-li-5 {
@include lineOverflow(8);
}
}
.line-ol {
&.line-li-1 {
.sb-line-ol {
&.sb-line-li-1 {
@include lineOverflow(1);
}
&.line-li-1.line-li-2 {
&.sb-line-li-1.sb-line-li-2 {
@include lineOverflow(2);
}
&.line-li-1.line-li-2.line-li-3 {
&.sb-line-li-1.sb-line-li-2.sb-line-li-3 {
@include lineOverflow(4);
}
&.line-li-1.line-li-2.line-li-3.line-li-4 {
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4 {
@include lineOverflow(6);
}
&.line-li-1.line-li-2.line-li-3.line-li-4.line-li-5 {
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4.sb-line-li-5 {
@include lineOverflow(8);
}
}
.line-comment {
.sb-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-size: 75%;
line-height: 75%;
}
}
+12 -33
View File
@@ -1,6 +1,4 @@
@import "constants";
.filter-wrapper {
.sb-filter-wrapper {
position: absolute;
margin: auto;
max-width: 500px;
@@ -10,21 +8,15 @@
top: 0;
bottom: 0;
max-height: 290px;
// overflow: hide;
z-index: 100;
}
.filter-box {
font-family: $ui-font;
background-color: #fff;
border: rgb(103, 103, 103) 1px solid;
.sb-filter-box {
border-radius: 8px;
box-shadow: rgba(0, 0, 0, 0.35) 0px 20px 20px;
overflow: hidden;
margin: 10px;
.header {
border-bottom: 1px rgb(108, 108, 108) solid;
.sb-header {
padding: 13px 10px 10px 10px;
display: flex;
label {
@@ -33,56 +25,45 @@
}
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;
.sb-help-text {
padding: 5px;
color: #555;
}
.result-list {
.sb-result-list {
max-height: 216px;
overflow-y: scroll;
.icon {
.sb-icon {
padding: 0 8px 0 5px;
}
.name {
.sb-name {
padding-top: -3px;
}
}
.option,
.selected-option {
.sb-option,
.sb-selected-option {
padding: 8px;
cursor: pointer;
height: 20px;
line-height: 20px;
}
.selected-option {
.sb-selected-option {
background-color: var(--highlight-color);
color: #eee;
// border-radius: 5px;
}
.option .hint,
.selected-option .hint {
.sb-option .sb-hint,
.sb-selected-option .sb-hint {
float: right;
margin-right: 0;
margin-top: -4px;
@@ -90,8 +71,6 @@
padding-right: 5px;
padding-top: 3px;
padding-bottom: 3px;
color: #eee;
background-color: #212476;
border-radius: 5px;
}
}
+11 -48
View File
@@ -1,6 +1,5 @@
@use "editor.scss";
@use "filter_box.scss";
@import "constants";
@font-face {
font-family: "iA-Mono";
@@ -30,12 +29,6 @@
font-style: italic;
}
#sb-root {
--ident: 18px;
--top-bar-bg: rgb(41, 41, 41);
--highlight-color: #464cfc;
}
#sb-root {
display: flex;
flex-direction: column;
@@ -48,25 +41,22 @@
flex-direction: row;
z-index: 20;
height: $top-bar-height;
background-color: rgb(213, 213, 213);
border-bottom: rgb(193, 193, 193) 1px solid;
color: rgb(55, 55, 55);
height: 55px;
.main {
flex: 2;
max-width: 100%;
.inner {
max-width: $max-editor-width;
max-width: 800px;
margin: auto;
font-size: 28px;
padding: 10px 20px;
display: flex;
flex-direction: row;
.notifications {
.sb-notifications {
position: absolute;
font-family: "iA-Mono";
bottom: 0;
left: 5px;
right: 5px;
@@ -77,19 +67,10 @@
padding: 3px;
margin-bottom: 3px;
border-radius: 5px;
border: rgb(41, 41, 41) 1px solid;
}
.notification-info {
background-color: rgb(187, 221, 247);
}
.notification-error {
background-color: rgb(255, 84, 84);
}
}
.current-page {
font-family: $ui-font;
.sb-current-page {
font-weight: bold;
flex: 1;
font-size: 28px;
@@ -100,30 +81,14 @@
display: block;
text-overflow: ellipsis;
}
.saved {
color: #111;
}
.unsaved {
color: #5e5e5e;
}
}
.actions {
text-align: right;
button {
border: 1px solid #7897d0;
border-radius: 3px;
margin: 3px;
font-size: 15px;
padding: 5px;
background-color: #e6e6e6;
}
.sb-actions {
text-align: right;
}
}
.panel {
.sb-panel {
flex: 1;
}
}
@@ -134,9 +99,8 @@
flex-grow: 1;
height: 0;
.panel {
.sb-panel {
flex: 1;
border-left: 1px solid #eee;
iframe {
border: 0;
@@ -154,12 +118,11 @@
height: 100%;
}
.bhs {
.sb-bhs {
height: 300px;
width: 100%;
border-top: rgb(193, 193, 193) 1px solid;
.panel {
.sb-panel {
height: 100%;
iframe {
+272
View File
@@ -0,0 +1,272 @@
#sb-root {
font-family: Arial;
--highlight-color: #464cfc;
}
#sb-top {
background-color: rgb(213, 213, 213);
border-bottom: rgb(193, 193, 193) 1px solid;
color: rgb(55, 55, 55);
}
.sb-panel {
border-left: 1px solid #eee;
}
.sb-bhs {
border-top: rgb(193, 193, 193) 1px solid;
}
.sb-notifications {
font-family: "iA-Mono";
}
.sb-notifications > div {
border: rgb(41, 41, 41) 1px solid;
}
.sb-notification-info {
background-color: rgb(187, 221, 247);
}
.sb-notification-error {
background-color: rgb(255, 84, 84);
}
.sb-saved {
color: #111;
}
.sb-unsaved {
color: #5e5e5e;
}
.sb-actions button {
border: 1px solid #7897d0;
border-radius: 3px;
margin: 3px;
font-size: 15px;
padding: 5px;
background-color: #e6e6e6;
}
/* Filter boxes */
.sb-filter-box {
background-color: #fff;
border: rgb(103, 103, 103) 1px solid;
box-shadow: rgba(0, 0, 0, 0.35) 0px 20px 20px;
}
.sb-filter-box .sb-header {
border-bottom: 1px rgb(108, 108, 108) solid;
}
.sb-filter-box .sb-header input {
font-family: "Arial";
color: #000;
}
.sb-filter-box .sb-header input::placeholder {
color: rgb(199, 199, 199);
font-weight: normal;
}
.sb-filter-box .sb-help-text {
background-color: #eee;
border-bottom: 1px rgb(108, 108, 108) solid;
color: #555;
}
.sb-filter-box .sb-selected-option {
color: #eee;
}
.sb-filter-box .sb-option .sb-hint,
.sb-filter-box .sb-selected-option .sb-hint {
color: #eee;
background-color: #212476;
}
/* Editor */
.cm-content {
font-family: "iA-Mono", "Menlo";
}
.cm-selectionBackground {
background-color: #d7e1f6 !important;
}
.sb-line-h1,
.sb-line-h2,
.sb-line-h3 {
background-color: rgba(0, 30, 77, 0.5);
color: #fff;
font-weight: bold;
padding: 2px 2px !important;
}
.sb-line-h1 .sb-meta {
color: orange;
}
.sb-line-h2 .sb-meta {
color: orange;
}
.sb-line-h3 .sb-meta {
color: orange;
}
.sb-line-h1 {
font-size: 1.5em;
}
.sb-line-h2 {
font-size: 1.2em;
}
.sb-line-h3 {
font-size: 1.1em;
}
/* Color list item this way */
.sb-line-li .sb-meta {
color: rgb(150, 150, 150);
}
/* Then undo other meta */
.sb-line-li .sb-meta ~ .sb-meta {
color: #650007;
}
.sb-line-code {
background-color: rgba(72, 72, 72, 0.1);
}
.sb-line-code .sb-code {
background-color: transparent;
}
.sb-line-tbl-header {
font-weight: bold;
}
.sb-line-tbl-header .meta {
font-weight: normal;
}
.sb-struct {
color: darkred;
}
.sb-code {
background-color: rgba(72, 72, 72, 0.1);
}
.sb-highlight {
background-color: rgba(255, 255, 0, 0.5);
}
.sb-line-fenced-code {
background-color: rgba(72, 72, 72, 0.1);
}
/* Mostly for JS when that comes back */
.sb-line-fenced-code .sb-code {
background-color: transparent;
}
.sb-line-fenced-code .sb-comment {
color: #989797;
background-color: transparent;
border-radius: 0;
font-style: inherit;
font-size: inherit;
line-height: inherit;
}
.sb-line-fenced-code .sb-keyword {
color: #830000;
}
.sb-line-fenced-code .sb-variableName {
color: #036d9b;
}
.sb-line-fenced-code .sb-typeName {
color: #038138;
}
.sb-line-fenced-code .sb-string,
.sb-line-fenced-code .sb-string2 {
color: #440377;
}
.sb-meta {
color: #650007;
}
.sb-line-blockquote {
background-color: rgba(220, 220, 220, 0.5);
color: #676767;
text-indent: -2ch;
padding-left: 2ch;
}
.sb-emphasis {
font-style: italic;
}
.sb-strong {
font-weight: 900;
}
.sb-link {
cursor: pointer;
}
.sb-link:not(.sb-meta, .sb-url) {
color: #0330cb;
text-decoration: underline;
}
.sb-link.sb-url {
color: #7e7d7d;
}
.sb-url:not(.sb-link) {
color: #0330cb;
text-decoration: underline;
cursor: pointer;
}
.sb-atom {
color: darkred;
}
.sb-wiki-link-page {
color: #0330cb;
background-color: rgba(77, 141, 255, 0.07);
border-radius: 5px;
padding: 0 5px;
cursor: pointer;
}
.sb-wiki-link {
cursor: pointer;
color: #a8abbd;
}
.sb-task-marker {
background-color: #ddd;
}
.sb-line-comment {
background-color: rgba(255, 255, 0, 0.5);
}
.sb-comment {
color: #989797;
background-color: rgba(210, 210, 210, 0.2);
border-radius: 5px;
font-size: 75%;
line-height: 75%;
}