lepture / github-cards

The unofficial GitHub Cards. Card for your GitHub profile, card for your GitHub repositories.
https://lab.lepture.com/github-cards/
BSD 3-Clause "New" or "Revised" License
2.12k stars 146 forks source link

Broken? #49

Closed tilight closed 7 years ago

tilight commented 7 years ago

Doesnt look so good right? Since yesterdy it looks like this 😃 fireshot capture 134 - woocommerce url und polylang i konzep_ - https___www konzeptcode com_de_woo Full iFrame content: <html><head></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;!doctype html&gt;&lt;html&gt;&lt;body&gt;&lt;style type="text/css"&gt;body{padding:0;margin:0;font-size:14px;font-family:"Helvetica Nenu",Hevetica,Arial,sans-serif;overflow:hidden}body.ready{border:1px solid #eee;border-radius:5px;border-color:#eee #ddd #bbb;box-shadow:rgba(0,0,0,.14) 0 1px 3px}.github-card{border-radius:5px;padding:8px 8px 0;background:#fff;color:#555;position:relative}.github-card a{text-decoration:none;color:#4183c4;outline:0}.github-card a:hover{text-decoration:underline}.github-card .header{position:relative}.github-card .button{position:absolute;top:0;right:0;padding:4px 8px 4px 7px;color:#555;text-shadow:0 1px 0 #fff;border:1px solid #d4d4d4;border-radius:3px;font-size:13px;font-weight:700;line-height:14px;background-color:#e6e6e6;background-image:-webkit-linear-gradient(#fafafa,#eaeaea);background-image:-moz-linear-gradient(#fafafa,#eaeaea);background-image:-ms-linear-gradient(#fafafa,#eaeaea);background-image:linear-gradient(#fafafa,#eaeaea)}.github-card .button:hover{color:#fff;text-decoration:none;background-color:#3072b3;background-image:-webkit-linear-gradient(#599bdc,#3072b3);background-image:-moz-linear-gradient(#599bdc,#3072b3);background-image:-ms-linear-gradient(#599bdc,#3072b3);background-image:linear-gradient(#599bdc,#3072b3);border-color:#518cc6 #518cc6 #2a65a0;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.user-card .header{padding:3px 0 4px 57px;min-height:48px}.user-card .header a{color:#707070;text-decoration:none}.user-card .header a:hover strong{text-decoration:underline}.user-card img{position:absolute;top:0;left:0;width:48px;height:48px;background:#fff;border-radius:4px}.user-card strong{display:block;color:#292f33;font-size:16px;line-height:1.6}.user-card ul{text-transform:uppercase;font-size:12px;color:#707070;list-style-type:none;margin:0;padding:0;border-top:1px solid #eee;border-bottom:1px solid #eee;zoom:1}.user-card ul:after{display:block;content:'';clear:both}.user-card .status a{color:#707070;text-decoration:none}.user-card .status a:hover{color:#4183c4}.user-card .status li{float:left;padding:4px 18px;border-left:1px solid #eee}.user-card .status li:first-child{border-left:0;padding-left:0}.user-card .footer{font-size:12px;font-weight:700;padding:11px 0 10px;color:#646464}.user-card .footer a{color:#646464}.repo-card .header{padding:3px 0 4px 57px}.repo-card .avatar,.repo-card .avatar img{position:absolute;top:0;left:0;width:48px;height:48px;background:#fff;border-radius:4px}.repo-card .header a{color:#707070}.repo-card .header strong{display:block;font-size:18px;line-height:1.4}.repo-card .header strong a{color:#292f33}.repo-card .header sup{font-size:10px;margin-left:3px;color:#797979}.repo-card .content{padding:6px 0 10px}.repo-card .content p{margin:0 5px 0 0;font:18px/24px Georgia,"Times New Roman",Palatino,serif;overflow:hidden;clear:both;word-wrap:break-word}.repo-card .footer{border-top:1px solid #eee;padding:8px 0 6px}.repo-card .status{font-size:10px;padding-right:10px;text-transform:uppercase}.repo-card .status strong{font-size:12px;padding-right:5px}&lt;/style&gt;&lt;script id="user-card" type="text/template"&gt;&lt;div class="header"&gt;&lt;a class="avatar" href="https://github.com/{login}"&gt;&lt;img src="{avatar_url}&amp;s=48"&gt;&lt;strong&gt;{name}&lt;/strong&gt;&lt;span&gt;@{login}&lt;/span&gt;&lt;/a&gt;&lt;a class="button" href="https://github.com/{login}"&gt;Follow&lt;/a&gt;&lt;/div&gt;&lt;ul class="status"&gt;&lt;li&gt;&lt;a href="https://github.com/{login}?tab=repositories"&gt;&lt;strong&gt;{public_repos}&lt;/strong&gt;Repos&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://gist.github.com/{login}"&gt;&lt;strong&gt;{public_gists}&lt;/strong&gt;Gists&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://github.com/{login}/followers"&gt;&lt;strong&gt;{followers}&lt;/strong&gt;Followers&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="footer"&gt;{job}&lt;/div&gt;&lt;/script&gt;&lt;script id="repo-card" type="text/template"&gt;&lt;div class="header"&gt;&lt;a class="avatar" href="https://github.com/{login}"&gt;&lt;img src="{avatar_url}&amp;s=48"&gt;&lt;/a&gt;&lt;strong class="name"&gt;&lt;a href="https://github.com/{full_name}"&gt;{name}&lt;/a&gt;&lt;sup class="language"&gt;{language}&lt;/sup&gt;&lt;/strong&gt;&lt;span&gt;{action}&lt;a href="https://github.com/{login}"&gt;{login}&lt;/a&gt;&lt;/span&gt;&lt;a class="button" href="https://github.com/{full_name}"&gt;Star&lt;/a&gt;&lt;/div&gt;&lt;div class="content"&gt;&lt;p&gt;{description}{homepage}&lt;/p&gt;&lt;/div&gt;&lt;div class="footer"&gt;&lt;span class="status"&gt;&lt;strong&gt;{forks_count}&lt;/strong&gt;Forks&lt;/span&gt;&lt;span class="status"&gt;&lt;strong&gt;{watchers_count}&lt;/strong&gt;Stars&lt;/span&gt;&lt;/div&gt;&lt;/script&gt;&lt;script&gt;function querystring(){var e=window.location.href,r;var t=e.slice(e.indexOf("?")+1).split("&amp;");var a=[];for(i=0;i&lt;t.length;i++){r=t[i].split("=");a.push(r[0]);a[r[0]]=r[1]}return a}var qs=querystring();(function(e){var r="https://api.github.com/",t;function a(e,r){try{if(window.localStorage){if(r){r._timestamp=(new Date).valueOf();localStorage[e]=JSON.stringify(r)}else{var t=localStorage[e];if(t){return JSON.parse(t)}return null}}}catch(a){}}function n(e,r){var t=e;var a=r.split(".");for(var n=0;n&lt;a.length;n++){if(t){t=t[a[n]]}else{break}}if(t===undefined||t===null){return""}return t}function i(r,a){var i=e.getElementById(r+"-card");var s=/{([^}]+)}/g;var o=i.innerHTML;var l=o.match(s);for(t=0;t&lt;l.length;t++){o=o.replace(l[t],n(a,l[t].slice(1,-1)))}return o}function s(e,r){var t=a(e);if(t&amp;&amp;t._timestamp){if((new Date).valueOf()-t._timestamp&lt;1e4){return r(t)}}if(qs.client_id&amp;&amp;qs.client_secret){e+="?client_id="+qs.client_id+"&amp;client_secret="+qs.client_secret}var n=new XMLHttpRequest;n.open("GET",e,true);n.onload=function(){r(JSON.parse(n.response))};n.send()}function o(r,a){var n=r.getElementsByTagName("a");for(t=0;t&lt;n.length;t++){(function(e){e.target="_"+(qs.target||"top")})(n[t])}e.body.appendChild(r);e.body.className="ready";if(parent!==self&amp;&amp;parent.postMessage){var i=Math.max(e.body.scrollHeight,e.documentElement.scrollHeight,e.body.offsetHeight,e.documentElement.offsetHeight,e.body.clientHeight,e.documentElement.clientHeight);parent.postMessage({height:i,sender:qs.identity||"*"},"*")}}function l(t){var n=r+"users/"+t;s(n,function(r){r=r||{};var s=r.message;var l="0";if(s){r=a(n)||r;l="?"}else{a(n,r)}r.login=t;r.name=p(r.name);r.public_repos=f(r.public_repos)||l;r.public_gists=f(r.public_gists)||l;r.followers=f(r.followers)||l;var c="Not available for hire.";if(r.hireable){var u="";if(r.email){u="mailto:"+r.email}else if(r.blog){u=r.blog}else{u=r.html_url}c='&lt;a href="'+u+'"&gt;Available for hire.&lt;/a&gt;'}if(s){c=s}r.job=c;var g=e.createElement("div");g.className="github-card user-card";g.innerHTML=i("user",r);o(g)})}function c(t,n){var l=r+"repos/"+t+"/"+n;s(l,function(r){r=r||{};var n=r.message;var s="0";if(n){r=a(l)||r;s="?"}else{a(l,r)}r.login=t;r.avatar_url="";if(r.owner&amp;&amp;r.owner.avatar_url){r.avatar_url=r.owner.avatar_url}r.forks_count=f(r.forks_count)||s;r.watchers_count=f(r.watchers_count)||s;if(r.fork){r.action="Forked by "}else{r.action="Created by "}var c=r.description;if(!c&amp;&amp;r.source){c=r.source.description}if(!c&amp;&amp;n){c=n}r.description=p(c)||"No description";var u=r.homepage;if(!u&amp;&amp;r.source){u=r.source.homepage}if(u){r.homepage=' &lt;a href="'+u+'"&gt;'+u.replace(/https?:\/\//,"").replace(/\/$/,"")+"&lt;/a&gt;"}else{r.homepage=""}var g=e.createElement("div");g.className="github-card repo-card";g.innerHTML=i("repo",r);o(g)})}function u(){}function f(e){if(!e)return null;if(e===1e3)return 1;if(e&lt;1e3)return e;e=e/1e3;if(e&gt;10)return parseInt(e,10)+"k";return e.toFixed(1)+"k"}if(!qs.user){u()}else if(qs.repo){c(qs.user,qs.repo)}else{l(qs.user)}function p(e){return e.replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;")}})(document);(function(e,r,t,a,n,i,s){e["GoogleAnalyticsObject"]=n;e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)},e[n].l=1*new Date;i=r.createElement(t),s=r.getElementsByTagName(t)[0];i.async=1;i.src=a;s.parentNode.insertBefore(i,s)})(window,document,"script","//www.google-analytics.com/analytics.js","ga");ga("create","UA-21475122-2","auto");var t=qs.user;if(qs.repo)t+="/"+qs.repo;ga("send","pageview",{title:t});&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;</pre></body></html>

lepture commented 7 years ago

https://github.com/lepture/github-cards/issues/45

Use the file on lab.lepture.com.