1
0
Fork 0
mirror of https://github.com/seejohnrun/haste-server.git synced 2024-11-25 14:01:21 +00:00

no scrolling when empty, better responsive

This commit is contained in:
Colin 2020-10-07 14:18:44 -04:00
parent 7ed6f45deb
commit 4980ccf5fb
2 changed files with 61 additions and 63 deletions

View file

@ -1,17 +1,22 @@
html, body {
height: 100%;
width: 100%;
}
body { body {
background: #263238; background: #002B36;
padding: 0 0 80px;
margin: 0; margin: 0;
font-family: sans-serif; font-family: sans-serif;
overflow-x: hidden;
overflow-y: auto;
} }
/* textarea */ /* textarea */
textarea { textarea {
background: transparent; background: #002B36;
border: 0px; border: 0px;
color: #fff; color: #fff;
padding: 0px;
width: 100%; width: 100%;
height: 100%; height: 100%;
font-family: monospace; font-family: monospace;
@ -20,6 +25,7 @@ textarea {
font-size: 13px; font-size: 13px;
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
padding: 20px 20px 80px 0;
} }
.logo a:hover svg path { .logo a:hover svg path {
@ -31,30 +37,24 @@ textarea {
#linenos { #linenos {
color: #7d7d7d; color: #7d7d7d;
z-index: -1000; z-index: -1000;
position: absolute;
top: 20px;
left: 0px;
width: 30px; /* 30 to get 20 away from box */
font-size: 13px; font-size: 13px;
font-family: monospace; font-family: monospace;
text-align: right; text-align: right;
user-select: none; user-select: none;
padding: 20px 20px 80px 20px;
flex-shrink: 0;
} }
/* code box when locked */ /* code box when locked */
#box { #box {
padding: 0px; padding: 20px 20px 20px 0;
margin: 0px; margin: 0px;
width: 100%; width: 100%;
border: 0px; border: 0px;
outline: none; outline: none;
font-size: 13px; font-size: 13px;
overflow: inherit; overflow: auto;
}
#box.hljs {
background: transparent;
} }
#box code { #box code {
@ -65,10 +65,6 @@ textarea {
/* key */ /* key */
#key { #key {
position: fixed;
bottom: 0px;
left: 0;
right: 0px;
z-index: +1000; /* watch out */ z-index: +1000; /* watch out */
} }
@ -116,7 +112,7 @@ button.enabled {
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
background: #263238; background: #002B36;
} }
.menu-actions { .menu-actions {

View file

@ -43,6 +43,13 @@
<body> <body>
<ul id="messages"></ul> <ul id="messages"></ul>
<div style="display: flex; flex-direction: column; height: 100%; width: 100%;">
<div style="display: flex; flex: auto;">
<div id="linenos"></div>
<pre id="box" style="display:none; flex: auto;" class="hljs" tabindex="0"><code></code></pre>
<textarea spellcheck="false" style="display:none;"></textarea>
</div>
<div id="key" class="menu" style="display: flex; padding: 16px;"> <div id="key" class="menu" style="display: flex; padding: 16px;">
<div class="logo" style="flex: auto; display: flex; align-items: center;"> <div class="logo" style="flex: auto; display: flex; align-items: center;">
<div class="button-wrap" style="position: relative;"> <div class="button-wrap" style="position: relative;">
@ -84,11 +91,6 @@
</div> </div>
</div> </div>
</div> </div>
<div style="padding: 20px 20px 20px 50px; overflow: auto;">
<div id="linenos"></div>
<pre id="box" style="display:none;" class="hljs" tabindex="0"><code></code></pre>
<textarea spellcheck="false" style="display:none;"></textarea>
</div> </div>
</body> </body>