From b44b6fe601677737dd867f3fe43a414d0863fbf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20B=C3=BCschlen?= Date: Mon, 20 Nov 2023 13:37:48 +0100 Subject: [PATCH] docs: add info about global styles and font licensing to the readme --- README.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f61cf1ce..4545cf01 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,37 @@ npm i @statistikzh/leu ## Usage +In order for the components to work, you need to load the theme styles and the font definitions globally. +The theme file is part of the package (`dist/theme.css`). +The fonts on the other hand have to be licensed and are therefore not included in the package. + +If you have an environment that resolves bare module imports, you can use the library like this: + +```html + + + + +``` + +### CDN + +Browsers can't resolve bare module imports without import maps. But we can use a CDN to resolve the imports for us. +This is useful if you're just using plain HTML and JavaScript without any build or transformation steps. +Also this is applicable in an environment like [Observable](https://observablehq.com). + ```html + - + ``` ## Linting and formatting