@okjavis/nodebb-theme-javis 1.0.1 → 1.3.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.
@@ -0,0 +1,815 @@
1
+ // ===========================================================
2
+ // SIDEBAR SYSTEM – Widget Styles
3
+ // Modern, clean sidebar with card-based widgets
4
+ // ===========================================================
5
+
6
+ // ===========================================================
7
+ // JAVIS SIDEBAR LOGO
8
+ // ===========================================================
9
+ .javis-sidebar-logo {
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ padding: $jv-space-6 $jv-space-4; // 12px top/bottom, 8px left/right
14
+ margin-bottom: $jv-space-4; // 8px gap before nav - industry standard
15
+ border-bottom: 1px solid $jv-border-subtle;
16
+ flex-shrink: 0;
17
+
18
+ .javis-logo-link {
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+ text-decoration: none;
23
+ }
24
+
25
+ // Icon logo (collapsed state) - 32x32px
26
+ .javis-logo-icon {
27
+ width: 32px;
28
+ height: 32px;
29
+ object-fit: contain;
30
+ }
31
+
32
+ // Full logo (expanded state) - max 140px width
33
+ .javis-logo-full {
34
+ max-width: 140px;
35
+ height: 32px;
36
+ object-fit: contain;
37
+ }
38
+ }
39
+
40
+ // Adjust when sidebar is open
41
+ .sidebar-left.open .javis-sidebar-logo {
42
+ padding: $jv-space-6 $jv-space-10; // 12px vertical, 20px horizontal when expanded
43
+ justify-content: flex-start;
44
+ }
45
+
46
+ // ===========================================================
47
+ // LEFT SIDEBAR (Main Navigation)
48
+ // ===========================================================
49
+ .sidebar {
50
+ background: $jv-surface;
51
+ border-right: 1px solid $jv-border-subtle;
52
+ padding-top: 0 !important; // Remove top padding so logo sits at top edge
53
+
54
+ // Main navigation list
55
+ #main-nav {
56
+ // No gap class - we control spacing per nav-item instead
57
+ }
58
+
59
+ // Nav items - proper spacing between items
60
+ .nav-item {
61
+ margin-bottom: $jv-space-2; // 4px between nav items - compact like Slack/Discord
62
+
63
+ &:last-child {
64
+ margin-bottom: 0; // No margin on last item
65
+ }
66
+ }
67
+
68
+ // Sidebar navigation links
69
+ .nav-link {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: $jv-space-4;
73
+ padding: $jv-space-4 $jv-space-6;
74
+ color: $jv-text-muted;
75
+ font-size: $jv-font-size-sm;
76
+ font-weight: 500;
77
+ border-radius: $jv-radius-sm;
78
+ transition: all 0.15s ease;
79
+
80
+ i {
81
+ width: 18px;
82
+ text-align: center;
83
+ font-size: 14px;
84
+ }
85
+
86
+ &:hover {
87
+ background: rgba(0, 81, 255, 0.06);
88
+ color: $jv-primary;
89
+ }
90
+
91
+ &.active {
92
+ background: $jv-primary-soft;
93
+ color: $jv-primary;
94
+ font-weight: 600;
95
+ }
96
+ }
97
+
98
+ // Sidebar section headers
99
+ .sidebar-header {
100
+ font-size: $jv-font-size-xs;
101
+ font-weight: 600;
102
+ color: $jv-text-soft;
103
+ text-transform: uppercase;
104
+ letter-spacing: 0.5px;
105
+ padding: $jv-space-6 $jv-space-6 $jv-space-2;
106
+ margin-top: $jv-space-4;
107
+ }
108
+
109
+ // Category list in sidebar
110
+ .category-list-container {
111
+ padding: $jv-space-2 0;
112
+
113
+ .category-item {
114
+ display: flex;
115
+ align-items: center;
116
+ gap: $jv-space-4;
117
+ padding: $jv-space-4 $jv-space-6;
118
+ color: $jv-text-main;
119
+ font-size: $jv-font-size-sm;
120
+ border-radius: $jv-radius-sm;
121
+ transition: background-color 0.15s ease;
122
+
123
+ &:hover {
124
+ background: rgba(0, 0, 0, 0.03);
125
+ }
126
+
127
+ .category-icon {
128
+ width: 24px;
129
+ height: 24px;
130
+ border-radius: $jv-radius-xs;
131
+ display: flex;
132
+ align-items: center;
133
+ justify-content: center;
134
+ font-size: 12px;
135
+ }
136
+ }
137
+ }
138
+ }
139
+
140
+ // ===========================================================
141
+ // WIDGET CONTAINER (General)
142
+ // ===========================================================
143
+ .widget-area,
144
+ div[data-widget-area] {
145
+ display: flex;
146
+ flex-direction: column;
147
+ gap: $jv-space-6;
148
+ }
149
+
150
+ // Individual widget card
151
+ .widget {
152
+ background: $jv-surface;
153
+ border: 1px solid $jv-border-subtle;
154
+ border-radius: $jv-radius-lg;
155
+ padding: $jv-space-8;
156
+ transition: box-shadow 0.15s ease;
157
+
158
+ &:hover {
159
+ box-shadow: $jv-shadow-soft;
160
+ }
161
+ }
162
+
163
+ // Widget titles
164
+ .widget-title,
165
+ div[data-widget-area] h5,
166
+ div[data-widget-area] h6,
167
+ div[data-widget-area="right"] h5,
168
+ div[data-widget-area="right"] h8 {
169
+ font-size: 14px;
170
+ font-weight: 700;
171
+ margin-bottom: $jv-space-6;
172
+ color: $jv-text-main;
173
+ text-transform: uppercase;
174
+ letter-spacing: 0.3px;
175
+ }
176
+
177
+ // ===========================================================
178
+ // TRENDING TAGS
179
+ // ===========================================================
180
+
181
+ .popular-tags {
182
+ gap: 6px;
183
+
184
+ .tag-list > div {
185
+ background: $jv-surface;
186
+ border: 1px solid $jv-border-subtle;
187
+ border-radius: 10px;
188
+ padding: 10px 12px;
189
+ font-size: 14px;
190
+ color: $jv-text-main;
191
+ display: flex;
192
+ flex-direction: column;
193
+ gap: 2px;
194
+ cursor: pointer;
195
+ transition: border-color 0.15s ease, background 0.15s ease;
196
+
197
+ &:hover {
198
+ border-color: rgba(0,0,0,0.12);
199
+ background: rgba(0,0,0,0.03);
200
+ }
201
+
202
+ small {
203
+ color: $jv-text-muted;
204
+ font-size: $jv-font-size-xs;
205
+ }
206
+ }
207
+ }
208
+
209
+ // ===========================================================
210
+ // TRENDING NOW
211
+ // ===========================================================
212
+
213
+ #recent_posts {
214
+ display: flex;
215
+ flex-direction: column;
216
+ gap: 10px;
217
+ margin-top: $jv-space-6;
218
+
219
+ li.widget-posts {
220
+ background: $jv-surface;
221
+ border: 1px solid rgba(0,0,0,0.05);
222
+ border-radius: $jv-radius-md;
223
+ padding: 10px 14px;
224
+ display: flex;
225
+ flex-direction: column;
226
+ gap: $jv-space-4;
227
+ transition: box-shadow 0.15s ease, border 0.15s ease;
228
+
229
+ &:hover {
230
+ border-color: rgba(0,0,0,0.08);
231
+ box-shadow: $jv-shadow-soft;
232
+ }
233
+
234
+ // Meta info
235
+ .d-flex.gap-2,
236
+ .timeago {
237
+ font-size: $jv-font-size-xs;
238
+ color: $jv-text-muted;
239
+ }
240
+
241
+ // Title inside mini post
242
+ a {
243
+ font-size: 14px;
244
+ font-weight: 500;
245
+ color: $jv-text-main;
246
+ text-decoration: none;
247
+ line-height: $jv-line-height-tight;
248
+
249
+ &:hover {
250
+ color: $jv-primary;
251
+ }
252
+ }
253
+
254
+ // 2-line clamp for content preview
255
+ p,
256
+ .content {
257
+ display: -webkit-box;
258
+ -webkit-line-clamp: 2;
259
+ -webkit-box-orient: vertical;
260
+ overflow: hidden;
261
+ font-size: $jv-font-size-sm;
262
+ color: $jv-text-muted;
263
+ margin: 0;
264
+ }
265
+
266
+ // Read more alignment
267
+ a.stretched-link {
268
+ font-size: $jv-font-size-xs;
269
+ color: $jv-primary;
270
+ }
271
+ }
272
+ }
273
+
274
+ // ===========================================================
275
+ // SEARCH WIDGET
276
+ // ===========================================================
277
+ .search-widget {
278
+ .input-group {
279
+ display: flex;
280
+
281
+ .form-control {
282
+ flex: 1;
283
+ border-top-right-radius: 0;
284
+ border-bottom-right-radius: 0;
285
+ border-right: none;
286
+ }
287
+
288
+ .btn {
289
+ border-top-left-radius: 0;
290
+ border-bottom-left-radius: 0;
291
+ padding: 8px 14px;
292
+ }
293
+ }
294
+ }
295
+
296
+ // ===========================================================
297
+ // ONLINE USERS WIDGET
298
+ // ===========================================================
299
+ .online-users,
300
+ .online-now {
301
+ .user-avatar {
302
+ width: 32px;
303
+ height: 32px;
304
+ border-radius: 50%;
305
+ object-fit: cover;
306
+ border: 2px solid $jv-surface;
307
+ transition: transform 0.15s ease;
308
+
309
+ &:hover {
310
+ transform: scale(1.1);
311
+ z-index: 10;
312
+ }
313
+ }
314
+
315
+ .avatar-stack {
316
+ display: flex;
317
+ flex-wrap: wrap;
318
+ gap: 4px;
319
+
320
+ .user-avatar {
321
+ margin-left: -8px;
322
+
323
+ &:first-child {
324
+ margin-left: 0;
325
+ }
326
+ }
327
+ }
328
+ }
329
+
330
+ // ===========================================================
331
+ // CATEGORIES WIDGET
332
+ // ===========================================================
333
+ .categories-widget {
334
+ .category-item {
335
+ display: flex;
336
+ align-items: center;
337
+ gap: $jv-space-4;
338
+ padding: $jv-space-4 0;
339
+ border-bottom: 1px solid $jv-border-subtle;
340
+ transition: background-color 0.15s ease;
341
+
342
+ &:last-child {
343
+ border-bottom: none;
344
+ }
345
+
346
+ &:hover {
347
+ background: rgba(0, 0, 0, 0.02);
348
+ margin: 0 (-$jv-space-4);
349
+ padding-left: $jv-space-4;
350
+ padding-right: $jv-space-4;
351
+ border-radius: $jv-radius-sm;
352
+ }
353
+
354
+ .category-icon {
355
+ width: 24px;
356
+ height: 24px;
357
+ border-radius: $jv-radius-xs;
358
+ display: flex;
359
+ align-items: center;
360
+ justify-content: center;
361
+ font-size: 12px;
362
+ flex-shrink: 0;
363
+ }
364
+
365
+ .category-name {
366
+ flex: 1;
367
+ font-size: $jv-font-size-sm;
368
+ font-weight: 500;
369
+ color: $jv-text-main;
370
+ }
371
+
372
+ .category-count {
373
+ font-size: $jv-font-size-xs;
374
+ color: $jv-text-soft;
375
+ background: rgba(0, 0, 0, 0.05);
376
+ padding: 2px 6px;
377
+ border-radius: $jv-radius-pill;
378
+ }
379
+ }
380
+ }
381
+
382
+ // ===========================================================
383
+ // STATS WIDGET
384
+ // ===========================================================
385
+ .stats-widget {
386
+ display: grid;
387
+ grid-template-columns: repeat(2, 1fr);
388
+ gap: $jv-space-6;
389
+
390
+ .stat-item {
391
+ text-align: center;
392
+ padding: $jv-space-4;
393
+ background: rgba(0, 0, 0, 0.02);
394
+ border-radius: $jv-radius-sm;
395
+
396
+ .stat-value {
397
+ font-size: $jv-font-size-xl;
398
+ font-weight: 700;
399
+ color: $jv-text-main;
400
+ line-height: 1;
401
+ }
402
+
403
+ .stat-label {
404
+ font-size: $jv-font-size-xs;
405
+ color: $jv-text-muted;
406
+ margin-top: $jv-space-2;
407
+ text-transform: uppercase;
408
+ letter-spacing: 0.3px;
409
+ }
410
+ }
411
+ }
412
+
413
+ // ===========================================================
414
+ // INFO WIDGET
415
+ // ===========================================================
416
+ .info-widget {
417
+ font-size: $jv-font-size-sm;
418
+ color: $jv-text-muted;
419
+ line-height: $jv-line-height-base;
420
+
421
+ p {
422
+ margin-bottom: $jv-space-4;
423
+
424
+ &:last-child {
425
+ margin-bottom: 0;
426
+ }
427
+ }
428
+
429
+ a {
430
+ color: $jv-primary;
431
+
432
+ &:hover {
433
+ text-decoration: underline;
434
+ }
435
+ }
436
+ }
437
+
438
+ // ===========================================================
439
+ // USER CARD WIDGET (in left sidebar)
440
+ // ===========================================================
441
+ .user-card-widget {
442
+ .user-header {
443
+ display: flex;
444
+ align-items: center;
445
+ gap: $jv-space-4;
446
+ margin-bottom: $jv-space-6;
447
+
448
+ .user-avatar {
449
+ width: 48px;
450
+ height: 48px;
451
+ border-radius: 50%;
452
+ object-fit: cover;
453
+ }
454
+
455
+ .user-info {
456
+ flex: 1;
457
+
458
+ .user-name {
459
+ font-size: $jv-font-size-base;
460
+ font-weight: 600;
461
+ color: $jv-text-main;
462
+ }
463
+
464
+ .user-title {
465
+ font-size: $jv-font-size-xs;
466
+ color: $jv-text-muted;
467
+ }
468
+ }
469
+ }
470
+
471
+ .user-stats {
472
+ display: flex;
473
+ justify-content: space-around;
474
+ padding: $jv-space-4 0;
475
+ border-top: 1px solid $jv-border-subtle;
476
+ border-bottom: 1px solid $jv-border-subtle;
477
+ margin-bottom: $jv-space-6;
478
+
479
+ .stat {
480
+ text-align: center;
481
+
482
+ .value {
483
+ font-size: $jv-font-size-lg;
484
+ font-weight: 600;
485
+ color: $jv-text-main;
486
+ }
487
+
488
+ .label {
489
+ font-size: $jv-font-size-xs;
490
+ color: $jv-text-muted;
491
+ }
492
+ }
493
+ }
494
+
495
+ .user-actions {
496
+ display: flex;
497
+ flex-direction: column;
498
+ gap: $jv-space-2;
499
+
500
+ .btn {
501
+ width: 100%;
502
+ }
503
+ }
504
+ }
505
+
506
+ // ===========================================================
507
+ // SUGGESTED TOPICS WIDGET
508
+ // ===========================================================
509
+ .suggested-topics {
510
+ .topic-item {
511
+ display: flex;
512
+ gap: $jv-space-4;
513
+ padding: $jv-space-4 0;
514
+ border-bottom: 1px solid $jv-border-subtle;
515
+
516
+ &:last-child {
517
+ border-bottom: none;
518
+ }
519
+
520
+ .topic-thumb {
521
+ width: 48px;
522
+ height: 48px;
523
+ border-radius: $jv-radius-sm;
524
+ object-fit: cover;
525
+ flex-shrink: 0;
526
+ }
527
+
528
+ .topic-info {
529
+ flex: 1;
530
+ min-width: 0;
531
+
532
+ .topic-title {
533
+ font-size: $jv-font-size-sm;
534
+ font-weight: 500;
535
+ color: $jv-text-main;
536
+ line-height: $jv-line-height-tight;
537
+ display: -webkit-box;
538
+ -webkit-line-clamp: 2;
539
+ -webkit-box-orient: vertical;
540
+ overflow: hidden;
541
+
542
+ &:hover {
543
+ color: $jv-primary;
544
+ }
545
+ }
546
+
547
+ .topic-meta {
548
+ font-size: $jv-font-size-xs;
549
+ color: $jv-text-soft;
550
+ margin-top: $jv-space-2;
551
+ }
552
+ }
553
+ }
554
+ }
555
+
556
+ // ===========================================================
557
+ // RESPONSIVE SIDEBAR
558
+ // ===========================================================
559
+ @media (max-width: 992px) {
560
+ .sidebar {
561
+ position: fixed;
562
+ top: 0;
563
+ left: 0;
564
+ bottom: 0;
565
+ width: 280px;
566
+ z-index: 1050;
567
+ transform: translateX(-100%);
568
+ transition: transform 0.3s ease;
569
+ box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
570
+
571
+ &.open {
572
+ transform: translateX(0);
573
+ }
574
+ }
575
+
576
+ .sidebar-backdrop {
577
+ position: fixed;
578
+ top: 0;
579
+ left: 0;
580
+ right: 0;
581
+ bottom: 0;
582
+ background: rgba(0, 0, 0, 0.4);
583
+ z-index: 1040;
584
+ opacity: 0;
585
+ visibility: hidden;
586
+ transition: opacity 0.3s ease, visibility 0.3s ease;
587
+
588
+ &.show {
589
+ opacity: 1;
590
+ visibility: visible;
591
+ }
592
+ }
593
+ }
594
+
595
+ // ===========================================================
596
+ // RIGHT SIDEBAR WIDGET AREA (Reddit-style)
597
+ // ===========================================================
598
+ div[data-widget-area="sidebar"],
599
+ .col-lg-3[data-widget-area="sidebar"] {
600
+ display: flex;
601
+ flex-direction: column;
602
+ gap: $jv-space-6;
603
+
604
+ // Widget card container
605
+ > div {
606
+ background: $jv-surface;
607
+ border: 1px solid $jv-border-subtle;
608
+ border-radius: $jv-radius-lg;
609
+ overflow: hidden;
610
+ }
611
+
612
+ // Widget header/title
613
+ h5, h6, .widget-title {
614
+ font-size: 12px !important;
615
+ font-weight: 700 !important;
616
+ text-transform: uppercase;
617
+ letter-spacing: 0.5px;
618
+ color: $jv-text-soft;
619
+ padding: $jv-space-6 $jv-space-6 $jv-space-4;
620
+ margin: 0 !important;
621
+ border-bottom: 1px solid $jv-border-subtle;
622
+ background: rgba(0, 0, 0, 0.015);
623
+ }
624
+ }
625
+
626
+ // ===========================================================
627
+ // POPULAR TAGS WIDGET (Sidebar)
628
+ // ===========================================================
629
+ div[data-widget-area="sidebar"] {
630
+ .popular-tags,
631
+ [class*="tag"] {
632
+ padding: $jv-space-4;
633
+
634
+ // Tag items grid
635
+ .tag-list,
636
+ > div {
637
+ display: flex;
638
+ flex-direction: column;
639
+ gap: $jv-space-2;
640
+
641
+ > div,
642
+ > a {
643
+ display: flex;
644
+ align-items: center;
645
+ justify-content: space-between;
646
+ padding: $jv-space-4 $jv-space-4;
647
+ background: transparent;
648
+ border: none;
649
+ border-radius: $jv-radius-sm;
650
+ color: $jv-text-main;
651
+ font-size: 14px;
652
+ font-weight: 500;
653
+ text-decoration: none;
654
+ transition: background-color 0.15s ease;
655
+ cursor: pointer;
656
+
657
+ &:hover {
658
+ background: rgba(0, 81, 255, 0.06);
659
+ color: $jv-primary;
660
+ }
661
+
662
+ // Topic count
663
+ small,
664
+ .count,
665
+ span:last-child {
666
+ font-size: 12px;
667
+ color: $jv-text-soft;
668
+ font-weight: 400;
669
+ }
670
+ }
671
+ }
672
+ }
673
+ }
674
+
675
+ // ===========================================================
676
+ // RECENT/TRENDING POSTS WIDGET (Sidebar)
677
+ // ===========================================================
678
+ div[data-widget-area="sidebar"] {
679
+ #recent_posts,
680
+ .recent-posts,
681
+ ul {
682
+ list-style: none;
683
+ padding: 0;
684
+ margin: 0;
685
+
686
+ li {
687
+ padding: $jv-space-4 $jv-space-6;
688
+ border-bottom: 1px solid $jv-border-subtle;
689
+ transition: background-color 0.15s ease;
690
+
691
+ &:last-child {
692
+ border-bottom: none;
693
+ }
694
+
695
+ &:hover {
696
+ background: rgba(0, 0, 0, 0.02);
697
+ }
698
+
699
+ // Post header with avatar
700
+ .d-flex {
701
+ display: flex;
702
+ align-items: center;
703
+ gap: $jv-space-2;
704
+ margin-bottom: $jv-space-2;
705
+
706
+ // Avatar
707
+ .avatar,
708
+ img[class*="avatar"] {
709
+ width: 20px !important;
710
+ height: 20px !important;
711
+ border-radius: 50%;
712
+ flex-shrink: 0;
713
+ }
714
+
715
+ // Username
716
+ a:first-of-type {
717
+ font-size: 12px;
718
+ font-weight: 600;
719
+ color: $jv-text-main;
720
+ text-decoration: none;
721
+
722
+ &:hover {
723
+ color: $jv-primary;
724
+ }
725
+ }
726
+
727
+ // Timeago
728
+ .timeago {
729
+ font-size: 11px;
730
+ color: $jv-text-soft;
731
+ }
732
+ }
733
+
734
+ // Post title/content
735
+ > a,
736
+ .post-content a,
737
+ p {
738
+ display: block;
739
+ font-size: 13px;
740
+ font-weight: 500;
741
+ color: $jv-text-main;
742
+ text-decoration: none;
743
+ line-height: 1.4;
744
+ margin-bottom: $jv-space-2;
745
+
746
+ // Line clamp
747
+ display: -webkit-box;
748
+ -webkit-line-clamp: 2;
749
+ -webkit-box-orient: vertical;
750
+ overflow: hidden;
751
+
752
+ &:hover {
753
+ color: $jv-primary;
754
+ }
755
+ }
756
+
757
+ // Content preview text
758
+ .post-content,
759
+ .content,
760
+ .text-xs {
761
+ font-size: 12px;
762
+ color: $jv-text-muted;
763
+ line-height: 1.45;
764
+ display: -webkit-box;
765
+ -webkit-line-clamp: 2;
766
+ -webkit-box-orient: vertical;
767
+ overflow: hidden;
768
+ }
769
+
770
+ // Read more link
771
+ a.stretched-link,
772
+ .read-more {
773
+ font-size: 12px;
774
+ font-weight: 600;
775
+ color: $jv-primary;
776
+ text-decoration: none;
777
+ margin-top: $jv-space-2;
778
+ display: inline-block;
779
+
780
+ &:hover {
781
+ text-decoration: underline;
782
+ }
783
+ }
784
+ }
785
+ }
786
+ }
787
+
788
+ // ===========================================================
789
+ // WIDGET HEADER ICONS
790
+ // ===========================================================
791
+ div[data-widget-area="sidebar"] {
792
+ h5, h6, .widget-title {
793
+ display: flex;
794
+ align-items: center;
795
+ gap: $jv-space-2;
796
+
797
+ i {
798
+ font-size: 14px;
799
+ color: $jv-text-soft;
800
+ }
801
+ }
802
+ }
803
+
804
+ // ===========================================================
805
+ // EMPTY STATE
806
+ // ===========================================================
807
+ div[data-widget-area="sidebar"] {
808
+ .empty,
809
+ .no-content {
810
+ padding: $jv-space-8;
811
+ text-align: center;
812
+ color: $jv-text-soft;
813
+ font-size: $jv-font-size-sm;
814
+ }
815
+ }