@okjavis/nodebb-theme-javis 3.0.0 → 3.0.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/package.json +1 -1
- package/scss/_base.scss +114 -0
- package/scss/_cards.scss +22 -69
- package/scss/_composer.scss +140 -41
- package/scss/_feed.scss +121 -64
- package/scss/_header.scss +12 -9
- package/scss/_sidebar-user.scss +25 -5
- package/scss/_sidebar.scss +128 -74
- package/static/lib/theme.js +29 -32
- package/templates/partials/header/brand.tpl +53 -0
- package/templates/partials/topics_list.tpl +11 -20
- package/templates/category.tpl +0 -95
package/scss/_sidebar.scss
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
// ===========================================================
|
|
7
7
|
// JAVIS SIDEBAR LOGO
|
|
8
8
|
// ===========================================================
|
|
9
|
-
// Height should match the sticky header (
|
|
9
|
+
// Height should match the sticky header (56px) for visual alignment
|
|
10
10
|
.javis-sidebar-logo {
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: center;
|
|
14
|
-
height:
|
|
15
|
-
min-height:
|
|
14
|
+
height: 56px; // Match header height (8px + 36px + 8px + border)
|
|
15
|
+
min-height: 56px;
|
|
16
16
|
padding: 0 $jv-space-4; // Only horizontal padding
|
|
17
17
|
margin-bottom: $jv-space-3; // 12px space below border before nav items
|
|
18
18
|
border-bottom: 1px solid $jv-border-subtle;
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
text-decoration: none;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
// Icon logo (collapsed state) -
|
|
29
|
+
// Icon logo (collapsed state) - 36px for better visibility
|
|
30
30
|
.javis-logo-icon {
|
|
31
|
-
width:
|
|
32
|
-
height:
|
|
31
|
+
width: 36px;
|
|
32
|
+
height: 36px;
|
|
33
33
|
object-fit: contain;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
// Full logo (expanded state) - max 140px width,
|
|
36
|
+
// Full logo (expanded state) - max 140px width, 36px height
|
|
37
37
|
.javis-logo-full {
|
|
38
38
|
max-width: 140px;
|
|
39
|
-
height:
|
|
39
|
+
height: 36px;
|
|
40
40
|
object-fit: contain;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
// ===========================================================
|
|
51
51
|
// LEFT SIDEBAR (Main Navigation)
|
|
52
52
|
// ===========================================================
|
|
53
|
+
// Reddit-style wider sidebar (200px) with expanded state as default
|
|
53
54
|
|
|
54
55
|
// Override Bootstrap's bg-light class on sidebar
|
|
55
56
|
.sidebar.bg-light,
|
|
@@ -59,9 +60,18 @@ nav.sidebar.bg-light {
|
|
|
59
60
|
|
|
60
61
|
.sidebar {
|
|
61
62
|
background: $jv-surface !important; // Pure white - cohesive with header
|
|
62
|
-
border-right:
|
|
63
|
+
border-right: none !important; // Clean look - no vertical divider
|
|
63
64
|
padding-top: 0 !important; // Remove top padding so logo sits at top edge
|
|
64
65
|
|
|
66
|
+
// Desktop: Use 270px width when expanded (Reddit-style)
|
|
67
|
+
@media (min-width: 992px) {
|
|
68
|
+
&.open {
|
|
69
|
+
min-width: 270px !important;
|
|
70
|
+
max-width: 270px !important;
|
|
71
|
+
width: 270px !important;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
65
75
|
// Nav items - proper spacing between items
|
|
66
76
|
.nav-item {
|
|
67
77
|
margin-bottom: $jv-space-2; // 4px between nav items - compact like Slack/Discord
|
|
@@ -498,7 +508,8 @@ div[data-widget-area] {
|
|
|
498
508
|
// RIGHT SIDEBAR WIDGET AREA (Reddit-style)
|
|
499
509
|
// ===========================================================
|
|
500
510
|
div[data-widget-area="right"],
|
|
501
|
-
.col-lg-3.col-sm-12
|
|
511
|
+
div[data-widget-area="right"].col-lg-3.col-sm-12,
|
|
512
|
+
.col-lg-3.col-sm-12[data-widget-area="right"] {
|
|
502
513
|
display: flex;
|
|
503
514
|
flex-direction: column;
|
|
504
515
|
|
|
@@ -506,33 +517,49 @@ div[data-widget-area="right"],
|
|
|
506
517
|
position: sticky;
|
|
507
518
|
top: 72px; // Adjust based on your header height
|
|
508
519
|
align-self: flex-start;
|
|
509
|
-
max-height: calc(100vh - 100px); // Account for header + padding
|
|
510
|
-
overflow-y: auto; // Allow scrolling if content is too tall
|
|
511
|
-
|
|
512
|
-
// Smooth scrollbar styling (webkit browsers)
|
|
513
|
-
&::-webkit-scrollbar {
|
|
514
|
-
width: 6px;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
&::-webkit-scrollbar-track {
|
|
518
|
-
background: transparent;
|
|
519
|
-
}
|
|
520
520
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
&:hover {
|
|
526
|
-
background: rgba(0, 0, 0, 0.25);
|
|
527
|
-
}
|
|
528
|
-
}
|
|
521
|
+
// CRITICAL: Remove all overflow/scroll from sidebar and ALL descendants
|
|
522
|
+
overflow: visible !important;
|
|
523
|
+
max-height: none !important;
|
|
529
524
|
|
|
530
525
|
// Widget card container
|
|
531
526
|
> div {
|
|
532
527
|
background: $jv-surface;
|
|
533
528
|
border: 1px solid $jv-border-subtle;
|
|
534
529
|
border-radius: $jv-radius-lg;
|
|
535
|
-
overflow: hidden;
|
|
530
|
+
overflow: hidden; // Hide overflow on card itself
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
// Trending Now widget - needs scrollable content
|
|
534
|
+
> div:has(#recent_posts),
|
|
535
|
+
> div:has(ul[id*="recent"]),
|
|
536
|
+
> div:has(.widget-posts) {
|
|
537
|
+
overflow: hidden !important; // Card clips content
|
|
538
|
+
|
|
539
|
+
// Inner scrollable container
|
|
540
|
+
> div {
|
|
541
|
+
max-height: 500px !important;
|
|
542
|
+
overflow-y: auto !important;
|
|
543
|
+
overflow-x: hidden !important;
|
|
544
|
+
|
|
545
|
+
// Scrollbar styling
|
|
546
|
+
&::-webkit-scrollbar {
|
|
547
|
+
width: 6px;
|
|
548
|
+
}
|
|
549
|
+
&::-webkit-scrollbar-track {
|
|
550
|
+
background: rgba(0, 0, 0, 0.03);
|
|
551
|
+
border-radius: 3px;
|
|
552
|
+
}
|
|
553
|
+
&::-webkit-scrollbar-thumb {
|
|
554
|
+
background: rgba(0, 0, 0, 0.15);
|
|
555
|
+
border-radius: 3px;
|
|
556
|
+
&:hover {
|
|
557
|
+
background: rgba(0, 0, 0, 0.25);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
scrollbar-width: thin;
|
|
561
|
+
scrollbar-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.03);
|
|
562
|
+
}
|
|
536
563
|
}
|
|
537
564
|
|
|
538
565
|
// Widget header/title - clean and simple
|
|
@@ -542,14 +569,19 @@ div[data-widget-area="right"],
|
|
|
542
569
|
text-transform: uppercase;
|
|
543
570
|
letter-spacing: 0.5px;
|
|
544
571
|
color: $jv-text-soft;
|
|
545
|
-
padding: $jv-space-4 $jv-space-
|
|
572
|
+
padding: $jv-space-4 0 $jv-space-3 0 !important; // top right bottom left - no horizontal padding (body handles it)
|
|
546
573
|
margin: 0 !important;
|
|
547
574
|
border-bottom: none !important; // Removed border
|
|
548
575
|
}
|
|
549
576
|
|
|
577
|
+
// Remove hr dividers after widget headers
|
|
578
|
+
hr {
|
|
579
|
+
display: none !important;
|
|
580
|
+
}
|
|
581
|
+
|
|
550
582
|
// Add spacing between widgets
|
|
551
583
|
> div + div {
|
|
552
|
-
margin-top: $jv-space-
|
|
584
|
+
margin-top: $jv-space-3; // Reduced from 16px to 12px
|
|
553
585
|
}
|
|
554
586
|
}
|
|
555
587
|
|
|
@@ -563,30 +595,35 @@ div[data-widget-area="right"] {
|
|
|
563
595
|
border: none !important;
|
|
564
596
|
border-radius: 0 !important;
|
|
565
597
|
overflow: visible !important;
|
|
566
|
-
|
|
567
|
-
//
|
|
568
|
-
h5 {
|
|
569
|
-
padding: $jv-space-3 0 !important;
|
|
570
|
-
border-bottom: none !important;
|
|
571
|
-
}
|
|
598
|
+
padding: 0 $jv-space-4 !important; // Horizontal padding for alignment
|
|
599
|
+
margin-bottom: 0 !important; // Remove extra margin
|
|
572
600
|
}
|
|
573
601
|
|
|
574
602
|
.popular-tags {
|
|
575
603
|
padding: 0 !important;
|
|
576
|
-
margin: 0;
|
|
604
|
+
margin: 0 !important; // Reset all margins
|
|
605
|
+
|
|
606
|
+
// Override Bootstrap mb-3 class
|
|
607
|
+
&.mb-3 {
|
|
608
|
+
margin-bottom: $jv-space-2 !important; // Space between widgets (reduced to 8px)
|
|
609
|
+
}
|
|
577
610
|
}
|
|
578
611
|
|
|
579
612
|
// Override Bootstrap's grid - make it a flowing wrap layout
|
|
580
|
-
.tag-list
|
|
613
|
+
.tag-list,
|
|
614
|
+
.tag-list.row {
|
|
581
615
|
display: flex !important;
|
|
582
616
|
flex-wrap: wrap !important;
|
|
583
617
|
gap: $jv-space-2 !important; // 8px gap between pills
|
|
584
618
|
padding: 0 !important;
|
|
585
619
|
margin: 0 !important;
|
|
620
|
+
margin-left: -$jv-space-3 !important; // Offset to align first pill's text with header (compensate for pill padding)
|
|
621
|
+
margin-bottom: $jv-space-2 !important; // Space between widgets (8px)
|
|
586
622
|
|
|
587
623
|
// Reset Bootstrap row/column styles
|
|
588
624
|
&.row {
|
|
589
|
-
margin:
|
|
625
|
+
margin-left: -$jv-space-3 !important;
|
|
626
|
+
margin-bottom: $jv-space-2 !important;
|
|
590
627
|
display: flex !important;
|
|
591
628
|
flex-wrap: wrap !important;
|
|
592
629
|
}
|
|
@@ -672,43 +709,13 @@ div[data-widget-area="right"] {
|
|
|
672
709
|
}
|
|
673
710
|
|
|
674
711
|
// ===========================================================
|
|
675
|
-
// TRENDING POSTS WIDGET - Widget Essentials
|
|
712
|
+
// TRENDING POSTS WIDGET - Widget Essentials / Recent Posts
|
|
676
713
|
// ===========================================================
|
|
677
714
|
|
|
678
|
-
//
|
|
679
|
-
.overflow-hidden {
|
|
680
|
-
overflow: visible !important;
|
|
681
|
-
}
|
|
682
|
-
|
|
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
|
|
690
|
-
&::-webkit-scrollbar {
|
|
691
|
-
width: 6px;
|
|
692
|
-
}
|
|
693
|
-
&::-webkit-scrollbar-track {
|
|
694
|
-
background: transparent;
|
|
695
|
-
}
|
|
696
|
-
&::-webkit-scrollbar-thumb {
|
|
697
|
-
background: rgba(0, 0, 0, 0.15);
|
|
698
|
-
border-radius: 3px;
|
|
699
|
-
&:hover {
|
|
700
|
-
background: rgba(0, 0, 0, 0.25);
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
// Recent posts container - no scroll here, parent wrapper handles it
|
|
715
|
+
// Recent posts container styling
|
|
706
716
|
#recent_posts,
|
|
707
717
|
ul[id*="recent"] {
|
|
708
|
-
|
|
709
|
-
overflow: visible !important;
|
|
710
|
-
padding: $jv-space-3 !important;
|
|
711
|
-
padding-bottom: $jv-space-5 !important;
|
|
718
|
+
padding: $jv-space-3 $jv-space-4 $jv-space-4 $jv-space-4 !important;
|
|
712
719
|
margin: 0;
|
|
713
720
|
list-style: none;
|
|
714
721
|
display: flex !important;
|
|
@@ -829,4 +836,51 @@ div[data-widget-area="right"] {
|
|
|
829
836
|
}
|
|
830
837
|
}
|
|
831
838
|
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
// ===========================================================
|
|
842
|
+
// CRITICAL: Override ALL overflow rules on right sidebar
|
|
843
|
+
// This MUST be at the end to have highest specificity
|
|
844
|
+
// The selector [data-widget-area=right] gets overflow-y:auto from somewhere
|
|
845
|
+
// ===========================================================
|
|
846
|
+
|
|
847
|
+
// Override the base selector that has overflow-y: auto
|
|
848
|
+
[data-widget-area="right"] {
|
|
849
|
+
overflow: visible !important;
|
|
850
|
+
overflow-y: visible !important;
|
|
851
|
+
overflow-x: visible !important;
|
|
852
|
+
max-height: none !important;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
// More specific selectors to ensure override
|
|
856
|
+
div[data-widget-area="right"],
|
|
857
|
+
.col-lg-3[data-widget-area="right"],
|
|
858
|
+
.col-sm-12[data-widget-area="right"] {
|
|
859
|
+
overflow: visible !important;
|
|
860
|
+
overflow-y: visible !important;
|
|
861
|
+
overflow-x: visible !important;
|
|
862
|
+
max-height: none !important;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
// Override Bootstrap's overflow-hidden utility
|
|
866
|
+
div[data-widget-area="right"] .overflow-hidden,
|
|
867
|
+
[data-widget-area="right"] .overflow-hidden {
|
|
868
|
+
overflow: visible !important;
|
|
869
|
+
overflow-x: visible !important;
|
|
870
|
+
overflow-y: visible !important;
|
|
871
|
+
max-height: none !important;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
// Hide any scrollbar that might appear (as backup)
|
|
875
|
+
[data-widget-area="right"]::-webkit-scrollbar,
|
|
876
|
+
div[data-widget-area="right"]::-webkit-scrollbar {
|
|
877
|
+
display: none !important;
|
|
878
|
+
width: 0 !important;
|
|
879
|
+
height: 0 !important;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
[data-widget-area="right"],
|
|
883
|
+
div[data-widget-area="right"] {
|
|
884
|
+
scrollbar-width: none !important;
|
|
885
|
+
-ms-overflow-style: none !important;
|
|
832
886
|
}
|
package/static/lib/theme.js
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
$(document).ready(function() {
|
|
13
13
|
console.log('JAVIS Community Theme initialized');
|
|
14
14
|
|
|
15
|
-
//
|
|
16
|
-
|
|
15
|
+
// Auto-expand sidebar on desktop (Reddit-style default)
|
|
16
|
+
initSidebarAutoExpand();
|
|
17
17
|
|
|
18
18
|
// Initialize image carousels for posts with multiple images
|
|
19
19
|
initPostImageCarousels();
|
|
@@ -198,41 +198,38 @@
|
|
|
198
198
|
console.log('JAVIS: Created carousel with ' + $images.length + ' images');
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
/**
|
|
202
|
+
* Auto-expand sidebar on desktop (Reddit-style default)
|
|
203
|
+
* The sidebar will be expanded by default on desktop, but users can still toggle it.
|
|
204
|
+
* Their preference is saved and respected on subsequent visits.
|
|
205
|
+
*/
|
|
206
|
+
function initSidebarAutoExpand() {
|
|
207
|
+
// Only run on desktop (min-width: 992px)
|
|
208
|
+
if ($(window).width() < 992) {
|
|
206
209
|
return;
|
|
207
210
|
}
|
|
208
211
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
var $sidebar = $('.sidebar-left');
|
|
213
|
+
if (!$sidebar.length) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
213
216
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
});
|
|
229
|
-
});
|
|
217
|
+
// Check if user has a saved preference (via config.theme.openSidebars)
|
|
218
|
+
// If they've explicitly closed the sidebar before, respect that
|
|
219
|
+
var hasUserPreference = typeof config !== 'undefined' &&
|
|
220
|
+
config.theme &&
|
|
221
|
+
typeof config.theme.openSidebars !== 'undefined';
|
|
222
|
+
|
|
223
|
+
// If sidebar is not already open and user hasn't explicitly closed it, expand it
|
|
224
|
+
if (!$sidebar.hasClass('open')) {
|
|
225
|
+
// If no user preference set, auto-expand (first-time visitors)
|
|
226
|
+
// If user preference is 'on', also expand
|
|
227
|
+
if (!hasUserPreference || config.theme.openSidebars === 'on' || config.theme.openSidebars === true) {
|
|
228
|
+
$sidebar.addClass('open');
|
|
229
|
+
$(window).trigger('action:sidebar.toggle');
|
|
230
|
+
console.log('JAVIS: Auto-expanded sidebar (Reddit-style default)');
|
|
230
231
|
}
|
|
231
|
-
|
|
232
|
-
$(window).trigger('action:sidebar.toggle');
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
console.log('JAVIS: Sidebar toggle initialized');
|
|
232
|
+
}
|
|
236
233
|
}
|
|
237
234
|
|
|
238
235
|
/**
|
|
@@ -1,11 +1,64 @@
|
|
|
1
1
|
{{{ if widgets.brand-header.length }}}
|
|
2
2
|
<div class="container-lg px-md-4 brand-container">
|
|
3
3
|
<div class="col-12 d-flex border-bottom pb-3 {{{ if config.theme.centerHeaderElements }}}justify-content-center{{{ end }}}">
|
|
4
|
+
<!-- Search widget area (left/center) -->
|
|
4
5
|
<div data-widget-area="brand-header" class="flex-fill gap-3 p-2 align-self-center">
|
|
5
6
|
{{{each widgets.brand-header}}}
|
|
6
7
|
{{./html}}
|
|
7
8
|
{{{end}}}
|
|
8
9
|
</div>
|
|
10
|
+
|
|
11
|
+
<!-- Right side: Notifications -->
|
|
12
|
+
<div class="header-right-actions d-flex align-items-center gap-2 ms-auto">
|
|
13
|
+
{{{ if config.loggedIn }}}
|
|
14
|
+
<!-- Notifications dropdown (logged-in users) -->
|
|
15
|
+
<div class="dropdown" component="notifications">
|
|
16
|
+
<a data-bs-toggle="dropdown" href="#" role="button" class="nav-link d-flex align-items-center position-relative p-2 rounded-circle" aria-haspopup="true" aria-expanded="false" aria-label="[[global:header.notifications]]" style="width: 40px; height: 40px; justify-content: center;">
|
|
17
|
+
<span class="position-relative">
|
|
18
|
+
<i component="notifications/icon" class="fa fa-fw fa-lg {{{ if unreadCount.notification}}}fa-bell{{{ else }}}fa-bell-o{{{ end }}}" style="color: #6b7280;"></i>
|
|
19
|
+
<span component="notifications/count" class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger {{{ if !unreadCount.notification }}}hidden{{{ end }}}" style="font-size: 10px; min-width: 18px;">{unreadCount.notification}</span>
|
|
20
|
+
</span>
|
|
21
|
+
</a>
|
|
22
|
+
<ul class="notifications-dropdown dropdown-menu dropdown-menu-end p-1 shadow" role="menu" style="min-width: 320px;">
|
|
23
|
+
<li>
|
|
24
|
+
<div component="notifications/list" class="list-container notification-list overscroll-behavior-contain pe-1 ff-base ghost-scrollbar" style="max-height: 400px; overflow-y: auto;">
|
|
25
|
+
<div class="mb-2 p-1">
|
|
26
|
+
<div class="d-flex gap-1 justify-content-between">
|
|
27
|
+
<div class="d-flex gap-2 flex-grow-1 placeholder-wave">
|
|
28
|
+
<div class="placeholder rounded-circle" style="width: 32px; height: 32px;"></div>
|
|
29
|
+
<div class="flex-grow-1">
|
|
30
|
+
<div class="d-flex flex-column">
|
|
31
|
+
<div class="text-sm">
|
|
32
|
+
<span class="placeholder placeholder-sm col-4"></span>
|
|
33
|
+
<span class="placeholder placeholder-sm col-6"></span>
|
|
34
|
+
<span class="placeholder placeholder-sm col-7"></span>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="text-xs">
|
|
37
|
+
<div class="placeholder placeholder-xs col-6"></div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</li>
|
|
46
|
+
<li class="dropdown-divider"></li>
|
|
47
|
+
<li>
|
|
48
|
+
<div class="d-flex justify-content-center gap-1 flex-wrap p-1">
|
|
49
|
+
<a role="button" href="#" class="btn btn-sm btn-light mark-all-read flex-fill text-nowrap text-truncate"><i class="fa fa-check-double"></i> [[notifications:mark-all-read]]</a>
|
|
50
|
+
<a class="btn btn-sm btn-primary flex-fill text-nowrap text-truncate" href="{relative_path}/notifications"><i class="fa fa-list"></i> [[notifications:see-all]]</a>
|
|
51
|
+
</div>
|
|
52
|
+
</li>
|
|
53
|
+
</ul>
|
|
54
|
+
</div>
|
|
55
|
+
{{{ else }}}
|
|
56
|
+
<!-- Notification icon for guests (redirects to login) -->
|
|
57
|
+
<a href="{relative_path}/login" class="nav-link d-flex align-items-center position-relative p-2 rounded-circle guest-notification-btn" aria-label="[[global:header.notifications]]" title="Sign in to view notifications" style="width: 40px; height: 40px; justify-content: center;">
|
|
58
|
+
<i class="fa fa-fw fa-lg fa-bell-o" style="color: #6b7280;"></i>
|
|
59
|
+
</a>
|
|
60
|
+
{{{ end }}}
|
|
61
|
+
</div>
|
|
9
62
|
</div>
|
|
10
63
|
</div>
|
|
11
64
|
{{{ end }}}
|
|
@@ -69,37 +69,28 @@
|
|
|
69
69
|
</div>
|
|
70
70
|
{{{ end }}}
|
|
71
71
|
|
|
72
|
-
<!--
|
|
72
|
+
<!-- Thumbnail Preview (if exists) -->
|
|
73
73
|
{{{ if ./thumbs.length }}}
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<img src="{./thumbs.0.url}" alt="" loading="lazy" />
|
|
84
|
-
{{{ if ./thumbs.1 }}}
|
|
85
|
-
<span class="thumb-count">+{subtract(./thumbs.length, 1)}</span>
|
|
86
|
-
{{{ end }}}
|
|
87
|
-
</a>
|
|
88
|
-
</div>
|
|
89
|
-
{{{ else }}}
|
|
90
|
-
<!-- Teaser/Preview Content (no image) -->
|
|
74
|
+
<a class="topic-thumbnail" href="{config.relative_path}/topic/{./slug}{{{ if ./bookmark }}}/{./bookmark}{{{ end }}}">
|
|
75
|
+
<img src="{./thumbs.0.url}" alt="" loading="lazy" />
|
|
76
|
+
{{{ if ./thumbs.1 }}}
|
|
77
|
+
<span class="thumb-count">+{subtract(./thumbs.length, 1)}</span>
|
|
78
|
+
{{{ end }}}
|
|
79
|
+
</a>
|
|
80
|
+
{{{ end }}}
|
|
81
|
+
|
|
82
|
+
<!-- Teaser/Preview Content -->
|
|
91
83
|
{{{ if ./teaser.content }}}
|
|
92
84
|
<div class="topic-teaser">
|
|
93
85
|
{./teaser.content}
|
|
94
86
|
</div>
|
|
95
87
|
{{{ end }}}
|
|
96
|
-
{{{ end }}}
|
|
97
88
|
|
|
98
89
|
<!-- Action Bar -->
|
|
99
90
|
<div class="topic-actions">
|
|
100
91
|
<a href="{config.relative_path}/topic/{./slug}" class="action-btn">
|
|
101
92
|
<i class="fa-regular fa-comment"></i>
|
|
102
|
-
<span>{humanReadableNumber(./postcount, 0)}
|
|
93
|
+
<span>{humanReadableNumber(./postcount, 0)} Comments</span>
|
|
103
94
|
</a>
|
|
104
95
|
<button class="action-btn share-btn" data-url="{config.relative_path}/topic/{./slug}">
|
|
105
96
|
<i class="fa fa-share"></i>
|
package/templates/category.tpl
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
<!-- IMPORT partials/breadcrumbs-json-ld.tpl -->
|
|
2
|
-
{{{ if config.theme.enableBreadcrumbs }}}
|
|
3
|
-
<!-- IMPORT partials/breadcrumbs.tpl -->
|
|
4
|
-
{{{ end }}}
|
|
5
|
-
|
|
6
|
-
<div class="category-header d-flex flex-column gap-2">
|
|
7
|
-
<div class="d-flex gap-2 align-items-center mb-1 {{{ if config.theme.centerHeaderElements }}}justify-content-center{{{ end }}}">
|
|
8
|
-
{buildCategoryIcon(@value, "40px", "rounded-1 flex-shrink-0")}
|
|
9
|
-
<h1 class="tracking-tight fs-2 fw-semibold mb-0">{./name}</h1>
|
|
10
|
-
</div>
|
|
11
|
-
{{{ if ./descriptionParsed }}}
|
|
12
|
-
<div class="description text-secondary text-sm w-100 {{{ if config.theme.centerHeaderElements }}}text-center{{{ end }}} line-clamp-4 clamp-fade-4">
|
|
13
|
-
{./descriptionParsed}
|
|
14
|
-
</div>
|
|
15
|
-
{{{ end }}}
|
|
16
|
-
<!-- ActivityPub handle - hidden by default, can show via tooltip -->
|
|
17
|
-
{{{ if ./handleFull }}}
|
|
18
|
-
<div class="activitypub-handle d-none">
|
|
19
|
-
<p class="text-secondary text-sm fst-italic mb-0">
|
|
20
|
-
[[category:handle.description, {handleFull}]]
|
|
21
|
-
<a href="#" class="link-secondary" data-action="copy" data-clipboard-text="{handleFull}"><i class="fa fa-fw fa-copy" aria-hidden="true"></i></a>
|
|
22
|
-
</p>
|
|
23
|
-
</div>
|
|
24
|
-
{{{ end }}}
|
|
25
|
-
<div class="d-flex flex-wrap gap-2 {{{ if config.theme.centerHeaderElements }}}justify-content-center{{{ end }}}">
|
|
26
|
-
<span class="badge text-body border border-gray-300 stats text-xs">
|
|
27
|
-
<span title="{totalTopicCount}" class="fw-bold">{humanReadableNumber(totalTopicCount)}</span>
|
|
28
|
-
<span class="text-lowercase fw-normal">[[global:topics]]</span>
|
|
29
|
-
</span>
|
|
30
|
-
<span class="badge text-body border border-gray-300 stats text-xs">
|
|
31
|
-
<span title="{totalPostCount}" class="fw-bold">{humanReadableNumber(totalPostCount)}</span>
|
|
32
|
-
<span class="text-lowercase fw-normal">[[global:posts]]</span>
|
|
33
|
-
</span>
|
|
34
|
-
{{{ if !isNumber(cid) }}}
|
|
35
|
-
<a href="{./url}" class="badge text-body border border-gray-300 text-xs" data-ajaxify="false">
|
|
36
|
-
<span class="fw-normal">View Original</span>
|
|
37
|
-
<i class="fa fa-external-link"></i>
|
|
38
|
-
</a>
|
|
39
|
-
{{{ end }}}
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
{{{ if widgets.header.length }}}
|
|
44
|
-
<div data-widget-area="header">
|
|
45
|
-
{{{ each widgets.header }}}
|
|
46
|
-
{{widgets.header.html}}
|
|
47
|
-
{{{ end }}}
|
|
48
|
-
</div>
|
|
49
|
-
{{{ end }}}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<div class="row flex-fill mt-3">
|
|
53
|
-
<div class="category d-flex flex-column {{{if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">
|
|
54
|
-
<!-- IMPORT partials/category/subcategory.tpl -->
|
|
55
|
-
{{{ if (topics.length || privileges.topics:create) }}}
|
|
56
|
-
<!-- IMPORT partials/topic-list-bar.tpl -->
|
|
57
|
-
{{{ end }}}
|
|
58
|
-
|
|
59
|
-
{{{ if (./inbox && (./hasFollowers == false)) }}}
|
|
60
|
-
<div class="alert alert-warning mb-4" id="category-no-followers" data-bs-toggle="dropdown" data-bs-target='[component="topic/watch"] button' aria-hidden="true">
|
|
61
|
-
<i class="fa fa-triangle-exclamation pe-2"></i>
|
|
62
|
-
[[category:no-followers]]
|
|
63
|
-
<a href="#" class="stretched-link"></a>
|
|
64
|
-
</div>
|
|
65
|
-
{{{ end }}}
|
|
66
|
-
|
|
67
|
-
{{{ if (!topics.length && privileges.topics:create) }}}
|
|
68
|
-
<div class="alert alert-info" id="category-no-topics">
|
|
69
|
-
[[category:no-topics]]
|
|
70
|
-
</div>
|
|
71
|
-
{{{ end }}}
|
|
72
|
-
|
|
73
|
-
<!-- IMPORT partials/topics_list.tpl -->
|
|
74
|
-
|
|
75
|
-
{{{ if config.usePagination }}}
|
|
76
|
-
<!-- IMPORT partials/paginator.tpl -->
|
|
77
|
-
{{{ end }}}
|
|
78
|
-
</div>
|
|
79
|
-
<div data-widget-area="sidebar" class="col-lg-3 col-sm-12 {{{ if !widgets.sidebar.length }}}hidden{{{ end }}}">
|
|
80
|
-
{{{ each widgets.sidebar }}}
|
|
81
|
-
{{widgets.sidebar.html}}
|
|
82
|
-
{{{ end }}}
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
<div data-widget-area="footer">
|
|
86
|
-
{{{each widgets.footer}}}
|
|
87
|
-
{{widgets.footer.html}}
|
|
88
|
-
{{{end}}}
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
{{{ if !config.usePagination }}}
|
|
92
|
-
<noscript>
|
|
93
|
-
<!-- IMPORT partials/paginator.tpl -->
|
|
94
|
-
</noscript>
|
|
95
|
-
{{{ end }}}
|