@okjavis/nodebb-theme-javis 1.6.0 → 2.0.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.
@@ -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
- 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
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,40 +26,42 @@
22
26
  text-decoration: none;
23
27
  }
24
28
 
25
- // Icon logo (collapsed state) - 32x32px
29
+ // Icon logo (collapsed state) - 28px to match header logo
26
30
  .javis-logo-icon {
27
- width: 32px;
28
- height: 32px;
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: 32px;
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 $jv-space-10; // 12px vertical, 20px horizontal when expanded
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
 
54
- // Main navigation list
55
- #main-nav {
56
- // No gap class - we control spacing per nav-item instead
57
- }
58
-
59
65
  // Nav items - proper spacing between items
60
66
  .nav-item {
61
67
  margin-bottom: $jv-space-2; // 4px between nav items - compact like Slack/Discord
@@ -177,151 +183,6 @@ div[data-widget-area] {
177
183
  }
178
184
  }
179
185
 
180
- // Widget titles
181
- .widget-title,
182
- div[data-widget-area] h5,
183
- div[data-widget-area] h6,
184
- div[data-widget-area="right"] h5,
185
- div[data-widget-area="right"] h8 {
186
- font-size: 14px;
187
- font-weight: 700;
188
- margin-bottom: $jv-space-6;
189
- color: $jv-text-main;
190
- text-transform: uppercase;
191
- letter-spacing: 0.3px;
192
- }
193
-
194
- // ===========================================================
195
- // TRENDING TAGS
196
- // ===========================================================
197
-
198
- .popular-tags {
199
- gap: 6px;
200
-
201
- .tag-list > div {
202
- background: $jv-surface;
203
- border: 1px solid $jv-border-subtle;
204
- border-radius: 10px;
205
- padding: 10px 12px;
206
- font-size: 14px;
207
- color: $jv-text-main;
208
- display: flex;
209
- flex-direction: column;
210
- gap: 2px;
211
- cursor: pointer;
212
- transition: border-color $jv-transition-fast, background-color $jv-transition-fast; // Modern transitions
213
-
214
- &:hover {
215
- border-color: $jv-border-strong; // Consistent border
216
- background: $jv-hover-bg; // Consistent hover state
217
- }
218
-
219
- // Focus state for accessibility
220
- &:focus-visible {
221
- outline: none;
222
- box-shadow: $jv-focus-ring;
223
- }
224
-
225
- small {
226
- color: $jv-text-muted;
227
- font-size: $jv-font-size-xs;
228
- }
229
- }
230
- }
231
-
232
- // ===========================================================
233
- // TRENDING NOW
234
- // ===========================================================
235
-
236
- #recent_posts {
237
- display: flex;
238
- flex-direction: column;
239
- gap: 10px;
240
- margin-top: $jv-space-6;
241
-
242
- li.widget-posts {
243
- background: $jv-surface;
244
- border: 1px solid rgba(0,0,0,0.05);
245
- border-radius: $jv-radius-md;
246
- padding: 10px 14px;
247
- display: flex;
248
- flex-direction: column;
249
- gap: $jv-space-4;
250
- transition: $jv-transition-shadow, border-color $jv-transition-fast; // Modern transitions
251
-
252
- &:hover {
253
- border-color: $jv-border-strong; // Consistent border
254
- box-shadow: $jv-shadow-sm; // shadcn subtle shadow
255
- }
256
-
257
- // Focus state for accessibility
258
- &:focus-within {
259
- outline: none;
260
- box-shadow: $jv-shadow-md, $jv-focus-ring;
261
- }
262
-
263
- // Meta info
264
- .d-flex.gap-2,
265
- .timeago {
266
- font-size: $jv-font-size-xs;
267
- color: $jv-text-muted;
268
- }
269
-
270
- // Title inside mini post
271
- a {
272
- font-size: 14px;
273
- font-weight: 500;
274
- color: $jv-text-main;
275
- text-decoration: none;
276
- line-height: $jv-line-height-tight;
277
-
278
- &:hover {
279
- color: $jv-primary;
280
- }
281
- }
282
-
283
- // 2-line clamp for content preview
284
- p,
285
- .content {
286
- display: -webkit-box;
287
- -webkit-line-clamp: 2;
288
- -webkit-box-orient: vertical;
289
- overflow: hidden;
290
- font-size: $jv-font-size-sm;
291
- color: $jv-text-muted;
292
- margin: 0;
293
- }
294
-
295
- // Read more alignment
296
- a.stretched-link {
297
- font-size: $jv-font-size-xs;
298
- color: $jv-primary;
299
- }
300
- }
301
- }
302
-
303
- // ===========================================================
304
- // SEARCH WIDGET
305
- // ===========================================================
306
- .search-widget {
307
- .input-group {
308
- display: flex;
309
-
310
- .form-control {
311
- flex: 1;
312
- border-top-right-radius: 0;
313
- border-bottom-right-radius: 0;
314
- border-right: none;
315
- }
316
-
317
- .btn {
318
- border-top-left-radius: 0;
319
- border-bottom-left-radius: 0;
320
- padding: 8px 14px;
321
- }
322
- }
323
- }
324
-
325
186
  // ===========================================================
