Set meta theme-color value before page transition
to avoid navigation bar color flickering in Android
dark mode.
---------
Co-authored-by: satnaing <satnaingdev@gmail.com>
Add optional chaining in the event listener of the theme switch button in toggle-theme.js file. This
is to avoid occuring an error in the console when `light & dark theme mode` is disabled.
Move theme switch js codes in Layout.astro file to external js file (toggle-theme.js). Update
.prettierignore to exclude the new toggle-theme.js file. Update base.css for new data-theme
attribute.