@okjavis/nodebb-theme-javis 1.4.0 → 1.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": "1.4.0",
3
+ "version": "1.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
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "templates": "templates",
19
19
  "screenshot": "screenshot.png",
20
- "version": "1.0.1",
20
+ "version": "1.5.0",
21
21
  "nbbpm": {
22
22
  "compatibility": "^4.0.0"
23
23
  }
package/scss/_base.scss CHANGED
@@ -9,197 +9,61 @@ nav[component="sidebar/right"],
9
9
  display: none !important;
10
10
  }
11
11
 
12
- // ===========================================================
13
- // MAIN CONTENT CENTERING (Reddit-style)
14
- // ===========================================================
15
- // Center the main content area with equal margins on both sides
16
- // This applies to ALL main content pages including feed, category, recent, etc.
12
+ // No custom layout overrides - use Harmony defaults
17
13
 
18
- // Feed page uses col-lg-6 for main content and col-lg-3 for sidebars
19
- .feed > .row {
20
- max-width: 1440px !important; // Max width for entire content area
21
- margin: 0 auto !important; // Center the row
22
- padding: 0 24px !important; // Equal padding on both sides - 24px like Reddit
23
- display: flex !important;
24
- justify-content: center !important; // Center the flex items
25
-
26
- // Left sidebar (widget area)
27
- > .col-lg-3[data-widget-area="left"] {
28
- flex: 0 0 auto !important;
29
- width: 0 !important; // Hide left sidebar to match your design
30
- max-width: 0 !important;
31
- padding: 0 !important;
32
- overflow: hidden !important;
33
- }
34
-
35
- // Main feed content (col-lg-6)
36
- > .col-lg-6 {
37
- flex: 0 0 auto !important;
38
- width: 800px !important; // Main content fixed width (Reddit ~750-800px)
39
- max-width: 800px !important;
40
- padding-left: 0 !important;
41
- padding-right: 24px !important; // Gap between content and sidebar
42
- }
43
-
44
- // Right sidebar (trending/widgets)
45
- > .col-lg-3[data-widget-area="right"] {
46
- flex: 0 0 auto !important;
47
- width: 312px !important; // Sidebar fixed width (Reddit ~312px)
48
- max-width: 312px !important;
49
- padding-left: 0 !important;
50
- padding-right: 0 !important;
51
- }
52
-
53
- @media (max-width: 991px) {
54
- padding: 0 16px !important; // Smaller padding on tablets
55
- flex-direction: column !important;
56
-
57
- > .col-lg-6,
58
- > .col-lg-3 {
59
- width: 100% !important;
60
- max-width: 100% !important;
61
- padding: 0 !important;
62
- }
63
- }
64
-
65
- @media (max-width: 768px) {
66
- padding: 0 12px !important; // Even smaller on mobile
67
- }
14
+ // Search bar width override
15
+ .search-widget .input-group {
16
+ max-width: 650px;
17
+ margin: 0 auto;
68
18
  }
69
19
 
70
- // ===========================================================
71
- // SEARCH BAR (Reddit-style)
72
- // ===========================================================
73
- // Target the brand header area where search widget is
74
- .brand-container [data-widget-area="brand-header"] {
75
- max-width: 500px !important; // Reddit search bar width (~500px)
76
- margin: 0 auto !important; // Center the search bar
77
- display: flex !important;
78
- align-items: center !important;
20
+ // Left sidebar layout - navigation at top, profile/collapse at bottom
21
+ nav[component="sidebar/left"] {
22
+ justify-content: flex-start !important; // Remove space-between
79
23
 
80
- // Search form/input group
81
- form,
82
- .input-group {
83
- width: 100% !important;
84
- display: flex !important;
85
- align-items: center !important;
86
- position: relative !important; // For absolute positioning of button
24
+ // Main navigation list - keep at top with no extra margin
25
+ #main-nav {
26
+ margin-top: 0 !important; // Remove top margin to be close to logo
27
+ flex-grow: 0 !important; // Don't grow to fill space
87
28
  }
88
29
 
89
- // Search input styling
90
- input[type="text"],
91
- input[type="search"],
92
- .form-control {
93
- flex: 1 !important;
94
- padding: 10px 48px 10px 16px !important; // Extra padding on right for button
95
- border-radius: 20px !important; // Fully rounded like Reddit
96
- border: 1px solid $jv-border-subtle !important;
97
- background: $jv-surface !important;
98
- font-size: 14px !important;
99
- width: 100% !important;
100
-
101
- &:focus {
102
- border-color: $jv-primary !important;
103
- outline: none !important;
104
- box-shadow: 0 0 0 1px $jv-primary !important;
105
- }
106
- }
107
-
108
- // Search button styling - positioned inside input on the right
109
- button[type="submit"],
110
- .btn {
111
- position: absolute !important;
112
- right: 4px !important; // Small gap from edge
113
- top: 50% !important;
114
- transform: translateY(-50%) !important;
115
- padding: 8px 12px !important;
116
- border-radius: 16px !important;
117
- background: transparent !important;
118
- border: none !important;
119
- color: $jv-text-muted !important;
120
- margin: 0 !important;
121
-
122
- &:hover {
123
- background: rgba(0, 0, 0, 0.05) !important;
124
- color: $jv-primary !important;
125
- }
126
-
127
- i {
128
- font-size: 16px !important;
129
- }
30
+ // Sidebar toggle container - push to bottom
31
+ .sidebar-toggle-container {
32
+ margin-top: auto !important; // Push to bottom
130
33
  }
131
34
  }
132
35
 
133
- // Main container padding adjustments (Reddit-style)
134
- .container-lg {
135
- max-width: 1440px !important; // Match our feed max-width
136
- padding-left: 24px !important; // Equal padding like Reddit
137
- padding-right: 24px !important;
138
-
139
- @media (max-width: 991px) {
140
- padding-left: 16px !important;
141
- padding-right: 16px !important;
142
- }
143
-
144
- @media (max-width: 768px) {
145
- padding-left: 12px !important;
146
- padding-right: 12px !important;
36
+ // Reddit-style layout: Equal spacing and wider feed
37
+ .feed > .row {
38
+ max-width: 1400px; // Reddit's approximate max-width
39
+ margin: 0 auto;
40
+ padding: 0 20px; // Reddit-style horizontal padding
41
+ justify-content: center; // Center the columns
42
+
43
+ // Equal gap between columns (Reddit uses ~16-20px)
44
+ gap: 20px;
45
+
46
+ // Adjust column widths for better proportions
47
+ > [data-widget-area="left"] {
48
+ flex: 0 0 auto;
49
+ width: 280px; // Fixed width for left sidebar (not using Bootstrap col-lg-3)
147
50
  }
148
- }
149
51
 
150
- // Feed header area - add more padding (Reddit-style)
151
- .feed {
152
- // Add top padding to feed container
153
- padding-top: 20px !important; // Reddit has ~20px top padding
154
-
155
- // Header controls (New Topic button, settings)
156
- .d-flex.justify-content-between.py-2.mb-2 {
157
- padding: 12px 0 !important; // More padding top/bottom
158
- margin-bottom: 20px !important; // More space before cards (Reddit-style)
52
+ // Center feed content - make it wider
53
+ > .col-lg-6 {
54
+ flex: 1 1 auto; // Take remaining space
55
+ max-width: 700px; // Reddit's feed is ~640-700px
56
+ margin-left: 0 !important; // Remove ms-auto
57
+ padding-left: 0 !important; // Remove left padding
58
+ padding-right: 0 !important; // Remove right padding
159
59
  }
160
- }
161
-
162
- // For other pages (category, recent, etc.) that use col-lg-9
163
- main .container,
164
- .container-fluid {
165
- > .row {
166
- max-width: 1440px !important;
167
- margin: 0 auto !important;
168
- padding: 0 24px !important;
169
- justify-content: center !important;
170
-
171
- > .col-lg-9 {
172
- flex: 0 0 auto !important;
173
- width: 640px !important;
174
- max-width: 640px !important;
175
- padding-left: 0 !important;
176
- padding-right: 24px !important;
177
-
178
- @media (max-width: 1200px) {
179
- width: 100% !important;
180
- max-width: 640px !important;
181
- padding-right: 16px !important;
182
- }
183
- }
184
60
 
185
- > .col-lg-3[data-widget-area="sidebar"] {
186
- flex: 0 0 auto !important;
187
- width: 312px !important;
188
- max-width: 312px !important;
189
- padding-left: 0 !important;
190
- padding-right: 0 !important;
191
- }
192
-
193
- @media (max-width: 991px) {
194
- padding: 0 16px !important;
195
-
196
- > .col-lg-9,
197
- > .col-lg-3 {
198
- width: 100% !important;
199
- max-width: 100% !important;
200
- padding: 0 !important;
201
- }
202
- }
61
+ // Right sidebar (Trending)
62
+ > [data-widget-area="right"] {
63
+ flex: 0 0 auto;
64
+ width: 320px; // Fixed width for right sidebar
65
+ padding-left: 0 !important; // Remove left padding
66
+ padding-right: 0 !important; // Remove right padding
203
67
  }
204
68
  }
205
69
 
@@ -258,9 +122,17 @@ h6 {
258
122
  a {
259
123
  color: $jv-primary;
260
124
  text-decoration: none;
261
- transition: color 0.15s ease;
125
+ transition: color $jv-transition-fast; // Modern transition
262
126
 
263
127
  &:hover {
264
128
  color: $jv-primary-hover;
265
129
  }
130
+
131
+ // Focus state for accessibility
132
+ &:focus-visible {
133
+ outline: none;
134
+ text-decoration: underline;
135
+ text-decoration-thickness: 2px;
136
+ text-underline-offset: 2px;
137
+ }
266
138
  }
@@ -26,7 +26,7 @@ $jv-info-hover: #2563eb;
26
26
  font-size: 14px;
27
27
  font-weight: 500;
28
28
  line-height: 1.4;
29
- transition: all 0.2s ease;
29
+ transition: background-color $jv-transition-fast, border-color $jv-transition-fast, color $jv-transition-fast; // Modern specific transitions
30
30
  border: 1px solid transparent;
31
31
  cursor: pointer;
32
32
  text-decoration: none;
@@ -35,7 +35,7 @@ $jv-info-hover: #2563eb;
35
35
  // Focus ring for accessibility
36
36
  &:focus {
37
37
  outline: none;
38
- box-shadow: 0 0 0 3px rgba(0, 81, 255, 0.2);
38
+ box-shadow: $jv-focus-ring;
39
39
  }
40
40
 
41
41
  &:focus:not(:focus-visible) {
@@ -43,7 +43,8 @@ $jv-info-hover: #2563eb;
43
43
  }
44
44
 
45
45
  &:focus-visible {
46
- box-shadow: 0 0 0 3px rgba(0, 81, 255, 0.3);
46
+ outline: none;
47
+ box-shadow: $jv-focus-ring;
47
48
  }
48
49
 
49
50
  // Disabled state
@@ -74,12 +75,10 @@ $jv-info-hover: #2563eb;
74
75
  background-color: $jv-primary-hover;
75
76
  border-color: $jv-primary-hover;
76
77
  box-shadow: $jv-shadow-button-hover;
77
- transform: translateY(-1px);
78
78
  color: #fff;
79
79
  }
80
80
 
81
81
  &:active {
82
- transform: translateY(0);
83
82
  box-shadow: $jv-shadow-button;
84
83
  }
85
84
  }
@@ -105,7 +104,7 @@ $jv-info-hover: #2563eb;
105
104
  color: $jv-text-main;
106
105
 
107
106
  &:hover {
108
- background-color: rgba(0, 0, 0, 0.04);
107
+ background-color: $jv-hover-bg; // Consistent hover state
109
108
  border-color: $jv-border-strong;
110
109
  color: $jv-text-main;
111
110
  }
@@ -155,11 +154,6 @@ $jv-info-hover: #2563eb;
155
154
  background-color: $jv-success-hover;
156
155
  border-color: $jv-success-hover;
157
156
  color: #fff;
158
- transform: translateY(-1px);
159
- }
160
-
161
- &:active {
162
- transform: translateY(0);
163
157
  }
164
158
  }
165
159
 
@@ -172,11 +166,6 @@ $jv-info-hover: #2563eb;
172
166
  background-color: $jv-danger-hover;
173
167
  border-color: $jv-danger-hover;
174
168
  color: #fff;
175
- transform: translateY(-1px);
176
- }
177
-
178
- &:active {
179
- transform: translateY(0);
180
169
  }
181
170
  }
182
171
 
@@ -189,11 +178,6 @@ $jv-info-hover: #2563eb;
189
178
  background-color: $jv-warning-hover;
190
179
  border-color: $jv-warning-hover;
191
180
  color: #fff;
192
- transform: translateY(-1px);
193
- }
194
-
195
- &:active {
196
- transform: translateY(0);
197
181
  }
198
182
  }
