1313// Sets and applies a theme site-wide.
1414function setTheme ( theme ) {
1515 const html = document . documentElement ;
16- const themeIcon = document . getElementById ( "dei-themeicon " ) ;
16+ const themeIcon = document . getElementById ( "theme-icon " ) ;
1717
1818 // Save theme setting.
1919 localStorage . setItem ( "theme" , theme ) ;
@@ -38,7 +38,7 @@ function setTheme(theme) {
3838
3939// Open sidebar button.
4040( function ( ) {
41- const sidebarButton = document . getElementById ( "dei-openaside " ) ;
41+ const sidebarButton = document . getElementById ( "open-aside " ) ;
4242 if ( ! sidebarButton ) {
4343 return ;
4444 }
@@ -64,7 +64,7 @@ function setTheme(theme) {
6464
6565// Back-to-top button.
6666( function ( ) {
67- const backToTop = document . getElementById ( "dei-backtotop " ) ;
67+ const backToTop = document . getElementById ( "back-to-top " ) ;
6868
6969 // On scroll, display/hide the button.
7070 document . addEventListener ( "scroll" , ( ) => {
@@ -84,7 +84,7 @@ function setTheme(theme) {
8484
8585// Theme selection menu.
8686( function ( ) {
87- const themeMenu = document . getElementById ( "dei-thememenu " ) ;
87+ const themeMenu = document . getElementById ( "theme-menu " ) ;
8888
8989 // On theme selected, update theme.
9090 themeMenu . addEventListener ( "sl-select" , ( event ) => {
@@ -110,9 +110,9 @@ function setTheme(theme) {
110110// Search functionality.
111111( function ( ) {
112112 // Fetch elements.
113- const searchInput = document . getElementById ( "dei-searchinput " ) ;
114- const navMain = document . getElementById ( "dei-navmain " ) ;
115- const navSearch = document . getElementById ( "dei-navsearch " ) ;
113+ const searchInput = document . getElementById ( "search-input " ) ;
114+ const navMain = document . getElementById ( "nav-main " ) ;
115+ const navSearch = document . getElementById ( "nav-search " ) ;
116116
117117 if ( ! searchInput | ! navMain || ! navSearch ) {
118118 return ;
@@ -394,7 +394,7 @@ function setTheme(theme) {
394394// Scroll to current page in navigation when present.
395395window . addEventListener ( "load" , ( ) => {
396396 // Fetch current page in navigation; do nothing if there's none.
397- const currentPage = document . getElementById ( "dei-currentpage " ) ;
397+ const currentPage = document . getElementById ( "current-page " ) ;
398398 if ( ! currentPage ) {
399399 return ;
400400 }
0 commit comments