This commit is contained in:
Haocen 2018-06-06 21:55:44 +00:00 committed by GitHub
commit 81ca9f17eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 10 deletions

View file

@ -1,6 +1,6 @@
body {
background: #002B36;
padding: 20px 50px;
padding: 20px 20px 20px 50px;
margin: 0px;
}
@ -17,13 +17,15 @@ textarea {
outline: none;
resize: none;
font-size: 13px;
padding-bottom: 95px;
overflow-x: hidden;
}
/* the line numbers */
#linenos {
color: #7d7d7d;
z-index: -1000;
/* z-index: -1000; */
position: absolute;
top: 20px;
left: 0px;
@ -31,6 +33,7 @@ textarea {
font-size: 13px;
font-family: monospace;
text-align: right;
user-select: none;
}
/* code box when locked */
@ -42,8 +45,11 @@ textarea {
border: 0px;
outline: none;
font-size: 13px;
padding-right: 360px;
overflow: inherit;
padding-bottom: 95px;
overflow-x: auto;
overflow-y: hidden;
box-sizing: border-box;
user-select: text;
}
#box code {
@ -55,7 +61,7 @@ textarea {
#key {
position: fixed;
top: 0px;
bottom: 0px;
right: 0px;
z-index: +1000; /* watch out */
}

View file

@ -4,6 +4,7 @@
<title>hastebin</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="solarized_dark.css"/>
<link rel="stylesheet" type="text/css" href="application.css"/>
@ -33,7 +34,23 @@
$(function() {
app = new haste('hastebin', { twitter: true });
handlePop({ target: window });
removeBanner();
});
function removeBanner() {
var box1 = document.getElementById('box1');
box1.style.transition = 'opacity 1s';
setTimeout(() => {
box1.style.opacity = 0;
box1.addEventListener('transitionend', function(event) {
box1.parentElement.removeChild(box1);
}, {
capture: false,
once: true
});
}, 1000);
}
</script>
</head>
@ -42,7 +59,11 @@
<ul id="messages"></ul>
<div id="key">
<div id="pointer" style="display:none;"></div>
<div id="pointer" style="display:none;"></div>
<div id="box3" style="display:none;">
<div class="label"></div>
<div class="shortcut"></div>
</div>
<div id="box1">
<a href="/about.md" class="logo"></a>
</div>
@ -53,10 +74,6 @@
<button class="raw function button-picture">Just Text</button>
<button class="twitter function button-picture">Twitter</button>
</div>
<div id="box3" style="display:none;">
<div class="label"></div>
<div class="shortcut"></div>
</div>
</div>
<div id="linenos"></div>