Better static routes

This commit is contained in:
Pitu 2017-01-17 20:12:58 -03:00
parent 410c702b2d
commit 075e1baac7
2 changed files with 9 additions and 39 deletions

View File

@ -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}`))

View File

@ -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% {