forked from necolas/css3-github-buttons
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
609 lines (545 loc) · 25 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
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS3 GitHub Buttons</title>
<meta name="description" content="Using CSS3 to create GitHub-style buttons from links, buttons, and inputs">
<style>
/* ------------------------------------------------------------------------------------------------------------- RESET */
html, body, div, form, p,
code, pre { margin: 0; padding: 0; border: 0; vertical-align: baseline; }
/* ------------------------------------------------------------------------------------------------------------- TEMPLATE */
body { font: 14px/1.333 sans-serif; color: #444; background: #eee; }
a { color: #980905; }
a:hover, a:focus, a:active { text-decoration: none; }
h1 { margin: 0 0 0.5em; font-size: 36px; }
h2 { margin: 0 0 0.75em; font-size: 21px; }
h3 { margin: 0 0 0.333em; font-size: 16px; font-weight: normal; }
p { margin: 0 0 1.333em; }
em { font-style: italic; }
table { border-collapse: separate; border-spacing: 0; margin: 0; vertical-align: middle; }
th { font-weight: bold; }
th, td { padding: 5px 25px 5px 5px; text-align: left; vertical-align: middle; }
pre, code { font-family: monospace, sans-serif; font-size: 1em; color:#080; }
/* ------------------------------------------------------------------------------------------------------------- TEMPLATE */
.container { position:relative; overflow:hidden; width: 600px; padding: 40px 60px; border: 1px solid #ccc; margin: 40px auto 20px; background: #fff; -webkit-box-shadow: 0 0 15px rgba(0,0,0,0.1); -moz-box-shadow: 0 0 15px rgba(0,0,0,0.1); box-shadow: 0 0 15px rgba(0,0,0,0.1); }
.container pre,
.container .prettyprint { padding: 0; border: 0; margin: 0 0 20px; font-size: 13px; background: #fff; }
.ribbon { position: absolute; top: -1px; right: -1px; opacity: 0.9; }
.ribbon:hover, .ribbon:focus, .ribbon:active { opacity: 1; }
.ribbon img { display: block; border: 0; }
.header { padding-right:80px; }
.section { margin: 40px 0 20px; }
.example { padding: 20px; border: 1px solid #ccc; margin: 10px -20px 20px; }
.footer { margin: 20px 0 50px; font-size: 11px; color: #666; text-align: center; }
.footer a { color: #666; }
/* ---------------------------------------------------- */
ul.actions {
font-family: helvetica, arial, freesans, clean, sans-serif;
font-size: 13px;
margin: 0;
}
ul.actions li {
position: relative;
display: inline-block;
margin-left: 5px;
top: -4px;
height: 26px;
padding: 5px 0 7px 0;
border: 1px solid transparent;
border-bottom: none;
}
.search a {
font-weight: 200;
font-size: 13.34px;
color: #666;
text-decoration: none;
}
.search .fieldwrap {
display: inline-block;
height: 26px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.search .fieldwrap > * {
display: inline-block;
}
.search input {
font-family: helvetica, arial, freesans, sans-serif;
line-height: normal;
display: inline-block;
padding: 5px 4px;
margin: 0;
font-size: 12px;
border: 1px solid lightGrey;
-webkit-border-top-left-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-moz-border-radius-topleft: 3px;
-moz-border-radius-bottomleft: 3px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.minibutton {
font-family: helvetica, arial, freesans, sans-serif;;
line-height: 1.4;
height: 21px;
padding: 0 0 0 3px;
font-size: 11px;
font-weight: bold;
}
.search .minibutton {
position: relative;
top: -2px;
margin-left: 0;
height: 26px;
padding-left: 0;
border-left: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-moz-border-radius-topright: 3px;
-moz-border-radius-bottomright: 3px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.minibutton,
.minibutton.disabled:hover {
position: relative;
font-family: helvetica,arial,freesans,clean,sans-serif;
display: inline-block;
color: #333;
text-shadow: 1px 1px 0 white;
white-space: nowrap;
border: none;
overflow: visible;
cursor: pointer;
border: 1px solid #D4D4D4;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background: #F4F4F4;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#F4F4F4',endColorstr='#ECECEC');
background: -webkit-gradient(linear,left top,left bottom,from(#F4F4F4),to(#ECECEC));
background: -moz-linear-gradient(top,#F4F4F4,#ECECEC);
}
.minibutton > span {
display: block;
height: 21px;
padding: 0 9px 0 7px;
line-height: 21px;
}
.search .minibutton span {
height: 26px;
width: 16px;
text-indent: -9999px;
background: url('search-icon.png') 50% 4px no-repeat;
}
.minibutton:hover{
color: #fff;
text-decoration: none;
text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
border-color: #518cc6;
border-bottom-color: #2a65a0;
background: #599bdc;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#599bdc',endColorstr='#3072b3');
background: -webkit-gradient(linear,left top,left bottom,from(#599bdc),to(#3072b3));
background: -moz-linear-gradient(top,#599bdc,#3072b3);
}
.minibutton:active{
border-color: #2a65a0;
border-bottom-color: #518cc6;
background: #3072b3;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#3072b3',endColorstr='#599bdc');
background: -webkit-gradient(linear,left top,left bottom,from(#3072b3),to(#599bdc));
background: -moz-linear-gradient(top,#3072b3,#599bdc);
}
.minibutton:hover span{
background-position: 50% -96px;
}
a.minibutton {
font-size: 13px;
padding: 1px 1px 2px 3px;
text-decoration: none;
}
</style>
<link rel="stylesheet" href="gh-buttons.css">
<!-- prettyify -->
<link rel="stylesheet" href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css">
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script>
</head>
<body onload="prettyPrint()">
<div class="container">
<a class="ribbon" href="http://github.com/todc/css3-github-buttons" target="_blank"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<div class="header">
<h1>CSS3 GitHub Buttons</h1>
<p><b><a href="http://github.com/todc/css3-github-buttons" title="GitHub repository">CSS3 GitHub Buttons</a> helps you easily create GitHub-style buttons from links, buttons, and inputs.</b></p>
</div>
<div class="section">
<h2>Buttons</h2>
<p>The "buttons" can be created by adding <code>class="button"</code> to any appropriate <code><a></code>, <code><button></code>, or <code><input></code> element. Add a further class of <code>pill</code> to create a button pill-like button. Add a further class of <code>primary</code> to emphasise more important actions.</p>
<div class="example">
<pre class="code prettyprint"><code><a href="#" class="button">Post comment</a></code></pre>
<form>
<a href="#button" class="button">Post comment (link)</a>
<input class="button" type="submit" value="Post comment (input)">
<button class="button" type="submit">Post comment (button)</button>
</form>
</div>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button pill">This is a pill button</a></code></pre>
<a href="#button" class="button pill">This is a pill button</a>
</div>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button primary">Publish post</a>
<a href="#" class="button">Save as draft</a></code></pre>
<a href="#button" class="button primary">Publish post</a> <a href="#button" class="button">Save as draft</a>
</div>
</div>
<div class="section">
<h2>Buttons with dangerous actions</h2>
<p>If you have a button that triggers a <em>dangerous</em> action, like deleting data, this can be indicated by adding the class <code>danger</code>.</p>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button danger">Delete post</a></code></pre>
<a href="#button" class="button danger">Delete post</a>
</div>
</div>
<div class="section">
<h2>Buttons with positive actions</h2>
<p>As an opposite to the <code>danger</code> class, you can specify the <code>green</code> class for a button.</p>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button green">Add a post</a></code></pre>
<a href="#button" class="button green">Add a post</a>
</div>
</div>
<div class="section">
<h2>shop.github.com buttons</h2>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button solid-green">Add an Item</a>
<a href="#" class="button solid-red">Remove an Item</a>
</code></pre>
<a href="#button" class="button solid-green">Add an Item</a>
<a href="#button" class="button solid-red">Remove an Item</a>
</div>
</div>
<div class="section">
<h2>Big buttons</h2>
<p>If you wish to emphasize a specific action you can add the class <code>big</code>.</p>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button big">Create Project</a></code></pre>
<a href="#button" class="button big">Create Project</a>
</div>
</div>
<div class="section">
<h2>Minibuttons</h2>
<p>Add the <code>mini</code> class to create a slightly smaller button.</p>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button mini">Create Project</a></code></pre>
<a href="#button" class="button mini">Create Project</a>
</div>
</div>
<div class="section">
<h2>Disabled Buttons</h2>
<p>Add the <code>disabled</code> class to indicate a disabled button.</p>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button disabled">Create Project</a></code></pre>
<a href="#button" class="button disabled">Create Project</a>
</div>
</div>
<div class="section">
<h2>Grouped buttons</h2>
<p>Groups of buttons can be created by wrapping them in an element given a class of <code>button-group</code>. A less important group of buttons can be marked out by adding a further class, <code>minor-group</code>.</p>
<div class="example">
<pre class="prettyprint"><code><div class="button-group">
<a href="#" class="button primary">Dashboard</a>
<a href="#" class="button">Inbox</a>
<a href="#" class="button">Account</a>
<a href="#" class="button">Logout</a>
</div></code></pre>
<div class="button-group">
<a href="#button" class="button primary">Dashboard</a>
<a href="#button" class="button">Inbox</a>
<a href="#button" class="button">Account</a>
<a href="#button" class="button">Logout</a>
</div>
</div>
<div class="example">
<pre class="prettyprint"><code><ul class="button-group">
<li><a href="#" class="button primary pill">Dashboard</a></li>
<li><a href="#" class="button pill">Inbox</a></li>
<li><a href="#" class="button pill">Account</a></li>
<li><a href="#" class="button pill">Logout</a></li>
</ul></code></pre>
<ul class="button-group">
<li><a href="#button" class="button primary pill">Dashboard</a></li>
<li><a href="#button" class="button pill">Inbox</a></li>
<li><a href="#button" class="button pill">Account</a></li>
<li><a href="#button" class="button pill">Logout</a></li>
</ul>
</div>
<div class="example">
<pre class="prettyprint"><code><div class="button-group <b>minor-group</b>">…</div></code></pre>
<div class="button-group minor-group">
<a href="#button" class="button primary">Dashboard</a>
<a href="#button" class="button">Inbox</a>
<a href="#button" class="button">Account</a>
<a href="#button" class="button">Logout</a>
</div>
</div>
</div>
<div class="section">
<h2>Mixed groups</h2>
<p>Displaying a mixture of grouped and standalone buttons, as might be seen in a toolbar, can be done by adding another wrapping element with the class <code>button-container</code>.</p>
<div class="example">
<pre class="prettyprint"><code><div class="actions <b>button-container</b>">
<a href="#" class="button primary">Compose new</a>
<div class="button-group">
<a href="#" class="button primary">Archive</a>
<a href="#" class="button">Report spam</a>
<a href="#" class="button danger">Delete</a>
</div>
<div class="button-group minor-group">
<a href="#" class="button">Move to</a>
<a href="#" class="button">Labels</a>
</div>
</div></code></pre>
<div class="actions button-container">
<a href="#button" class="button primary">Compose new</a>
<div class="button-group">
<a href="#button" class="button primary">Archive</a>
<a href="#button" class="button">Report spam</a>
<a href="#button" class="button danger">Delete</a>
</div>
<div class="button-group minor-group">
<a href="#button" class="button">Move to</a>
<a href="#button" class="button">Labels</a>
</div>
</div>
</div>
</div>
<div class="section">
<h2>Buttons with icons only</h2>
<p>A range of icons can be added (only for links and buttons) by adding a class of <code>icon</code>, <code>no-text</code> and any one of the provided icon classes below. You must replace link text with <code>&nbsp;</code> (it cannot be left empty).</p>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button no-text icon search">&nbsp;</a>
<a href="#" class="button no-text icon fork">&nbsp;</a>
<a href="#" class="button no-text icon approve green">&nbsp;</a>
<a href="#" class="button no-text icon remove red">&nbsp;</a>
</code></pre>
<a href="#button" class="button no-text icon search"> </a>
<a href="#button" class="button no-text icon fork"> </a>
<a href="#button" class="button green no-text icon approve"> </a>
<a href="#button" class="button red no-text icon remove"> </a>
<div class="clear"> </div>
<pre class="prettyprint"><code>
<div class="actions button-container">
<a href="#button" class="button icon edit green primary">Compose new</a>
<div class="button-group">
<a href="#button" class="button primary">Archive</a>
<a href="#button" class="button">Report spam</a>
<a href="#button" class="button red icon trash no-text"> </a>
</div>
<div class="button-group minor-group">
<a href="#button" class="button">Move to</a>
<a href="#button" class="button icon tag no-text"> </a>
</div>
</div>
</code></pre>
<div class="actions button-container">
<a href="#button" class="button icon edit green primary">Compose new</a>
<div class="button-group">
<a href="#button" class="button primary">Archive</a>
<a href="#button" class="button">Report spam</a>
<a href="#button" class="button red icon trash no-text"> </a>
</div>
<div class="button-group minor-group">
<a href="#button" class="button">Move to</a>
<a href="#button" class="button icon tag no-text"> </a>
</div>
</div>
</div>
</div>
<div class="section">
<h2>Buttons with icons</h2>
<p>A range of icons can be added (only for links and buttons) by adding a class of <code>icon</code> and any one of the provided icon classes:</p>
<div class="example">
<pre class="prettyprint"><code><a href="#" class="button icon search">Search</a></code></pre>
<a href="#button" class="button icon search">Search</a>
</div>
<div class="example">
<table>
<thead>
<tr>
<th scope="col">Class</th>
<th scope="col">Example</th>
</tr>
</thead>
<tr>
<td scope="row"><code>.arrowup</code></td>
<td><a href="#button" class="button icon arrowup">Move up</a></td>
</tr>
<tr>
<td scope="row"><code>.arrowdown</code></td>
<td><a href="#button" class="button icon arrowdown">Move down</a></td>
</tr>
<tr>
<td scope="row"><code>.arrowleft</code></td>
<td><a href="#button" class="button icon arrowleft">Move left</a></td>
</tr>
<tr>
<td scope="row"><code>.arrowright</code></td>
<td><a href="#button" class="button icon arrowright">Move right</a></td>
</tr>
<tr>
<td scope="row"><code>.approve</code></td>
<td><a href="#button" class="button icon approve">Approve registration</a></td>
</tr>
<tr>
<td scope="row"><code>.add</code></td>
<td><a href="#button" class="button icon add">Add post</a></td>
</tr>
<tr>
<td scope="row"><code>.remove</code></td>
<td><a href="#button" class="button danger icon remove">Remove item</a></td>
</tr>
<tr>
<td scope="row"><code>.log</code></td>
<td><a href="#button" class="button icon log">View log</a></td>
</tr>
<tr>
<td scope="row"><code>.calendar</code></td>
<td><a href="#button" class="button icon calendar">Add to calendar</a></td>
</tr>
<tr>
<td scope="row"><code>.chat</code></td>
<td><a href="#button" class="button icon chat">Start chat</a></td>
</tr>
<tr>
<td scope="row"><code>.clock</code></td>
<td><a href="#button" class="button icon clock">Start timer</a></td>
</tr>
<tr>
<td scope="row"><code>.settings</code></td>
<td><a href="#button" class="button icon settings">Settings</a></td>
</tr>
<tr>
<td scope="row"><code>.comment</code></td>
<td><a href="#button" class="button icon comment">Add comment</a></td>
</tr>
<tr>
<td scope="row"><code>.fork</code></td>
<td><a href="#button" class="button icon fork">Fork</a></td>
</tr>
<tr>
<td scope="row"><code>.like</code></td>
<td><a href="#button" class="button icon like">Like</a></td>
</tr>
<tr>
<td scope="row"><code>.favorite</code></td>
<td><a href="#button" class="button icon favorite">Favorite</a></td>
</tr>
<tr>
<td scope="row"><code>.home</code></td>
<td><a href="#button" class="button icon home">Back to homepage</a></td>
</tr>
<tr>
<td scope="row"><code>.key</code></td>
<td><a href="#button" class="button icon key">Password protect</a></td>
</tr>
<tr>
<td scope="row"><code>.lock</code></td>
<td><a href="#button" class="button icon lock">Lock</a></td>
</tr>
<tr>
<td scope="row"><code>.unlock</code></td>
<td><a href="#button" class="button icon unlock">Unlock</a></td>
</tr>
<tr>
<td scope="row"><code>.loop</code></td>
<td><a href="#button" class="button icon loop">Resend message</a></td>
</tr>
<tr>
<td scope="row"><code>.search</code></td>
<td><a href="#button" class="button icon search">Search</a></td>
</tr>
<tr>
<td scope="row"><code>.mail</code></td>
<td><a href="#button" class="button icon mail">Send email</a></td>
</tr>
<tr>
<td scope="row"><code>.move</code></td>
<td><a href="#button" class="button icon move">Move</a></td>
</tr>
<tr>
<td scope="row"><code>.edit</code></td>
<td><a href="#button" class="button icon edit">Edit post</a></td>
</tr>
<tr>
<td scope="row"><code>.pin</code></td>
<td><a href="#button" class="button icon pin">Pin to Map</a></td>
</tr>
<tr>
<td scope="row"><code>.reload</code></td>
<td><a href="#button" class="button icon reload">Reload page</a></td>
</tr>
<tr>
<td scope="row"><code>.rss</code></td>
<td><a href="#button" class="button icon rss">Subscribe to RSS feed</a></td>
</tr>
<tr>
<td scope="row"><code>.tag</code></td>
<td><a href="#button" class="button icon tag">Add tag</a></td>
</tr>
<tr>
<td scope="row"><code>.trash</code></td>
<td><a href="#button" class="button danger icon trash">Delete post</a></td>
</tr>
<tr>
<td scope="row"><code>.user</code></td>
<td><a href="#button" class="button icon user">Add new user</a></td>
</tr>
</table>
</div>
</div>
<div class="section">
<h2>Search Field + Button</h2>
<p>Shows a search button attached to an input field.</p>
<div class="example">
<div>
<ul class="actions">
<li class="search">
<form action="" method="get">
<a href="/todc/cerberus-hr/issues/search">Search:</a>
<span class="fieldwrap">
<input type="text" name="q" value="" placeholder="Issues & Milestones…" style="outline-style: none; outline-width: initial; outline-color: initial; "><button type="submit" class="minibutton"><span>Search</span></button>
</span>
</form>
</li>
<li>
<a href="" class="minibutton"><span><span class="icon"></span>New Issue</span></a>
</li>
</ul>
</div>
</div>
</div>
<div class="section">
<h2>Browser compatibility</h2>
<p>Firefox 3.5+, Google Chrome, Safari 4+, IE 8+, Opera 10+.</p>
<p><strong>Note:</strong> Some CSS3 features are not supported in older versions of Opera and versions of Internet Explorer prior to IE 8. The use of icons is not supported in IE 6 or IE 7.</p>
</div>
<div class="section">
<h2>License</h2>
<p>Public domain: <a href="http://unlicense.org/">http://unlicense.org/</a></p>
</div>
<div class="section">
<h2>Acknowledgements</h2>
<p>Inspired by <a href="http://michaelhenriksen.dk">Michael Henriksen</a>'s <a href="http://github.com/michenriksen/css3buttons">CSS3 Buttons</a>. Icons from <a href="http://somerandomdude.com/projects/iconic/">Iconic pack</a>.</p>
</div>
</div>
<div class="footer">
<a href="http://github.com/todc/css3-github-buttons">CSS3 GitHub Buttons</a> by <a href="http://timodonnell.com" title="Website of Tim O'Donnell">Tim O'Donnell</a>.
</div>
</body>
</html>