A fork of Hundredrabbits' theme framework, rewritten in typescript.
It is licensed under ISC, which is compatible with MIT, the original license that Hundredrabbits' framework was licensed under.
This package is published on jsr. To use it, it is suggested to create an import map. Currently, jsr does not allow importing staight from the browser, so you should use a cdn instead.
<script type="importmap">
{
"imports": {
"jsr:@iv/themes": "https://esm.sh/jsr/@iv/themes@<current ver>"
}
}
</script>
It is suggested to pin a specific version, sp you will need to replace
<current ver>
with the version shown above in the badge.
Then, you can it like this:
import Theme from "jsr:@iv/themes";
Or, you can also use a http import:
import Theme from "https://esm.sh/jsr/@iv/themes@<current ver>";
Same as above, you should replace <current ver>
with the current version shown
in the badge above.
Note: a browser that supports es6-module is required.
const theme = new Theme();
theme.install(); // installs a style element to provide variables
theme.start(); // loads an existing theme from localStorage, or the default theme
To apply a new theme, find an existing theme here, then drag and drop the svg file onto the web page.