Add a GitHub star button in the footer

This commit is contained in:
Gaël Métais
2015-07-20 11:48:35 +02:00
parent 137b4d25b9
commit 7779efedf1
4 changed files with 13 additions and 15 deletions
+3 -6
View File
@@ -279,12 +279,6 @@ a.linkButton {
width: 8.25em;
height: 11em;
}
.star {
font-weight: bold;
}
.star span {
font-size: 1.2em;
}
.footer {
padding: 3em;
color: #413;
@@ -295,6 +289,9 @@ a.linkButton {
.footer .version {
font-size: 0.7em;
}
.footer .github {
margin: 1em 0 0 0.5em;
}
[class^="icon-"]:before,
[class*=" icon-"]:before {
vertical-align: baseline;
+5
View File
@@ -37,6 +37,11 @@ yltApp.run(['$rootScope', '$location', function($rootScope, $location) {
$rootScope.$on('$routeChangeSuccess', function(){
ga('send', 'pageview', {'page': $location.path()});
});
// GitHub star button (asynchronously loaded iframe)
window.addEventListener('load', function() {
window.document.getElementById('ghbtn').src = 'http://ghbtns.com/github-btn.html?user=gmetais&repo=YellowLabTools&type=star&count=true&size=large';
});
}]);
yltApp.config(['$routeProvider', '$locationProvider',
+3 -8
View File
@@ -234,14 +234,6 @@ a.linkButton {
}
}
.star {
font-weight: bold;
span {
font-size: 1.2em;
}
}
.footer {
padding: 3em;
color: #413;
@@ -251,6 +243,9 @@ a.linkButton {
.version {
font-size: 0.7em;
}
.github {
margin: 1em 0 0 0.5em;
}
}
[class^="icon-"]:before, [class*=" icon-"]:before {
+2 -1
View File
@@ -50,8 +50,9 @@
<div id="header"><h1>Yellow Lab <span class="icon-lab"></span> Tools</h1></div>
<div id="body" ng-view autoscroll="true"></div>
<div class="footer">
<a href="/about">Learn more</a><br>If you like <b>Yellow Lab Tools</b>, <a href="https://github.com/gmetais/YellowLabTools" target="_blank" class="star">give it a <span>&#9733;</span> on GitHub</a>!<br>
<span class="version">@@version</span>
<br><a href="/about">More about Yellow Lab Tools</a><br>
<div class="github"><iframe id="ghbtn" frameborder="0" scrolling="0" width="145px" height="30px"></iframe></div>
</div>
<script>