@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,610 @@
1
+ // ===========================================================
2
+ // FEED PLUGIN – Reddit-Style Post Cards
3
+ // Styles for nodebb-plugin-feed (/feed route)
4
+ // ===========================================================
5
+
6
+ // ===========================================================
7
+ // FEED CONTAINER
8
+ // ===========================================================
9
+ .feed {
10
+ // Header controls row
11
+ .d-flex.justify-content-between.py-2.mb-2 {
12
+ padding: $jv-space-4 0 !important;
13
+ margin-bottom: $jv-space-6 !important;
14
+
15
+ // New Topic button
16
+ #new_topic,
17
+ .btn-primary {
18
+ font-weight: 600;
19
+ padding: 10px 20px;
20
+ border-radius: $jv-radius-sm;
21
+ }
22
+
23
+ // Settings dropdown button
24
+ #options-dropdown {
25
+ .btn-ghost {
26
+ background: $jv-surface;
27
+ border: 1px solid $jv-border-subtle;
28
+ border-radius: $jv-radius-sm;
29
+ padding: 8px 12px;
30
+
31
+ &:hover {
32
+ background: rgba(0, 0, 0, 0.02);
33
+ border-color: $jv-border-strong;
34
+ }
35
+ }
36
+
37
+ .dropdown-menu {
38
+ background: $jv-surface;
39
+ border: 1px solid $jv-border-subtle;
40
+ border-radius: $jv-radius-md;
41
+ box-shadow: $jv-shadow-card;
42
+ padding: $jv-space-2;
43
+ }
44
+ }
45
+ }
46
+
47
+ // Empty state alert
48
+ .alert-warning {
49
+ background: $jv-surface;
50
+ border: 1px solid $jv-border-subtle;
51
+ border-radius: $jv-radius-lg;
52
+ color: $jv-text-muted;
53
+ padding: $jv-space-12;
54
+ }
55
+ }
56
+
57
+ // ===========================================================
58
+ // POSTS LIST
59
+ // ===========================================================
60
+ .feed ul[component="posts"] {
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 0;
64
+ padding: 0;
65
+ margin: 0;
66
+ list-style: none;
67
+ }
68
+
69
+ // ===========================================================
70
+ // POST CARD – Main Styling
71
+ // ===========================================================
72
+ .feed li[component="post"].posts-list-item {
73
+ background: $jv-surface !important;
74
+ border: 1px solid $jv-border-subtle !important;
75
+ border-radius: $jv-radius-lg !important;
76
+ margin-bottom: $jv-space-4 !important;
77
+ box-shadow: none !important;
78
+ overflow: hidden;
79
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
80
+
81
+ &:hover {
82
+ border-color: $jv-border-strong !important;
83
+ box-shadow: $jv-shadow-soft !important;
84
+ }
85
+
86
+ // Deleted state
87
+ &.deleted {
88
+ opacity: 0.5;
89
+ }
90
+
91
+ // Scheduled state
92
+ &.scheduled {
93
+ border-left: 3px solid #f59e0b;
94
+ }
95
+ }
96
+
97
+ // ===========================================================
98
+ // THUMBNAIL IMAGE
99
+ // ===========================================================
100
+ .feed li[component="post"].posts-list-item {
101
+ > .p-1.position-relative {
102
+ padding: 0 !important;
103
+
104
+ .overflow-hidden {
105
+ border-radius: $jv-radius-lg $jv-radius-lg 0 0 !important;
106
+ max-height: 350px !important;
107
+
108
+ img {
109
+ width: 100%;
110
+ object-fit: cover;
111
+ }
112
+ }
113
+
114
+ // Additional thumbnails
115
+ .position-absolute {
116
+ padding: $jv-space-4 !important;
117
+
118
+ img {
119
+ border: 2px solid $jv-surface;
120
+ box-shadow: $jv-shadow-soft;
121
+ }
122
+ }
123
+ }
124
+ }
125
+
126
+ // ===========================================================
127
+ // POST CONTENT AREA
128
+ // ===========================================================
129
+ .feed li[component="post"].posts-list-item {
130
+ > .d-flex.gap-2.p-3 {
131
+ padding: $jv-space-6 !important;
132
+ gap: $jv-space-4 !important;
133
+ }
134
+
135
+ // Avatar
136
+ .d-none.d-lg-block {
137
+ .avatar,
138
+ img[class*="avatar"] {
139
+ width: 44px !important;
140
+ height: 44px !important;
141
+ border-radius: 50% !important;
142
+ object-fit: cover;
143
+ border: 2px solid rgba(0, 0, 0, 0.05);
144
+ }
145
+ }
146
+
147
+ // Post body
148
+ .post-body {
149
+ gap: $jv-space-4 !important;
150
+ }
151
+ }
152
+
153
+ // ===========================================================
154
+ // TOPIC TITLE
155
+ // ===========================================================
156
+ .feed li[component="post"].posts-list-item {
157
+ .topic-title {
158
+ font-size: 18px !important;
159
+ font-weight: 600 !important;
160
+ line-height: 1.35 !important;
161
+ color: $jv-text-main !important;
162
+ margin-bottom: $jv-space-2;
163
+
164
+ &:hover {
165
+ color: $jv-primary !important;
166
+ }
167
+ }
168
+ }
169
+
170
+ // ===========================================================
171
+ // POST META (Author, Time)
172
+ // ===========================================================
173
+ .feed li[component="post"].posts-list-item {
174
+ .post-info {
175
+ font-size: 13px !important;
176
+ color: $jv-text-muted;
177
+ gap: $jv-space-2 !important;
178
+
179
+ .post-author {
180
+ a {
181
+ color: $jv-text-main;
182
+ font-weight: 600;
183
+
184
+ &:hover {
185
+ color: $jv-primary;
186
+ }
187
+ }
188
+
189
+ // Mobile avatar
190
+ .avatar,
191
+ img[class*="avatar"] {
192
+ width: 18px !important;
193
+ height: 18px !important;
194
+ border-radius: 50% !important;
195
+ }
196
+ }
197
+
198
+ .timeago {
199
+ color: $jv-text-soft !important;
200
+ }
201
+ }
202
+ }
203
+
204
+ // ===========================================================
205
+ // POST CONTENT
206
+ // ===========================================================
207
+ .feed li[component="post"].posts-list-item {
208
+ .content[component="post/content"] {
209
+ font-size: 14px !important;
210
+ line-height: 1.6 !important;
211
+ color: $jv-text-muted;
212
+
213
+ // Truncation styles (from plugin)
214
+ &.truncate-post-content {
215
+ max-height: 150px;
216
+ overflow: hidden;
217
+ position: relative;
218
+
219
+ &::after {
220
+ content: '';
221
+ position: absolute;
222
+ bottom: 0;
223
+ left: 0;
224
+ right: 0;
225
+ height: 40px;
226
+ background: linear-gradient(transparent, $jv-surface);
227
+ pointer-events: none;
228
+ }
229
+ }
230
+
231
+ // Links in content
232
+ a:not(.stretched-link) {
233
+ color: $jv-primary;
234
+
235
+ &:hover {
236
+ text-decoration: underline;
237
+ }
238
+ }
239
+
240
+ // Images in content
241
+ img {
242
+ max-width: 100%;
243
+ border-radius: $jv-radius-sm;
244
+ }
245
+
246
+ // Code blocks
247
+ pre, code {
248
+ background: rgba(0, 0, 0, 0.03);
249
+ border-radius: $jv-radius-xs;
250
+ font-size: 13px;
251
+ }
252
+
253
+ pre {
254
+ padding: $jv-space-4;
255
+ }
256
+
257
+ code {
258
+ padding: 2px 6px;
259
+ }
260
+ }
261
+
262
+ // See more button
263
+ [component="show/more"] {
264
+ background: $jv-surface !important;
265
+ border: 1px solid $jv-border-subtle !important;
266
+ color: $jv-primary !important;
267
+ font-weight: 600;
268
+ padding: 6px 16px;
269
+ box-shadow: $jv-shadow-soft;
270
+
271
+ &:hover {
272
+ background: $jv-primary-soft !important;
273
+ border-color: $jv-primary !important;
274
+ }
275
+ }
276
+ }
277
+
278
+ // ===========================================================
279
+ // DIVIDER
280
+ // ===========================================================
281
+ .feed li[component="post"].posts-list-item {
282
+ hr {
283
+ border-color: $jv-border-subtle !important;
284
+ margin: $jv-space-4 0 !important;
285
+ opacity: 1;
286
+ }
287
+ }
288
+
289
+ // ===========================================================
290
+ // ACTION BAR (Comments, Bookmark, Upvote, Reply)
291
+ // ===========================================================
292
+ .feed li[component="post"].posts-list-item {
293
+ .d-flex.justify-content-between:last-child {
294
+ margin: 0 (-$jv-space-2);
295
+
296
+ .btn-link {
297
+ display: inline-flex;
298
+ align-items: center;
299
+ gap: 6px;
300
+ padding: 8px 12px !important;
301
+ font-size: 13px !important;
302
+ font-weight: 600 !important;
303
+ color: $jv-text-muted !important;
304
+ background: transparent;
305
+ border: none;
306
+ border-radius: $jv-radius-sm;
307
+ text-decoration: none !important;
308
+ transition: background-color 0.15s ease, color 0.15s ease;
309
+
310
+ &:hover {
311
+ background: rgba(0, 0, 0, 0.04);
312
+ color: $jv-text-main !important;
313
+ }
314
+
315
+ i {
316
+ font-size: 16px;
317
+ }
318
+
319
+ // Comments button
320
+ &[href*="post"]:first-child {
321
+ i {
322
+ color: $jv-text-soft;
323
+ }
324
+
325
+ &:hover i {
326
+ color: $jv-primary;
327
+ }
328
+ }
329
+
330
+ // Bookmark button
331
+ &[data-action="bookmark"] {
332
+ &[data-bookmarked="true"] {
333
+ color: $jv-primary !important;
334
+
335
+ i {
336
+ color: $jv-primary !important;
337
+ }
338
+ }
339
+
340
+ &:hover {
341
+ background: rgba(0, 81, 255, 0.06);
342
+ }
343
+ }
344
+
345
+ // Upvote button
346
+ &[data-action="upvote"] {
347
+ &[data-upvoted="true"] {
348
+ color: #ef4444 !important;
349
+
350
+ i {
351
+ color: #ef4444 !important;
352
+ }
353
+ }
354
+
355
+ &:hover {
356
+ background: rgba(239, 68, 68, 0.06);
357
+
358
+ i {
359
+ color: #ef4444;
360
+ }
361
+ }
362
+ }
363
+
364
+ // Reply button
365
+ &[data-action="reply"] {
366
+ &:hover {
367
+ background: rgba(0, 81, 255, 0.06);
368
+
369
+ i {
370
+ color: $jv-primary;
371
+ }
372
+ }
373
+ }
374
+ }
375
+ }
376
+ }
377
+
378
+ // ===========================================================
379
+ // RESPONSIVE
380
+ // ===========================================================
381
+ @media (max-width: 992px) {
382
+ .feed li[component="post"].posts-list-item {
383
+ border-radius: $jv-radius-md !important;
384
+ margin-bottom: $jv-space-2 !important;
385
+
386
+ > .d-flex.gap-2.p-3 {
387
+ padding: $jv-space-4 !important;
388
+ }
389
+
390
+ .topic-title {
391
+ font-size: 16px !important;
392
+ }
393
+
394
+ .d-flex.justify-content-between:last-child {
395
+ .btn-link {
396
+ padding: 6px 8px !important;
397
+ font-size: 12px !important;
398
+
399
+ span {
400
+ display: none;
401
+ }
402
+ }
403
+ }
404
+ }
405
+ }
406
+
407
+ @media (max-width: 576px) {
408
+ .feed li[component="post"].posts-list-item {
409
+ .topic-title {
410
+ font-size: 15px !important;
411
+ }
412
+
413
+ .content[component="post/content"] {
414
+ font-size: 13px !important;
415
+ }
416
+
417
+ .d-flex.justify-content-between:last-child {
418
+ .btn-link {
419
+ padding: 6px !important;
420
+
421
+ i {
422
+ font-size: 14px;
423
+ }
424
+ }
425
+ }
426
+ }
427
+ }
428
+
429
+ // ===========================================================
430
+ // CATEGORIES LIST – Reddit-Style Category Cards
431
+ // Styles for world.tpl (/categories route)
432
+ // ===========================================================
433
+
434
+ // ===========================================================
435
+ // CATEGORIES LIST CONTAINER
436
+ // ===========================================================
437
+ ul.categories-list {
438
+ display: flex !important;
439
+ flex-direction: column;
440
+ gap: 0;
441
+ padding: 0 !important;
442
+ margin: 0;
443
+ list-style: none;
444
+ }
445
+
446
+ // ===========================================================
447
+ // CATEGORY CARD – Main Styling
448
+ // ===========================================================
449
+ .categories-list > li[component="categories/category"] {
450
+ background: $jv-surface !important;
451
+ border: 1px solid $jv-border-subtle !important;
452
+ border-radius: $jv-radius-lg !important;
453
+ margin-bottom: $jv-space-4 !important;
454
+ padding: $jv-space-6 !important;
455
+ overflow: hidden;
456
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
457
+
458
+ &:hover {
459
+ border-color: $jv-border-strong !important;
460
+ box-shadow: $jv-shadow-soft !important;
461
+ }
462
+
463
+ // Category icon
464
+ .category-icon {
465
+ width: 48px !important;
466
+ height: 48px !important;
467
+ border-radius: $jv-radius-md !important;
468
+ display: flex;
469
+ align-items: center;
470
+ justify-content: center;
471
+ font-size: 20px;
472
+ flex-shrink: 0;
473
+ }
474
+
475
+ // Category header with icon and title
476
+ .category-header {
477
+ display: flex;
478
+ align-items: flex-start;
479
+ gap: $jv-space-4;
480
+ }
481
+
482
+ // Category title
483
+ .category-name,
484
+ h2 a,
485
+ .title a {
486
+ font-size: 18px !important;
487
+ font-weight: 600 !important;
488
+ line-height: 1.35 !important;
489
+ color: $jv-text-main !important;
490
+ text-decoration: none !important;
491
+
492
+ &:hover {
493
+ color: $jv-primary !important;
494
+ }
495
+ }
496
+
497
+ // Category description
498
+ .category-description,
499
+ .description {
500
+ font-size: 14px !important;
501
+ line-height: 1.5 !important;
502
+ color: $jv-text-muted;
503
+ margin-top: $jv-space-2;
504
+ margin-bottom: 0;
505
+ }
506
+
507
+ // Stats row (topics, posts count)
508
+ .category-stat,
509
+ .stat {
510
+ font-size: 13px !important;
511
+ color: $jv-text-soft;
512
+
513
+ strong,
514
+ .human-readable-number {
515
+ color: $jv-text-muted;
516
+ font-weight: 600;
517
+ }
518
+ }
519
+
520
+ // Teaser (latest post preview)
521
+ .category-teaser,
522
+ .teaser {
523
+ margin-top: $jv-space-4;
524
+ padding-top: $jv-space-4;
525
+ border-top: 1px solid $jv-border-subtle;
526
+
527
+ .avatar {
528
+ width: 24px !important;
529
+ height: 24px !important;
530
+ border-radius: 50% !important;
531
+ }
532
+
533
+ .timeago {
534
+ font-size: 12px !important;
535
+ color: $jv-text-soft;
536
+ }
537
+
538
+ a {
539
+ color: $jv-text-muted;
540
+ font-size: 13px;
541
+
542
+ &:hover {
543
+ color: $jv-primary;
544
+ }
545
+ }
546
+ }
547
+
548
+ // Children categories
549
+ .category-children {
550
+ margin-top: $jv-space-4;
551
+ padding-top: $jv-space-4;
552
+ border-top: 1px solid $jv-border-subtle;
553
+
554
+ .category-children-item {
555
+ display: inline-flex;
556
+ align-items: center;
557
+ gap: $jv-space-2;
558
+ padding: $jv-space-2 $jv-space-4;
559
+ background: rgba(0, 0, 0, 0.02);
560
+ border-radius: $jv-radius-sm;
561
+ margin-right: $jv-space-2;
562
+ margin-bottom: $jv-space-2;
563
+ font-size: 13px;
564
+ color: $jv-text-muted;
565
+
566
+ &:hover {
567
+ background: rgba(0, 0, 0, 0.04);
568
+ color: $jv-primary;
569
+ }
570
+ }
571
+ }
572
+ }
573
+
574
+ // ===========================================================
575
+ // CATEGORIES RESPONSIVE
576
+ // ===========================================================
577
+ @media (max-width: 992px) {
578
+ .categories-list > li[component="categories/category"] {
579
+ border-radius: $jv-radius-md !important;
580
+ margin-bottom: $jv-space-2 !important;
581
+ padding: $jv-space-4 !important;
582
+
583
+ .category-icon {
584
+ width: 40px !important;
585
+ height: 40px !important;
586
+ font-size: 18px;
587
+ }
588
+
589
+ .category-name,
590
+ h2 a,
591
+ .title a {
592
+ font-size: 16px !important;
593
+ }
594
+ }
595
+ }
596
+
597
+ @media (max-width: 576px) {
598
+ .categories-list > li[component="categories/category"] {
599
+ .category-name,
600
+ h2 a,
601
+ .title a {
602
+ font-size: 15px !important;
603
+ }
604
+
605
+ .category-description,
606
+ .description {
607
+ font-size: 13px !important;
608
+ }
609
+ }
610
+ }