diff --git a/node_modules/nodebb-theme-harmony/templates/partials/topic-list-bar.tpl b/node_modules/nodebb-theme-harmony/templates/partials/topic-list-bar.tpl index 53f558cfdc..a587830ac8 100644 --- a/node_modules/nodebb-theme-harmony/templates/partials/topic-list-bar.tpl +++ b/node_modules/nodebb-theme-harmony/templates/partials/topic-list-bar.tpl @@ -26,6 +26,11 @@ {{{ end }}} + + + + Resources + {{{ if (!feeds:disableRSS && rssFeedUrl) }}} {{{ end }}} diff --git a/src/controllers/index.js b/src/controllers/index.js index 2cf50a7785..669b2f4fc2 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -37,6 +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'); diff --git a/src/controllers/resources-button.js b/src/controllers/resources-button.js new file mode 100644 index 0000000000..34c9727761 --- /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; \ No newline at end of file diff --git a/src/routes/index.js b/src/routes/index.js index 4008f1565a..d2d34957ac 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -4,7 +4,7 @@ const nconf = require('nconf'); const winston = require('winston'); const path = require('path'); const express = require('express'); - +const resourcesButtonController = require('../controllers/resources-button'); const meta = require('../meta'); const controllers = require('../controllers'); const controllerHelpers = require('../controllers/helpers'); @@ -80,6 +80,8 @@ _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