199
183
 
@@ -206,11 +190,6 @@ $jv-info-hover: #2563eb;
206
190
  background-color: $jv-info-hover;
207
191
  border-color: $jv-info-hover;
208
192
  color: #fff;
209
- transform: translateY(-1px);
210
- }
211
-
212
- &:active {
213
- transform: translateY(0);
214
193
  }
215
194
  }
216
195
 
@@ -218,12 +197,12 @@ $jv-info-hover: #2563eb;
218
197
  // LIGHT/SUBTLE BUTTON
219
198
  // ===========================================================
220
199
  .btn-light {
221
- background-color: rgba(0, 0, 0, 0.04);
200
+ background-color: $jv-hover-bg; // Consistent with hover state
222
201
  border-color: transparent;
223
202
  color: $jv-text-main;
224
203
 
225
204
  &:hover {
226
- background-color: rgba(0, 0, 0, 0.08);
205
+ background-color: $jv-active-bg; // Consistent active state
227
206
  color: $jv-text-main;
228
207
  }
229
208
  }
@@ -237,7 +216,7 @@ $jv-info-hover: #2563eb;
237
216
  color: $jv-text-muted;
238
217
 
239
218
  &:hover {
240
- background-color: rgba(0, 0, 0, 0.05);
219
+ background-color: $jv-hover-bg; // Consistent hover state
241
220
  color: $jv-text-main;
242
221
  }
243
222
  }
@@ -353,11 +332,12 @@ $jv-info-hover: #2563eb;
353
332
  height: 56px;
354
333
  border-radius: 50%;
355
334
  padding: 0;
356
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
335
+ box-shadow: $jv-shadow-lg; // shadcn large shadow
336
+ transition: $jv-transition-shadow, transform $jv-transition-fast; // Modern transitions
357
337
 
358
338
  &:hover {
359
- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
360
- transform: translateY(-2px);
339
+ box-shadow: $jv-shadow-xl; // shadcn extra large shadow
340
+ transform: translateY(-2px); // FABs are meant to lift on hover
361
341
  }
362
342
 
363
343
  i {