Skip to content

not-ivy/themes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Themes

jsr badge

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.

Use

Importing

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.

Import Map

<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:

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.

Quick Start

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.