File tree Expand file tree Collapse file tree
django/VIM/templates/instruments Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,15 +138,15 @@ <h4 class="ms-3 me-2 my-auto">
138138 </ div >
139139 < div class ="d-flex ">
140140 < button type ="button "
141- class ="btn me-1 px-1 py-0 justify-content-center display-btn masonry-btn "
141+ class ="btn me-2 me-md- 1 px-1 py-0 justify-content-center display-btn masonry-btn "
142142 id ="masonry-btn "
143143 title ="Masonry View "
144144 aria-label ="Masonry View "
145145 aria-pressed ="true ">
146146 < i class ="bi bi-columns-gap "> </ i >
147147 </ button >
148148 < button type ="button "
149- class ="btn me-2 px-1 py-0 justify-content-center display-btn std-btn "
149+ class ="btn me-2 px-1 py-0 justify-content-center display-btn std-btn d-none d-md-inline-flex "
150150 id ="std-btn "
151151 title ="Standard View "
152152 aria-label ="Standard View ">
Original file line number Diff line number Diff line change @@ -53,6 +53,19 @@ class DisplayManager {
5353 this . currentMasonry . layout ( ) ;
5454 }
5555 } ) ;
56+
57+ // Force Masonry view on small screens
58+ window . addEventListener ( 'resize' , ( ) => {
59+ if ( window . matchMedia ( '(max-width: 767.98px)' ) . matches ) {
60+ this . setDisplayMode ( 'masonry' ) ;
61+ }
62+ this . updateDisplayMode ( ) ;
63+
64+ // Re-layout masonry if active
65+ if ( this . getDisplayMode ( ) === 'masonry' && this . currentMasonry ) {
66+ this . currentMasonry . layout ( ) ;
67+ }
68+ } ) ;
5669 }
5770
5871 private setDisplayMode ( displayMode : DisplayMode ) : void {
You can’t perform that action at this time.
0 commit comments