This commit is contained in:
ed 2021-04-24 19:22:15 +02:00
parent c3e4d65b80
commit c9c3302664
5 changed files with 175 additions and 191 deletions

View file

@ -6,7 +6,7 @@ html,body,tr,th,td,#files,a {
background: none; background: none;
font-weight: inherit; font-weight: inherit;
font-size: inherit; font-size: inherit;
padding: none; padding: 0;
border: none; border: none;
} }
html { html {
@ -90,15 +90,13 @@ a, #files tbody div a:last-child {
#files td { #files td {
margin: 0; margin: 0;
padding: 0 .5em; padding: 0 .5em;
}
#files td {
border-bottom: 1px solid #111; border-bottom: 1px solid #111;
} }
#files td+td+td { #files td+td+td {
max-width: 30em; max-width: 30em;
overflow: hidden; overflow: hidden;
} }
#files tr td { #files tr+tr td {
border-top: 1px solid #383838; border-top: 1px solid #383838;
} }
#files tbody td:nth-child(3) { #files tbody td:nth-child(3) {
@ -487,9 +485,6 @@ input[type="checkbox"]:checked+label {
border-collapse: collapse; border-collapse: collapse;
width: 100%; width: 100%;
} }
#files td div a:last-child {
width: 100%;
}
#wrap { #wrap {
margin-top: 2em; margin-top: 2em;
} }

View file

@ -1,126 +1,125 @@
#toc { #toc {
display: none; display: none;
} }
#mtw { #mtw {
display: block; display: block;
position: fixed; position: fixed;
left: .5em; left: .5em;
bottom: 0; bottom: 0;
width: calc(100% - 56em); width: calc(100% - 56em);
} }
#mw { #mw {
left: calc(100% - 55em); left: calc(100% - 55em);
overflow-y: auto; overflow-y: auto;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
} }
/* single-screen */ /* single-screen */
#mtw.preview, #mtw.preview,
#mw.editor { #mw.editor {
opacity: 0; opacity: 0;
z-index: 1; z-index: 1;
} }
#mw.preview, #mw.preview,
#mtw.editor { #mtw.editor {
z-index: 5; z-index: 5;
} }
#mtw.single, #mtw.single,
#mw.single { #mw.single {
margin: 0; margin: 0;
left: 1em; left: 1em;
left: max(1em, calc((100% - 56em) / 2)); left: max(1em, calc((100% - 56em) / 2));
} }
#mtw.single { #mtw.single {
width: 55em; width: 55em;
width: min(55em, calc(100% - 2em)); width: min(55em, calc(100% - 2em));
} }
#mp { #mp {
position: relative; position: relative;
} }
#mt, #mtr { #mt, #mtr {
width: 100%; width: 100%;
height: calc(100% - 1px); height: calc(100% - 1px);
color: #444; color: #444;
background: #f7f7f7; background: #f7f7f7;
border: 1px solid #999; border: 1px solid #999;
outline: none; outline: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
font-family: 'consolas', monospace, monospace; font-family: 'consolas', monospace, monospace;
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-word; word-break: break-word;
overflow-wrap: break-word; overflow-wrap: break-word;
word-wrap: break-word; /*ie*/ word-wrap: break-word; /*ie*/
overflow-y: scroll; overflow-y: scroll;
line-height: 1.3em; line-height: 1.3em;
font-size: .9em; font-size: .9em;
position: relative; position: relative;
scrollbar-color: #eb0 #f7f7f7; scrollbar-color: #eb0 #f7f7f7;
} }
html.dark #mt { html.dark #mt {
color: #eee; color: #eee;
background: #222; background: #222;
border: 1px solid #777; border: 1px solid #777;
scrollbar-color: #b80 #282828; scrollbar-color: #b80 #282828;
} }
#mtr { #mtr {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
} }
#save.force-save { #save.force-save {
color: #400; color: #400;
background: #f97; background: #f97;
border-radius: .15em; border-radius: .15em;
} }
html.dark #save.force-save { html.dark #save.force-save {
color: #fca; color: #fca;
background: #720; background: #720;
} }
#save.disabled { #save.disabled {
opacity: .4; opacity: .4;
} }
#helpbox, #helpbox,
#toast { #toast {
background: #f7f7f7; background: #f7f7f7;
border-radius: .4em; border-radius: .4em;
z-index: 9001; z-index: 9001;
} }
#helpbox { #helpbox {
display: none; display: none;
position: fixed; position: fixed;
padding: 2em; padding: 2em;
top: 4em; top: 4em;
overflow-y: auto; overflow-y: auto;
box-shadow: 0 .5em 2em #777; box-shadow: 0 .5em 2em #777;
height: calc(100% - 12em); height: calc(100% - 12em);
left: calc(50% - 15em); left: calc(50% - 15em);
right: 0; right: 0;
width: 30em; width: 30em;
} }
#helpclose { #helpclose {
display: block; display: block;
} }
html.dark #helpbox { html.dark #helpbox {
box-shadow: 0 .5em 2em #444; box-shadow: 0 .5em 2em #444;
} }
html.dark #helpbox, html.dark #helpbox,
html.dark #toast { html.dark #toast {
background: #222; background: #222;
border: 1px solid #079; border: 1px solid #079;
border-width: 1px 0; border-width: 1px 0;
} }
#toast { #toast {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
padding: .6em 0; padding: .6em 0;
position: fixed; position: fixed;
z-index: 9001; top: 30%;
top: 30%; transition: opacity 0.2s ease-in-out;
transition: opacity 0.2s ease-in-out; opacity: 1;
opacity: 1;
} }

