Commit f31b79dc authored by insert's avatar insert 🎺

Initial commit

parents
node_modules
dist
\ No newline at end of file
This diff is collapsed.
{
"name": "dropper",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"ejs": "^2.6.1",
"express": "^4.16.4",
"multer": "^1.4.1"
},
"devDependencies": {
"@types/express": "^4.16.1",
"@types/node": "^11.9.5"
}
}
@import url('https://fonts.googleapis.com/css?family=Raleway:200,300');
html, body {
font-family: 'Raleway', sans-serif;
background: #eeeeee;
color: #111;
margin-bottom: 100px;
}
.container {
margin: auto;
max-width: 420px;
padding: 2em;
}
.footer {
position: fixed;
width: 100%;
bottom: 0;
padding-bottom: 2em;
}
.logo {
height: 75px;
margin: auto;
display: block;
}
.sublogo {
height: 60px;
margin: auto;
display: block;
}
.title {
text-align: center;
font-weight: 200;
font-size: 2.5em;
margin: 10px;
}
.subtitle {
text-align: center;
font-weight: 300;
font-size: 1.5em;
margin: 10px;
}
.footnote {
text-align: center;
font-weight: 300;
font-size: 0.8em;
margin: 0;
}
a, a:link, a:visited {
text-decoration: none;
color: #111;
}
a:hover {
color: #555;
}
.blocked {
cursor: not-allowed;
}
hr {
border: none;
border-top: 1px solid rgba(25, 25, 25, 0.3);
max-width: 100px;
}
input {
display: block;
margin: 0.4em auto;
max-width: 180px;
}
.entry {
display: flex;
flex-direction: row;
}
.entry > :not(:last-child) {
margin-right: 1em;
}
.entry progress {
flex-grow: 1;
}
progress[value] {
-webkit-appearance: none;
appearance: none;
border: none;
background: #222;
}
::-webkit-progress-value, ::-moz-progress-bar {
background: linear-gradient(304deg, #bf741e, #6dbf1e, #1e68bf, #5a1ebf);
background-size: 400% 400%;
-webkit-animation: Progress 10s ease infinite;
-moz-animation: Progress 10s ease infinite;
animation: Progress 10s ease infinite;
}
@-webkit-keyframes Progress {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
100%{background-position:0% 50%}
}
@-moz-keyframes Progress {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
100%{background-position:0% 50%}
}
@keyframes Progress {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
100%{background-position:0% 50%}
}
\ No newline at end of file
import app from './web';
app.listen(7410, () => console.log('Listening on :7410'));
\ No newline at end of file
import { Router } from 'express';
let app = Router();
app.get('/', async (req, res) => {
res.render('index');
});
export default app;
\ No newline at end of file
import { Router } from 'express';
import RouterUI from './routes/route.ui';
//import RouterAPI from './web.routes.api';
//import RouterServe from './web.routes.serve';
let app = Router();
app.use('/', RouterUI);
//app.use('/', RouterServe);
app.use((req, res) => {
res.contentType('.txt').send('404: Not Found!');
});
export default app;
\ No newline at end of file
import express from 'express';
import Web from './web.routes';
import { resolve } from 'path';
let app = express();
app.set('views', resolve('views'));
app.set('view engine', 'ejs');
app.use(express.static(resolve('public')));
app.use(Web);
export default app;
\ No newline at end of file
{
"compilerOptions": {
/* Basic Options */
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./dist", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
}
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>dropper</title>
<link href="assets/styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="container">
<img class="logo" src="assets/dropper.png" />
<h3 class="title">dropper</h3>
<h3 class="footnote">login / register</h3>
</div>
<noscript>
<div class="container">
<img class="sublogo" src="assets/redstone.png" />
<h3 class="subtitle">warning: noscript enabled</h3>
<h3 class="footnote">this may impact your experience</h3>
</div>
</noscript>
<div class="container">
<img class="upload sublogo" src="assets/hopper.png" />
<h3 class="upload subtitle"><script>document.write('click to')</script> upload a file</h3>
<form id="upload" method="POST" action="/api/upload">
<input type="file" id="file" name="file" class="hidden" />
<noscript><input type="submit" value="upload"></input></noscript>
</form>
<h3 class="footnote">25mb max / 250mb left</h3>
</div>
<div class="container">
<img class="sublogo" src="assets/lamp.png" />
<h3 class="subtitle">uploads</h3>
<div class="uploads">
<div class="entry">
<span>filename</span>
<progress value="70" max="100"></progress>
</div>
</div>
</div>
<div class="footer">
<h3 class="footnote">ShareX usage &middot; API documentation &middot; Source repository</h3>
<hr />
<h3 class="footnote">&copy; insert</h3>
<h3 class="footnote">Images used are copyright to Mojang AB.</h3>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script>
$('.hidden').css('display', 'none');
$('.upload').click(() => $('#file').click());
$('#file'). change((e) => {
let fn = e.target.files[0].name;
let el = document.createElement('div');
});
</script>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment