File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
Original file line number Diff line number Diff line change 4949
5050 <!-- Preload hero images -->
5151 < link rel ="preload " href ="assets/accuracy-vs-identifiability-light.jpeg " as ="image " type ="image/jpeg " />
52- < link rel ="preload " href ="assets/accuracy-vs-identifiability-dark.jpeg " as ="image " type ="image/jpeg " />
52+ < link rel ="preload " href ="assets/accuracy-vs-identifiability-dark.png " as ="image " type ="image/png " />
5353
5454 < link rel ="stylesheet " href ="styles.css " />
5555
@@ -213,7 +213,10 @@ <h3 class="hero-hook reveal" data-delay="400">
213213 < img
214214 id ="heroFigure "
215215 class ="hero-figure-img "
216- src ="assets/accuracy-vs-identifiability-light.jpeg "
216+ src ="assets/accuracy-vs-identifiability-dark.png "
217+ data-hero-default ="assets/accuracy-vs-identifiability-dark.png "
218+ data-hero-light ="assets/accuracy-vs-identifiability-light.jpeg "
219+ data-hero-dark ="assets/accuracy-vs-identifiability-dark.png "
217220 alt ="Accuracy vs Identifiability "
218221 decoding ="async "
219222 />
Original file line number Diff line number Diff line change @@ -505,18 +505,19 @@ function updateCurrentYear() {
505505 document . getElementById ( 'currentYear' ) . textContent = new Date ( ) . getFullYear ( ) ;
506506}
507507
508- // Hero Image Theme Swap (JPEG only for sharp text)
508+ // Keep the landing hero on its default asset; only repo cards are theme-swapped.
509509function initializeHeroImageSwap ( ) {
510510 const heroFigure = document . getElementById ( 'heroFigure' ) ;
511511
512512 const updateHeroImage = ( ) => {
513513 const currentTheme = document . documentElement . dataset . theme || 'light' ;
514514 const variant = currentTheme === 'dark' ? 'dark' : 'light' ;
515515
516- // Update main hero figure (JPEG only for sharp text)
516+ // Preserve the default landing hero image from the markup.
517517 if ( heroFigure ) {
518- heroFigure . src = `assets/accuracy-vs-identifiability-${ variant } .jpeg` ;
519- heroFigure . alt = `Accuracy vs Identifiability (${ variant } mode)` ;
518+ const defaultSrc = heroFigure . dataset . heroDefault || heroFigure . getAttribute ( 'src' ) ;
519+ heroFigure . src = defaultSrc ;
520+ heroFigure . alt = 'Accuracy vs Identifiability' ;
520521 }
521522
522523 // Update repo card hero images
Original file line number Diff line number Diff line change 1515
1616ASSETS_DIR=" assets"
1717LIGHT_JPEG=" ${ASSETS_DIR} /accuracy-vs-identifiability-light.jpeg"
18- DARK_JPEG=" ${ASSETS_DIR} /accuracy-vs-identifiability-dark.jpeg "
18+ DARK_JPEG=" ${ASSETS_DIR} /accuracy-vs-identifiability-dark.png "
1919
2020# Color codes for output
2121GREEN=' \033[0;32m'
Original file line number Diff line number Diff line change 1313
1414ASSETS_DIR=" assets"
1515LIGHT_JPEG=" ${ASSETS_DIR} /accuracy-vs-identifiability-light.jpeg"
16- DARK_JPEG=" ${ASSETS_DIR} /accuracy-vs-identifiability-dark.jpeg "
16+ DARK_JPEG=" ${ASSETS_DIR} /accuracy-vs-identifiability-dark.png "
1717
1818# Color codes
1919GREEN=' \033[0;32m'
You can’t perform that action at this time.
0 commit comments