326
187
  // ONLINE USERS WIDGET
327
188
  // ===========================================================
@@ -643,7 +504,7 @@ div[data-widget-area="right"],
643
504
 
644
505
  // Sticky positioning - stays visible when scrolling
645
506
  position: sticky;
646
- top: 80px; // Adjust based on your header height
507
+ top: 48px; // Adjust based on your header height
647
508
  align-self: flex-start;
648
509
  max-height: calc(100vh - 100px); // Account for header + padding
649
510
  overflow-y: auto; // Allow scrolling if content is too tall
@@ -681,9 +542,9 @@ div[data-widget-area="right"],
681
542
  text-transform: uppercase;
682
543
  letter-spacing: 0.5px;
683
544
  color: $jv-text-soft;
684
- padding: $jv-space-4 $jv-space-4;
685
- margin: 0 0 $jv-space-4 0 !important;
686
- border-bottom: 1px solid $jv-border-subtle;
545
+ padding: $jv-space-4 $jv-space-4 $jv-space-4 $jv-space-4;
546
+ margin: 0 !important;
547
+ border-bottom: none !important; // Removed border
687
548
  }
688
549
 
689
550
  // Add spacing between widgets
@@ -693,136 +554,279 @@ div[data-widget-area="right"],
693
554
  }
694
555
 
695
556
  // ===========================================================
696
- // POPULAR TAGS WIDGET (Sidebar) - Reddit-style vertical list
557
+ // TRENDING TAGS WIDGET (Sidebar) - Pill-style flowing tags
697
558
  // ===========================================================