View file

@ -8,68 +8,58 @@ html .editor-toolbar>i.separator { border-left: 1px solid #ccc; }
html .editor-toolbar.disabled-for-preview>button:not(.no-disable) { opacity: .35 } html .editor-toolbar.disabled-for-preview>button:not(.no-disable) { opacity: .35 }
html { html {
line-height: 1.5em; line-height: 1.5em;
} }
html, body { html, body {
margin: 0; margin: 0;
padding: 0; padding: 0;
min-height: 100%; min-height: 100%;
font-family: sans-serif; font-family: sans-serif;
background: #f7f7f7; background: #f7f7f7;
color: #333; color: #333;
} }
#mn { #mn {
font-weight: normal; font-weight: normal;
margin: 1.3em 0 .7em 1em; margin: 1.3em 0 .7em 1em;
} }
#mn a { #mn a {
color: #444; color: #444;
margin: 0 0 0 -.2em; margin: 0 0 0 -.2em;
padding: 0 0 0 .4em; padding: 0 0 0 .4em;
text-decoration: none; text-decoration: none;
/* ie: */ /* ie: */
border-bottom: .1em solid #777\9; border-bottom: .1em solid #777\9;
margin-right: 1em\9; margin-right: 1em\9;
} }
#mn a:first-child { #mn a:first-child {
padding-left: .5em; padding-left: .5em;
} }
#mn a:last-child { #mn a:last-child {
padding-right: .5em; padding-right: .5em;
} }
#mn a:not(:last-child):after { #mn a:not(:last-child):after {
content: ''; content: '';
width: 1.05em; width: 1.05em;
height: 1.05em; height: 1.05em;
margin: -.2em .3em -.2em -.4em; margin: -.2em .3em -.2em -.4em;
display: inline-block; display: inline-block;
border: 1px solid rgba(0,0,0,0.2); border: 1px solid rgba(0,0,0,0.2);
border-width: .2em .2em 0 0; border-width: .2em .2em 0 0;
transform: rotate(45deg); transform: rotate(45deg);
} }
#mn a:hover { #mn a:hover {
color: #000; color: #000;
text-decoration: underline; text-decoration: underline;
} }
html .editor-toolbar>button.disabled { html .editor-toolbar>button.disabled {
opacity: .35; opacity: .35;
pointer-events: none; pointer-events: none;
} }
html .editor-toolbar>button.save.force-save { html .editor-toolbar>button.save.force-save {
background: #f97; background: #f97;
} }
/*
*[data-ln]:before {
content: attr(data-ln);
font-size: .8em;
margin: 0 .4em;
color: #f0c;
}
.cm-header { font-size: .4em !important }
*/
@ -101,29 +91,29 @@ html .editor-toolbar>button.save.force-save {
line-height: 1.1em; line-height: 1.1em;
} }
.mdo a { .mdo a {
color: #fff; color: #fff;
background: #39b; background: #39b;
text-decoration: none; text-decoration: none;
padding: 0 .3em; padding: 0 .3em;
border: none; border: none;
border-bottom: .07em solid #079; border-bottom: .07em solid #079;
} }
.mdo h2 { .mdo h2 {
color: #fff; color: #fff;
background: #555; background: #555;
margin-top: 2em; margin-top: 2em;
border-bottom: .22em solid #999; border-bottom: .22em solid #999;
border-top: none; border-top: none;
} }
.mdo h1 { .mdo h1 {
color: #fff; color: #fff;
background: #444; background: #444;
font-weight: normal; font-weight: normal;
border-top: .4em solid #fb0; border-top: .4em solid #fb0;
border-bottom: .4em solid #777; border-bottom: .4em solid #777;
border-radius: 0 1em 0 1em; border-radius: 0 1em 0 1em;
margin: 3em 0 1em 0; margin: 3em 0 1em 0;
padding: .5em 0; padding: .5em 0;
} }
h1, h2 { h1, h2 {
line-height: 1.5em; line-height: 1.5em;
@ -197,14 +187,14 @@ th {
/* mde support */ /* mde support */
.mdo { .mdo {
padding: 1em; padding: 1em;
background: #f7f7f7; background: #f7f7f7;
} }
html.dark .mdo { html.dark .mdo {
background: #1c1c1c; background: #1c1c1c;
} }
.CodeMirror { .CodeMirror {
background: #f7f7f7; background: #f7f7f7;
} }
@ -214,108 +204,108 @@ html.dark .mdo {
/* darkmode */ /* darkmode */
html.dark .mdo, html.dark .mdo,
html.dark .CodeMirror { html.dark .CodeMirror {
border-color: #222; border-color: #222;
} }
html.dark, html.dark,
html.dark body, html.dark body,
html.dark .CodeMirror { html.dark .CodeMirror {
background: #222; background: #222;
color: #ccc; color: #ccc;
} }
html.dark .CodeMirror-cursor { html.dark .CodeMirror-cursor {
border-color: #fff; border-color: #fff;
} }
html.dark .CodeMirror-selected { html.dark .CodeMirror-selected {
box-shadow: 0 0 1px #0cf inset; box-shadow: 0 0 1px #0cf inset;
} }
html.dark .CodeMirror-selected, html.dark .CodeMirror-selected,
html.dark .CodeMirror-selectedtext { html.dark .CodeMirror-selectedtext {
border-radius: .1em; border-radius: .1em;
background: #246; background: #246;
color: #fff; color: #fff;
} }
html.dark .mdo a { html.dark .mdo a {
background: #057; background: #057;
} }
html.dark .mdo h1 a, html.dark .mdo h4 a, html.dark .mdo h1 a, html.dark .mdo h4 a,
html.dark .mdo h2 a, html.dark .mdo h5 a, html.dark .mdo h2 a, html.dark .mdo h5 a,
html.dark .mdo h3 a, html.dark .mdo h6 a { html.dark .mdo h3 a, html.dark .mdo h6 a {
color: inherit; color: inherit;
background: none; background: none;
} }
html.dark pre, html.dark pre,
html.dark code { html.dark code {
color: #8c0; color: #8c0;
background: #1a1a1a; background: #1a1a1a;
border: .07em solid #333; border: .07em solid #333;
} }
html.dark .mdo ul, html.dark .mdo ul,
html.dark .mdo ol { html.dark .mdo ol {
border-color: #444; border-color: #444;
} }
html.dark .mdo>ul, html.dark .mdo>ul,
html.dark .mdo>ol { html.dark .mdo>ol {
border-color: #555; border-color: #555;
} }
html.dark strong { html.dark strong {
color: #fff; color: #fff;
} }
html.dark p>em, html.dark p>em,
html.dark li>em, html.dark li>em,
html.dark td>em { html.dark td>em {
color: #f94; color: #f94;
border-color: #666; border-color: #666;
} }
html.dark h1 { html.dark h1 {
background: #383838; background: #383838;
border-top: .4em solid #b80; border-top: .4em solid #b80;
border-bottom: .4em solid #4c4c4c; border-bottom: .4em solid #4c4c4c;
} }
html.dark h2 { html.dark h2 {
background: #444; background: #444;
border-bottom: .22em solid #555; border-bottom: .22em solid #555;
} }
html.dark td, html.dark td,
html.dark th { html.dark th {
border-color: #444; border-color: #444;
} }
html.dark blockquote { html.dark blockquote {
background: #282828; background: #282828;
border: .07em dashed #444; border: .07em dashed #444;
} }
html.dark #mn a { html.dark #mn a {
color: #ccc; color: #ccc;
} }
html.dark #mn a:not(:last-child):after { html.dark #mn a:not(:last-child):after {
border-color: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.3);
} }
html.dark .editor-toolbar { html.dark .editor-toolbar {
border-color: #2c2c2c; border-color: #2c2c2c;
background: #1c1c1c; background: #1c1c1c;
} }
html.dark .editor-toolbar>i.separator { html.dark .editor-toolbar>i.separator {
border-left: 1px solid #444; border-left: 1px solid #444;
border-right: 1px solid #111; border-right: 1px solid #111;
} }
html.dark .editor-toolbar>button { html.dark .editor-toolbar>button {
margin-left: -1px; border: 1px solid rgba(255,255,255,0.1); margin-left: -1px; border: 1px solid rgba(255,255,255,0.1);
color: #aaa; color: #aaa;
} }
html.dark .editor-toolbar>button:hover { html.dark .editor-toolbar>button:hover {
color: #333; color: #333;
} }
html.dark .editor-toolbar>button.active { html.dark .editor-toolbar>button.active {
color: #333; color: #333;
border-color: #ec1; border-color: #ec1;
background: #c90; background: #c90;
} }
html.dark .editor-toolbar::after, html.dark .editor-toolbar::after,
html.dark .editor-toolbar::before { html.dark .editor-toolbar::before {
background: none; background: none;
} }

View file

@ -3,7 +3,7 @@ html,body,tr,th,td,#files,a {
background: none; background: none;
font-weight: inherit; font-weight: inherit;
font-size: inherit; font-size: inherit;
padding: none; padding: 0;
border: none; border: none;
} }
html { html {
@ -20,8 +20,8 @@ body {
padding-bottom: 5em; padding-bottom: 5em;
} }
#box { #box {
padding: .5em 1em; padding: .5em 1em;
background: #2c2c2c; background: #2c2c2c;
} }
pre { pre {
font-family: monospace, monospace; font-family: monospace, monospace;

View file

@ -217,7 +217,7 @@
padding: 0 1em; padding: 0 1em;
height: 0; height: 0;
opacity: .1; opacity: .1;
transition: all 0.14s ease-in-out; transition: all 0.14s ease-in-out;
box-shadow: 0 .2em .5em #222; box-shadow: 0 .2em .5em #222;
border-radius: .4em; border-radius: .4em;
z-index: 1; z-index: 1;