mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-19 01:31:34 +00:00
Better static routes
This commit is contained in:
parent
410c702b2d
commit
075e1baac7
27
lolisafe.js
27
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}`))
|
@ -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% {
|
||||
|
Loading…
Reference in New Issue
Block a user