Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
updates to cdns
Browse files Browse the repository at this point in the history
  • Loading branch information
therealbenpai committed Mar 16, 2024
1 parent 9044694 commit 3fa1f31
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion views/pages/alex/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ html(lang="en")
body
.loading-screen
.loading-content
img(src="webicon.png" alt="Astolfo")
img(src="/cdn/img/webicon.png" alt="Astolfo")
h1 Welcome to auxiliaryfrfr.com!
header
nav
Expand Down
10 changes: 0 additions & 10 deletions web/pages/functions/routeCDN.js

This file was deleted.

4 changes: 3 additions & 1 deletion web/pages/routes/alex.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const router = require('express').Router();

router
.get('/', (_, res) => res.render('pages/alex/index.pug'))
.get('/cdn', require('../functions/routeCDN')('alex'));
.get('/cdn/img/:file', (req, res) => res.sendFile(`${process.cwd()}/web/pages/assets/alex/img/${req.params.file}`))
.get('/cdn/js/:file', (req, res) => res.sendFile(`${process.cwd()}/web/pages/assets/alex/js/${req.params.file}.js`))
.get('/cdn/css/:file', (req, res) => res.sendFile(`${process.cwd()}/web/pages/assets/alex/css/${req.params.file}.css`));

module.exports = router;
4 changes: 3 additions & 1 deletion web/pages/routes/ben.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const router = require('express').Router();

router
.get('/', (_, res) => res.render('pages/ben/index.pug'))
.get('/cdn', require('../functions/routeCDN')('ben'));
.get('/cdn/img/:file', (req, res) => res.sendFile(`${process.cwd()}/web/pages/assets/ben/img/${req.params.file}`))
.get('/cdn/js/:file', (req, res) => res.sendFile(`${process.cwd()}/web/pages/assets/ben/js/${req.params.file}.js`))
.get('/cdn/css/:file', (req, res) => res.sendFile(`${process.cwd()}/web/pages/assets/ben/css/${req.params.file}.css`));

module.exports = router;
4 changes: 3 additions & 1 deletion web/pages/routes/oblong.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const router = require('express').Router();

router
.get('/', (_, res) => res.render('pages/oblong/index.pug'))
.get('/cdn', require('../functions/routeCDN')('oblong'));
.get('/cdn/img/:file', (req, res) => res.sendFile(`${process.cwd()}/web/pages/assets/oblong/img/${req.params.file}`))
.get('/cdn/js/:file', (req, res) => res.sendFile(`${process.cwd()}/web/pages/assets/oblong/js/${req.params.file}.js`))
.get('/cdn/css/:file', (req, res) => res.sendFile(`${process.cwd()}/web/pages/assets/oblong/css/${req.params.file}.css`));

module.exports = router;

0 comments on commit 3fa1f31

Please sign in to comment.