-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
129 lines (124 loc) · 3.69 KB
/
index.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Web Components</title>
<script src="./theme-toggle/index.js"></script>
<script src="./theme.js"></script>
<link rel="stylesheet" href="https://www.mgrossklaus.de/css/common.css" />
<link rel="stylesheet" href="./index.css" />
<link rel="stylesheet" href="./theme-toggle/index.css" />
</head>
<body>
<div class="RichText">
<h1>Web Components</h1>
<p>Collection of unstyled, Light DOM based Web Components.</p>
<ul>
<li>
<a href="./accordion-tabs">Accordion / Tabs</a>
</li>
<li>
<a href="./sortable-table">Sortable Table</a>
</li>
<li>
<a href="./theme-toggle/">Theme Toggle</a>
</li>
</ul>
<p>
<em
>Please note that these are still very much work in progress.<br />It
is planned to improve accessibility, add test cases and add further
options.</em
>
</p>
<dl>
<dt>Repository</dt>
<dd>
<a href="https://www.github.com/mgrsskls/web-components"
>https://www.github.com/mgrsskls/web-components</a
>
</dd>
</dl>
</div>
<div class="ThemeToggle">
<theme-toggle>
<div class="ThemeToggle-wrapper">
<input
class="u-hiddenVisually"
type="radio"
name="theme"
value="auto"
id="theme-auto"
checked
/>
<label for="theme-auto">
<span class="u-hiddenVisually">Automatic</span>
<svg
class="ThemeToggle-icon ThemeToggle-icon--auto"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9.75 17 9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2Z"
/>
</svg>
</label>
<input
class="u-hiddenVisually"
type="radio"
name="theme"
value="light"
id="theme-light"
/>
<label for="theme-light">
<span class="u-hiddenVisually">Light</span>
<svg
class="ThemeToggle-icon ThemeToggle-icon--light"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364-.707-.707M6.343 6.343l-.707-.707m12.728 0-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"
/>
</svg>
</label>
<input
class="u-hiddenVisually"
type="radio"
name="theme"
value="dark"
id="theme-dark"
/>
<label for="theme-dark">
<span class="u-hiddenVisually">Dark</span>
<svg
class="ThemeToggle-icon ThemeToggle-icon--dark"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 24 24"
fill="none"
>
<path
d="m20.354 15.354.928.373a1 1 0 0 0-1.3-1.3l.372.927ZM8.646 3.646l.928.373a1 1 0 0 0-1.301-1.301l.373.928Zm11.335 10.78c-.92.37-1.925.574-2.981.574v2a9.976 9.976 0 0 0 3.727-.718l-.746-1.856ZM17 15a8 8 0 0 1-8-8H7c0 5.523 4.477 10 10 10v-2ZM9 7c0-1.056.204-2.061.574-2.981l-1.856-.746A9.975 9.975 0 0 0 7 7h2Zm-5 5a8.003 8.003 0 0 1 5.019-7.426l-.746-1.856A10.003 10.003 0 0 0 2 12h2Zm8 8a8 8 0 0 1-8-8H2c0 5.523 4.477 10 10 10v-2Zm7.426-5.019A8.003 8.003 0 0 1 12 20.001v2c4.207 0 7.805-2.599 9.282-6.274l-1.856-.746Z"
/>
</svg>
</label>
</div>
</theme-toggle>
</div>
<script>
themeToggle(document.querySelector(".ThemeToggle"));
</script>
</body>
</html>