diff --git a/src/controllers/index.js b/src/controllers/index.js index 2cf50a7785..fdfc26e9f5 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -37,7 +37,7 @@ Controllers.osd = require('./osd'); Controllers['404'] = require('./404'); Controllers.errors = require('./errors'); Controllers.composer = require('./composer'); - +Controllers.resourcesButton = require('./resources-button'); Controllers.write = require('./write'); Controllers.reset = async function (req, res) { diff --git a/src/controllers/resources-button.js b/src/controllers/resources-button.js new file mode 100644 index 0000000000..e15fd58d25 --- /dev/null +++ b/src/controllers/resources-button.js @@ -0,0 +1,12 @@ +'use strict'; + +const controllers = {}; + +controllers.getResourcesButtonPage = async (req, res) => { + // Render the resources-button template + res.render('resources-button', { + title: 'Resources Page', // You can customize the title or add more data as needed + }); +}; + +module.exports = controllers; diff --git a/src/routes/index.js b/src/routes/index.js index 4008f1565a..fa44f3ee27 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -7,6 +7,7 @@ const express = require('express'); const meta = require('../meta'); const controllers = require('../controllers'); +const resourcesButtonController = require('../controllers/resources-button'); const controllerHelpers = require('../controllers/helpers'); const plugins = require('../plugins'); @@ -80,6 +81,7 @@ _mounts.categories = (app, name, middleware, controllers) => { setupPageRoute(app, '/recent', [], controllers.recent.get); setupPageRoute(app, '/top', [], controllers.top.get); setupPageRoute(app, '/unread', [middleware.ensureLoggedIn], controllers.unread.get); + setupPageRoute(app, '/resources-button', [], resourcesButtonController.getResourcesButtonPage); }; _mounts.category = (app, name, middleware, controllers) => { diff --git a/src/views/resources-button.tpl b/src/views/resources-button.tpl new file mode 100644 index 0000000000..51ee880762 --- /dev/null +++ b/src/views/resources-button.tpl @@ -0,0 +1,22 @@ + + + + + + {{title}} + + +
+

Resources

+

Welcome to the resources page! Here you can find various links and materials.

+ +

Useful Links

+ + +
+ + \ No newline at end of file