@okjavis/nodebb-theme-javis 5.0.4 → 5.0.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okjavis/nodebb-theme-javis",
3
- "version": "5.0.4",
3
+ "version": "5.0.6",
4
4
  "description": "Modern, premium NodeBB theme for JAVIS Community - Extends Harmony with custom styling",
5
5
  "main": "theme.js",
6
6
  "scripts": {
package/scss/_base.scss CHANGED
@@ -340,3 +340,94 @@ a {
340
340
  visibility: hidden !important;
341
341
  }
342
342
  }
343
+
344
+ // ===========================================================
345
+ // ACCOUNT/PROFILE SIDEBAR - Structured layout for mobile
346
+ // ===========================================================
347
+ @media (max-width: 767px) {
348
+ // Account sidebar container - force column layout
349
+ .account [component="sidebar/left"] .flex-shrink-0,
350
+ .account .flex-shrink-0.pe-2.border-end-md {
351
+ width: 100% !important;
352
+ padding: 0 !important;
353
+ border: none !important;
354
+ margin-bottom: $jv-space-4 !important;
355
+ }
356
+
357
+ // Inner container - structured grid layout
358
+ .account [component="sidebar/left"] .sticky-md-top,
359
+ .account .sticky-md-top.d-flex {
360
+ display: grid !important;
361
+ grid-template-columns: 1fr 1fr !important;
362
+ gap: $jv-space-2 !important;
363
+ padding: $jv-space-3 !important;
364
+ background: $jv-surface !important;
365
+ border-radius: $jv-radius-md !important;
366
+ border: 1px solid $jv-border-subtle !important;
367
+ }
368
+
369
+ // Menu items - consistent sizing
370
+ .account [component="sidebar/left"] a.btn {
371
+ margin: 0 !important;
372
+ padding: $jv-space-3 !important;
373
+ border-radius: $jv-radius-sm !important;
374
+ background: $jv-bg !important;
375
+ border: 1px solid $jv-border-subtle !important;
376
+ transition: all $jv-transition-fast !important;
377
+ min-height: 56px !important;
378
+ display: flex !important;
379
+ flex-direction: column !important;
380
+ align-items: flex-start !important;
381
+ justify-content: center !important;
382
+
383
+ &:hover {
384
+ background: $jv-hover-bg !important;
385
+ border-color: $jv-border-strong !important;
386
+ }
387
+
388
+ &.active {
389
+ background: $jv-primary !important;
390
+ color: white !important;
391
+ border-color: $jv-primary !important;
392
+
393
+ .text-xs {
394
+ color: rgba(255, 255, 255, 0.9) !important;
395
+ }
396
+ }
397
+
398
+ // Text content
399
+ .flex-grow-1 {
400
+ font-size: $jv-font-size-sm !important;
401
+ font-weight: 600 !important;
402
+ margin-bottom: 2px !important;
403
+ }
404
+
405
+ // Count badges
406
+ .text-xs {
407
+ font-size: $jv-font-size-xs !important;
408
+ color: $jv-text-soft !important;
409
+ font-weight: 500 !important;
410
+ }
411
+ }
412
+
413
+ // Horizontal rules - full width dividers
414
+ .account [component="sidebar/left"] hr {
415
+ grid-column: 1 / -1 !important;
416
+ margin: $jv-space-2 0 !important;
417
+ border-color: $jv-border-subtle !important;
418
+ }
419
+
420
+ // Settings and action links - full width buttons
421
+ .account [component="sidebar/left"] a.btn.ff-secondary.text-xs,
422
+ .account [component="sidebar/left"] a[href*="/edit"],
423
+ .account [component="sidebar/left"] a[component*="account/"] {
424
+ grid-column: 1 / -1 !important;
425
+ flex-direction: row !important;
426
+ gap: $jv-space-2 !important;
427
+ align-items: center !important;
428
+
429
+ i {
430
+ flex-shrink: 0 !important;
431
+ }
432
+ }
433
+ }
@@ -856,4 +856,32 @@ html.composing .composer.reply {
856
856
  padding-bottom: max($jv-space-3, env(safe-area-inset-bottom)) !important;
857
857
  border-radius: 0 !important;
858
858
  }
859
+
860
+ // Fix composer category dropdown positioning on mobile
861
+ html.composing .composer .category-list-container {
862
+ [component="category-selector"],
863
+ .btn-group {
864
+ position: relative !important;
865
+ }
866
+
867
+ .dropdown-menu {
868
+ transition: none !important;
869
+ animation: none !important;
870
+
871
+ &.show {
872
+ position: absolute !important;
873
+ top: 100% !important;
874
+ left: 0 !important;
875
+ right: auto !important;
876
+ bottom: auto !important;
877
+ transform: none !important;
878
+ margin: 4px 0 0 0 !important;
879
+ width: auto !important;
880
+ min-width: 280px !important;
881
+ max-width: 320px !important;
882
+ max-height: none !important;
883
+ height: auto !important;
884
+ }
885
+ }
886
+ }
859
887
  }
package/scss/_header.scss CHANGED
@@ -237,6 +237,15 @@
237
237
  }
238
238
  }
239
239
 
