@okjavis/nodebb-theme-javis 1.5.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/scss/_feed.scss CHANGED
@@ -70,20 +70,26 @@
70
70
  }
71
71
 
72
72
  // ===========================================================
73
- // POST CARD – Main Styling
73
+ // POST CARD – Main Styling (shadcn + Modern Polish)
74
74
  // ===========================================================
75
75
  .feed li[component="post"].posts-list-item {
76
76
  background: $jv-surface !important;
77
77
  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;
78
+ border-radius: $jv-radius-sm !important; // 8px - shadcn standard
79
+ margin-bottom: $jv-space-2 !important; // 8dp grid
80
+ box-shadow: $jv-shadow-sm !important; // shadcn subtle shadow
81
81
  overflow: hidden;
82
- transition: border-color 0.15s ease, box-shadow 0.15s ease;
82
+ transition: $jv-transition-shadow, border-color $jv-transition-fast; // Modern smooth transitions
83
83
 
84
84
  &:hover {
85
- border-color: $jv-border-strong !important;
86
- box-shadow: $jv-shadow-soft !important;
85
+ box-shadow: $jv-shadow-md !important; // shadcn hover shadow
86
+ border-color: $jv-border-strong !important; // Subtle border darkening
87
+ }
88
+
89
+ // Focus state for accessibility
90
+ &:focus-within {
91
+ outline: none;
92
+ box-shadow: $jv-shadow-md, $jv-focus-ring !important;
87
93
  }
88
94
 
89
95
  // Deleted state
@@ -106,10 +112,11 @@
106
112
 
107
113
  .overflow-hidden {
108
114
  border-radius: $jv-radius-md $jv-radius-md 0 0 !important; // Match card radius
109
- max-height: 350px !important;
115
+ max-height: 280px !important; // Reduced from 350px - more balanced ratio
110
116
 
111
117
  img {
112
118
  width: 100%;
119
+ height: 280px; // Fixed height for consistency
113
120
  object-fit: cover;
114
121
  }
115
122
  }
@@ -131,11 +138,11 @@
131
138
  // ===========================================================
132
139
  .feed li[component="post"].posts-list-item {
133
140
  > .d-flex.gap-2.p-3 {
134
- padding: $jv-space-6 !important; // 12px - compact but comfortable
135
- gap: $jv-space-4 !important;
141
+ padding: $jv-space-4 $jv-space-3 !important; // 16dp vertical, 12dp horizontal - Material grid
142
+ gap: $jv-space-3 !important; // 12dp spacing
136
143
 
137
144
  @media (max-width: 768px) {
138
- padding: $jv-space-4 !important; // 8px on mobile
145
+ padding: $jv-space-3 $jv-space-2 !important; // 12dp vertical, 8dp horizontal on mobile
139
146
  }
140
147
  }
141
148
 
@@ -143,8 +150,8 @@
143
150
  .d-none.d-lg-block {
144
151
  .avatar,
145
152
  img[class*="avatar"] {
146
- width: 40px !important; // Smaller, cleaner
147
- height: 40px !important;
153
+ width: 48px !important; // 48dp - Material standard avatar size
154
+ height: 48px !important;
148
155
  border-radius: 50% !important;
149
156
  object-fit: cover;
150
157
  border: 2px solid rgba(0, 0, 0, 0.05);
@@ -153,7 +160,7 @@
153
160
 
154
161
  // Post body
155
162
  .post-body {
156
- gap: $jv-space-2 !important; // Tighter gap - 4px
163
+ gap: $jv-space-2 !important; // 8dp - Material grid
157
164
  }
158
165
  }
159
166
 
@@ -162,12 +169,12 @@
162
169
  // ===========================================================
163
170
  .feed li[component="post"].posts-list-item {
164
171
  .topic-title {
165
- font-size: 18px !important; // Keeping subtle
166
- font-weight: 600 !important;
167
- line-height: 1.3 !important; // Tighter for clean look
172
+ font-size: 20px !important; // Larger for prominence (Reddit/LinkedIn style)
173
+ font-weight: 700 !important; // Bolder for better hierarchy
174
+ line-height: 1.4 !important; // Better readability
168
175
  color: $jv-text-main !important;
169
- margin-bottom: $jv-space-2; // 4px
170
- letter-spacing: -0.01em; // Slight tightening for modern feel
176
+ margin-bottom: $jv-space-3; // 6px - more breathing room
177
+ letter-spacing: -0.02em; // Tighter for modern feel
171
178
 
172
179
  &:hover {
173
180
  color: $jv-primary !important;
@@ -180,14 +187,15 @@
180
187
  // ===========================================================
181
188
  .feed li[component="post"].posts-list-item {
182
189
  .post-info {
183
- font-size: 13px !important;
190
+ font-size: 14px !important; // Slightly larger for readability
184
191
  color: $jv-text-soft; // Lighter for hierarchy
185
- gap: $jv-space-2 !important;
192
+ gap: $jv-space-3 !important; // More spacing between elements
186
193
 
187
194
  .post-author {
188
195
  a {
189
- color: $jv-text-muted; // Less prominent
190
- font-weight: 500; // Lighter weight
196
+ color: $jv-text-soft; // More subtle - not competing with title
197
+ font-weight: 400; // Normal weight
198
+ font-size: 14px;
191
199
 
192
200
  &:hover {
193
201
  color: $jv-primary;
@@ -205,6 +213,12 @@
205
213
 
206
214
  .timeago {
207
215
  color: $jv-text-soft !important;
216
+ font-size: 13px;
217
+
218
+ &::before {
219
+ content: "• ";
220
+ margin-right: 4px;
221
+ }
208
222
  }
209
223
  }
210
224
  }
@@ -214,13 +228,14 @@
214
228
  // ===========================================================
215
229
  .feed li[component="post"].posts-list-item {
216
230
  .content[component="post/content"] {
217
- font-size: 14px !important;
231
+ font-size: 15px !important; // Slightly larger for better readability
218
232
  line-height: 1.6 !important;
219
233
  color: $jv-text-muted;
234
+ margin-top: $jv-space-3; // Better spacing from meta
220
235
 
221
236
  // Truncation styles (from plugin)
222
237
  &.truncate-post-content {
223
- max-height: 150px;
238
+ max-height: 120px; // Reduced from 150px for cleaner cards
224
239
  overflow: hidden;
225
240
  position: relative;
226
241
 
@@ -230,7 +245,7 @@
230
245
  bottom: 0;
231
246
  left: 0;
232
247
  right: 0;
233
- height: 40px;
248
+ height: 50px; // Taller gradient
234
249
  background: linear-gradient(transparent, $jv-surface);
235
250
  pointer-events: none;
236
251
  }
@@ -300,40 +315,55 @@
300
315
  .feed li[component="post"].posts-list-item {
301
316
  .d-flex.justify-content-between:last-child {
302
317
  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
318
+ padding-top: $jv-space-4; // More padding - 8px
319
+ border-top: 1px solid rgba(0, 0, 0, 0.06); // Slightly more visible separator
305
320
 
306
321
  .btn-link {
307
322
  display: inline-flex;
308
323
  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
324
+ gap: $jv-space-2; // 8dp consistent spacing
325
+ padding: $jv-space-2 $jv-space-3 !important; // 8dp vertical, 12dp horizontal
326
+ font-size: 14px !important;
327
+ font-weight: 600 !important;
313
328
  color: $jv-text-muted !important;
314
329
  background: transparent;
315
330
  border: none;
316
- border-radius: $jv-radius-sm;
331
+ border-radius: $jv-radius-sm; // 8px shadcn standard
317
332
  text-decoration: none !important;
318
- transition: background-color 0.15s ease, color 0.15s ease;
333
+ transition: background-color $jv-transition-fast, color $jv-transition-fast; // Modern transitions, NO transform
319
334
 
320
335
  &:hover {
321
- background: rgba(0, 0, 0, 0.03); // Subtler hover
336
+ background: $jv-hover-bg; // Consistent hover state
322
337
  color: $jv-text-main !important;
323
338
  }
324
339
 
340
+ // Focus state for accessibility
341
+ &:focus-visible {
342
+ outline: none;
343
+ box-shadow: $jv-focus-ring;
344
+ }
345
+
325
346
  i {
326
- font-size: 16px;
347
+ font-size: 18px; // Larger icons
348
+ }
349
+
350
+ // Make numbers bold and prominent
351
+ span {
352
+ font-weight: 700;
327
353
  }
328
354
 
329
355
  // Comments button
330
356
  &[href*="post"]:first-child {
331
357
  i {
332
- color: $jv-text-soft;
358
+ color: $jv-text-muted;
333
359
  }
334
360
 
335
- &:hover i {
336
- color: $jv-primary;
361
+ &:hover {
362
+ background: rgba(0, 81, 255, 0.08);
363
+
364
+ i {
365
+ color: $jv-primary;
366
+ }
337
367
  }
338
368
  }
339
369
 
@@ -341,6 +371,7 @@
341
371
  &[data-action="bookmark"] {
342
372
  &[data-bookmarked="true"] {
343
373
  color: $jv-primary !important;
374
+ background: $jv-selected-bg !important; // Consistent selected state
344
375
 
345
376
  i {
346
377
  color: $jv-primary !important;
@@ -348,7 +379,11 @@
348
379
  }
349
380
 
350
381
  &:hover {
351
- background: rgba(0, 81, 255, 0.06);
382
+ background: $jv-selected-bg;
383
+
384
+ i {
385
+ color: $jv-primary;
386
+ }
352
387
  }
353
388
  }
354
389
 
@@ -356,6 +391,7 @@
356
391
  &[data-action="upvote"] {
357
392
  &[data-upvoted="true"] {
358
393
  color: #ef4444 !important;
394
+ background: rgba(239, 68, 68, 0.08) !important;
359
395
 
360
396
  i {
361
397
  color: #ef4444 !important;
@@ -363,7 +399,7 @@
363
399
  }
364
400
 
365
401
  &:hover {
366
- background: rgba(239, 68, 68, 0.06);
402
+ background: rgba(239, 68, 68, 0.08);
367
403
 
368
404
  i {
369
405
  color: #ef4444;
@@ -371,10 +407,13 @@
371
407
  }
372
408
  }
373
409
 
374
- // Reply button
410
+ // Reply button (Primary CTA)
375
411
  &[data-action="reply"] {
412
+ color: $jv-primary !important;
413
+ font-weight: 700 !important;
414
+
376
415
  &:hover {
377
- background: rgba(0, 81, 255, 0.06);
416
+ background: $jv-selected-bg;
378
417
 
379
418
  i {
380
419
  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
  }