1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2024-11-27 11:20:18 +01:00

Merge branch 'fixes' into docker

This commit is contained in:
Manuel 2021-04-07 16:57:29 +02:00
commit e6e82512f0
Signed by: Manuel
GPG key ID: 4085037435E1F07A
3 changed files with 44 additions and 29 deletions

View file

@ -38,6 +38,7 @@ DocumentHandler.prototype.handleGetRaw = async function(key, res, skipExpire){
return;
}
winston.verbose('retrieved raw document', { key: key });
res.setHeader('content-type', 'text/plain');
res.status(200).end(data);
};

View file

@ -1,7 +1,18 @@
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
body {
background: #002B36;
}
.text-container {
padding: 20px 50px;
margin: 0px;
width: calc(100% - 100px);
height: calc(100% - 40px);
}
/* textarea */
@ -10,7 +21,7 @@ textarea {
background: transparent;
border: 0px;
color: #fff;
padding: 0px;
padding: 0;
width: 100%;
height: 100%;
font-family: monospace;
@ -26,7 +37,7 @@ textarea {
z-index: -1000;
position: absolute;
top: 20px;
left: 0px;
left: 0;
width: 30px; /* 30 to get 20 away from box */
font-size: 13px;
font-family: monospace;
@ -36,17 +47,18 @@ textarea {
/* code box when locked */
#box {
padding: 0px;
margin: 0px;
padding: 0;
margin: 0;
width: 100%;
border: 0px;
border: 0;
outline: none;
font-size: 13px;
overflow: inherit;
margin-bottom: 20px;
}
#box code {
padding: 0px;
padding: 0;
background: transparent !important; /* don't hide hastebox */
}
@ -54,8 +66,8 @@ textarea {
#key {
position: fixed;
top: 0px;
right: 0px;
top: 0;
right: 0;
z-index: +1000; /* watch out */
}
@ -67,8 +79,8 @@ textarea {
#box2 {
background: #08323c;
font-size: 0px;
padding: 0px 5px;
font-size: 0;
padding: 0 5px;
}
#box1 a.logo, #box1 a.logo:visited {
@ -104,11 +116,11 @@ textarea {
height: 5px;
width: 10px;
background: url(hover-dropdown-tip.png);
bottom: 0px;
bottom: 0;
position: absolute;
margin: auto;
left: 0px;
right: 0px;
left: 0;
right: 0;
}
#box3, #messages li {
@ -152,7 +164,7 @@ textarea {
#messages {
position:fixed;
top:0px;
top:0;
right:138px;
margin:0;
padding:0;
@ -169,3 +181,6 @@ textarea {
background:rgba(102,8,0,0.8);
}
#linenos {
user-select: none;
}

View file

@ -1,16 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>hastebin</title>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="solarized_dark.css"/>
<link rel="stylesheet" type="text/css" href="application.css"/>
<meta charset="utf-8">
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" type="text/css" href="solarized_dark.css">
<link rel="stylesheet" type="text/css" href="application.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="highlight.min.js"></script>
<script type="text/javascript" src="application.min.js"></script>
<meta name="robots" content="noindex,nofollow"/>
<script type="text/javascript">
let app = null;
// Handle pops
@ -39,8 +40,6 @@
});
</script>
</head>
<body>
<ul id="messages"></ul>
@ -63,7 +62,7 @@
</div>
<div id="linenos"></div>
<div class="text-container">
<pre id="box" style="display: none;" class="hljs" tabindex="0"><code></code></pre>
<textarea spellcheck="false" style="display: none;"></textarea>
</body>
</html>
</div>