-
Notifications
You must be signed in to change notification settings - Fork 1
/
github-btn.html
243 lines (233 loc) · 15.9 KB
/
github-btn.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
<html><body><style type="text/css">
body {
padding: 0;
margin: 0;
font: bold 11px/14px "Helvetica Neue", Helvetica, Arial, sans-serif;
text-rendering: optimizeLegibility;
overflow: hidden;
}
.github-btn {
height: 20px;
overflow: hidden;
}
.gh-btn,
.gh-count,
.gh-ico {
float: left;
}
.gh-btn,
.gh-count {
padding: 2px 5px 2px 4px;
color: #555;
text-decoration: none;
text-shadow: 0 1px 0 #fff;
white-space: nowrap;
cursor: pointer;
border-radius: 3px;
}
.gh-btn {
background-color: #e6e6e6;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#eaeaea));
background-image: -webkit-linear-gradient(#fafafa, #eaeaea);
background-image: -moz-linear-gradient(top, #fafafa, #eaeaea);
background-image: -ms-linear-gradient(#fafafa, #eaeaea);
background-image: -o-linear-gradient(#fafafa, #eaeaea);
background-image: linear-gradient(#fafafa, #eaeaea);
background-repeat: no-repeat;
border: 1px solid #d4d4d4;
border-bottom-color: #bcbcbc;
}
.gh-btn:hover,
.gh-btn:focus,
.gh-btn:active {
color: #fff;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
border-color: #518cc6 #518cc6 #2a65a0;
background-color: #3072b3;
}
.gh-btn:hover,
.gh-btn:focus {
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc), to(#3072b3));
background-image: -webkit-linear-gradient(#599bdc, #3072b3);
background-image: -moz-linear-gradient(top, #599bdc, #3072b3);
background-image: -ms-linear-gradient(#599bdc, #3072b3);
background-image: -o-linear-gradient(#599bdc, #3072b3);
background-image: linear-gradient(#599bdc, #3072b3);
}
.gh-btn:active {
background-image: none;
-webkit-box-shadow: inset 0 2px 5px rgba(0,0,0,.10);
-moz-box-shadow: inset 0 2px 5px rgba(0,0,0,.10);
box-shadow: inset 0 2px 5px rgba(0,0,0,.10);
}
.gh-ico {
width: 14px;
height: 15px;
margin-top: -1px;
margin-right: 4px;
vertical-align: middle;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAtCAQAAABGtvB0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAB7RJREFUWMPt12tQVPcZx/HHGw0VG6yo1Y42YGIbjamT6JhEbc1AUodaJNbnsNwsFRQUsUSQQUEUNILGotFITTA2olVCI7FoiLdquOgEcFBAQS5Z5bLcXFZcdvfs7ZxfX+yqoLvQ6btO+5w3e3bOdz87+9/5n12i/3RGkSfNoV/RQppDnjTq3yjYg9O4kg2s50pOY48hg/E+v63NNtXIomww1dRmey+hCUMRywVthDKntKy8rDynNEIp9LEwaDAhL0XWohzRWIRFiEa53HdqK00cjBAEU16N9RD8MRuz4W899GWNYOQgp4FLfopsvJs4Zj79jKbRdPIas6AxURYLUukHzoiJAfqz1bsPsoq38G4+xLu4a+en528GiDzFcfGnuZIOIU0Jorr8SM3JhoKqk6YH9akQJEPSAifIij9vuo930rMYT46kfCx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JDQhkLEYjwNPnDHcmTgS1zGZfwdGVgOd/pvmX8Bbv8r+TZ9z+kAAAAASUVORK5CYII=);
background-repeat: no-repeat;
background-position: 0 0;
}
.gh-btn:hover .gh-ico,
.gh-btn:focus .gh-ico,
.gh-btn:active .gh-ico {
background-position: -25px 0;
}
.gh-count {
position: relative;
display: none; /* hidden to start */
margin-left: 4px;
background-color: #fafafa;
border: 1px solid #d4d4d4;
}
.gh-count:hover,
.gh-count:focus {
color: #4183C4;
}
.gh-count:before,
.gh-count:after {
content: ' ';
position: absolute;
display: inline-block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.gh-count:before {
top: 50%;
left: -3px;
margin-top: -4px;
border-width: 4px 4px 4px 0;
border-right-color: #fafafa;
}
.gh-count:after {
top: 50%;
left: -4px;
z-index: -1;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #d4d4d4;
}
.github-btn-large {
height: 30px;
}
.github-btn-large .gh-btn,
.github-btn-large .gh-count {
padding: 3px 10px 3px 8px;
font-size: 16px;
line-height: 22px;
border-radius: 4px;
}
.github-btn-large .gh-ico {
width: 22px;
height: 23px;
background-position: 0 -20px;
}
.github-btn-large .gh-btn:hover .gh-ico,
.github-btn-large .gh-btn:focus .gh-ico,
.github-btn-large .gh-btn:active .gh-ico {
background-position: -25px -20px;
}
.github-btn-large .gh-count {
margin-left: 6px;
}
.github-btn-large .gh-count:before {
left: -5px;
margin-top: -6px;
border-width: 6px 6px 6px 0;
}
.github-btn-large .gh-count:after {
left: -6px;
margin-top: -7px;
border-width: 7px 7px 7px 0;
}
@media (-moz-min-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) {
.gh-ico {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABaCAQAAADkmzsCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAE81JREFUeNrtnG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rfcm9aTuArZvsfpQWWqH3iAT7DYY2J+m5Ra9utjofbJl3cfNSxY+Jj/qlzVAFXoxvfXJ6PdLY8VdKHyJRz40YnFWLDk7Np99NPECWkDc18vCrWH2sKLBuW8n7bw3N6jebuwYGERwdxkrQi1eJ4PiCaONPLIJZXjrGYyz3DzZSIi+PEkE1zJ6FKOzYwngP+U/5xBDQKIYDKLiWYzm1nDl0ykH229/0PArXarlWz/A3bbfoDcyFIFAAAAAElFTkSuQmCC);
background-size: 50px 45px;
}
}
</style>
<span class="github-btn" id="github-btn">
<a class="gh-btn" id="gh-btn" href="#" target="_blank">
<span class="gh-ico"></span>
<span class="gh-text" id="gh-text"></span>
</a>
<a class="gh-count" id="gh-count" href="#" target="_blank"></a>
</span>
<script type="text/javascript">
// Read a page's GET URL variables and return them as an associative array.
// Source: http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html
var params = function () {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}()
var user = params.user,
repo = params.repo,
type = params.type,
count = params.count,
size = params.size,
head = document.getElementsByTagName('head')[0],
button = document.getElementById('gh-btn'),
mainButton = document.getElementById('github-btn'),
text = document.getElementById('gh-text'),
counter = document.getElementById('gh-count');
// Add commas to numbers
function addCommas(n) {
return String(n).replace(/(\d)(?=(\d{3})+$)/g, '$1,')
}
function jsonp(path) {
var el = document.createElement('script');
el.src = path + '?callback=callback';
head.insertBefore(el, head.firstChild);
}
function callback(obj) {
if (type == 'watch') {
counter.innerHTML = addCommas(obj.data.watchers);
} else if (type == 'fork') {
counter.innerHTML = addCommas(obj.data.forks);
} else if (type == 'follow') {
counter.innerHTML = addCommas(obj.data.followers);
}
// Show the count if asked
if (count == 'true') {
counter.style.display = 'block';
}
}
// Set href to be URL for repo
button.href = 'https://github.com/' + user + '/' + repo + '/';
// Add the class, change the text label, set count link href
if (type == 'watch') {
mainButton.className += ' github-watchers';
text.innerHTML = 'Star';
counter.href = 'https://github.com/' + user + '/' + repo + '/stargazers';
} else if (type == 'fork') {
mainButton.className += ' github-forks';
text.innerHTML = 'Fork';
counter.href = 'https://github.com/' + user + '/' + repo + '/network';
} else if (type == 'follow') {
mainButton.className += ' github-me';
text.innerHTML = 'Follow @' + user;
button.href = 'https://github.com/' + user;
counter.href = 'https://github.com/' + user + '/followers';
}
// Change the size
if (size == 'large') {
mainButton.className += ' github-btn-large';
}
if (type == 'follow') {
jsonp('https://api.github.com/users/' + user);
} else {
jsonp('https://api.github.com/repos/' + user + '/' + repo);
}
</script></body></html>