-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.html
185 lines (158 loc) · 8.35 KB
/
styleguide.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
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Living Styleguide</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Living Styleguide</h1>
<main>
<div>
<h2>Form Component</h2>
<form action="/" method="post" name="login">
<h2>sign in</h2>
<label for="field-email">Email</label>
<input type="email" id="field-email" name="field-email" autocomplete="email" required autofocus>
<label for="field-password">Password</label>
<input type="password" id="field-password" name="field-password" required>
<label for="field-stay-logged-in"><input type="checkbox" id="field-stay-logged-in" name="field-stay-logged-in" value="stay-logged-in"><span></span> Stay logged in</label>
<a href="#">Forgot password</a>
<button type="submit">sign in</button>
</form>
</div>
<div class="side-nav">
<h2>Navigation Component</h2>
<input type="checkbox" id="hamburger" name="hamburger">
<label for="hamburger">🍔</label>
<nav>
<ul>
<li><a href="#main-content" aria-label="Home, current page">Home</a></li>
<li>
<a href="/products">Products</a>
<ul>
<li><a href="/products/rock">Rock</a></li>
<li><a href="/products/paper">Paper</a></li>
<li><a href="/products/scissors">Scissors</a></li>
</ul>
</li>
<li><a href="/about">About</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</nav>
</div>
<div>
<h2>Picture with subtitle Component</h2>
<article>
<figure>
<!-- Portrait -->
<img data-orientation="portrait" src="https://vasilis.nl/voto/fotos/klein/170126170241-we-hebben-een-bortusk-1280.jpg" alt="A drawing of a colorful monster on a newspaper" />
<!-- Landscape -->
<img data-orientation="landscape" src="https://vasilis.nl/voto/fotos/klein/161001174911-verhuizen-1280.jpg" alt="A bulldozer transporting a beach house along a sunny beach" />
<figcaption>
<p>
There's also this big and in depth description of the picture. You often see this on newssites or photo blogs. You could also replace the photo with a video if needed.
</p>
<footer>
<time datetime="2017-02-06">6-2-2017</time> © 2017 <a href="https://vasilis.nl">Vasilis van Gemert</a>
</footer>
</figcaption>
</figure>
</article>
</div>
<div>
<h2>Media item Component</h2>
<article class="media-item">
<h1>HTML5 accessibility, are block links hurting accessibility?<a href="/"></a></h1>
<img src="https://vasilis.nl/voto/fotos/klein/161001180558-de-boot-gemist-150.jpg" alt="A colorful crayon drawing on the hood of a car." />
<p>
It is conforming in HTML5 for links to include block level elements such as headings and paragraphs, this was forbidden in previous versions of HTML.
A recent article by @feather concludes that the inclusion of block level elements inside a link causes some Assistive Technology (AT) to misbehave.
</p>
</article>
</div>
<div>
<h2>Progress indicator Component</h2>
<nav title="progress">
<h1>Finish your order</h1>
<progress value="0.25" max="1">25%</progress>
<ol>
<li value="1">
<a href="/cart">Cart</a>
</li>
<li value="2">
<a href="#main-content" aria-label="Address, current step">Address</a>
</li>
<li value="3">Payment</li>
<li value="4">Confirm</li>
</ol>
</nav>
</div>
<div>
<h2>Rating Component</h2>
<fieldset>
<legend>Rating</legend>
<section>
<input type="radio" name="rating" id="rating-0">
<label for="rating-0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" enable-background="new 0 0 64 64"><circle cx="32" cy="32" r="30" fill="#ef5350"/><path d="m41 49.7c-5.8-4.8-12.2-4.8-18 0-.7.6-1.3-.4-.8-1.3 1.8-3.4 5.3-6.5 9.8-6.5s8.1 3.1 9.8 6.5c.5.8-.1 1.8-.8 1.3" fill="#302424"/><path d="m10.2 24.9c-1.5 4.7.6 10 5.3 12.1 4.6 2.2 10 .5 12.7-3.7l-6.9-7.7-11.1-.7" fill="#fff"/><g fill="#302424"><path d="m14.2 25.8c-1.4 2.9-.1 6.4 2.8 7.7 2.9 1.4 6.4.1 7.7-2.8 1-1.9-9.6-6.8-10.5-4.9"/><path d="m10.2 24.9c1.6-1 3.5-1.5 5.4-1.5 1.9 0 3.8.5 5.6 1.3 1.7.8 3.3 2 4.6 3.4 1.2 1.5 2.2 3.2 2.4 5.1-1.3-1.3-2.6-2.4-4-3.4-1.4-1-2.8-1.8-4.2-2.4-1.5-.7-3-1.2-4.6-1.7-1.8-.3-3.4-.6-5.2-.8"/></g><path d="m53.8 24.9c1.5 4.7-.6 10-5.3 12.1-4.6 2.2-10 .5-12.7-3.7l6.9-7.7 11.1-.7" fill="#fff"/><g fill="#302424"><path d="m49.8 25.8c1.4 2.9.1 6.4-2.8 7.7-2.9 1.4-6.4.1-7.7-2.8-1-1.9 9.6-6.8 10.5-4.9"/><path d="m53.8 24.9c-1.6-1-3.5-1.5-5.4-1.5-1.9 0-3.8.5-5.6 1.3-1.7.8-3.3 2-4.6 3.4-1.2 1.5-2.2 3.2-2.4 5.1 1.3-1.3 2.6-2.4 4-3.4 1.4-1 2.8-1.8 4.2-2.4 1.5-.7 3-1.2 4.6-1.7 1.8-.3 3.4-.6 5.2-.8"/></g></svg>
Sad!
</label>
<input type="radio" name="rating" id="rating-1">
<label for="rating-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" enable-background="new 0 0 64 64"><path d="m2.5 37.2c2.9 16.3 18.4 27.2 34.8 24.3 16.3-2.9 27.2-18.4 24.3-34.8-2.9-16.2-18.5-27.1-34.8-24.2-16.3 2.8-27.2 18.4-24.3 34.7" fill="#ffdd67"/><g fill="#664e27"><circle cx="42.4" cy="24.7" r="5"/><circle cx="19.7" cy="28.7" r="5"/><path d="m43.3 41.8c-5.8-1.5-12-.4-16.9 3-1.2.9 1.1 4 2.3 3.2 3.2-2.3 8.4-3.8 13.7-2.4 1.3.3 2.4-3.3.9-3.8"/></g></svg>
Meh
</label>
<input type="radio" name="rating" id="rating-2">
<label for="rating-2">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" enable-background="new 0 0 64 64"><circle cx="32" cy="32" r="30" fill="#ffdd67"/><g fill="#664e27"><circle cx="20.5" cy="26.6" r="5"/><circle cx="43.5" cy="26.6" r="5"/><path d="m44.6 40.3c-8.1 5.7-17.1 5.6-25.2 0-1-.7-1.8.5-1.2 1.6 2.5 4 7.4 7.7 13.8 7.7s11.3-3.6 13.8-7.7c.6-1.1-.2-2.3-1.2-1.6"/></g></svg>
Nice
</label>
<input type="radio" name="rating" id="rating-3">
<label for="rating-3">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" enable-background="new 0 0 64 64"><circle cx="32" cy="32" r="30" fill="#ffdd67"/><path d="m49.7 34.4c-.4-.5-1.1-.4-1.9-.4-15.8 0-15.8 0-31.6 0-.8 0-1.5-.1-1.9.4-3.9 5 .7 19.6 17.7 19.6 17 0 21.6-14.6 17.7-19.6" fill="#664e27"/><path d="m33.8 41.7c-.6 0-1.5.5-1.1 2 .2.7 1.2 1.6 1.2 2.8 0 2.4-3.8 2.4-3.8 0 0-1.2 1-2 1.2-2.8.3-1.4-.6-2-1.1-2-1.6 0-4.1 1.7-4.1 4.6 0 3.2 2.7 5.8 6 5.8 3.3 0 6-2.6 6-5.8-.1-2.8-2.7-4.5-4.3-4.6" fill="#4c3526"/><path d="m24.3 50.7c2.2 1 4.8 1.5 7.7 1.5 2.9 0 5.5-.6 7.7-1.5-2.1-1.1-4.7-1.7-7.7-1.7s-5.6.6-7.7 1.7" fill="#ff717f"/><path d="m47 36c-15 0-15 0-29.9 0-2.1 0-2.1 4-.1 4 10.4 0 19.6 0 30 0 2 0 2-4 0-4" fill="#fff"/><g fill="#664e27"><circle cx="20.5" cy="23" r="5"/><circle cx="43.5" cy="23" r="5"/></g></svg>
Fantastic!
</label>
</section>
</fieldset>
</div>
<div>
<h2>Chat Component</h2>
<article class="chat">
<article>
<section>
<header>
<p>Posted on <time datatime="2015-01-22T10:25">10:25 AM</time> by you</p>
</header>
<p>Hey!</p>
<footer>
<p data-status="READ">Has been read</p>
</footer>
</section>
<section>
<header>
<p>Posted on <time datatime="2017-02-03T14:19">2:19 PM</time> by John</p>
</header>
<p>Hey! Sorry I was busy</p>
</section>
<section>
<header>
<p>Posted on <time datatime="2017-02-03T14:22">2:22 PM</time> by you</p>
</header>
<p>I sent that 2 years ago</p>
<footer>
<p data-status="DELIVERED">Has been delivered</p>
</footer>
</section>
</article>
<form action="/" method="post">
<label for="field-message">Message input</label>
<textarea name="field-message" placeholder="Type something..."></textarea>
<button type="submit">Send</button>
</form>
</article>
</div>
</main>
</body>
</html>