COCK AND BALL TORTURE

This commit is contained in:
split / May 2023-01-30 14:23:47 -08:00
parent d30de18d26
commit f2e40819d3
3 changed files with 26 additions and 81 deletions

View file

@ -10,92 +10,26 @@
<meta name="title" content="$FileName"> <meta name="title" content="$FileName">
<meta name="description" content="ID: $FileId"> <meta name="description" content="ID: $FileId">
<style> <link
rel="stylesheet"
* { href="/static/style/downloads.css"
font-family: sans-serif; >
}
h1,h2 {
text-align:center;
}
#content {
position:fixed;
left:50%;
top:50%;
transform:translate(-50%,-50%);
background-color:white;
width:450px;
/*height:100%;*/
}
body {
background-color: darkgray;
}
#btnContainer {
width:calc( 100% - 50px );
height:50px;
position:relative;
left:50%;
transform:translate(-50%,0);
}
#dlbtn {
width:100%;
height:100%;
background-color: #66AAFF;
border:none;
position:absolute;
left:0px;
top:0px;
text-decoration: none;
display:flex; /* This is a mess but I give up. */
flex-direction: column;
justify-content: center;
}
#btnContainer:hover {
outline: 1px solid gray;
}
#dlbtn > p {
color:black;
font-weight:bold;
font-size:20px;
text-align: center;
width:100%;
line-height:20px;
}
.note {
padding:5px;
position:relative;
width:calc( 100% - 60px );
left:25px;
border:1px solid #AAAAAAFF;
border-radius: 8px;
background-color: #AAAAAA66;
}
@media only screen and (max-width: 450px) {
#content {
position:fixed;
left:0%;
top:0%;
transform:translate(0%,0%);
background-color:white;
width:100%;
height:100%;
}
}
</style>
</head> </head>
<body> <body>
<div id="content"> <div id="uploadWindow">
<h1> <h1>
$FileName $FileName
</h1> </h1>
<h2 style="font-family:monospace">file id: $FileId</h2> <p style="color:#999999">
<div id="btnContainer"><a id="dlbtn" href="/file/$FileId" download="$FileName"><p>Download file</p></a></div> file id <span class="number">$FileId</span>
<p style="font-family:monospace;position:relative;width:calc( 100% - 50px );left:25px;text-align: center;">
May take a while to download. Stay put.
</p> </p>
<div style="width:100%;height:25px"></div>
<button style="position:relative;width:100%;top:10px;">
<a id="dlbtn" href="/file/$FileId" download="$FileName" style="position:absolute;left:0px;top:0px;height:100%;width:100%;"></a>
download
</button>
<div style="min-height:20px" />
</div> </div>
</body> </body>

View file

@ -106,7 +106,7 @@ app.get("/download/:fileId",(req,res) => {
if (files.getFilePointer(req.params.fileId)) { if (files.getFilePointer(req.params.fileId)) {
let file = files.getFilePointer(req.params.fileId) let file = files.getFilePointer(req.params.fileId)
fs.readFile(__dirname+"/../pages/download.html",(err,buf) => { fs.readFile(process.cwd()+"/pages/download.html",(err,buf) => {
if (err) {res.sendStatus(500);console.log(err);return} if (err) {res.sendStatus(500);console.log(err);return}
res.send( res.send(
buf.toString() buf.toString()

11
src/style/downloads.scss Normal file
View file

@ -0,0 +1,11 @@
// probably dont need to import the entire
// uploads css file
// so i might just make a separate file with mixins
// and import them
@use "app/uploads";
@use "base";
body {
background-color: base.$Background;
}