@okjavis/nodebb-theme-javis 2.2.0 → 2.4.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/_topic.scss CHANGED
@@ -166,11 +166,9 @@ body.template-topic {
166
166
  }
167
167
  }
168
168
 
169
- // Align the post header row with avatar
169
+ // Align the post header row with avatar (extends base .post-header)
170
170
  .post-header {
171
- min-height: 36px; // Match avatar height
172
- align-items: center !important;
173
- margin-bottom: 0 !important;
171
+ min-height: 36px; // Match avatar height for alignment
174
172
  }
175
173
 
176
174
  .post-container {
@@ -191,9 +189,9 @@ body.template-topic {
191
189
  // ===========================================================
192
190
  .post-header {
193
191
  display: flex;
194
- align-items: center;
192
+ align-items: center !important;
195
193
  gap: $jv-space-2;
196
- margin-bottom: $jv-space-3;
194
+ margin-bottom: 0 !important;
197
195
  font-size: $jv-font-size-xs;
198
196
 
199
197
  .avatar {
@@ -444,10 +442,32 @@ body.template-topic {
444
442
  }
445
443
  }
446
444
 
447
- // Always visible post actions (override Harmony's hover behavior)
448
- .topic .posts [component="post"] [component="post/actions"] {
445
+ // Post actions - show on hover (Reddit/HN style)
446
+ // Uses JS-managed .post-hovered class to prevent bubble to parent posts
447
+ .topic .posts [component="post"] {
448
+ [component="post/actions"] {
449
+ opacity: 0;
450
+ transition: opacity $jv-transition-fast;
451
+ }
452
+
453
+ // Show actions only on the directly hovered post (JS adds .post-hovered class)
454
+ > .post-container-parent.post-hovered [component="post/actions"] {
455
+ opacity: 1;
456
+ }
457
+
458
+ // Always show if user has interacted (voted, bookmarked)
459
+ [component="post/actions"] {
460
+ .upvoted,
461
+ .downvoted,
462
+ .bookmarked {
463
+ opacity: 1;
464
+ }
465
+ }
466
+ }
467
+
468
+ // Keep vote count always visible when there are votes
469
+ .topic .posts [component="post/vote-count"]:not(:empty) {
449
470
  opacity: 1 !important;
450
- visibility: visible !important;
451
471
  }
452
472
 
453
473
  // ===========================================================
@@ -578,9 +598,7 @@ body.template-topic {
578
598
  }
579
599
 
580
600
  [component="topic/reply/container"] {
581
- display: flex;
582
- flex-direction: column;
583
- gap: $jv-space-2;
601
+ width: 100%;
584
602
 
585
603
  .btn-primary {
586
604
  flex: 1;
@@ -589,12 +607,28 @@ body.template-topic {
589
607
  padding: $jv-space-3 $jv-space-4;
590
608
  }
591
609
 
592
- .dropdown-toggle { display: none; }
610
+ // Hide the "Reply as topic" dropdown toggle and menu
611
+ .dropdown-toggle,
612
+ .dropdown-menu {
613
+ display: none !important;
614
+ }
593
615
  }
594
616
 
595
- // Consistent ghost button styling for all sidebar action buttons
617
+ // Sidebar action buttons - full-width, left-aligned (extends base .btn-ghost)
596
618
  .btn-ghost,
597
619
  .bottom-sheet > .btn,
620
+ .thread-tools > .dropdown-toggle {
621
+ text-align: left;
622
+ width: 100%;
623
+ justify-content: flex-start;
624
+
625
+ i {
626
+ width: 16px; // Fixed width for icon alignment
627
+ }
628
+ }
629
+
630
+ // Non-ghost buttons need base ghost styling too
631
+ .bottom-sheet > .btn,
598
632
  .thread-tools > .dropdown-toggle {
599
633
  background: transparent !important;
600
634
  border: 1px solid transparent !important;
@@ -603,15 +637,10 @@ body.template-topic {
603
637
  border-radius: $jv-radius-sm;
604
638
  font-size: $jv-font-size-sm;
605
639
  font-weight: 500;
606
- text-align: left;
607
- width: 100%;
608
- justify-content: flex-start;
609
640
  transition: background-color $jv-transition-fast, color $jv-transition-fast;
610
-
611
- i {
612
- width: 16px;
613
- color: $jv-primary;
614
- }
641
+ display: inline-flex;
642
+ align-items: center;
643
+ gap: $jv-space-2;
615
644
 
616
645
  &:hover {
617
646
  background: $jv-hover-bg !important;
@@ -738,121 +767,143 @@ body.template-topic {
738
767
 
739
768
  // ===========================================================
740
769
  // PARENT POST CONTEXT (shown when viewing a reply)
770
+ // Compact inline style - visually distinct from main posts
741
771
  // ===========================================================
742
772
  [component="post/parent"] {
743
- background: $jv-surface !important;
744
- border: 1px solid $jv-border-subtle !important;
745
- border-left: 3px solid $jv-primary !important;
746
- border-radius: $jv-radius-sm !important;
747
- padding: $jv-space-3 !important;
748
- margin-bottom: $jv-space-3 !important;
749
- transition: background-color $jv-transition-fast, border-color $jv-transition-fast;
773
+ background: transparent !important;
774
+ border: none !important;
775
+ border-left: 2px solid $jv-border-strong !important;
776
+ border-radius: 0 !important;
777
+ padding: $jv-space-1 0 $jv-space-1 $jv-space-3 !important;
778
+ margin-bottom: $jv-space-2 !important;
779
+ margin-left: $jv-space-1 !important;
780
+ transition: border-color $jv-transition-fast;
781
+ cursor: pointer;
782
+ display: flex !important;
783
+ align-items: center !important;
784
+ gap: $jv-space-2 !important;
785
+ flex-direction: row !important;
750
786
 
751
787
  &:hover {
752
- background: $jv-hover-bg !important;
753
- border-color: $jv-border-strong !important;
754
- border-left-color: $jv-primary-hover !important;
755
- }
756
-
757
- // Header row with avatar and metadata
758
- > .d-flex:first-child {
759
- gap: $jv-space-2 !important;
760
- margin-bottom: $jv-space-2;
788
+ border-left-color: $jv-primary !important;
761
789
 
762
- // Small avatar
763
- .avatar,
764
- [component="user/picture"] {
765
- width: 20px !important;
766
- height: 20px !important;
767
- border-radius: 50%;
768
- flex-shrink: 0;
790
+ .fw-semibold {
791
+ color: $jv-primary !important;
769
792
  }
793
+ }
770
794
 
771
- // Username and time
772
- .text-nowrap,
773
- .fw-bold {
774
- font-size: $jv-font-size-xs !important;
775
- font-weight: 600;
776
- color: $jv-text-main;
777
- }
795
+ // Avatar
796
+ .avatar,
797
+ [component="user/picture"] {
798
+ width: 16px !important;
799
+ height: 16px !important;
800
+ border-radius: 50%;
801
+ flex-shrink: 0;
802
+ }
778
803
 
779
- .text-muted {
780
- font-size: $jv-font-size-xs !important;
781
- color: $jv-text-soft !important;
782
- }
804
+ // Username
805
+ .fw-semibold {
806
+ font-size: $jv-font-size-xs !important;
807
+ font-weight: 600;
808
+ color: $jv-text-muted;
809
+ transition: color $jv-transition-fast;
783
810
  }
784
811
 
785
- // Parent content preview
812
+ // Parent content preview - inline, truncated
786
813
  [component="post/parent/content"] {
787
- font-size: $jv-font-size-sm !important;
788
- color: $jv-text-muted !important;
789
- line-height: $jv-line-height-base;
790
- display: -webkit-box;
791
- -webkit-line-clamp: 2;
792
- -webkit-box-orient: vertical;
814
+ font-size: $jv-font-size-xs !important;
815
+ color: $jv-text-soft !important;
816
+ line-height: 1.4;
817
+ white-space: nowrap;
793
818
  overflow: hidden;
819
+ text-overflow: ellipsis;
820
+ flex: 1;
821
+ min-width: 0;
794
822
 
795
823
  p {
796
824
  margin: 0;
825
+ display: inline;
797
826
  }
827
+
828
+ // Hide images in preview
829
+ img {
830
+ display: none;
831
+ }
832
+ }
833
+
834
+ // Hide the nested flex container structure, flatten it
835
+ > .d-flex {
836
+ display: contents !important;
798
837
  }
799
838
  }
800
839
 
801
840
  // ===========================================================
802
- // REPLY COUNT BUTTON (Accordion trigger)
841
+ // POST HIGHLIGHT ANIMATION (when navigating to a post)
842
+ // ===========================================================
843
+ .post-highlight-flash {
844
+ animation: postHighlightFlash 1.5s ease-out;
845
+ }
846
+
847
+ @keyframes postHighlightFlash {
848
+ 0% {
849
+ background-color: rgba($jv-primary, 0.15);
850
+ box-shadow: 0 0 0 4px rgba($jv-primary, 0.1);
851
+ }
852
+ 100% {
853
+ background-color: $jv-surface;
854
+ box-shadow: none;
855
+ }
856
+ }
857
+
858
+ // ===========================================================
859
+ // REPLY COUNT BUTTON (Reddit/Discord style - no border, text link)
803
860
  // ===========================================================
804
861
  [component="post/reply-count"] {
805
- display: inline-flex !important;
862
+ display: inline-flex;
806
863
  align-items: center;
807
864
  gap: $jv-space-2;
808
- background: $jv-surface !important;
809
- border: 1px solid $jv-border-subtle !important;
810
- border-radius: $jv-radius-pill !important;
811
- padding: $jv-space-1 $jv-space-3 !important;
865
+ background: transparent !important;
866
+ border: none !important;
867
+ border-radius: $jv-radius-sm !important;
868
+ padding: $jv-space-1 $jv-space-2 !important;
812
869
  font-size: $jv-font-size-xs !important;
813
870
  color: $jv-text-muted !important;
814
871
  cursor: pointer;
815
872
  transition: all $jv-transition-fast;
873
+ text-decoration: none !important;
816
874
 
817
- &:hover {
818
- background: $jv-hover-bg !important;
819
- border-color: $jv-border-strong !important;
820
- color: $jv-text-main !important;
875
+ // Respect the hidden class when there are no replies
876
+ &.hidden {
877
+ display: none !important;
821
878
  }
822
879
 
823
- // Avatar stack
824
- [component="post/reply-count/avatars"] {
825
- display: flex;
826
- align-items: center;
827
-
828
- span {
829
- margin-left: -4px;
880
+ &:hover {
881
+ background: $jv-hover-bg !important;
882
+ color: $jv-primary !important;
830
883
 
831
- &:first-child {
832
- margin-left: 0;
833
- }
884
+ [component="post/reply-count/text"],
885
+ .replies-count {
886
+ color: $jv-primary !important;
834
887
  }
888
+ }
835
889
 
836
- .avatar,
837
- img {
838
- width: 18px !important;
839
- height: 18px !important;
840
- border-radius: 50%;
841
- border: 2px solid $jv-surface;
842
- }
890
+ // Hide avatars - cleaner look like Reddit
891
+ [component="post/reply-count/avatars"] {
892
+ display: none !important;
843
893
  }
844
894
 
845
- // Reply count text
895
+ // Reply count text - simple and clean
846
896
  .replies-count,
847
897
  [component="post/reply-count/text"] {
848
898
  font-weight: 600;
849
- color: $jv-text-main;
899
+ font-size: $jv-font-size-xs;
900
+ color: $jv-text-muted;
901
+ transition: color $jv-transition-fast;
850
902
  }
851
903
 
852
- // Last reply time
904
+ // Hide last reply time - too verbose
853
905
  .replies-last {
854
- color: $jv-text-soft;
855
- font-size: $jv-font-size-xs;
906
+ display: none !important;
856
907
  }
857
908
 
858
909
  // Chevron icon
@@ -864,80 +915,86 @@ body.template-topic {
864
915
 
865
916
  // Expanded state
866
917
  &[aria-expanded="true"] {
918
+ color: $jv-primary !important;
919
+
867
920
  .fa-chevron-down {
868
921
  transform: rotate(180deg);
869
922
  }
923
+
924
+ [component="post/reply-count/text"],
925
+ .replies-count {
926
+ color: $jv-primary !important;
927
+ }
870
928
  }
871
929
  }
872
930
 
873
931
  // ===========================================================
874
- // NESTED REPLIES CONTAINER (Threaded style)
932
+ // NESTED REPLIES CONTAINER (Clean threaded style)
933
+ // Inspired by Reddit/GitHub - compact, minimal
875
934
  // ===========================================================
876
935
  [component="post/replies/container"] {
877
936
  margin-top: $jv-space-3 !important;
878
937
  margin-bottom: 0 !important;
879
- margin-left: $jv-space-6;
938
+ margin-left: $jv-space-4;
880
939
  padding: 0 !important;
881
940
  background: transparent !important;
882
941
  border: none !important;
883
942
  border-radius: 0 !important;
884
943
  position: relative;
885
944
 
886
- // Thread line
945
+ // Simple thread line
887
946
  &::before {
888
947
  content: "";
889
948
  position: absolute;
890
- left: -$jv-space-4;
949
+ left: -$jv-space-2;
891
950
  top: 0;
892
- bottom: $jv-space-4;
951
+ bottom: 0;
893
952
  width: 2px;
894
953
  background: $jv-border-subtle;
895
954
  border-radius: 1px;
955
+ transition: background $jv-transition-fast;
956
+ }
957
+
958
+ // Hover effect on thread line
959
+ &:hover::before {
960
+ background: $jv-border-strong;
896
961
  }
897
962
 
898
- // Replies list
963
+ // Replies list - compact spacing
899
964
  [component="post/replies"],
900
965
  ul.list-unstyled {
901
966
  margin: 0;
902
967
  padding: 0;
903
968
  display: flex;
904
969
  flex-direction: column;
905
- gap: $jv-space-3;
970
+ gap: $jv-space-2;
906
971
  }
907
972
 
908
- // Individual reply posts
973
+ // Individual reply posts - clean, compact
909
974
  [component="post"] {
910
975
  margin: 0 !important;
911
976
  padding: 0 !important;
912
977
  background: transparent !important;
913
978
  position: relative;
914
979
 
915
- // Thread connector dot
980
+ // No connector dots
916
981
  &::before {
917
- content: "";
918
- position: absolute;
919
- left: -$jv-space-4 - 3px;
920
- top: $jv-space-4;
921
- width: 8px;
922
- height: 8px;
923
- background: $jv-surface;
924
- border: 2px solid $jv-border-strong;
925
- border-radius: 50%;
926
- z-index: 1;
982
+ display: none !important;
927
983
  }
928
984
 
929
- // Reply card
985
+ // Reply container - compact padding
930
986
  .post-container-parent {
931
- background: $jv-surface !important;
932
- border: 1px solid $jv-border-subtle !important;
987
+ background: transparent !important;
988
+ border: none !important;
933
989
  border-radius: $jv-radius-sm !important;
934
- padding: $jv-space-3 !important;
990
+ padding: $jv-space-2 $jv-space-3 !important;
991
+ margin-left: 0;
992
+ margin-right: 0;
935
993
  gap: $jv-space-2 !important;
936
- transition: border-color $jv-transition-fast, box-shadow $jv-transition-fast;
994
+ transition: background $jv-transition-fast;
937
995
 
938
996
  &:hover {
939
- border-color: $jv-border-strong !important;
940
- box-shadow: $jv-shadow-sm;
997
+ background: $jv-hover-bg !important;
941
998
  }
942
999
 
943
1000
  // Smaller avatar for replies
@@ -945,8 +1002,8 @@ body.template-topic {
945
1002
  > div:first-child {
946
1003
  .avatar,
947
1004
  [component="user/picture"] {
948
- width: 28px !important;
949
- height: 28px !important;
1005
+ width: 20px !important;
1006
+ height: 20px !important;
950
1007
  }
951
1008
  }
952
1009
  }
@@ -958,16 +1015,20 @@ body.template-topic {
958
1015
  border: none !important;
959
1016
  }
960
1017
 
961
- // Reply header
1018
+ // Reply header - inline, compact
962
1019
  .post-header {
963
1020
  font-size: $jv-font-size-xs !important;
964
1021
  min-height: auto !important;
965
- margin-bottom: $jv-space-1 !important;
1022
+ margin-bottom: 0 !important;
1023
+ display: flex;
1024
+ align-items: center;
1025
+ gap: $jv-space-2;
966
1026
 
967
1027
  .fw-bold,
968
1028
  a[data-username] {
969
1029
  font-size: $jv-font-size-xs !important;
970
1030
  font-weight: 600;
1031
+ color: $jv-text-main;
971
1032
  }
972
1033
 
973
1034
  .text-muted {
@@ -980,22 +1041,22 @@ body.template-topic {
980
1041
  }
981
1042
  }
982
1043
 
983
- // Reply content
1044
+ // Reply content - tighter
984
1045
  [component="post/content"] {
985
1046
  font-size: $jv-font-size-sm !important;
986
1047
  line-height: $jv-line-height-base;
1048
+ color: $jv-text-main;
1049
+ margin-top: $jv-space-1;
987
1050
  }
988
1051
 
989
- // Reply footer/actions
1052
+ // Reply footer - override main post styles (no border, tighter spacing)
990
1053
  [component="post/footer"],
991
1054
  .post-footer {
992
- margin-top: $jv-space-2 !important;
993
- padding-top: $jv-space-2 !important;
994
- padding-bottom: 0 !important;
995
- border-top: 1px solid $jv-border-subtle !important;
996
- border-bottom: none !important;
1055
+ margin-top: $jv-space-1 !important;
1056
+ border-top: none !important;
997
1057
  }
998
1058
 
1059
+ // Smaller action buttons for compact reply layout (inherits opacity/hover behavior from main rule)
999
1060
  [component="post/actions"] {
1000
1061
  gap: $jv-space-1 !important;
1001
1062
 
@@ -1005,15 +1066,10 @@ body.template-topic {
1005
1066
  font-size: $jv-font-size-xs !important;
1006
1067
 
1007
1068
  i {
1008
- font-size: 14px !important;
1069
+ font-size: 12px !important;
1009
1070
  }
1010
1071
  }
1011
1072
  }
1012
-
1013
- // Last reply - no bottom spacing on thread line
1014
- &:last-child::before {
1015
- display: block !important;
1016
- }
1017
1073
  }
1018
1074
  }
1019
1075
  }
@@ -1061,33 +1117,23 @@ body.template-topic {
1061
1117
 
1062
1118
  // Mobile adjustments for threaded replies
1063
1119
  [component="post/replies/container"] {
1064
- margin-left: $jv-space-4;
1120
+ margin-left: $jv-space-3;
1065
1121
 
1066
1122
  &::before {
1067
- left: -$jv-space-3;
1123
+ left: -$jv-space-2;
1068
1124
  }
1069
1125
 
1070
- [component="post"] {
1071
- &::before {
1072
- left: -$jv-space-3 - 3px;
1073
- }
1126
+ [component="post"] .post-container-parent {
1127
+ padding: $jv-space-2 $jv-space-3 !important;
1128
+ margin-left: 0;
1129
+ margin-right: 0;
1074
1130
  }
1075
1131
  }
1076
1132
 
1077
1133
  // Mobile adjustments for parent context
1078
1134
  [component="post/parent"] {
1079
- padding: $jv-space-2 !important;
1080
-
1081
- [component="post/parent/content"] {
1082
- -webkit-line-clamp: 1;
1083
- }
1084
- }
1085
-
1086
- // Mobile reply count button
1087
- [component="post/reply-count"] {
1088
- .replies-last {
1089
- display: none !important;
1090
- }
1135
+ padding: $jv-space-1 0 $jv-space-1 $jv-space-2 !important;
1136
+ margin-left: 0 !important;
1091
1137
  }
1092
1138
  }
1093
1139
  }