Skip to content

Commit 3579e51

Browse files
committed
Write development instructions within readme
1 parent e29c1d7 commit 3579e51

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

README.md

+43-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,46 @@
11
# Klaro UI
2+
23
The Klaro consent manager custom UI for the California Digital Library.
34

4-
Developer instructions coming soon.
5+
View sample at https://cdlib.github.io/klaro-ui
6+
7+
## Requirements
8+
9+
- Git
10+
- Node version 20 or above
11+
- NPM version 10 or above
12+
- Klaro source and a valid config file
13+
14+
## Installation
15+
16+
1. Follow the steps in [Getting Started](https://klaro.org/docs/getting-started) within the Klaro documentation.
17+
18+
2. Within the `src` URL of the Klaro script (after the config script), replace the URL ending in **klaro.js** with the "no CSS" version:
19+
20+
```
21+
https://cdn.kiprotect.com/klaro/v0.7/klaro-no-css.js
22+
```
23+
24+
3. From your CLI, install Klaro UI into your application as a dependency:
25+
26+
```
27+
npm install https://github.com/cdlib/klaro-ui --save
28+
```
29+
30+
The module **klaro-ui** is now installed in your application's **node_modules** folder.
31+
32+
4. From your bundler/build tool, source the `klaro-ui` stylesheet from the klaro-ui module:
33+
34+
```
35+
/node_modules/klaro-ui/dist/klaro-ui.css
36+
```
37+
38+
## Appearance
39+
40+
Klaro UI doesn't include any typefaces. The Klaro text will include the font defined for the document.
41+
42+
The Klaro UI default stylesheet renders a light colored theme when a user's system appearance is set to light colors and a dark colored theme when set to dark colors.
43+
44+
For only the light colored theme, use **klaro-ui-light.css** within **klaro-ui/dist**.
45+
46+
For only the dark colored theme, use **klaro-ui-dark.css** within **klaro-ui/dist**.

src/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<h1>Klaro UI for the California Digital Library</h1>
3636
<main>
3737
<p>This page demonstrates the Klaro consent manager using the custom CDL design, text and functionality.</p>
38-
<p>Developer instructions for applying this custom UI to instances of Klaro on CDL websites will be published soon to <a href="https://github.com/cdlib/klaro-ui" target="_blank">cdlib Klaro-UI GitHub repository</a>.</p>
38+
<p>To use this custom UI for instances of Klaro on CDL websites, see the <a href="https://github.com/cdlib/klaro-ui" target="_blank">cdlib Klaro-UI GitHub readme</a>.</p>
3939
<p>Below is filler content to force some vertical page scrolling and test that Klaro is always rendering as a fixed component in the lower-right of the browser.</p>
4040
</main>
4141
<aside>

0 commit comments

Comments
 (0)