-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathindex.html
403 lines (353 loc) · 16.2 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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>YUI CSS Extras</title>
<link rel="stylesheet" type="text/css" href="http://necolas.github.com/normalize.css/1.0.2/normalize.css">
<link rel="stylesheet" type="text/css" href="cssextras.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.9.0pr1/build/cssgrids-responsive/cssgrids-responsive-min.css">
<link rel="stylesheet" type="text/css" href="ybutton.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.8.0/build/cssbutton/cssbutton-min.css">
<style>
body {
font-family: sans-serif;
color: #333;
}
.header {
background: black;
min-height: 80px;
margin: 0;
color:white;
padding: 30px 20px;
}
.header h2 {
font-weight:300;
color: #666;
margin:0;
}
h1,h2,h3,h4,h5,h6 {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light",
"Helvetica Neue", sans-serif;
font-weight: 300;
}
.content {
padding: 0 30px 2em;
}
.content h2 {
color:#2B474F;
margin:50px 0 20px 0;
font-weight:bold;
}
.yui3-img-eliptical,
.yui3-img-shadow,
.yui3-img-rounded,
.yui3-img-bordered {
margin: 1em; /* remove this. it's only for viewing during dev */
}
.spacer {
margin:8px 0 8px;
}
.wide-popover {
width:70%;
}
.rightAligned {
text-align: right;
}
.bolded {
font-weight: bold;
}
.example-caption{
position: relative;
}
.example-thumb-caption {
font-size: 70%;
}
.example-caption.eliptical:after,
.example-caption.rounded:after,
.example-caption.bordered:after {
position: absolute;
left: 1.5em;
bottom: 0;
font-size: 70%;
}
.example-caption.eliptical:after {
content: "yui3-img-eliptical";
}
.example-caption.rounded:after {
content: "yui3-img-rounded";
}
.example-caption.bordered:after {
content: "yui3-img-bordered";
}
.photo-credit {
display: block;
font-size: 70%;
text-decoration: none;
color: #ccc;
margin-top: 0.4em;
}
.gist {
margin-top:25px;
}
.gist::before {
content: "Code:";
margin-bottom: 10px;
display: block;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light",
"Helvetica Neue", sans-serif;
font-weight: 300;
}
</style>
</head>
<body>
<div class="header y-u-1">
<h1 class="yui3-u-1">YUI3 CSS Extras</h1>
<h2 class="yui3-u">Simple styling for images, thumbnails, code, badges, contextual menus, alerts</h2>
</div>
<div class="content">
<h2>First, include it on your page</h2>
<p>Add the CSS on your page:</p>
<code>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/gallery-2013.01.09-23-24/build/gallerycss-cssextras/gallerycss-cssextras.css">
</code>
<p>Optionally, you can load it through the <code>YUI().use()</code>:</p>
<pre>
YUI({
//specify a gallery build
gallery: 'gallery-2013.01.09-23-24'
}).use(gallerycss-cssextras', function(Y) {
Y.log('YUI Loaded');
});
</pre>
<h2>Images</h2>
<p>
Styling of three different types are available for images, eliptical, rounded, bordered.
To use them, just add one of these classes to the <code><img></code> tag
</p>
<span class="example-caption eliptical">
<img class="yui3-img-eliptical" src="tests/manual/assets/images/stream.jpg" width="250" height="167" alt="Reflection-Moab, Utah by Bob Protus" title="Reflection-Moab, Utah by Bob Protus"/>
</span>
<span class="example-caption rounded">
<img class="yui3-img-rounded" src="tests/manual/assets/images/stream.jpg" width="250" height="167" alt="Reflection-Moab, Utah by Bob Protus" title="Reflection-Moab, Utah by Bob Protus"/>
</span>
<span class="example-caption bordered">
<img class="yui3-img-bordered" src="tests/manual/assets/images/stream.jpg" width="250" height="167" alt="Reflection-Moab, Utah by Bob Protus" title="Reflection-Moab, Utah by Bob Protus"/>
</span>
<a class="photo-credit" href="http://www.flickr.com/photos/katsrcool/7263892750/in/set-72157629835747790">Photography by Bob Protus</a>
<script src="https://gist.github.com/4710293.js"></script>
<p>
When using class <code>yui3-img-eliptical</code>, if the width and height of the image
are equal, it will appear as a circle.
</p>
<span class="example-caption eliptical">
<img class="yui3-img-eliptical" src="tests/manual/assets/images/flower.jpg" width="150" height="150" alt="Desert Flora by Bob Protus" title="Desert Flora by Bob Protus"/>
</span>
<a class="photo-credit" href="http://www.flickr.com/photos/katsrcool/8273081730/in/set-72157629835747790">Photography by Bob Protus</a>
<script src="https://gist.github.com/4710691.js"></script>
<h2>Thumbnails</h2>
<p>
Add the class <code>yui3-thumbnails</code> to the container <code><ul></code>,
Then add one of the classes, <code>yui3-thumb-eliptical, yui3-thumb-rounded, or yui3-thumb-bordered</code>, to the <code><a></code>
.
</p>
<ul class="yui3-thumbnails">
<li>
<a class="yui3-thumb-eliptical" href="http://www.flickr.com/photos/katsrcool/7273047594/in/set-72157629835747790">
<img src="tests/manual/assets/images/red_rock_thumb.jpg" width="88" alt="Utah landscape by Bob Protus" title="Utah landscape by Bob Protus"/>
</a>
<span class="example-thumb-caption">yui3-thumb-eliptical</span>
</li>
<li>
<a class="yui3-thumb-rounded" href="http://www.flickr.com/photos/katsrcool/7273047594/in/set-72157629835747790">
<img src="tests/manual/assets/images/red_rock_thumb.jpg" width="80" alt="Utah landscape by Bob Protus" title="Utah landscape by Bob Protus"/>
</a>
<span class="example-thumb-caption">yui3-thumb-rounded</span>
</li>
<li>
<a class="yui3-thumb-bordered" href="http://www.flickr.com/photos/katsrcool/7273047594/in/set-72157629835747790"><img src="tests/manual/assets/images/red_rock_thumb.jpg" width="80" alt="Utah landscape by Bob Protus" title="Utah landscape by Bob Protus"/></a>
<span class="example-thumb-caption">yui3-thumb-bordered</span>
</li>
<li>
<a class="yui3-thumb-bordered" href="http://www.flickr.com/photos/katsrcool/7273047594/in/set-72157629835747790"><img src="tests/manual/assets/images/red_rock_thumb.jpg" width="80" alt="Utah landscape by Bob Protus"/>
<div class="caption">
<h3>Landscape</h3>
<p>Beautiful desert images in Utah.
By Bob Protus
</p>
</div>
</a>
<span class="example-thumb-caption">yui3-thumb-bordered</span>
</li>
</ul>
<a class="photo-credit" href="http://www.flickr.com/photos/katsrcool/7273047594/in/set-72157629835747790">Photography by Bob Protus</a>
<p>
Adding a <code><div class="caption"></code> allows you to customize the thumbnail with additional content.
</p>
<script src="https://gist.github.com/4710836.js"></script>
<h2>Code</h2>
<p>
Designate text as being code as in this example...
</p>
<strong>For example:</strong> When using a <code><div></code> make sure to...<br>
<script src="https://gist.github.com/jconniff/4715460.js"></script>
<p>
To show a block of code, wrap it in a <code><pre></code>...<code></pre></code> tag.
</p>
<pre>
for (i = 0; i < 10; i+=1) {
myValue = i;
}
</pre>
<script src="https://gist.github.com/jconniff/4715512.js"></script>
<!-- <code><></code> -->
<h2>Badges</h2>
<p>
To create a badge, use a <code><span></code> tag, and add one of the badge classes as shown below. Badges are great for categorizing and color-coding items.
</p>
<span class="yui3-badge">1</span>
<span class="yui3-badge-success">success</span>
<span class="yui3-badge-warning">warning</span>
<span class="yui3-badge-important">A</span>
<span class="yui3-badge-info">3.8</span>
<span class="yui3-badge-inverse">inverse</span>
<script src="https://gist.github.com/jconniff/4715697.js"></script>
<h2>Notifications</h2>
<p>
Create notifications by adding a class to it's <code><div></code>. Subtle grey notifications can be implemented by using the <code>yui3-alert-subtle</code> class name. Create a more noticible alert by using the <code>yui3-alert-urgent</code>. Regular notifications can be created by using the <code>yui3-alert-normal</code>.
</p>
<div class="yui3-alert-subtle">
<label>System Notification</label>
This system will be temporarily out of service.
</div>
<div class="yui3-alert-urgent">
<label>Breaking News</label>
Official: 'Most' of Atlanic City Underwater. Atlantic City Boardwalk Destroyed by Sandy...
</div>
<div class="yui3-alert-normal">
<label>Green Bay Packers</label>
Looks like you like the Green Bay Packers so we added the team to your Sports App!
</div>
<script src="https://gist.github.com/jconniff/4716486.js"></script>
<h2>Contextual Modals</h2>
<p>
Contextual Modals are great for displaying small amounts of additional content on demand. They can be triggered upon some user interaction. These modal boxes can contain any type of content that you want.
</p>
<div class="yui3-g spacer">
<div class="yui3-u-1-2">
<h3>Bottom Arrow</h3>
<div class="yui3-popover bottom">
<div>
<p>You have no new notifications.</p>
<p>Receive notifications when you comment or discuss content with friends on Yahoo!</p>
<p><a href="#" class="yui3-button block">Learn More</a></p>
</div>
<div class="yui3-arrow-border"></div>
<div class="yui3-arrow"></div>
</div>
</div>
<div class="yui3-u-1-2">
<h3>Left Arrow</h3>
<div class="yui3-popover left">
<div>
<p>You have no new notifications.</p>
<p>Receive notifications when you comment or discuss content with friends on Yahoo!</p>
<p><a href="#" class="yui3-button block">Learn More</a></p>
</div>
<div class="yui3-arrow-border"></div>
<div class="yui3-arrow"></div>
</div>
</div>
</div>
<div class="yui3-g spacer">
<div class="yui3-u-1-2">
<h3>Top Arrow</h3>
<div class="yui3-popover top">
<div>
<p>You have no new notifications.</p>
<p>Receive notifications when you comment or discuss content with friends on Yahoo!</p>
<p><a href="#" class="yui3-button block">Learn More</a></p>
</div>
<div class="yui3-arrow-border"></div>
<div class="yui3-arrow"></div>
</div>
</div>
<div class="yui3-u-1-2">
<h3>Right Arrow</h3>
<div class="yui3-popover right">
<div>
<p>You have no new notifications.</p>
<p>Receive notifications when you comment or discuss content with friends on Yahoo!</p>
<p><a href="#" class="yui3-button block">Learn More</a></p>
</div>
<div class="yui3-arrow-border"></div>
<div class="yui3-arrow"></div>
</div>
</div>
</div>
<p>
To implement these modals, use the markup below. You can change the classname from <code>top</code> to <code>left</code>, <code>right</code>, or <code>bottom</code> based on what direction you want the arrow to point.
</p>
<script src="https://gist.github.com/tilomitra/4725701.js"></script>
<h2>Contextual Modals with Grids</h2>
<p>You can use grids within these contextual menus for interesting effects.</p>
<div class="yui3-g spacer">
<div class="yui3-u-1">
<h4>You have mail.</h4>
<div class="yui3-popover bottom wide-popover">
<div class="yui3-g">
<div class="yui3-u-1-5 bolded">Yahoo! Mail</div>
<div class="yui3-u-3-5">You have 3 new messages.</div>
<div class="yui3-u-1-5 rightAligned"><a href="#" class="small yui3-button">Read</a></div>
</div>
<div class="yui3-arrow-border"></div>
<div class="yui3-arrow"></div>
</div>
</div>
</div>
<script src="https://gist.github.com/tilomitra/4725721.js"></script>
<div class="yui3-g spacer">
<div class="yui3-u-1">
<h4>Multiple Notification Sources.</h4>
<div class="yui3-popover top wide-popover">
<div class="yui3-g spacer">
<div class="yui3-u-1-5 bolded">Finance:</div>
<div class="yui3-u-3-5"><strong>AAPL</strong> dropped <strong>5%</strong> to $612.26 in After Hours trading.</div>
<div class="yui3-u-1-5 rightAligned"><a href="#" class="small yui3-button">Full Chart</a></div>
</div>
<div class="yui3-g spacer">
<div class="yui3-u-1-5 bolded">Messenger:</div>
<div class="yui3-u-3-5">3 unread messages from Chad Michaels.</div>
<div class="yui3-u-1-5 rightAligned"><a href="#" class="small yui3-button">Read</a></div>
</div>
<div class="yui3-g spacer">
<div class="yui3-u-1-5 bolded">Sports:</div>
<div class="yui3-u-3-5"><strong>Final Score</strong> Oakland <strong>3-1</strong> Baltimore</div>
<div class="yui3-u-1-5 rightAligned"><a href="#" class="small yui3-button">Highlights</a></div>
</div>
<div class="yui3-arrow-border"></div>
<div class="yui3-arrow"></div>
</div>
</div>
</div>
<script src="https://gist.github.com/tilomitra/4725745.js"></script>
<h2>Buttons</h2>
<p>Buttons are provided through the <code>cssbutton</code> button. You can use it from the CDN:</p>
<code>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.8.0/build/cssbutton/cssbutton-min.css">
</code>
<p>Attach the <code>.primary</code> or <code>.error</code> class names to toggle styles.</p>
<a href="#" class="yui3-button">Highlights</a>
<a href="#" class="yui3-button primary">Primary Button</a>
<a href="#" class="yui3-button error">Be Careful!</a>
<script src="https://gist.github.com/tilomitra/4725765.js"></script>
<h3>Large Button</h3>
<p>Large buttons have twice the padding of regular buttons. Apply the <code>.large</code> class name.</p>
<a href="#" class="yui3-button large">Big click target</a>
<script src="https://gist.github.com/tilomitra/4725767.js"></script>
<h3>Small Buttons</h3>
<p>Small buttons have half the padding of regular buttons. Apply the <code>.small</code> class name.</p>
<a href="#" class="yui3-button small">Smaller target.</a>
<script src="https://gist.github.com/tilomitra/4725772.js"></script>
</div>
</body>
</html>