mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Improve static link handling
This commit is contained in:
parent
0fb575f369
commit
7251c97c54
4 changed files with 6 additions and 4 deletions
3
index.js
3
index.js
|
@ -39,11 +39,10 @@ md.use(require("markdown-it-table-of-contents"), { "includeLevel": [2, 3], "list
|
||||||
md.use(require('markdown-it-title'));
|
md.use(require('markdown-it-title'));
|
||||||
|
|
||||||
app.set('view engine', 'pug');
|
app.set('view engine', 'pug');
|
||||||
app.use('/static', express.static('static'));
|
|
||||||
app.use('/favicon.svg', express.static('favicon.svg'));
|
app.use('/favicon.svg', express.static('favicon.svg'));
|
||||||
|
|
||||||
app.use('/', require('./routes/main'));
|
app.use('/', require('./routes/main'));
|
||||||
app.use('/dep', require('./routes/dep'));
|
app.use('/static', require('./routes/static'));
|
||||||
app.use('/server', require('./routes/server'));
|
app.use('/server', require('./routes/server'));
|
||||||
app.use('/encrypt', require('./routes/encrypt'));
|
app.use('/encrypt', require('./routes/encrypt'));
|
||||||
app.use('/verify', require('./routes/verify'));
|
app.use('/verify', require('./routes/verify'));
|
||||||
|
|
|
@ -27,10 +27,13 @@ You should also get your employer (if you work as a programmer) or school,
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary. For
|
if any, to sign a "copyright disclaimer" for the program, if necessary. For
|
||||||
more information on this, and how to apply and follow the GNU AGPL, see <https://www.gnu.org/licenses/>.
|
more information on this, and how to apply and follow the GNU AGPL, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
const express = require('express');
|
||||||
const router = require('express').Router();
|
const router = require('express').Router();
|
||||||
|
|
||||||
router.get('/openpgp.min.js', function(req, res) {
|
router.get('/openpgp.min.js', function(req, res) {
|
||||||
res.sendFile(`node_modules/openpgp/dist/openpgp.min.js`, { root: `${__dirname}/../` })
|
res.sendFile(`node_modules/openpgp/dist/openpgp.min.js`, { root: `${__dirname}/../` })
|
||||||
});
|
});
|
||||||
|
|
||||||
|
router.use('/', express.static('static'));
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
|
@ -21,5 +21,5 @@ main.container.container--profile
|
||||||
a(href='/') Keyoxide
|
a(href='/') Keyoxide
|
||||||
| .
|
| .
|
||||||
|
|
||||||
script(src='/dep/openpgp.min.js')
|
script(src='/static/openpgp.min.js')
|
||||||
script(type='text/javascript' src='/static/scripts.js' charset='utf-8')
|
script(type='text/javascript' src='/static/scripts.js' charset='utf-8')
|
||||||
|
|
|
@ -28,6 +28,6 @@ main.container
|
||||||
a(href='https://fosstodon.org/@keyoxide') Mastodon
|
a(href='https://fosstodon.org/@keyoxide') Mastodon
|
||||||
p © 2020 Keyoxide contributors
|
p © 2020 Keyoxide contributors
|
||||||
|
|
||||||
script(src='/dep/openpgp.min.js')
|
script(src='/static/openpgp.min.js')
|
||||||
script(src='/static/qrcode.min.js')
|
script(src='/static/qrcode.min.js')
|
||||||
script(type='text/javascript' src='/static/scripts.js' charset='utf-8')
|
script(type='text/javascript' src='/static/scripts.js' charset='utf-8')
|
||||||
|
|
Loading…
Reference in a new issue