File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -335,28 +335,31 @@ <h5 class="card-title mb-3 text-center">Highest Rated Media</h5>
335335 < script >
336336 function updateJustification ( containerSelector = '.activity-stats' ) {
337337 const container = document . querySelector ( containerSelector ) ;
338-
338+ const contributionGraph = container . querySelector ( '.contribution-graph' ) ;
339+
339340 // Check if content is wider than container
340341 const hasOverflow = container . scrollWidth > container . clientWidth ;
341342
342343 if ( hasOverflow ) {
343344 container . classList . remove ( 'justify-content-center' ) ;
344345 container . classList . add ( 'justify-content-start' ) ;
346+ contributionGraph . classList . add ( 'mb-4' ) ;
345347 } else {
346348 container . classList . remove ( 'justify-content-start' ) ;
347349 container . classList . add ( 'justify-content-center' ) ;
350+ contributionGraph . classList . remove ( 'mb-4' ) ;
348351 }
349- }
350-
351- // Initial check
352- document . addEventListener ( 'DOMContentLoaded' , ( ) => {
353- updateJustification ( ) ;
354- } ) ;
355-
356- // Update on window resize
357- window . addEventListener ( 'resize' , ( ) => {
358- updateJustification ( ) ;
359- } ) ;
352+ }
353+
354+ // Initial check
355+ document . addEventListener ( 'DOMContentLoaded' , ( ) => {
356+ updateJustification ( ) ;
357+ } ) ;
358+
359+ // Update on window resize
360+ window . addEventListener ( 'resize' , ( ) => {
361+ updateJustification ( ) ;
362+ } ) ;
360363 </ script >
361364
362365 < script src ="
https://cdn.jsdelivr.net/npm/[email protected] /index.iife.min.js "
> </ script >
You can’t perform that action at this time.
0 commit comments