@okjavis/nodebb-theme-javis 1.5.0 → 1.6.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/scss/_feed.scss CHANGED
@@ -3,6 +3,24 @@
3
3
  // Styles for nodebb-plugin-feed (/feed route)
4
4
  // ===========================================================
5
5
 
6
+ // ===========================================================
7
+ // HIDE NEW TOPIC BUTTON AND ALL CATEGORIES ROW
8
+ // ===========================================================
9
+ // Hide New Topic button
10
+ // #new_topic,
11
+ // .btn[href*="/compose"],
12
+ // button[data-action="newTopic"],
13
+ // a[href*="/compose"] {
14
+ // display: none !important;
15
+ // }
16
+
17
+ // // Hide All categories row
18
+ // .category-selector-container,
19
+ // [component="category/dropdown"],
20
+ // .d-flex.justify-content-between.py-2.mb-2 {
21
+ // display: none !important;
22
+ // }
23
+
6
24
  // ===========================================================
7
25
  // FEED CONTAINER
8
26
  // ===========================================================
@@ -10,12 +28,12 @@
10
28
  // No max-width - let Bootstrap grid handle width
11
29
  // Already inside col-lg-9 which provides proper constraints
12
30
 
13
- // Header controls row
31
+ // Header controls row (keeping for reference, but hidden above)
14
32
  .d-flex.justify-content-between.py-2.mb-2 {
15
33
  padding: $jv-space-4 0 !important;
16
34
  margin-bottom: $jv-space-6 !important;
17
35
 
18
- // New Topic button
36
+ // New Topic button (hidden above)
19
37
  #new_topic,
20
38
  .btn-primary {
21
39
  font-weight: 600;
@@ -70,20 +88,26 @@
70
88
  }
71
89
 
72
90
  // ===========================================================
73
- // POST CARD – Main Styling
91
+ // POST CARD – Main Styling (shadcn + Modern Polish)
74
92
  // ===========================================================
75
93
  .feed li[component="post"].posts-list-item {
76
94
  background: $jv-surface !important;
77
95
  border: 1px solid $jv-border-subtle !important;
78
- border-radius: $jv-radius-md !important; // 12px - more compact than 16px
79
- margin-bottom: $jv-space-4 !important; // 8px - compact like Reddit
80
- box-shadow: none !important;
96
+ border-radius: $jv-radius-sm !important; // 8px - shadcn standard
97
+ margin-bottom: $jv-space-2 !important; // 8dp grid
98
+ box-shadow: $jv-shadow-sm !important; // shadcn subtle shadow
81
99
  overflow: hidden;
82
- transition: border-color 0.15s ease, box-shadow 0.15s ease;
100
+ transition: $jv-transition-shadow, border-color $jv-transition-fast; // Modern smooth transitions
83
101
 
84
102
  &:hover {
85
- border-color: $jv-border-strong !important;
86
- box-shadow: $jv-shadow-soft !important;
103
+ box-shadow: $jv-shadow-md !important; // shadcn hover shadow
104
+ border-color: $jv-border-strong !important; // Subtle border darkening
105
+ }
106
+
107
+ // Focus state for accessibility
108
+ &:focus-within {
109
+ outline: none;
110
+ box-shadow: $jv-shadow-md, $jv-focus-ring !important;
87
111
  }
88
112
 
89
113
  // Deleted state
@@ -106,10 +130,11 @@
106
130
 
107
131
  .overflow-hidden {
108
132
  border-radius: $jv-radius-md $jv-radius-md 0 0 !important; // Match card radius
109
- max-height: 350px !important;
133
+ max-height: 280px !important; // Reduced from 350px - more balanced ratio
110
134
 
111
135
  img {
112
136
  width: 100%;
137
+ height: 280px; // Fixed height for consistency
113
138
  object-fit: cover;
114
139
  }
115
140
  }
@@ -131,11 +156,11 @@
131
156
  // ===========================================================
132
157
  .feed li[component="post"].posts-list-item {
133
158
  > .d-flex.gap-2.p-3 {
134
- padding: $jv-space-6 !important; // 12px - compact but comfortable
135
- gap: $jv-space-4 !important;
159
+ padding: $jv-space-4 $jv-space-3 !important; // 16dp vertical, 12dp horizontal - Material grid
160
+ gap: $jv-space-3 !important; // 12dp spacing
136
161
 
137
162
  @media (max-width: 768px) {
138
- padding: $jv-space-4 !important; // 8px on mobile
163
+ padding: $jv-space-3 $jv-space-2 !important; // 12dp vertical, 8dp horizontal on mobile
139
164
  }
140
165
  }
141
166
 
@@ -143,8 +168,8 @@
143
168
  .d-none.d-lg-block {
144
169
  .avatar,
145
170
  img[class*="avatar"] {
146
- width: 40px !important; // Smaller, cleaner
147
- height: 40px !important;
171
+ width: 48px !important; // 48dp - Material standard avatar size
172
+ height: 48px !important;
148
173
  border-radius: 50% !important;
149
174
  object-fit: cover;
150
175
  border: 2px solid rgba(0, 0, 0, 0.05);
@@ -153,7 +178,7 @@
153
178
 
154
179
  // Post body
155
180
  .post-body {
156
- gap: $jv-space-2 !important; // Tighter gap - 4px
181
+ gap: $jv-space-2 !important; // 8dp - Material grid
157
182
  }
158
183
  }
159
184
 
@@ -162,12 +187,12 @@
162
187
  // ===========================================================
163
188
  .feed li[component="post"].posts-list-item {
164
189
  .topic-title {
165
- font-size: 18px !important; // Keeping subtle
166
- font-weight: 600 !important;
167
- line-height: 1.3 !important; // Tighter for clean look
190
+ font-size: 20px !important; // Larger for prominence (Reddit/LinkedIn style)
191
+ font-weight: 700 !important; // Bolder for better hierarchy
192
+ line-height: 1.4 !important; // Better readability
168
193
  color: $jv-text-main !important;
169
- margin-bottom: $jv-space-2; // 4px
170
- letter-spacing: -0.01em; // Slight tightening for modern feel
194
+ margin-bottom: $jv-space-3; // 6px - more breathing room
195
+ letter-spacing: -0.02em; // Tighter for modern feel
171
196
 
172
197
  &:hover {
173
198
  color: $jv-primary !important;
@@ -180,14 +205,15 @@
180
205
  // ===========================================================
181
206
  .feed li[component="post"].posts-list-item {
182
207
  .post-info {
183
- font-size: 13px !important;
208
+ font-size: 14px !important; // Slightly larger for readability
184
209
  color: $jv-text-soft; // Lighter for hierarchy
185
- gap: $jv-space-2 !important;
210
+ gap: $jv-space-3 !important; // More spacing between elements
186
211
 
187
212
  .post-author {
188
213
  a {
189
- color: $jv-text-muted; // Less prominent
190
- font-weight: 500; // Lighter weight
214
+ color: $jv-text-soft; // More subtle - not competing with title
215
+ font-weight: 400; // Normal weight
216
+ font-size: 14px;
191
217
 
192
218
  &:hover {
193
219
  color: $jv-primary;
@@ -205,6 +231,12 @@
205
231
 
206
232
  .timeago {
207
233
  color: $jv-text-soft !important;
234
+ font-size: 13px;
235
+
236
+ &::before {
237
+ content: "• ";
238
+ margin-right: 4px;
239
+ }
208
240
  }
209
241
  }
210
242
  }
@@ -214,13 +246,14 @@
214
246
  // ===========================================================
215
247
  .feed li[component="post"].posts-list-item {
216
248
  .content[component="post/content"] {
217
- font-size: 14px !important;
249
+ font-size: 15px !important; // Slightly larger for better readability
218
250
  line-height: 1.6 !important;
219
251
  color: $jv-text-muted;
252
+ margin-top: $jv-space-3; // Better spacing from meta
220
253
 
221
254
  // Truncation styles (from plugin)
222
255
  &.truncate-post-content {
223
- max-height: 150px;
256
+ max-height: 120px; // Reduced from 150px for cleaner cards
224
257
  overflow: hidden;
225
258
  position: relative;
226
259
 
@@ -230,7 +263,7 @@
230
263
  bottom: 0;
231
264
  left: 0;
232
265
  right: 0;
233
- height: 40px;
266
+ height: 50px; // Taller gradient
234
267
  background: linear-gradient(transparent, $jv-surface);
235
268
  pointer-events: none;
236
269
  }
@@ -300,40 +333,55 @@
300
333
  .feed li[component="post"].posts-list-item {
301
334
  .d-flex.justify-content-between:last-child {
302
335
  margin: 0 (-$jv-space-2);
303
- padding-top: $jv-space-2; // Small padding above - 4px
304
- border-top: 1px solid rgba(0, 0, 0, 0.04); // Subtle separator
336
+ padding-top: $jv-space-4; // More padding - 8px
337
+ border-top: 1px solid rgba(0, 0, 0, 0.06); // Slightly more visible separator
305
338
 
306
339
  .btn-link {
307
340
  display: inline-flex;
308
341
  align-items: center;
309
- gap: 6px;
310
- padding: 6px 10px !important; // Tighter padding
311
- font-size: 13px !important;
312
- font-weight: 500 !important; // Lighter weight
342
+ gap: $jv-space-2; // 8dp consistent spacing
343
+ padding: $jv-space-2 $jv-space-3 !important; // 8dp vertical, 12dp horizontal
344
+ font-size: 14px !important;
345
+ font-weight: 600 !important;
313
346
  color: $jv-text-muted !important;
314
347
  background: transparent;
315
348
  border: none;
316
- border-radius: $jv-radius-sm;
349
+ border-radius: $jv-radius-sm; // 8px shadcn standard
317
350
  text-decoration: none !important;
318
- transition: background-color 0.15s ease, color 0.15s ease;
351
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions, NO transform
319
352
 
320
353
  &:hover {
321
- background: rgba(0, 0, 0, 0.03); // Subtler hover
354
+ background: $jv-hover-bg; // Consistent hover state
322
355
  color: $jv-text-main !important;
323
356
  }
324
357
 
358
+ // Focus state for accessibility
359
+ &:focus-visible {
360
+ outline: none;
361
+ box-shadow: $jv-focus-ring;
362
+ }
363
+
325
364
  i {
326
- font-size: 16px;
365
+ font-size: 18px; // Larger icons
366
+ }
367
+
368
+ // Make numbers bold and prominent
369
+ span {
370
+ font-weight: 700;
327
371
  }
328
372
 
329
373
  // Comments button
330
374
  &[href*="post"]:first-child {
331
375
  i {
332
- color: $jv-text-soft;
376
+ color: $jv-text-muted;
333
377
  }
334
378
 
335
- &:hover i {
336
- color: $jv-primary;
379
+ &:hover {
380
+ background: rgba(0, 81, 255, 0.08);
381
+
382
+ i {
383
+ color: $jv-primary;
384
+ }
337
385
  }
338
386
  }
339
387
 
@@ -341,6 +389,7 @@
341
389
  &[data-action="bookmark"] {
342
390
  &[data-bookmarked="true"] {
343
391
  color: $jv-primary !important;
392
+ background: $jv-selected-bg !important; // Consistent selected state
344
393
 
345
394
  i {
346
395
  color: $jv-primary !important;
@@ -348,7 +397,11 @@
348
397
  }
349
398
 
350
399
  &:hover {
351
- background: rgba(0, 81, 255, 0.06);
400
+ background: $jv-selected-bg;
401
+
402
+ i {
403
+ color: $jv-primary;
404
+ }
352
405
  }
353
406
  }
354
407
 
@@ -356,6 +409,7 @@
356
409
  &[data-action="upvote"] {
357
410
  &[data-upvoted="true"] {
358
411
  color: #ef4444 !important;
412
+ background: rgba(239, 68, 68, 0.08) !important;
359
413
 
360
414
  i {
361
415
  color: #ef4444 !important;
@@ -363,7 +417,7 @@
363
417
  }
364
418
 
365
419
  &:hover {
366
- background: rgba(239, 68, 68, 0.06);
420
+ background: rgba(239, 68, 68, 0.08);
367
421
 
368
422
  i {
369
423
  color: #ef4444;
@@ -371,10 +425,13 @@
371
425
  }
372
426
  }
373
427
 
374
- // Reply button
428
+ // Reply button (Primary CTA)
375
429
  &[data-action="reply"] {
430
+ color: $jv-primary !important;
431
+ font-weight: 700 !important;
432
+
376
433
  &:hover {
377
- background: rgba(0, 81, 255, 0.06);
434
+ background: $jv-selected-bg;
378
435
 
379
436
  i {
380
437
  color: $jv-primary;
package/scss/_forms.scss CHANGED
@@ -17,7 +17,7 @@ textarea,
17
17
  color: $jv-text-main;
18
18
  line-height: $jv-line-height-tight;
19
19
  box-shadow: none;
20
- transition: all 0.15s ease;
20
+ transition: border-color $jv-transition-fast, box-shadow $jv-transition-fast; // Modern transitions
21
21
 
22
22
  &::placeholder {
23
23
  color: $jv-text-muted;
@@ -26,7 +26,7 @@ textarea,
26
26
  &:focus {
27
27
  outline: none;
28
28
  border-color: $jv-primary;
29
- box-shadow: 0 0 0 3px $jv-primary-soft;
29
+ box-shadow: $jv-focus-ring; // Consistent focus ring
30
30
  }
31
31
  }
32
32
 
@@ -68,22 +68,18 @@ textarea {
68
68
  font-weight: 400;
69
69
  text-align: left;
70
70
  color: $jv-text-muted;
71
- box-shadow: $jv-shadow-soft;
72
- transition: all 0.15s ease;
71
+ box-shadow: $jv-shadow-sm; // shadcn subtle shadow
72
+ transition: border-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
73
73
 
74
74
  &:hover,
75
75
  &:focus {
76
76
  background: $jv-surface;
77
77
  border-color: $jv-primary;
78
78
  color: $jv-primary;
79
- box-shadow: $jv-shadow-soft;
79
+ box-shadow: $jv-shadow-sm; // shadcn subtle shadow
80
80
  outline: none;
81
81
  }
82
82
 
83
- &:active {
84
- transform: scale(0.99);
85
- }
86
-
87
83
  // Override Bootstrap button states
88
84
  &.btn,
89
85
  &.btn:focus,
@@ -91,7 +87,7 @@ textarea {
91
87
  &.btn:active {
92
88
  background: $jv-surface;
93
89
  border-radius: $jv-radius-pill;
94
- box-shadow: $jv-shadow-soft;
90
+ box-shadow: $jv-shadow-sm; // shadcn subtle shadow
95
91
  border-color: $jv-border-subtle;
96
92
  outline: none;
97
93
  }
@@ -109,11 +105,11 @@ textarea {
109
105
  .dropdown-menu {
110
106
  border: 1px solid $jv-border-subtle;
111
107
  border-radius: $jv-radius-md;
112
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
108
+ box-shadow: $jv-shadow-lg; // shadcn large shadow for dropdowns
113
109
  padding: $jv-space-2 0;
114
110
  min-width: 180px;
115
111
  background: $jv-surface;
116
- animation: dropdownFade 0.15s ease;
112
+ animation: dropdownFade $jv-transition-fast;
117
113
 
118
114
  @keyframes dropdownFade {
119
115
  from {
@@ -130,7 +126,7 @@ textarea {
130
126
  padding: $jv-space-4 $jv-space-8;
131
127
  font-size: $jv-font-size-sm;
132
128
  color: $jv-text-main;
133
- transition: background-color 0.15s ease;
129
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
134
130
  display: flex;
135
131
  align-items: center;
136
132
  gap: $jv-space-4;
@@ -150,7 +146,7 @@ textarea {
150
146
  }
151
147
 
152
148
  &:active {
153
- background: rgba(0, 81, 255, 0.1);
149
+ background: $jv-active-bg; // Consistent active state
154
150
  }
155
151
 
156
152
  &.active {
@@ -158,6 +154,13 @@ textarea {
158
154
  color: $jv-primary;
159
155
  font-weight: 500;
160
156
  }
157
+
158
+ // Focus state for accessibility
159
+ &:focus-visible {
160
+ outline: none;
161
+ background: rgba(0, 81, 255, 0.06);
162
+ color: $jv-primary;
163
+ }
161
164
  }
162
165
 
163
166
  .dropdown-divider {
@@ -291,7 +294,7 @@ textarea {
291
294
  .modal-content {
292
295
  border: none;
293
296
  border-radius: $jv-radius-lg;
294
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
297
+ box-shadow: $jv-shadow-xl; // shadcn extra large shadow for modals
295
298
  }
296
299
 
297
300
  .modal-header {
@@ -305,11 +308,17 @@ textarea {
305
308
 
306
309
  .btn-close {
307
310
  opacity: 0.5;
308
- transition: opacity 0.15s ease;
311
+ transition: opacity $jv-transition-fast; // Modern transition
309
312
 
310
313
  &:hover {
311
314
  opacity: 1;
312
315
  }
316
+
317
+ // Focus state for accessibility
318
+ &:focus-visible {
319
+ outline: none;
320
+ box-shadow: $jv-focus-ring;
321
+ }
313
322
  }
314
323
  }
315
324
 
@@ -331,7 +340,7 @@ textarea {
331
340
  height: 18px;
332
341
  margin-top: 0;
333
342
  border: 2px solid $jv-border-strong;
334
- transition: all 0.15s ease;
343
+ transition: background-color $jv-transition-fast, border-color $jv-transition-fast; // Modern transitions
335
344
 
336
345
  &:checked {
337
346
  background-color: $jv-primary;
@@ -339,7 +348,8 @@ textarea {
339
348
  }
340
349
 
341
350
  &:focus {
342
- box-shadow: 0 0 0 3px $jv-primary-soft;
351
+ outline: none;
352
+ box-shadow: $jv-focus-ring; // Consistent focus ring
343
353
  border-color: $jv-primary;
344
354
  }
345
355
  }
@@ -374,14 +384,14 @@ textarea {
374
384
  border: none;
375
385
  border-bottom: 1px solid $jv-border-subtle;
376
386
  padding: $jv-space-6 $jv-space-8;
377
- transition: background-color 0.15s ease;
387
+ transition: background-color $jv-transition-fast; // Modern transition
378
388
 
379
389
  &:last-child {
380
390
  border-bottom: none;
381
391
  }
382
392
 
383
393
  &:hover {
384
- background: rgba(0, 0, 0, 0.02);
394
+ background: $jv-hover-bg; // Consistent hover state
385
395
  }
386
396
 
387
397
  &.active {
@@ -389,6 +399,12 @@ textarea {
389
399
  border-color: transparent;
390
400
  color: $jv-primary;
391
401
  }
402
+
403
+ // Focus state for accessibility
404
+ &:focus-visible {
405
+ outline: none;
406
+ background: $jv-hover-bg;
407
+ }
392
408
  }
393
409
 
394
410
  // ===========================================================
@@ -408,8 +424,12 @@ textarea {
408
424
  vertical-align: middle;
409
425
  }
410
426
 
411
- &.table-hover tbody tr:hover {
412
- background: rgba(0, 0, 0, 0.02);
427
+ &.table-hover tbody tr {
428
+ transition: background-color $jv-transition-fast; // Modern transition
429
+
430
+ &:hover {
431
+ background: $jv-hover-bg; // Consistent hover state
432
+ }
413
433
  }
414
434
  }
415
435
 
@@ -426,12 +446,18 @@ textarea {
426
446
  font-size: $jv-font-size-sm;
427
447
  color: $jv-text-main;
428
448
  background: transparent;
429
- transition: all 0.15s ease;
449
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
430
450
 
431
451
  &:hover {
432
- background: rgba(0, 0, 0, 0.05);
452
+ background: $jv-hover-bg; // Consistent hover state
433
453
  color: $jv-primary;
434
454
  }
455
+
456
+ // Focus state for accessibility
457
+ &:focus-visible {
458
+ outline: none;
459
+ box-shadow: $jv-focus-ring;
460
+ }
435
461
  }
436
462
 
437
463
  .page-item.active .page-link {
@@ -460,7 +486,7 @@ textarea {
460
486
  font-size: $jv-font-size-sm;
461
487
  font-weight: 500;
462
488
  color: $jv-text-muted;
463
- transition: all 0.15s ease;
489
+ transition: color $jv-transition-fast, border-bottom-color $jv-transition-fast; // Modern transitions
464
490
 
465
491
  &:hover {
466
492
  color: $jv-text-main;
@@ -472,6 +498,12 @@ textarea {
472
498
  border-bottom-color: $jv-primary;
473
499
  background: transparent;
474
500
  }
501
+
502
+ // Focus state for accessibility
503
+ &:focus-visible {
504
+ outline: none;
505
+ box-shadow: $jv-focus-ring;
506
+ }
475
507
  }
476
508
  }
477
509
 
@@ -487,10 +519,10 @@ textarea {
487
519
  font-size: $jv-font-size-sm;
488
520
  font-weight: 500;
489
521
  color: $jv-text-muted;
490
- transition: all 0.15s ease;
522
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions
491
523
 
492
524
  &:hover {
493
- background: rgba(0, 0, 0, 0.04);
525
+ background: $jv-hover-bg; // Consistent hover state
494
526
  color: $jv-text-main;
495
527
  }
496
528
 
@@ -498,5 +530,11 @@ textarea {
498
530
  background: $jv-primary;
499
531
  color: #fff;
500
532
  }
533
+
534
+ // Focus state for accessibility
535
+ &:focus-visible {
536
+ outline: none;
537
+ box-shadow: $jv-focus-ring;
538
+ }
501
539
  }
502
540
  }