@okjavis/nodebb-theme-javis 2.5.1 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okjavis/nodebb-theme-javis",
3
- "version": "2.5.1",
3
+ "version": "2.5.3",
4
4
  "description": "Modern, premium NodeBB theme for JAVIS Community - Extends Harmony with custom styling",
5
5
  "main": "theme.js",
6
6
  "scripts": {
@@ -34,6 +34,7 @@
34
34
  "scss/",
35
35
  "static/",
36
36
  "templates/",
37
+ "public/",
37
38
  "theme.js",
38
39
  "theme.scss",
39
40
  "theme.json",
package/plugin.json CHANGED
@@ -6,6 +6,7 @@
6
6
  "library": "./theme.js",
7
7
  "baseTheme": "nodebb-theme-harmony",
8
8
  "hooks": [
9
+ { "hook": "static:app.load", "method": "init" },
9
10
  { "hook": "filter:widgets.getAreas", "method": "defineWidgetAreas" },
10
11
  { "hook": "filter:admin.header.build", "method": "addAdminNavigation" },
11
12
  { "hook": "filter:config.get", "method": "getThemeConfig" }
@@ -16,6 +17,9 @@
16
17
  "scripts": [
17
18
  "static/lib/theme.js"
18
19
  ],
20
+ "modules": {
21
+ "../admin/plugins/javis.js": "public/admin.js"
22
+ },
19
23
  "templates": "templates",
20
24
  "screenshot": "screenshot.png",
21
25
  "version": "1.5.0",
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ define('admin/plugins/javis', ['settings'], function (Settings) {
4
+ var ACP = {};
5
+
6
+ ACP.init = function () {
7
+ // Load settings from 'harmony' key for compatibility with parent theme
8
+ Settings.load('harmony', $('.javis-settings'));
9
+
10
+ $('#save').on('click', function () {
11
+ // Save to 'harmony' key for compatibility
12
+ Settings.save('harmony', $('.javis-settings'));
13
+ });
14
+ };
15
+
16
+ return ACP;
17
+ });
@@ -0,0 +1,76 @@
1
+ <div class="acp-page-container">
2
+ <!-- IMPORT admin/partials/settings/header.tpl -->
3
+
4
+ <div class="row m-0">
5
+ <div id="spy-container" class="col-12 col-md-8 px-0 mb-4" tabindex="0">
6
+ <form role="form" class="javis-settings">
7
+ <div class="mb-4">
8
+ <h5 class="fw-bold">JAVIS Theme Settings</h5>
9
+ <p class="text-muted">Configure the default settings for the JAVIS Community theme.</p>
10
+ </div>
11
+
12
+ <div class="form-check form-switch mb-3">
13
+ <input type="checkbox" class="form-check-input" id="enableQuickReply" name="enableQuickReply" />
14
+ <label for="enableQuickReply" class="form-check-label">Enable Quick Reply</label>
15
+ <p class="form-text">Allow users to quickly reply to topics without opening the full composer.</p>
16
+ </div>
17
+
18
+ <div class="form-check form-switch mb-3">
19
+ <input type="checkbox" class="form-check-input" id="enableBreadcrumbs" name="enableBreadcrumbs" />
20
+ <label for="enableBreadcrumbs" class="form-check-label">Enable Breadcrumbs</label>
21
+ <p class="form-text">Show navigation breadcrumbs at the top of pages.</p>
22
+ </div>
23
+
24
+ <div class="form-check form-switch mb-3">
25
+ <input type="checkbox" class="form-check-input" id="centerHeaderElements" name="centerHeaderElements" />
26
+ <label for="centerHeaderElements" class="form-check-label">Center Header Elements</label>
27
+ <p class="form-text">Center-align the header navigation elements.</p>
28
+ </div>
29
+
30
+ <div class="form-check form-switch mb-3">
31
+ <input type="checkbox" class="form-check-input" id="mobileTopicTeasers" name="mobileTopicTeasers" />
32
+ <label for="mobileTopicTeasers" class="form-check-label">Mobile Topic Teasers</label>
33
+ <p class="form-text">Show topic teasers on mobile devices.</p>
34
+ </div>
35
+
36
+ <div class="form-check form-switch mb-3">
37
+ <input type="checkbox" class="form-check-input" id="stickyToolbar" name="stickyToolbar" />
38
+ <label for="stickyToolbar" class="form-check-label">Sticky Toolbar</label>
39
+ <p class="form-text">Keep the topic toolbar visible when scrolling.</p>
40
+ </div>
41
+
42
+ <div class="form-check form-switch mb-3">
43
+ <input type="checkbox" class="form-check-input" id="topicSidebarTools" name="topicSidebarTools" />
44
+ <label for="topicSidebarTools" class="form-check-label">Topic Sidebar Tools</label>
45
+ <p class="form-text">Show topic tools in the sidebar instead of inline.</p>
46
+ </div>
47
+
48
+ <div class="form-check form-switch mb-3">
49
+ <input type="checkbox" class="form-check-input" id="autohideBottombar" name="autohideBottombar" />
50
+ <label for="autohideBottombar" class="form-check-label">Auto-hide Bottom Bar</label>
51
+ <p class="form-text">Automatically hide the bottom navigation bar when scrolling down.</p>
52
+ </div>
53
+
54
+ <div class="form-check form-switch mb-3">
55
+ <input type="checkbox" class="form-check-input" id="topMobilebar" name="topMobilebar" />
56
+ <label for="topMobilebar" class="form-check-label">Top Mobile Bar</label>
57
+ <p class="form-text">Show mobile navigation at the top instead of bottom.</p>
58
+ </div>
59
+
60
+ <div class="form-check form-switch mb-3">
61
+ <input type="checkbox" class="form-check-input" id="openSidebars" name="openSidebars" />
62
+ <label for="openSidebars" class="form-check-label">Open Sidebars by Default</label>
63
+ <p class="form-text">Keep sidebars expanded by default (JAVIS default: enabled).</p>
64
+ </div>
65
+
66
+ <div class="form-check form-switch mb-3">
67
+ <input type="checkbox" class="form-check-input" id="chatModals" name="chatModals" />
68
+ <label for="chatModals" class="form-check-label">Chat Modals</label>
69
+ <p class="form-text">Open chats in modal windows instead of navigating to the chat page.</p>
70
+ </div>
71
+ </form>
72
+ </div>
73
+
74
+ <!-- IMPORT admin/partials/settings/toc.tpl -->
75
+ </div>
76
+ </div>
package/theme.js CHANGED
@@ -25,6 +25,22 @@ const defaults = {
25
25
  chatModals: 'off',
26
26
  };
27
27
 
28
+ /**
29
+ * Hook: static:app.load
30
+ * Initialize routes for admin panel
31
+ */
32
+ theme.init = async function (params) {
33
+ const { router } = params;
34
+ const routeHelpers = require.main.require('./src/routes/helpers');
35
+
36
+ // Admin panel route - render using Harmony's admin template structure
37
+ routeHelpers.setupAdminPageRoute(router, '/admin/plugins/javis', [], (req, res) => {
38
+ res.render('admin/plugins/javis', {
39
+ title: 'JAVIS Theme',
40
+ });
41
+ });
42
+ };
43
+
28
44
  /**
29
45
  * Load theme config - replaces Harmony's loadThemeConfig
30
46
  * Uses JAVIS defaults (with openSidebars: 'on')
@@ -125,7 +141,7 @@ theme.defineWidgetAreas = async (areas) => {
125
141
 
126
142
  theme.addAdminNavigation = (header) => {
127
143
  header.plugins.push({
128
- route: '/plugins/javis-community-theme',
144
+ route: '/plugins/javis',
129
145
  icon: 'fa-paint-brush',
130
146
  name: 'JAVIS Theme',
131
147
  });