@okjavis/nodebb-theme-javis 2.5.0 → 2.5.1

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.0",
3
+ "version": "2.5.1",
4
4
  "description": "Modern, premium NodeBB theme for JAVIS Community - Extends Harmony with custom styling",
5
5
  "main": "theme.js",
6
6
  "scripts": {
package/plugin.json CHANGED
@@ -6,11 +6,9 @@
6
6
  "library": "./theme.js",
7
7
  "baseTheme": "nodebb-theme-harmony",
8
8
  "hooks": [
9
- { "hook": "static:app.load", "method": "init" },
10
9
  { "hook": "filter:widgets.getAreas", "method": "defineWidgetAreas" },
11
10
  { "hook": "filter:admin.header.build", "method": "addAdminNavigation" },
12
- { "hook": "filter:config.get", "method": "getThemeConfig" },
13
- { "hook": "filter:settings.get", "method": "getAdminSettings" }
11
+ { "hook": "filter:config.get", "method": "getThemeConfig" }
14
12
  ],
15
13
  "staticDirs": {
16
14
  "static": "./static"
@@ -18,9 +16,6 @@
18
16
  "scripts": [
19
17
  "static/lib/theme.js"
20
18
  ],
21
- "modules": {
22
- "../admin/plugins/javis.js": "public/admin.js"
23
- },
24
19
  "templates": "templates",
25
20
  "screenshot": "screenshot.png",
26
21
  "version": "1.5.0",
package/theme.js CHANGED
@@ -9,11 +9,9 @@ const meta = require.main.require('./src/meta');
9
9
  const user = require.main.require('./src/user');
10
10
  const _ = require.main.require('lodash');
11
11
 
12
- const controllers = require('./lib/controllers');
13
-
14
12
  const theme = {};
15
13
 
16
- // JAVIS defaults - openSidebars is 'on' by default
14
+ // Harmony's defaults - we override openSidebars to 'on'
17
15
  const defaults = {
18
16
  enableQuickReply: 'on',
19
17
  enableBreadcrumbs: 'on',
@@ -28,24 +26,12 @@ const defaults = {
28
26
  };
29
27
 
30
28
  /**
31
- * Hook: static:app.load
32
- * Initialize routes for admin panel
33
- */
34
- theme.init = async function (params) {
35
- const { router } = params;
36
- const routeHelpers = require.main.require('./src/routes/helpers');
37
-
38
- // Admin panel route
39
- routeHelpers.setupAdminPageRoute(router, '/admin/plugins/javis', [], controllers.renderAdminPage);
40
- };
41
-
42
- /**
43
- * Load theme config
29
+ * Load theme config - replaces Harmony's loadThemeConfig
44
30
  * Uses JAVIS defaults (with openSidebars: 'on')
45
31
  */
46
32
  async function loadThemeConfig(uid) {
47
33
  const [themeConfig, userConfig] = await Promise.all([
48
- meta.settings.get('javis'),
34
+ meta.settings.get('harmony'),
49
35
  user.getSettings(uid),
50
36
  ]);
51
37
 
@@ -67,9 +53,6 @@ async function loadThemeConfig(uid) {
67
53
  return config;
68
54
  }
69
55
 
70
- // Export loadThemeConfig for potential use by other modules
71
- theme.loadThemeConfig = loadThemeConfig;
72
-
73
56
  /**
74
57
  * Hook: filter:config.get
75
58
  * Sets config.theme with JAVIS-specific defaults
@@ -80,20 +63,6 @@ theme.getThemeConfig = async function (config) {
80
63
  return config;
81
64
  };
82
65
 
83
- /**
84
- * Hook: filter:settings.get
85
- * Provide default values for admin settings
86
- */
87
- theme.getAdminSettings = async function (hookData) {
88
- if (hookData.plugin === 'javis') {
89
- hookData.values = {
90
- ...defaults,
91
- ...hookData.values,
92
- };
93
- }
94
- return hookData;
95
- };
96
-
97
66
  theme.defineWidgetAreas = async (areas) => {
98
67
  // Define widget areas like Harmony does
99
68
  const locations = ['header', 'sidebar', 'footer'];
@@ -156,7 +125,7 @@ theme.defineWidgetAreas = async (areas) => {
156
125
 
157
126
  theme.addAdminNavigation = (header) => {
158
127
  header.plugins.push({
159
- route: '/plugins/javis',
128
+ route: '/plugins/javis-community-theme',
160
129
  icon: 'fa-paint-brush',
161
130
  name: 'JAVIS Theme',
162
131
  });
@@ -1,76 +0,0 @@
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>