Skip to content

Commit

Permalink
fix a multi items, add sponsor tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
majodev committed Oct 8, 2023
1 parent 66554d2 commit 31b3302
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 29 deletions.
6 changes: 5 additions & 1 deletion client/app/fonts/fonts.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ angular.module('googleWebfontsHelperApp')
$scope.sponsorsPromise = $http.get('https://sponsors.mranftl.com/json')
.success(function (data) {
$scope.sponsors = data.sponsors;
$scope.busy = false;

setTimeout(function () {
$('[data-toggle="tooltip"]').tooltip();
}, 0);

}) // err is not handled, because it is not critical

$scope.scrollListTop = function() {
Expand Down
42 changes: 14 additions & 28 deletions client/app/fonts/fonts.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,46 +50,32 @@
<!-- App name -->
<h4 class="page-header"><a href="/" ng-click="selectedItemID=''">google-webfonts-helper</a><br /><small>Get eot,
ttf, svg, woff and woff2 + CSS</small></h4>
<!-- GH Sponsor -->
<!-- <iframe id="githubSponsor" src="https://ghbtns.com/github-btn.html?user=majodev&type=sponsor&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="200px" height="30px"></iframe> -->
<!-- <div id="githubSponsor">
<a href="https://github.com/sponsors/majodev" target="_blank">
<img alt="GitHub Sponsors"
src="https://img.shields.io/github/sponsors/majodev?style=social&logo=github%20sponsors&label=sponsor"
height="30px">
</a>
</div> -->

<div class="nav-push-right">
<a class="btn btn-default actSponsorButton actSponsorButton{{ sponsor.type }}"
href="https://github.com/{{ sponsor.login }}" ng-repeat="sponsor in sponsors" role="button" target="_blank">
<img class="sponsor-img" src="{{ sponsor.url }}" alt="{{ sponsor.login }}" />
<div class="sponsor-img-overlay" />
href="https://github.com/{{ sponsor.login }}" ng-repeat="sponsor in sponsors" role="button" target="_blank"
data-toggle="tooltip" data-placement="bottom" title="{{ sponsor.login }}">
<span>
<img class="sponsor-img" src="{{ sponsor.url }}" alt="{{ sponsor.login }}" />
<span class="sponsor-img-overlay" />
</span>
</a>

<a href="https://github.com/sponsors/majodev" target="_blank" role="button" type="button"
class="btn btn-default actNavButton">
<i class="fa fa-heart-o sponsorheart"></i>&nbsp;<strong>Sponsor</strong>&nbsp;<span
ng-if="sponsors.length > 0" class="badge">{{sponsors.length}}</span>
class="btn btn-default actNavButton" data-toggle="tooltip" data-placement="bottom"
title="Join {{ sponsors.length }} lovely sponsors!">
<span>
<i class="fa fa-heart-o sponsorheart"></i>&nbsp;<strong>Sponsor</strong>
</span>
</a>
<a href="https://github.com/majodev/google-webfonts-helper" target="_blank" role="button" type="button"
class="btn btn-default actNavButton">
<i class="fa fa-star-o"></i>&nbsp;<strong>Star</strong>
<span>
<i class="fa fa-star-o"></i>&nbsp;<strong>Star</strong>
</span>
</a>
</div>

<!-- GH Stars -->
<!-- <iframe id="githubCount" src="https://ghbtns.com/github-btn.html?user=majodev&repo=google-webfonts-helper&type=watch&count=true&size=large"
allowtransparency="true" frameborder="0" scrolling="0" width="170px" height="30px"></iframe> -->
<!-- <div id="githubCount">
<a href="https://github.com/majodev/google-webfonts-helper" target="_blank">
<img alt="GitHub Repo stars"
src="https://img.shields.io/github/stars/majodev/google-webfonts-helper?style=social&logo=github&label=star"
height="30px">
</a>
</div> -->

</div>
</div>

Expand Down
1 change: 1 addition & 0 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<!-- build:js({client,node_modules}) app/vendor.js -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
Expand Down

0 comments on commit 31b3302

Please sign in to comment.