698
559
  div[data-widget-area="right"] {
560
+ // Remove outer card for tags widget - let it flow directly
561
+ > div:has(.popular-tags) {
562
+ background: transparent !important;
563
+ border: none !important;
564
+ border-radius: 0 !important;
565
+ overflow: visible !important;
566
+
567
+ // Keep the header styled
568
+ h5 {
569
+ padding: $jv-space-3 0 !important;
570
+ border-bottom: none !important;
571
+ }
572
+ }
573
+
699
574
  .popular-tags {
700
- width: 100% !important;
575
+ padding: 0 !important;
576
+ margin: 0;
701
577
  }
702
578
 
579
+ // Override Bootstrap's grid - make it a flowing wrap layout
703
580
  .tag-list {
581
+ display: flex !important;
582
+ flex-wrap: wrap !important;
583
+ gap: $jv-space-2 !important; // 8px gap between pills
704
584
  padding: 0 !important;
705
585
  margin: 0 !important;
706
- width: 100% !important;
707
-
708
- // Override Bootstrap grid classes to force vertical layout
709
- display: flex !important;
710
- flex-direction: column !important;
711
586
 
712
- // Remove any grid/row styling
587
+ // Reset Bootstrap row/column styles
713
588
  &.row {
714
- --bs-gutter-x: 0 !important;
715
- --bs-gutter-y: 0 !important;
716
589
  margin: 0 !important;
590
+ display: flex !important;
591
+ flex-wrap: wrap !important;
717
592
  }
718
593
 
719
- // Force each tag to be full width (override col classes)
720
- > * {
721
- width: 100% !important;
722
- max-width: 100% !important;
723
- flex: 0 0 100% !important;
594
+ // Reset column divs - let them be inline
595
+ > div {
596
+ flex: none !important;
597
+ width: auto !important;
724
598
  padding: 0 !important;
599
+ margin: 0 !important;
600
+ max-width: none !important;
725
601
  }
726
602
 
603
+ // Style each tag as a compact pill
727
604
  .btn-ghost,
728
605
  a.btn-ghost {
729
- display: flex !important;
730
- flex-direction: column !important;
731
- align-items: flex-start !important;
732
- background: transparent !important;
733
- border: none !important;
734
- border-radius: 0 !important;
735
- padding: $jv-space-3 $jv-space-4 !important;
736
- transition: background-color $jv-transition-fast !important;
737
- text-align: left !important;
738
- width: 100% !important;
739
- margin: 0 !important;
606
+ display: inline-flex !important;
607
+ flex-direction: row !important;
608
+ align-items: center !important;
609
+ gap: $jv-space-1 !important; // 4px between tag name and count
610
+ background: rgba(0, 0, 0, 0.04) !important;
611
+ border: 1px solid transparent !important;
612
+ border-radius: $jv-radius-pill !important;
613
+ // [Enhancement 5] Increased padding for better touch targets
614
+ padding: $jv-space-2 $jv-space-3 !important; // 8px vertical, 12px horizontal
615
+ transition: all $jv-transition-fast !important;
616
+ text-decoration: none !important;
617
+ width: auto !important;
618
+ min-height: auto !important;
740
619
 
741
620
  &:hover {
742
- background: $jv-hover-bg !important;
621
+ background: $jv-primary-soft !important;
622
+ color: $jv-primary !important;
623
+ // [Enhancement 6] Subtle shadow on hover
624
+ box-shadow: $jv-shadow-xs !important;
625
+ transform: translateY(-1px);
626
+
627
+ .tag-item {
628
+ color: $jv-primary !important;
629
+ }
630
+
631
+ .tag-topic-count {
632
+ color: $jv-primary !important;
633
+ opacity: 0.7;
634
+ }
635
+ }
636
+
637
+ &:focus-visible {
638
+ outline: none;
639
+ box-shadow: $jv-focus-ring;
743
640
  }
744
641
 
745
642
  .tag-item {
746
- font-size: 14px !important;
747
- font-weight: 600 !important;
643
+ font-size: $jv-font-size-xs !important; // 12px
644
+ font-weight: 500 !important;
748
645
  color: $jv-text-main !important;
749
- margin-bottom: $jv-space-1 !important;
646
+ line-height: 1.2 !important;
647
+ margin: 0 !important;
648
+
649
+ // [Enhancement 2] Add # icon before tag name
650
+ &::before {
651
+ content: "#";
652
+ color: $jv-text-soft;
653
+ margin-right: 2px;
654
+ font-weight: 400;
655
+ }
750
656
  }
751
657
 
752
658
  .tag-topic-count {
753
- font-size: 12px !important;
754
- font-weight: 400 !important;
755
- color: $jv-text-soft !important;
659
+ display: none !important;
660
+ }
661
+
662
+ // [Enhancement 3] Color-code tags by popularity
663
+ // Tags with topics get slightly darker background
664
+ &[data-tag]:not([data-count="0"]) {
665
+ background: rgba(0, 0, 0, 0.06) !important;
666
+
667
+ .tag-item {
668
+ font-weight: 600 !important;
669
+ }
756
670
  }
757
671
  }
758
672
  }
759
673
 
760
- }
674
+ // ===========================================================
675
+ // TRENDING POSTS WIDGET - Widget Essentials Specific
676
+ // ===========================================================
761
677
 
762
- // ===========================================================
763
- // RECENT/TRENDING POSTS WIDGET (Sidebar) - Widget Essentials Specific
764
- // ===========================================================
765
- div[data-widget-area="right"] {
766
- // Recent posts container with scrolling
767
- #recent_posts,
768
- ul[id*="recent"] {
769
- max-height: 400px;
770
- overflow-y: auto;
771
- padding: 0;
772
- margin: 0;
678
+ // Override Bootstrap's overflow-hidden on wrapper divs
679
+ .overflow-hidden {
680
+ overflow: visible !important;
681
+ }
773
682
 
774
- // Smooth scrollbar
683
+ // The wrapper div after h5 (Trending Posts header) - make it scrollable
684
+ h5 + div {
685
+ max-height: 420px;
686
+ overflow-y: auto !important;
687
+ overflow-x: hidden !important;
688
+
689
+ // Scrollbar styling
775
690
  &::-webkit-scrollbar {
776
- width: 4px;
691
+ width: 6px;
777
692
  }
778
-
779
693
  &::-webkit-scrollbar-track {
780
694
  background: transparent;
781
695
  }
782
-
783
696
  &::-webkit-scrollbar-thumb {
784
697
  background: rgba(0, 0, 0, 0.15);
785
- border-radius: 2px;
786
-
698
+ border-radius: 3px;
787
699
  &:hover {
788
700
  background: rgba(0, 0, 0, 0.25);
789
701
  }
790
702
  }
791
703
  }
792
704
 
705
+ // Recent posts container - no scroll here, parent wrapper handles it
706
+ #recent_posts,
707
+ ul[id*="recent"] {
708
+ max-height: none !important;
709
+ overflow: visible !important;
710
+ padding: $jv-space-3 !important;
711
+ padding-bottom: $jv-space-5 !important;
712
+ margin: 0;
713
+ list-style: none;
714
+ display: flex !important;
715
+ flex-direction: column !important;
716
+ gap: $jv-space-3 !important;
717
+ }
718
+
793
719
  // Style the actual widget-posts items
794
720
  .widget-posts {
795
721
  padding: $jv-space-3 $jv-space-4 !important;
796
- transition: background-color $jv-transition-fast !important;
797
- border-bottom: 1px solid $jv-border-subtle !important;
722
+ transition: $jv-transition-shadow, border-color $jv-transition-fast !important;
723
+ border: 1px solid rgba(0,0,0,0.05) !important;
724
+ border-radius: $jv-radius-md !important;
725
+ background: $jv-surface !important;
726
+ cursor: pointer;
727
+ flex-shrink: 0 !important;
728
+ display: flex !important;
729
+ flex-direction: column !important;
730
+ gap: $jv-space-3 !important;
798
731
 
799
- &:last-child {
800
- border-bottom: none !important;
732
+ &:hover {
733
+ border-color: $jv-border-strong !important;
734
+ box-shadow: $jv-shadow-sm;
801
735
  }
802
736
 
803
- &:hover {
804
- background: $jv-hover-bg !important;
737
+ &:focus-within {
738
+ outline: none;
739
+ box-shadow: $jv-shadow-md, $jv-focus-ring;
740
+ }
741
+
742
+ // Hide hr elements
743
+ hr {
744
+ display: none !important;
745
+ }
746
+
747
+ // Meta info row (author + timeago)
748
+ .d-flex.gap-2 {
749
+ display: flex !important;
750
+ align-items: center !important;
751
+ gap: $jv-space-2 !important;
752
+ font-size: $jv-font-size-xs;
753
+ color: $jv-text-muted;
754
+ flex-wrap: nowrap;
755
+ }
756
+
757
+ .timeago {
758
+ font-size: $jv-font-size-xs;
759
+ color: $jv-text-soft;
805
760
  }
806
761
 
807
762
  .post-author a {
808
- font-size: 12px !important;
763
+ font-size: $jv-font-size-xs !important;
809
764
  font-weight: 500 !important;
810
765
  color: $jv-text-main !important;
811
766
  }
812
767
 
768
+ // Title link
769
+ a {
770
+ font-size: 14px;
771
+ font-weight: 500;
772
+ color: $jv-text-main;
773
+ text-decoration: none;
774
+ line-height: $jv-line-height-tight;
775
+
776
+ &:hover {
777
+ color: $jv-primary;
778
+ }
779
+ }
780
+
781
+ // Content preview
782
+ p,
783
+ .content,
813
784
  .line-clamp-6 {
814
- font-size: 13px !important;
815
- font-weight: 400 !important;
816
- color: $jv-text-main !important;
817
- line-height: 1.5 !important;
785
+ display: -webkit-box;
786
+ -webkit-line-clamp: 3;
787
+ -webkit-box-orient: vertical;
788
+ overflow: hidden;
789
+ font-size: $jv-font-size-sm !important;
790
+ color: $jv-text-muted !important;
791
+ line-height: $jv-line-height-base !important;
792
+ margin: 0;
818
793
  }
819
794
 
820
- .post-preview-footer a {
821
- font-size: 12px !important;
822
- font-weight: 500 !important;
823
- color: $jv-primary !important;
824
- text-decoration: none !important;
795
+ // Read more link
796
+ a.stretched-link {
797
+ font-size: $jv-font-size-xs;
798
+ color: $jv-primary;
825
799
  }
826
- }
827
- }
828
800
 
801
+ // Footer with "read more" link
802
+ .post-preview-footer {
803
+ margin-top: auto;
804
+
805
+ a {
806
+ font-size: $jv-font-size-xs !important;
807
+ font-weight: 600 !important;
808
+ color: $jv-primary !important;
809
+ text-decoration: none !important;
810
+ transition: color $jv-transition-fast !important;
811
+ display: inline-flex;
812
+ align-items: center;
813
+ gap: $jv-space-1;
814
+
815
+ &:hover {
816
+ color: $jv-primary-hover !important;
817
+ text-decoration: underline !important;
818
+ }
819
+
820
+ &::after {
821
+ content: "→";
822
+ font-size: inherit;
823
+ transition: transform $jv-transition-fast;
824
+ }
825
+
826
+ &:hover::after {
827
+ transform: translateX(2px);
828
+ }
829
+ }
830
+ }
831
+ }
832
+ }