240
+ // ===========================================================
241
+ // NOTIFICATION DROPDOWN - Reduced width for better fit
242
+ // ===========================================================
243
+ .notifications-dropdown {
244
+ min-width: 300px !important;
245
+ max-width: 340px !important;
246
+ width: 300px !important;
247
+ }
248
+
240
249
  // ===========================================================
241
250
  // RESPONSIVE ADJUSTMENTS
242
251
  // ===========================================================
@@ -300,6 +309,13 @@
300
309
  justify-content: center;
301
310
  flex-shrink: 0;
302
311
  }
312
+
313
+ // Reduce notification dropdown width on mobile to prevent cutoff
314
+ .notifications-dropdown {
315
+ min-width: 280px !important;
316
+ max-width: 90vw !important;
317
+ width: 280px !important;
318
+ }
303
319
  }
304
320
  }
305
321
 
@@ -54,12 +54,16 @@
54
54
  // Fix mobile category dropdown positioning on feed page
55
55
  fixMobileFeedCategoryDropdown();
56
56
 
57
+ // Fix mobile category dropdown positioning in composer
58
+ fixMobileComposerCategoryDropdown();
59
+
57
60
  // Re-initialize carousels when new posts are loaded (infinite scroll, etc.)
58
61
  // Also handle post edits by clearing the processed flag
59
62
  $(window).on('action:posts.loaded action:topic.loaded action:ajaxify.end', function() {
60
63
  initPostImageCarousels();
61
64
  initParentPostNavigation();
62
65
  fixMobileFeedCategoryDropdown();
66
+ fixMobileComposerCategoryDropdown();
63
67
  initPostHoverActions();
64
68
  initFeedComposerPromptHandler();
65
69
  initTopicListVoting();
@@ -79,6 +83,11 @@
79
83
  initPostImageCarousels();
80
84
  }
81
85
  });
86
+
87
+ // Handle composer events - fix category dropdown on mobile when composer is shown
88
+ $(window).on('action:composer.loaded action:composer.enhanced', function() {
89
+ fixMobileComposerCategoryDropdown();
90
+ });
82
91
  });
83
92
 
84
93
  /**
@@ -805,6 +814,72 @@
805
814
  console.log('JAVIS: Mobile fix event listener attached');
806
815
  }
807
816
 
817
+ /**
818
+ * Fix mobile category dropdown positioning in composer
819
+ * Aggressively overrides Popper.js positioning on mobile to prevent bottom-left corner issue
820
+ */
821
+ function fixMobileComposerCategoryDropdown() {
822
+ console.log('JAVIS: fixMobileComposerCategoryDropdown called, window width:', window.innerWidth);
823
+
824
+ // Find the composer category selector
825
+ var $categorySelector = $('.composer [component="category-selector"]');
826
+ if (!$categorySelector.length) {
827
+ console.log('JAVIS: Composer category selector not found');
828
+ return;
829
+ }
830
+
831
+ console.log('JAVIS: Composer category selector found, setting up mobile fix');
832
+
833
+ // Find the dropdown button and menu
834
+ var $dropdownButton = $categorySelector.find('.dropdown-toggle');
835
+ var $dropdownMenu = $categorySelector.find('.dropdown-menu');
836
+
837
+ if (!$dropdownButton.length || !$dropdownMenu.length) {
838
+ console.log('JAVIS: Composer dropdown button or menu not found');
839
+ return;
840
+ }
841
+
842
+ // Disable Popper immediately on mobile to prevent animation from bottom-left
843
+ if (window.innerWidth <= 767) {
844
+ $dropdownButton.attr('data-bs-display', 'static');
845
+ console.log('JAVIS: Disabled Popper positioning on mobile for composer');
846
+ }
847
+
848
+ // Always bind the event, but check window width when it fires
849
+ $categorySelector.off('shown.bs.dropdown.javisComposerMobileFix').on('shown.bs.dropdown.javisComposerMobileFix', function() {
850
+ console.log('JAVIS: Composer dropdown shown event fired, window width:', window.innerWidth);
851
+
852
+ // Only apply fix on mobile
853
+ if (window.innerWidth > 767) {
854
+ console.log('JAVIS: Not mobile, skipping composer positioning fix');
855
+ return;
856
+ }
857
+
858
+ console.log('JAVIS: Applying mobile positioning fix for composer');
859
+
860
+ // Use requestAnimationFrame to ensure we override after Popper runs
861
+ requestAnimationFrame(function() {
862
+ $dropdownMenu.css({
863
+ 'position': 'absolute',
864
+ 'top': '100%',
865
+ 'left': '0',
866
+ 'right': 'auto',
867
+ 'bottom': 'auto',
868
+ 'transform': 'none',
869
+ 'margin': '4px 0 0 0',
870
+ 'inset': 'auto'
871
+ });
872
+
873
+ // Also remove Popper attributes
874
+ $dropdownMenu.removeAttr('data-popper-placement');
875
+
876
+ console.log('JAVIS: Composer mobile positioning applied successfully');
877
+ });
878
+ });
879
+
880
+ console.log('JAVIS: Composer mobile fix event listener attached');
881
+ }
882
+
808
883
  /**
809
884
  * Initialize immediate category filter navigation on feed page
810
885
  * When a category is selected, navigate immediately instead of waiting for dropdown close