zeon-studio / astroplate

Astroplate is a free starter template built with Astro, TailwindCSS & TypeScript providing everything you need to jumpstart your Astro project. Get started with Astroplate and save yourself hours of work!
https://zeon.studio/preview?project=astroplate
MIT License
576 stars 176 forks source link

Dark theme stop working propertly when ViewTransitions is used #12

Closed jsparedes closed 1 year ago

jsparedes commented 1 year ago

After ViewTransitions in Base.astro

---
import { ViewTransitions } from 'astro:transitions';
---
<html lang="en">
  <head>
    <title>My Homepage</title>
    <ViewTransitions />
  </head>
  <body>

  </body>
</html>

If we switch to another page and want to change the theme (dark or ligth): It stop working. In order to change the theme it is necessary to do a reload. This means what we can only change the theme in the first page loaded.

tfsomrat commented 1 year ago

hey @jsparedes, this issue is fixed here #16