@okjavis/nodebb-theme-javis 1.7.0 → 2.1.0
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 +1 -1
- package/plugin.json +2 -1
- package/scss/_base.scss +0 -6
- package/scss/_buttons.scss +0 -10
- package/scss/_forms.scss +0 -17
- package/scss/_header.scss +281 -0
- package/scss/_sidebar.scss +24 -47
- package/scss/_topic.scss +681 -0
- package/scss/_variables.scss +10 -0
- package/templates/partials/topic/sidebar.tpl +48 -0
- package/templates/topic.tpl +133 -0
- package/theme.js +56 -0
- package/theme.scss +2 -0
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"baseTheme": "nodebb-theme-harmony",
|
|
8
8
|
"hooks": [
|
|
9
9
|
{ "hook": "filter:widgets.getAreas", "method": "defineWidgetAreas" },
|
|
10
|
-
{ "hook": "filter:admin.header.build", "method": "addAdminNavigation" }
|
|
10
|
+
{ "hook": "filter:admin.header.build", "method": "addAdminNavigation" },
|
|
11
|
+
{ "hook": "filter:config.get", "method": "getThemeConfig" }
|
|
11
12
|
],
|
|
12
13
|
"staticDirs": {
|
|
13
14
|
"static": "./static"
|
package/scss/_base.scss
CHANGED
|
@@ -11,12 +11,6 @@ nav[component="sidebar/right"],
|
|
|
11
11
|
|
|
12
12
|
// No custom layout overrides - use Harmony defaults
|
|
13
13
|
|
|
14
|
-
// Search bar width override
|
|
15
|
-
.search-widget .input-group {
|
|
16
|
-
max-width: 650px;
|
|
17
|
-
margin: 0 auto;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
14
|
// Left sidebar layout - navigation at top, profile/collapse at bottom
|
|
21
15
|
nav[component="sidebar/left"] {
|
|
22
16
|
justify-content: flex-start !important; // Remove space-between
|
package/scss/_buttons.scss
CHANGED
|
@@ -3,16 +3,6 @@
|
|
|
3
3
|
// Modern, clean buttons with smooth interactions
|
|
4
4
|
// ===========================================================
|
|
5
5
|
|
|
6
|
-
// Semantic colors
|
|
7
|
-
$jv-success: #10b981;
|
|
8
|
-
$jv-success-hover: #059669;
|
|
9
|
-
$jv-danger: #ef4444;
|
|
10
|
-
$jv-danger-hover: #dc2626;
|
|
11
|
-
$jv-warning: #f59e0b;
|
|
12
|
-
$jv-warning-hover: #d97706;
|
|
13
|
-
$jv-info: #3b82f6;
|
|
14
|
-
$jv-info-hover: #2563eb;
|
|
15
|
-
|
|
16
6
|
// ===========================================================
|
|
17
7
|
// BASE BUTTON
|
|
18
8
|
// ===========================================================
|
package/scss/_forms.scss
CHANGED
|
@@ -37,23 +37,6 @@ textarea {
|
|
|
37
37
|
min-height: 100px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
// ===========================================================
|
|
41
|
-
// SEARCH BAR
|
|
42
|
-
// ===========================================================
|
|
43
|
-
|
|
44
|
-
.search-widget .input-group {
|
|
45
|
-
.form-control {
|
|
46
|
-
border-top-right-radius: 0;
|
|
47
|
-
border-bottom-right-radius: 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.btn-primary {
|
|
51
|
-
border-top-left-radius: 0;
|
|
52
|
-
border-bottom-left-radius: 0;
|
|
53
|
-
padding: 0 18px;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
40
|
// ===========================================================
|
|
58
41
|
// COMPOSER TRIGGER (Write a Post…)
|
|
59
42
|
// ===========================================================
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// ============================================
|
|
2
|
+
// HEADER / TOPBAR - Sticky Navigation Bar
|
|
3
|
+
// ============================================
|
|
4
|
+
// Industry-standard sticky header with centered search
|
|
5
|
+
// Inspired by: Slack, Linear, Notion, GitHub
|
|
6
|
+
|
|
7
|
+
// ===========================================================
|
|
8
|
+
// BRAND CONTAINER (Top Bar)
|
|
9
|
+
// ===========================================================
|
|
10
|
+
.brand-container {
|
|
11
|
+
position: sticky;
|
|
12
|
+
top: 0;
|
|
13
|
+
z-index: 1020; // Below modals (1050) but above content
|
|
14
|
+
background: $jv-surface;
|
|
15
|
+
border-bottom: 1px solid $jv-border-subtle;
|
|
16
|
+
margin: 0 !important; // No margins - ever
|
|
17
|
+
padding: $jv-space-3 $jv-space-4 !important; // 12px vertical, 16px horizontal
|
|
18
|
+
min-height: 64px; // 12px top + 40px search + 12px bottom
|
|
19
|
+
max-width: 100% !important; // Override container-lg max-width
|
|
20
|
+
width: 100% !important; // Full width always
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
transition: box-shadow $jv-transition-base;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
|
|
26
|
+
// Override Bootstrap container classes
|
|
27
|
+
&.container-lg,
|
|
28
|
+
&.container-md,
|
|
29
|
+
&.container {
|
|
30
|
+
max-width: 100% !important;
|
|
31
|
+
padding-left: $jv-space-4 !important;
|
|
32
|
+
padding-right: $jv-space-4 !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Subtle shadow on scroll (added via JS)
|
|
36
|
+
&.scrolled {
|
|
37
|
+
box-shadow: $jv-shadow-sm;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Inner flex container
|
|
41
|
+
> .col-12 {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
gap: $jv-space-4;
|
|
46
|
+
border-bottom: none !important; // Remove Harmony's border
|
|
47
|
+
padding: 0 $jv-space-4 !important; // Horizontal padding
|
|
48
|
+
margin: 0 !important;
|
|
49
|
+
width: 100% !important; // Ensure full width - no right margin
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Brand/Logo wrapper - compact padding
|
|
53
|
+
[component="brand/wrapper"] {
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
padding: $jv-space-1 !important; // Minimal padding
|
|
56
|
+
border-radius: $jv-radius-sm;
|
|
57
|
+
transition: background $jv-transition-fast;
|
|
58
|
+
gap: $jv-space-2 !important; // Tighter gap
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
background: $jv-hover-bg;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Logo sizing - compact
|
|
66
|
+
[component="brand/logo"] {
|
|
67
|
+
max-height: 28px; // Compact logo height - matches sidebar logo
|
|
68
|
+
width: auto;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Site title (if shown)
|
|
72
|
+
[component="siteTitle"] {
|
|
73
|
+
h1 {
|
|
74
|
+
font-size: $jv-font-size-base !important; // Smaller title
|
|
75
|
+
font-weight: 600 !important;
|
|
76
|
+
margin: 0 !important;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ===========================================================
|
|
82
|
+
// SEARCH BAR - Centered, Prominent
|
|
83
|
+
// ===========================================================
|
|
84
|
+
[data-widget-area="brand-header"] {
|
|
85
|
+
flex: 1;
|
|
86
|
+
display: flex;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
align-items: center;
|
|
89
|
+
padding: 0 $jv-space-4 !important;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Search widget in header
|
|
93
|
+
.brand-container .search-widget,
|
|
94
|
+
[data-widget-area="brand-header"] .search-widget {
|
|
95
|
+
width: 100%;
|
|
96
|
+
max-width: 560px;
|
|
97
|
+
|
|
98
|
+
.input-group {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
background: $jv-bg; // Light gray background (matches app bg)
|
|
102
|
+
border-radius: $jv-radius-pill;
|
|
103
|
+
border: 1px solid transparent;
|
|
104
|
+
transition: all $jv-transition-fast;
|
|
105
|
+
padding: 0;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
|
|
108
|
+
// Hover state
|
|
109
|
+
&:hover {
|
|
110
|
+
background: darken($jv-bg, 2%);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Focus-within state
|
|
114
|
+
&:focus-within {
|
|
115
|
+
background: $jv-surface;
|
|
116
|
+
border-color: $jv-primary;
|
|
117
|
+
box-shadow: $jv-focus-ring;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Search icon button
|
|
121
|
+
.btn-outline-secondary,
|
|
122
|
+
.input-group-text {
|
|
123
|
+
background: transparent !important;
|
|
124
|
+
border: none !important;
|
|
125
|
+
padding: $jv-space-2 $jv-space-3;
|
|
126
|
+
padding-right: 0;
|
|
127
|
+
color: $jv-text-soft !important;
|
|
128
|
+
|
|
129
|
+
i {
|
|
130
|
+
font-size: 14px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:hover {
|
|
134
|
+
background: transparent !important;
|
|
135
|
+
color: $jv-text-muted !important;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Search input field
|
|
140
|
+
.form-control {
|
|
141
|
+
background: transparent !important;
|
|
142
|
+
border: none !important;
|
|
143
|
+
box-shadow: none !important;
|
|
144
|
+
padding: $jv-space-2 $jv-space-3;
|
|
145
|
+
padding-left: $jv-space-2;
|
|
146
|
+
font-size: $jv-font-size-base;
|
|
147
|
+
color: $jv-text-main;
|
|
148
|
+
height: 40px; // Consistent height
|
|
149
|
+
|
|
150
|
+
// Placeholder styling
|
|
151
|
+
&::placeholder {
|
|
152
|
+
color: $jv-text-soft;
|
|
153
|
+
opacity: 1;
|
|
154
|
+
font-weight: 400;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&:focus {
|
|
158
|
+
outline: none;
|
|
159
|
+
box-shadow: none !important;
|
|
160
|
+
|
|
161
|
+
&::placeholder {
|
|
162
|
+
color: $jv-text-muted;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Search submit button (blue button)
|
|
168
|
+
.btn-primary,
|
|
169
|
+
.btn[type="submit"] {
|
|
170
|
+
height: 40px;
|
|
171
|
+
min-width: 40px;
|
|
172
|
+
padding: 0 $jv-space-4;
|
|
173
|
+
border-radius: 0 $jv-radius-pill $jv-radius-pill 0 !important;
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Keyboard shortcut hint (optional enhancement)
|
|
180
|
+
&::after {
|
|
181
|
+
content: "⌘K";
|
|
182
|
+
display: none; // Enable when JS shortcut is implemented
|
|
183
|
+
padding: $jv-space-1 $jv-space-2;
|
|
184
|
+
margin-right: $jv-space-2;
|
|
185
|
+
background: rgba(0, 0, 0, 0.06);
|
|
186
|
+
border-radius: $jv-radius-xs;
|
|
187
|
+
font-size: $jv-font-size-xs;
|
|
188
|
+
color: $jv-text-soft;
|
|
189
|
+
font-family: $jv-font-sans;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// ===========================================================
|
|
195
|
+
// SEARCH DROPDOWN RESULTS
|
|
196
|
+
// ===========================================================
|
|
197
|
+
.brand-container .search-dropdown,
|
|
198
|
+
.search-widget .dropdown-menu {
|
|
199
|
+
width: 100%;
|
|
200
|
+
min-width: 400px;
|
|
201
|
+
max-width: 560px;
|
|
202
|
+
margin-top: $jv-space-2 !important;
|
|
203
|
+
padding: $jv-space-2;
|
|
204
|
+
border-radius: $jv-radius-md;
|
|
205
|
+
border: 1px solid $jv-border-subtle;
|
|
206
|
+
box-shadow: $jv-shadow-lg;
|
|
207
|
+
background: $jv-surface;
|
|
208
|
+
|
|
209
|
+
// Quick search results
|
|
210
|
+
.quick-search-results-container {
|
|
211
|
+
max-height: 400px;
|
|
212
|
+
overflow-y: auto;
|
|
213
|
+
|
|
214
|
+
// Individual result items
|
|
215
|
+
.search-result {
|
|
216
|
+
padding: $jv-space-2 $jv-space-3;
|
|
217
|
+
border-radius: $jv-radius-sm;
|
|
218
|
+
transition: background $jv-transition-fast;
|
|
219
|
+
|
|
220
|
+
&:hover {
|
|
221
|
+
background: $jv-hover-bg;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Advanced search link
|
|
227
|
+
.advanced-search-link {
|
|
228
|
+
color: $jv-text-muted;
|
|
229
|
+
transition: color $jv-transition-fast;
|
|
230
|
+
|
|
231
|
+
&:hover {
|
|
232
|
+
color: $jv-primary;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// ===========================================================
|
|
238
|
+
// RESPONSIVE ADJUSTMENTS
|
|
239
|
+
// ===========================================================
|
|
240
|
+
@media (max-width: 991px) {
|
|
241
|
+
.brand-container {
|
|
242
|
+
// On tablet/mobile, maintain proper spacing
|
|
243
|
+
min-height: 56px !important;
|
|
244
|
+
margin: 0 !important;
|
|
245
|
+
padding: $jv-space-2 0 !important;
|
|
246
|
+
|
|
247
|
+
> .col-12 {
|
|
248
|
+
padding: 0 $jv-space-2 !important;
|
|
249
|
+
width: 100% !important;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
[data-widget-area="brand-header"] {
|
|
253
|
+
padding: 0 $jv-space-2 !important;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.search-widget {
|
|
257
|
+
max-width: 100%;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@media (max-width: 767px) {
|
|
263
|
+
.brand-container {
|
|
264
|
+
// Hide search in header on mobile (use mobile header instead)
|
|
265
|
+
[data-widget-area="brand-header"] {
|
|
266
|
+
display: none;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
> .col-12 {
|
|
270
|
+
justify-content: center;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// ===========================================================
|
|
276
|
+
// MAIN PANEL - Remove top margin for cohesive layout
|
|
277
|
+
// ===========================================================
|
|
278
|
+
#panel {
|
|
279
|
+
margin-top: 0 !important; // Remove mt-3 class margin
|
|
280
|
+
}
|
|
281
|
+
|
package/scss/_sidebar.scss
CHANGED
|
@@ -6,14 +6,18 @@
|
|
|
6
6
|
// ===========================================================
|
|
7
7
|
// JAVIS SIDEBAR LOGO
|
|
8
8
|
// ===========================================================
|
|
9
|
+
// Height should match the sticky header (64px) for visual alignment
|
|
9
10
|
.javis-sidebar-logo {
|
|
10
11
|
display: flex;
|
|
11
12
|
align-items: center;
|
|
12
13
|
justify-content: center;
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
height: 65px; // Match header height (12px + 40px + 12px)
|
|
15
|
+
min-height: 65px;
|
|
16
|
+
padding: 0 $jv-space-4; // Only horizontal padding
|
|
17
|
+
margin-bottom: $jv-space-3; // 12px space below border before nav items
|
|
15
18
|
border-bottom: 1px solid $jv-border-subtle;
|
|
16
19
|
flex-shrink: 0;
|
|
20
|
+
box-sizing: border-box;
|
|
17
21
|
|
|
18
22
|
.javis-logo-link {
|
|
19
23
|
display: flex;
|
|
@@ -22,32 +26,39 @@
|
|
|
22
26
|
text-decoration: none;
|
|
23
27
|
}
|
|
24
28
|
|
|
25
|
-
// Icon logo (collapsed state) -
|
|
29
|
+
// Icon logo (collapsed state) - 28px to match header logo
|
|
26
30
|
.javis-logo-icon {
|
|
27
|
-
width:
|
|
28
|
-
height:
|
|
31
|
+
width: 28px;
|
|
32
|
+
height: 28px;
|
|
29
33
|
object-fit: contain;
|
|
30
34
|
}
|
|
31
35
|
|
|
32
|
-
// Full logo (expanded state) - max 140px width
|
|
36
|
+
// Full logo (expanded state) - max 140px width, 28px height
|
|
33
37
|
.javis-logo-full {
|
|
34
38
|
max-width: 140px;
|
|
35
|
-
height:
|
|
39
|
+
height: 28px;
|
|
36
40
|
object-fit: contain;
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
|
|
40
|
-
// Adjust when sidebar is open
|
|
44
|
+
// Adjust when sidebar is open - same height, just different horizontal padding
|
|
41
45
|
.sidebar-left.open .javis-sidebar-logo {
|
|
42
|
-
padding: $jv-space-6
|
|
46
|
+
padding: 0 $jv-space-6; // Only horizontal padding changes
|
|
43
47
|
justify-content: flex-start;
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
// ===========================================================
|
|
47
51
|
// LEFT SIDEBAR (Main Navigation)
|
|
48
52
|
// ===========================================================
|
|
53
|
+
|
|
54
|
+
// Override Bootstrap's bg-light class on sidebar
|
|
55
|
+
.sidebar.bg-light,
|
|
56
|
+
nav.sidebar.bg-light {
|
|
57
|
+
background-color: $jv-surface !important; // Pure white - cohesive with header
|
|
58
|
+
}
|
|
59
|
+
|
|
49
60
|
.sidebar {
|
|
50
|
-
background: $jv-surface;
|
|
61
|
+
background: $jv-surface !important; // Pure white - cohesive with header
|
|
51
62
|
border-right: 1px solid $jv-border-subtle;
|
|
52
63
|
padding-top: 0 !important; // Remove top padding so logo sits at top edge
|
|
53
64
|
|
|
@@ -172,28 +183,6 @@ div[data-widget-area] {
|
|
|
172
183
|
}
|
|
173
184
|
}
|
|
174
185
|
|
|
175
|
-
// ===========================================================
|
|
176
|
-
// SEARCH WIDGET
|
|
177
|
-
// ===========================================================
|
|
178
|
-
.search-widget {
|
|
179
|
-
.input-group {
|
|
180
|
-
display: flex;
|
|
181
|
-
|
|
182
|
-
.form-control {
|
|
183
|
-
flex: 1;
|
|
184
|
-
border-top-right-radius: 0;
|
|
185
|
-
border-bottom-right-radius: 0;
|
|
186
|
-
border-right: none;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.btn {
|
|
190
|
-
border-top-left-radius: 0;
|
|
191
|
-
border-bottom-left-radius: 0;
|
|
192
|
-
padding: 8px 14px;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
186
|
// ===========================================================
|
|
198
187
|
// ONLINE USERS WIDGET
|
|
199
188
|
// ===========================================================
|
|
@@ -515,7 +504,7 @@ div[data-widget-area="right"],
|
|
|
515
504
|
|
|
516
505
|
// Sticky positioning - stays visible when scrolling
|
|
517
506
|
position: sticky;
|
|
518
|
-
top:
|
|
507
|
+
top: 48px; // Adjust based on your header height
|
|
519
508
|
align-self: flex-start;
|
|
520
509
|
max-height: calc(100vh - 100px); // Account for header + padding
|
|
521
510
|
overflow-y: auto; // Allow scrolling if content is too tall
|
|
@@ -667,18 +656,7 @@ div[data-widget-area="right"] {
|
|
|
667
656
|
}
|
|
668
657
|
|
|
669
658
|
.tag-topic-count {
|
|
670
|
-
|
|
671
|
-
font-weight: 400 !important;
|
|
672
|
-
color: $jv-text-soft !important;
|
|
673
|
-
line-height: 1 !important;
|
|
674
|
-
|
|
675
|
-
// Show count in parentheses style
|
|
676
|
-
&::before {
|
|
677
|
-
content: "(";
|
|
678
|
-
}
|
|
679
|
-
&::after {
|
|
680
|
-
content: ")";
|
|
681
|
-
}
|
|
659
|
+
display: none !important;
|
|
682
660
|
}
|
|
683
661
|
|
|
684
662
|
// [Enhancement 3] Color-code tags by popularity
|
|
@@ -851,5 +829,4 @@ div[data-widget-area="right"] {
|
|
|
851
829
|
}
|
|
852
830
|
}
|
|
853
831
|
}
|
|
854
|
-
}
|
|
855
|
-
|
|
832
|
+
}
|