diff --git a/node_modules/nodebb-theme-harmony/scss/topic.scss b/node_modules/nodebb-theme-harmony/scss/topic.scss index 94f10bc36d..029c15514a 100644 --- a/node_modules/nodebb-theme-harmony/scss/topic.scss +++ b/node_modules/nodebb-theme-harmony/scss/topic.scss @@ -8,6 +8,20 @@ body.template-topic { width: 960px; } + #Resources { + background-color: transparent; + border: none; + padding: 0.5rem 1rem; // Add padding to match other buttons + color: #007bff; // Adjust color to match button text + font-weight: bold; + + &:hover { + background-color: #f1f3f5; // Match hover background with others + border-radius: 5px; + color: #0056b3; // Adjust hover text color if needed + } + } + .posts { // fixes code blocks pushing content out on mobile @include media-breakpoint-down(md) { 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..dbf8db526f 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,15 @@ {{{ end }}} + + + + Resources + + + + + {{{ if (!feeds:disableRSS && rssFeedUrl) }}} {{{ end }}} diff --git a/src/controllers/resources-button.js b/src/controllers/resources-button.js new file mode 100644 index 0000000000..42df84a281 --- /dev/null +++ b/src/controllers/resources-button.js @@ -0,0 +1,10 @@ +'use strict'; + +const controllers = {}; +controllers.getResourcesButtonPage = async (req, res) => { + 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..998866a08b 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -4,6 +4,8 @@ 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'); @@ -80,6 +82,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.getResourcesPage); }; _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..b1d0e5f0f2 --- /dev/null +++ b/src/views/resources-button.tpl @@ -0,0 +1,25 @@ + + +
+ + +Welcome to the resources page! Here you can find various links and materials.
+ + +