Skip to content

Commit

Permalink
Merge pull request #41 from CMU-17313Q/test-changes-on-duplicate-theme
Browse files Browse the repository at this point in the history
Made changes to a duplicated theme
  • Loading branch information
rmmahmou authored Oct 20, 2024
2 parents 1b80ca3 + f0621e4 commit c104c9a
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 2 deletions.
Binary file added custom_themes/nodebb-theme-testing.zip
Binary file not shown.
1 change: 1 addition & 0 deletions custom_themes/nodebb-theme-testing1
Submodule nodebb-theme-testing1 added at d493d6
3 changes: 2 additions & 1 deletion install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
]
},
"dependencies": {
"nodebb-theme-testing": "github:rmmahmou/nodebb-theme-testing",
"@adactive/bootstrap-tagsinput": "0.8.2",
"@fontsource/inter": "5.0.18",
"@fontsource/poppins": "5.0.14",
Expand Down Expand Up @@ -195,4 +196,4 @@
"url": "https://github.com/barisusakli"
}
]
}
}
4 changes: 3 additions & 1 deletion public/openapi/read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,6 @@ paths:
"/api/groups/{slug}/members":
$ref: 'read/groups/slug/members.yaml'
/api/outgoing:
$ref: 'read/outgoing.yaml'
$ref: 'read/outgoing.yaml'
/api/resources-button:
$ref: 'read/resources-button.yaml'
14 changes: 14 additions & 0 deletions public/openapi/read/resources-button.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
get:
summary: "Retrieve resources button data"
description: "Endpoint to get resources button information"
responses:
'200':
description: "Successful response"
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Resources button data retrieved successfully"
12 changes: 12 additions & 0 deletions src/controllers/resources-button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

const controllers = {};

controllers.getResourcesButtonPage = async (req, res) => {
// Return a JSON response to match the API schema definition
res.status(200).json({
message: 'Resources button data retrieved successfully',
});
};

module.exports = controllers;
4 changes: 4 additions & 0 deletions src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ const winston = require('winston');
const path = require('path');
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');

Expand Down Expand Up @@ -80,6 +83,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) => {
Expand Down
22 changes: 22 additions & 0 deletions src/views/resources-button.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{title}}</title>
</head>
<body>
<div class="container">
<h1>Resources</h1>
<p>Welcome to the resources page! Here you can find various links and materials.</p>

<h2>Useful Links</h2>
<ul>
<li><a href="https://example.com" target="_blank">Example Link 1</a></li>
<li><a href="https://example.com" target="_blank">Example Link 2</a></li>
<li><a href="https://example.com" target="_blank">Example Link 3</a></li>
</ul>
<!-- Add more sections as needed -->
</div>
</body>
</html>

0 comments on commit c104c9a

Please sign in to comment.