-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
162 lines (153 loc) · 4.92 KB
/
index.html
File metadata and controls
162 lines (153 loc) · 4.92 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width initial-scale=1.0"/>
<meta name="handheldfriendly" content="true"/>
<meta name="mobileoptimized" content="320"/>
<title>ui-forms by Syndicatefx</title>
<meta name="description" content="Fancy HTML form elements"/>
<link rel="stylesheet" href="css/ui-forms.min.css">
<!--Demo styles only-->
<style>header{max-width:75rem;margin-left:auto;margin-right:auto;padding:2rem;display:flex;align-items:center;justify-content:space-between}header h1{font-size:1rem;font-weight:600;text-transform:uppercase}header nav{display:flex;align-items:center}header span{font-size:.875rem;font-weight:600;padding-left:.5rem;padding-right:.5rem}ul{list-style:none}.grid,article{max-width:75rem;margin-left:auto;margin-right:auto;padding-top:8vmin;padding-bottom:8vmin}.grid{--min:18rem;--gap:1rem;display:grid;grid-gap:var(--gap);grid-template-columns:repeat(auto-fit,minmax(var(--min),1fr))}.grid>*{padding:2rem}.grid>*>*{margin-bottom:2rem}a{color:var(--color-brand)}</style>
</head>
<body>
<header>
<h1>ui-forms</h1>
<nav>
<span>Light</span><input type="checkbox" class="switch themeSwitch"><span>Dark</span>
</nav>
</header>
<div class="grid">
<!--Checkbox-->
<ul>
<li>
<input id="c1" type="checkbox">
<label for="c1">Checkbox</label>
</li>
<li>
<input id="c2" type="checkbox" checked>
<label for="c2">Checkbox</label>
</li>
<li>
<input id="c1d" type="checkbox" disabled>
<label for="c1d">Checkbox(disabled)</label>
</li>
<li>
<input id="c2d" type="checkbox" checked disabled>
<label for="c2d">Checkbox(disabled)</label>
</li>
</ul>
<!--Radio-->
<ul>
<li>
<input id="r1" type="radio" name="radio" value="1">
<label for="r1">Radio</label>
</li>
<li>
<input id="r2" type="radio" name="radio" value="2" checked>
<label for="r2">Radio</label>
</li>
<li>
<input id="r1d" type="radio" name="radiod" value="1" disabled>
<label for="r1d">Radio(disabled)</label>
</li>
<li>
<input id="r2d" type="radio" name="radiod" value="2" checked disabled>
<label for="r2d">Radio(disabled)</label>
</li>
</ul>
<!--Switch-->
<ul>
<li>
<input id="s1" type="checkbox" class="switch">
<label for="s1">Switch</label>
</li>
<li>
<input id="s2" type="checkbox" class="switch" checked>
<label for="s2">Switch</label>
</li>
<li>
<input id="s1d" type="checkbox" class="switch" disabled>
<label for="s1d">Switch(disabled)</label>
</li>
<li>
<input id="s2d" type="checkbox" class="switch" checked disabled>
<label for="s2d">Switch(disabled)</label>
</li>
</ul>
</div>
<div class="grid">
<!--Range-->
<ul>
<li>
<input type="range" value="10" max="50">
</li>
</ul>
</div>
<div class="grid">
<!--Fields-->
<ul>
<li>
<label for="text">Text</label>
<input type="text" id="text" placeholder="Placeholder text">
</li>
<li>
<label for="text-2">Text(disabled)</label>
<input type="text" id="text-2" value="value" disabled>
</li>
<li>
<label for="number">Number</label>
<input type="number" id="number">
</li>
</ul>
<ul>
<li>
<label for="select">Select</label>
<select id="select">
<option value="Choice 1">Choice 1</option>
<option value="Choice 2">Choice 2</option>
<option value="Choice 3">Choice 3</option>
</select>
</li>
<li>
<label for="select-2">Select(disabled)</label>
<select id="select-2" disabled>
<option value="Choice 1">Choice 1</option>
<option value="Choice 2">Choice 2</option>
<option value="Choice 3">Choice 3</option>
</select>
</li>
<li>
<label for="date">Date</label>
<input type="date" id="date">
</li>
</ul>
</div>
<div class="grid">
<!--Textarea-->
<ul>
<li>
<label for="textarea">Textarea</label>
<textarea id="textarea"></textarea>
</li>
</ul>
</div>
<footer class="grid">
<p>Handcrafted by Paulo Nunes</p>
<p>Fork on <a href="https://github.com/syndicatefx/ui-forms" rel="noopener noreferrer">Github</a></p>
</footer>
<script>
const toggleSwitch = document.querySelector('.themeSwitch');
function switchTheme(e) {
if (e.target.checked) {
document.documentElement.setAttribute('data-theme', 'dark');
}
else {
document.documentElement.setAttribute('data-theme', 'light');
}
}
toggleSwitch.addEventListener('change', switchTheme, false);
</script>
</body>
</html>