The code in `navbar.dart' is now more declarative and cleaner.
If the `lastUpdate' variable’s content change, then it will force the
user to reload the page, bypassing their cache. This can be useful in
case of an update with which the cache could break the website.
This commit adds the Nord theme into the list of available themes. The
Nord theme is now the default theme for dark-based systems.
Theme buttons now have their own class to make it easier to change
them without too much work.
The `style.scss' file has been split up in three different files:
- main.scss, the new file to load from the HTML page, imports the two
other files
- themes.scss, containing all the theming of the websites
- style.scss, containing the rest
All websites loading the theme will now need to load it from
`main.scss' instead of `style.scss', likewise with the `.css'
extension
This commit removes the `html' package dependency, speeding up the
compile time of the Dart code.
It also simplifies the code and removes some unused code. For instance
the sun, moon, and lightbulb icons is removed, the `Theme' class is
removed, and the `switchTheme' function is now merged into the
`setTheme' function. The `makeThemeItem' function has also had its
second argument removed.
The default theme is now chosen based on the user’s preference stored in
their device. If the device uses a dark theme, the website’s dark theme
will be used by default. Otherwise, the light theme will be used by
default.
Sitemap generation is now independent from the navbar generation, and
it will be added to the navbar only once the navbar has been created.
Also, better style for code.
Table of content was made unavailable regardless of whether one was
provided by the page or not. This commit fixes this issue by making an
unavailable TOC only if one is not provided by the web page, otherwise
the TOC will be available.