Migrate to Deno (#86)

Big bang migration to Deno 🤯
This commit is contained in:
Zef Hemel
2022-10-10 14:50:21 +02:00
committed by GitHub
parent 78f83c70d8
commit 561aa6891f
287 changed files with 4577 additions and 25087 deletions
+88
View File
@@ -0,0 +1,88 @@
.cm-editor {
font-size: 18px;
padding: 0 20px;
--max-width: 800px;
.cm-content {
margin: auto;
max-width: var(--max-width);
}
.sb-inline-img {
max-width: calc(var(--max-width) * 0.9);
}
&.cm-focused {
outline: none !important;
}
// Weird hack to readjust iOS's safari font-size when contenteditable is disabled
.ios-safari-readonly {
font-size: 60%;
}
// Indentation of follow-up lines
@mixin lineOverflow($baseIndent) {
text-indent: -1 * ($baseIndent + 2ch);
padding-left: $baseIndent + 2ch;
&.sb-line-task {
text-indent: -1 * ($baseIndent + 6ch);
padding-left: $baseIndent + 6ch;
}
&.sb-line-blockquote {
text-indent: -1 * ($baseIndent + 4ch);
padding-left: $baseIndent + 4ch;
}
}
.sb-line-ul {
&.sb-line-li-1 {
@include lineOverflow(0);
}
&.sb-line-li-1.sb-line-li-2 {
@include lineOverflow(2);
}
&.sb-line-li-1.sb-line-li-2.sb-line-li-3 {
@include lineOverflow(4);
}
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4 {
@include lineOverflow(6);
}
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4.sb-line-li-5 {
@include lineOverflow(8);
}
}
.sb-line-ol {
&.sb-line-li-1 {
@include lineOverflow(1);
}
&.sb-line-li-1.sb-line-li-2 {
@include lineOverflow(2);
}
&.sb-line-li-1.sb-line-li-2.sb-line-li-3 {
@include lineOverflow(4);
}
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4 {
@include lineOverflow(6);
}
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4.sb-line-li-5 {
@include lineOverflow(8);
}
}
.sb-line-comment {
text-indent: -1 * 3ch;
padding-left: 3ch;
}
}
+76
View File
@@ -0,0 +1,76 @@
.sb-filter-wrapper {
position: absolute;
margin: auto;
max-width: 500px;
height: 600px;
left: 0;
right: 0;
top: 0;
bottom: 0;
max-height: 290px;
z-index: 100;
}
.sb-filter-box {
border-radius: 8px;
overflow: hidden;
margin: 10px;
.sb-header {
padding: 13px 10px 10px 10px;
display: flex;
label {
color: var(--highlight-color);
margin: 3px;
}
input {
background: transparent;
border: 0;
padding: 3px;
outline: 0;
font-size: 1em;
flex-grow: 100;
}
}
.sb-help-text {
padding: 5px;
}
.sb-result-list {
max-height: 216px;
overflow-y: scroll;
.sb-icon {
padding: 0 8px 0 5px;
}
.sb-name {
padding-top: -3px;
}
}
.sb-option,
.sb-selected-option {
padding: 8px;
cursor: pointer;
height: 20px;
line-height: 20px;
}
.sb-selected-option {
background-color: var(--highlight-color);
}
.sb-option .sb-hint,
.sb-selected-option .sb-hint {
float: right;
margin-right: 0;
margin-top: -4px;
padding-left: 5px;
padding-right: 5px;
padding-top: 3px;
padding-bottom: 3px;
border-radius: 5px;
}
}
+154
View File
@@ -0,0 +1,154 @@
@use "editor";
@use "filter_box";
@use "theme";
@font-face {
font-family: "iA-Mono";
src: url("/iAWriterMonoS-Regular.woff2");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "iA-Mono";
src: url("/iAWriterMonoS-Bold.woff2");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "iA-Mono";
src: url("/iAWriterMonoS-Italic.woff2");
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: "iA-Mono";
src: url("/iAWriterMonoS-BoldItalic.woff2");
font-weight: bold;
font-style: italic;
}
#sb-root {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
#sb-top {
display: flex;
flex-direction: row;
z-index: 20;
height: 55px;
.main {
flex: 2;
max-width: 100%;
.inner {
max-width: 800px;
margin: auto;
font-size: 28px;
padding: 10px 20px;
display: flex;
flex-direction: row;
.sb-notifications {
position: absolute;
bottom: 0;
left: 5px;
right: 5px;
font-size: 15px;
z-index: 100;
> div {
padding: 3px;
margin-bottom: 3px;
border-radius: 5px;
}
}
.sb-current-page {
font-weight: bold;
flex: 1;
font-size: 28px;
overflow: hidden;
white-space: nowrap;
text-align: left;
display: block;
text-overflow: ellipsis;
}
}
.sb-actions {
text-align: right;
}
}
.sb-panel {
flex: 1;
}
}
#sb-main {
display: flex;
flex-direction: row;
flex-grow: 1;
height: 0;
.sb-panel {
flex: 1;
iframe {
border: 0;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
}
}
#sb-editor {
overflow-y: scroll;
flex: 2;
height: 100%;
}
.sb-bhs {
height: 300px;
width: 100%;
.sb-panel {
height: 100%;
iframe {
border: 0;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
}
}
.sb-modal {
position: absolute;
z-index: 100;
.sb-panel {
height: 100%;
iframe {
border: 0;
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
}
}
+390
View File
@@ -0,0 +1,390 @@
#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-modal {
border: 1px solid #000;
background-color: #fff;
}
.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-loading {
color: #7a7a7a;
}
.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;
}
.cm-editor .cm-tooltip-autocomplete {
.cm-completionDetail {
font-style: normal;
display: block;
font-size: 80%;
margin-left: 5px;
color: #555;
}
li[aria-selected] .cm-completionDetail {
color: #d2d2d2;
}
.cm-completionLabel {
display: block;
margin-left: 5px;
}
.cm-completionIcon {
display: none;
}
}
.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,
.sb-line-h2 .sb-meta,
.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;
}
.sb-hashtag {
color: blue;
}
.sb-hr {
background-color: #f5f5f5;
line-height: 0.9em;
display: block;
color: #8d8a8a;
}
.sb-naked-url {
color: #0330cb;
cursor: pointer;
}
.sb-named-anchor {
color: #959595;
}
.sb-command-link {
background-color: #e3dfdf;
cursor: pointer;
border-top: 1px solid silver;
border-left: 1px solid silver;
border-bottom: 1px solid gray;
border-right: 1px solid gray;
border-radius: 4px;
padding: 0 4px;
}
/* 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;
white-space: nowrap;
cursor: pointer;
}
.sb-wiki-link {
cursor: pointer;
color: #8f96c2;
}
.sb-task-marker {
background-color: #ddd;
}
.sb-line-comment {
background-color: rgba(255, 255, 0, 0.5);
}
.sb-comment {
color: #989797;
font-size: 75%;
line-height: 75%;
}
html[data-theme="dark"] {
#sb-root {
background-color: #555;
color: rgb(200, 200, 200);
}
#sb-top {
background-color: rgb(38, 38, 38);
border-bottom: rgb(62, 62, 62) 1px solid;
color: rgb(200, 200, 200);
}
.sb-saved {
color: rgb(225, 225, 225);
}
.sb-filter-box,
/* duplicating the class name to increase specificity */
.sb-help-text.sb-help-text {
color: #ccc;
background-color: rgb(38, 38, 38);
}
.sb-help-text {
border-bottom: 1px solid #6c6c6c;
}
.sb-line-li .sb-meta ~ .sb-meta,
.sb-line-fenced-code .sb-meta {
color: #d17278;
}
.sb-wiki-link-page {
color: #7e99fc;
background-color: #a3bce712;
}
.sb-code,
.sb-line-fenced-code,
.sb-task-marker {
background-color: #333;
}
.sb-notifications > div {
border: rgb(197, 197, 197) 1px solid;
background-color: #333;
}
.sb-hashtag {
color: #94b0f4;
}
.sb-naked-url {
color: #94b0f4;
}
.sb-command-link {
background-color: #595959;
}
}