diff --git a/static/application.css b/static/application.css index ab90a24..2b1ba3c 100644 --- a/static/application.css +++ b/static/application.css @@ -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; @@ -42,8 +44,10 @@ textarea { border: 0px; outline: none; font-size: 13px; - padding-right: 360px; - overflow: inherit; + padding-bottom: 95px; + overflow-x: scroll; + overflow-y: hidden; + box-sizing: border-box; } #box code { @@ -55,7 +59,7 @@ textarea { #key { position: fixed; - top: 0px; + bottom: 0px; right: 0px; z-index: +1000; /* watch out */ } diff --git a/static/index.html b/static/index.html index 5b16823..3e9be22 100644 --- a/static/index.html +++ b/static/index.html @@ -34,37 +34,22 @@ $(function() { app = new haste('hastebin', { twitter: true }); handlePop({ target: window }); - responsive(); + removeBanner(); }); - function responsive() { - // apply touch device specific style - if ("ontouchstart" in document.documentElement) { - var mTextAreaStyle = document.createElement('style'); - mTextAreaStyle.setAttribute('rel', 'stylesheet') - mTextAreaStyle.setAttribute('type', 'text/css'); - document.head.appendChild(mTextAreaStyle); - mTextAreaStyle.sheet.insertRule('textarea{ padding-bottom: 95px; }', 0); + function removeBanner() { + var box1 = document.getElementById('box1'); + box1.style.transition = 'opacity 1s'; - var key = document.getElementById('key'); - key.style.top = 'auto'; - key.style.bottom = '0px'; - - 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 - }); - - var tArea = document.querySelector('textarea'); - tArea.style.paddingBottom = '95px'; - }, 1000); - } + setTimeout(() => { + box1.style.opacity = 0; + box1.addEventListener('transitionend', function(event) { + box1.parentElement.removeChild(box1); + }, { + capture: false, + once: true + }); + }, 1000); } @@ -74,7 +59,11 @@