-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.html
103 lines (92 loc) · 3.71 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vrembem</title>
<link rel="icon" type="image/png" sizes="32x32" href="https://sebnitu.com/dist/favicon.png">
<!-- Include Vrembem styles -->
<link rel="stylesheet" href="https://unpkg.com/vrembem/dist/styles.css">
</head>
<body>
<div role="main">
<div class="section background-shade">
<div class="section__container gap-y">
<h1 class="text-size-lg">Vrembem</h1>
<p class="max-width-xs">A component library based on the BEM methodology. This document is using the CDN implementation of Vrembem.</p>
</div>
</div>
<div class="section">
<div class="section__container gap-y">
<h2>Quick links</h2>
<ul class="list">
<li><a class="link" href="https://vrembem.com">Documentation</a></li>
<li><a class="link" href="https://github.com/sebnitu/vrembem/tree/main/packages">Components</a></li>
<li><a class="link" href="https://github.com/sebnitu/vrembem/blob/main/CHANGELOG.md">Changelog</a></li>
</ul>
<hr class="sep margin-y-xl">
<h2>Example Component</h2>
<p>
<button class="link" data-modal-open="modal-default">
Open modal
</button>
</p>
<hr class="sep margin-y-xl">
<h2>Starter Template</h2>
<pre class="pre"><code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>...</title>
<link rel="stylesheet" href="https://unpkg.com/vrembem/dist/styles.css">
</head>
<body>
<!-- Markup goes here... -->
<script src="https://unpkg.com/vrembem"></script>
</body>
</html></code></pre>
</div>
</div>
</div>
<div id="modal-default" class="modal">
<div class="modal__dialog dialog">
<div class="dialog__header flex-justify-between">
<h2>Hello, world!</h2>
<button data-modal-close class="dialog__close icon-action" aria-label="Close button">
<svg class="icon icon-x" role="img" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<div class="dialog__body">
This is an example modal implementation.
</div>
<div class="dialog__footer">
<button data-modal-close class="button button_color_primary">Sounds Good!</button>
<button data-modal-close class="button button_color_secondary">Close</button>
</div>
</div>
</div>
<!-- Include Vrembem JavaScript -->
<script src="https://unpkg.com/vrembem"></script>
<!-- Include individual JavaScript components -->
<!--
<script src="https://unpkg.com/@vrembem/core"></script>
<script src="https://unpkg.com/@vrembem/checkbox"></script>
<script src="https://unpkg.com/@vrembem/drawer"></script>
<script src="https://unpkg.com/@vrembem/modal"></script>
<script src="https://unpkg.com/@vrembem/popover"></script>
-->
<!-- Instantiate the component rendered in the document -->
<!-- All Vrembem JS components are namespaced under the `vrembem` object -->
<script>
const modal = new vrembem.Modal();
modal.init({
selectorInert: '[role="main"]',
selectorOverflow: 'body, [role="main"]'
});
</script>
</body>
</html>