Skip to content

Commit bc9fa4f

Browse files
Add usage to readme (#408)
1 parent 2236e34 commit bc9fa4f

10 files changed

Lines changed: 319 additions & 69 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@
1010

1111
Voor vragen of opmerkingen over de beslishulp mail je naar: [ai-verordening@minbzk.nl](mailto::ai-verordening@minbzk.nl).
1212

13+
# Gebruik beslishulp in je eigen website
14+
15+
De beslishulp met alle styling is te downloaden van de [release pagina](https://github.com/MinBZK/ai-verordening-beslishulp/releases).
16+
17+
Om de beslishulp op te nemen in een pagina, is minimaal de volgende code nodig. Let op dat je ook de
18+
class 'rvo-theme' meeneemt, anders werkt de CSS niet.
19+
20+
```html
21+
<div id="app" class="rvo-theme"></div>
22+
<script src="index.js"></script>
23+
```
24+
25+
Daarnaast bestaat de mogelijkheid een knop aan de conclusiepagina toe te voegen. Deze kan van een eigen
26+
tekst worden voorzien en 'onclick' stuurt dit een javascript event 'beslishulp-done'. Zie ook het [voorbeeld](voorbeeld.html) hoe je dit kunt gebruiken.
27+
28+
Als de beslishulp in een eigen website wordt gebruikt, is de kans groot dat de CSS gaat mengen en dit
29+
ongewenste effecten heeft. Overweeg een iframe te gebruiken om dit te voorkomen, zie ook het [iframe voorbeeld](iframe_voorbeeld.html). Merk op dat het javascript event hier een 'message' is i.v.m. cross-origin communication.
30+
1331
# AI-Verordening-Beslishulp
1432

1533
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/MinBZK/ai-verordening-beslishulp/main.svg?badge_token=d3dKEK97RwC1II15_W-nng)](https://results.pre-commit.ci/latest/github/MinBZK/ai-verordening-beslishulp/main?badge_token=d3dKEK97RwC1II15_W-nng)

frontend/package-lock.json

Lines changed: 48 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
"@nl-rvo/assets": "1.0.0-alpha.360",
2020
"@nl-rvo/component-library-css": "1.3.0",
2121
"@nl-rvo/design-tokens": "1.2.1",
22+
"@rollup/pluginutils": "^5.1.4",
2223
"@tailwindcss/postcss": "^4.1.3",
24+
"@tailwindcss/vite": "^4.1.3",
2325
"@types/jexl": "^2.3.4",
2426
"fp-ts": "^2.16.9",
2527
"io-ts": "^2.2.22",
@@ -42,7 +44,7 @@
4244
"eslint": "^9.24.0",
4345
"eslint-plugin-vue": "^9.32.0",
4446
"npm-run-all2": "^7.0.2",
45-
"postcss": "^8.5.1",
47+
"postcss": "^8.5.3",
4648
"prettier": "^3.4.2",
4749
"tailwindcss": "^4.1.3",
4850
"typescript": "~5.6.3",

frontend/postcss.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
export default {
1+
module.exports = {
22
plugins: {
3-
"@tailwindcss/postcss": {},
4-
}
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
56
}

frontend/src/assets/base.css

Lines changed: 0 additions & 51 deletions
This file was deleted.

frontend/src/assets/main.css

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,59 @@
1-
@import './base.css';
1+
@import "tailwindcss/theme.css" layer(theme);
2+
@import "tailwindcss/utilities.css" layer(utilities);
3+
4+
@layer theme, base, components, utilities;
5+
6+
.rvo-theme {
7+
background-color: var(--utrecht-document-background-color);
8+
color: var(--utrecht-document-color);
9+
font-family: var(--utrecht-document-font-family);
10+
font-size: var(--utrecht-document-font-size);
11+
font-weight: var(--utrecht-document-font-weight);
12+
line-height: var(--utrecht-document-line-height);
13+
}
14+
15+
.progress-tracker-font {
16+
color: var(--rvo-color-hemelblauw);
17+
font-weight: bold;
18+
}
19+
20+
#progress-question-mobile {
21+
@media only screen and (width <= 800px) {
22+
display: flex;
23+
align-items: center;
24+
}
25+
}
26+
27+
.aiv-definition {
28+
position: relative;
29+
display: inline-block;
30+
border-bottom: 2px dotted black;
31+
}
32+
33+
.aiv-definition .aiv-definition-text {
34+
visibility: hidden;
35+
width: 300px;
36+
background-color: var(--rvo-color-wit);
37+
color: var(--rvo-color-zwart);
38+
filter: drop-shadow(0 4px 4px rgba(115, 142, 171, 0.5));
39+
text-align: left;
40+
border-radius: var(--rvo-border-radius-xl);
41+
border-color: var(--rvo-color-grijs-200);
42+
border: 1px;
43+
padding: var(--rvo-alert-padding-sm-padding-block-end);
44+
position: absolute;
45+
z-index: 1;
46+
/* hack for Safari, https://stackoverflow.com/questions/38762661/css-drop-shadow-not-working-properly-in-safari/75027316#75027316 **/
47+
backdrop-filter: blur(0);
48+
}
49+
50+
.aiv-definition:hover .aiv-definition-text {
51+
visibility: visible;
52+
}
53+
54+
/* reset some styles without using tailwind pre-flight */
55+
ol, ul, menu {
56+
list-style: none;
57+
margin: 0;
58+
padding: 0;
59+
}

frontend/tailwind.config.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
/** @type {import('tailwindcss').Config} */
2-
export default {
3-
4-
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
1+
module.exports = {
2+
purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
3+
darkMode: false,
54
theme: {
65
extend: {},
76
},
7+
variants: {
8+
extend: {},
9+
},
810
plugins: [],
911
}

0 commit comments

Comments
 (0)