aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPitu <[email protected]>2017-01-17 20:12:58 -0300
committerPitu <[email protected]>2017-01-17 20:12:58 -0300
commit075e1baac71917016fe943b30482532ee9824caf (patch)
tree3acd11f65a48b9757f01a5c740c3aa2182033b32
parentBetter links on bottom and displaying max file size (diff)
downloadhost.fuwn.me-075e1baac71917016fe943b30482532ee9824caf.tar.xz
host.fuwn.me-075e1baac71917016fe943b30482532ee9824caf.zip
Better static routes
-rw-r--r--lolisafe.js27
-rw-r--r--public/css/style.css21
2 files changed, 9 insertions, 39 deletions
diff --git a/lolisafe.js b/lolisafe.js
index 91f6de5..8f7b999 100644
--- a/lolisafe.js
+++ b/lolisafe.js
@@ -20,28 +20,9 @@ safe.use('/' + prefix, express.static('./uploads'))
safe.use('/', express.static('./public'))
safe.use('/api', api)
-safe.get('/', function (req, res, next) {
- res.sendFile('home.html', {
- root: './pages/'
- })
-})
-
-safe.get('/panel', function (req, res, next) {
- res.sendFile('panel.html', {
- root: './pages/'
- })
-})
-
-safe.use(function (req, res, next) {
- res.status(404).sendFile('404.html', {
- root: './pages/error/',
- })
-})
-
-safe.use(function (err, req, res, next) {
- res.status(500).sendFile('500.html', {
- root: './pages/error/',
- })
-})
+safe.get('/', (req, res, next) => res.sendFile('home.html', { root: './pages/' }))
+safe.get('/panel', (req, res, next) => res.sendFile('panel.html', { root: './pages/' }))
+safe.use((req, res, next) => res.status(404).sendFile('404.html', { root: './pages/error/' }))
+safe.use((req, res, next) => res.status(500).sendFile('500.html', { root: './pages/error/' }))
safe.listen(config.port, () => console.log(`loli-safe started on port ${config.port}`)) \ No newline at end of file
diff --git a/public/css/style.css b/public/css/style.css
index 188dd86..44f46bf 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -44,25 +44,14 @@ section#home div#dropzone {
cursor: pointer;
}
-section#home div#dropzone:hover {
- background-color: #ff3860;
- border-color: #ff3860;
- color: #fff;
-}
-
section#home div#uploads, section#home p#tokenContainer, section#home a#panel { display: none; }
-
+section#home div#dropzone:hover { background-color: #ff3860; border-color: #ff3860; color: #fff; }
+section#home h3#maxFileSize { font-size: 14px; }
+section#home h3#links span { padding-left: 5px; padding-right: 5px; }
section#home img.logo { height: 200px; margin-top: 20px; }
section#home .dz-preview .dz-details { display: flex; }
-section#home .dz-preview .dz-details .dz-size, section#home .dz-preview .dz-details .dz-filename { flex: 1 }
-section#home .dz-preview img, section#home .dz-preview .dz-success-mark, section#home .dz-preview .dz-error-mark { display: none }
-section#home h3#links span {
- padding-left: 5px;
- padding-right: 5px;
-}
-section#home h3#maxFileSize {
- font-size: 14px;
-}
+section#home .dz-preview .dz-details .dz-size, section#home .dz-preview .dz-details .dz-filename { flex: 1; }
+section#home .dz-preview img, section#home .dz-preview .dz-success-mark, section#home .dz-preview .dz-error-mark { display: none; }
@keyframes floatUp {
0% {