Login   Register  
PHP Classes
elePHPant
Icontem

File: public/github/button.html

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mike  >  PHP Socializer  >  public/github/button.html  >  Download  
File: public/github/button.html
Role: Auxiliary data
Content type: text/plain
Description: Documentation
Class: PHP Socializer
Embed social buttons and widgets in Web pages
Author: By
Last change:
Date: 1 year ago
Size: 5,291 bytes
 

Contents

Class file image Download
<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;-webkit-border-radius:3px;-moz-border-radius:3px;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;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.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:url(github-icons.png) no-repeat 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;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;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.github-btn-large .gh-ico{width:22px;height:23px;background-position:0 -20px}.github-btn-large:hover .gh-ico,.github-btn-large:focus .gh-ico,.github-btn-large: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(github-icons-2x.png);background-size:50px 45px}}</style> <span id="github-btn" class="github-btn"> <a id="gh-btn" href="#" target="_blank" class="gh-btn"> <span class="gh-ico"></span> <span id="gh-text" class="gh-text"></span> </a> <a id="gh-count" href="#" target="_blank" class="gh-count"></a> </span> <script type="text/javascript">var params=function(){var d=[],c;var a=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");for(var b=0;b<a.length;b++){c=a[b].split("=");d.push(c[0]);d[c[0]]=c[1]}return d}();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");function addCommas(a){return a.toString().replace(/(\d)(?=(\d{3})+$)/g,"$1,")}function jsonp(b){var a=document.createElement("script");a.src=b+"?callback=callback";head.insertBefore(a,head.firstChild)}function callback(a){if(type=="watch"){counter.innerHTML=addCommas(a.data.watchers)}else{if(type=="fork"){counter.innerHTML=addCommas(a.data.forks)}else{if(type=="follow"){counter.innerHTML=addCommas(a.data.followers)}}}if(count=="true"){counter.style.display="block"}}button.href="https://github.com/"+user+"/"+repo+"/";if(type=="watch"){mainButton.className+=" github-watchers";text.innerHTML="Star";counter.href="https://github.com/"+user+"/"+repo+"/watchers"}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"}}}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>