File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 377
377
li {
378
378
display : inline ;
379
379
}
380
+ li .github-stars-count-whole-number {
381
+ display : none ;
382
+ }
380
383
}
381
384
382
385
Original file line number Diff line number Diff line change 1
1
var githubStarsScript = $ ( "script[src*=github-stars]" ) ;
2
2
var starCountCallDate = githubStarsScript . attr ( "star-count-call-date" ) ;
3
3
var starCountData = githubStarsScript . attr ( "star-count-data" ) ;
4
+ var ecosystemStars = githubStarsScript . attr ( "ecosystem" ) ;
5
+ var cloudfrontUrl = "" ;
6
+
7
+ if ( ecosystemStars == "true" ) {
8
+ cloudfrontUrl = "https://d2ze5o8gurgoho.cloudfront.net/star-count" ;
9
+ }
10
+ else {
11
+ cloudfrontUrl = "https://du4l4liqvfo92.cloudfront.net/star-count" ;
12
+ }
4
13
5
14
var today = new Date ( ) ;
6
15
var starCountCallDateParsed = new Date (
19
28
20
29
function updateStarCount ( ) {
21
30
console . log ( "Updated star count fetched" ) ;
22
- $ . getJSON ( "https://du4l4liqvfo92.cloudfront.net/star-count" , function ( data ) {
31
+ $ . getJSON ( cloudfrontUrl , function ( data ) {
23
32
localStorage . setItem ( starCountCallDate , Date . parse ( today ) ) ;
24
33
localStorage . setItem ( starCountData , JSON . stringify ( data ) ) ;
25
34
Original file line number Diff line number Diff line change 34
34
{% assign ecosystem = site.ecosystem | sort_natural: "title" %}
35
35
36
36
{% for item in ecosystem %}
37
- < div class ="col-md-6 ecosystem-card-wrapper " id ="ecosystemCards " data-categories ="{{ item.category | join: ", " }}" data-date-added="{{ item.date-added }} ">
37
+ < div class ="col-md-6 ecosystem-card-wrapper " id ="ecosystemCards " data-categories ="{{ item.category | join: ", " }}" data-date-added="{{ item.date-added }} " data-id =" {{ item.github-id }} " >
38
38
< div class ="card ecosystem-card ">
39
39
< a href ="{{ item.link }} " target ="_blank ">
40
40
< div class ="card-body {{ item.logo-class }} {% if item.experimental %}experimental{% endif %} ">
44
44
< div class ="icon-count-container ">
45
45
< li > < img class ="github-logo " src ="/assets/images/logo-github.svg "> </ li >
46
46
< li class ="github-stars-count "> </ li >
47
+ < li class ="github-stars-count-whole-number "> </ li >
47
48
</ div >
48
49
</ ul >
49
50
{% if item.experimental %}
122
123
</ script >
123
124
124
125
< script src ="//cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js "> </ script >
125
- < script star-count-call-date ="ecosystemStarCountCallDate " star-count-data ="ecosystemStarCountData " src ="{{ site.baseurl }}/assets/github-stars.js "> </ script >
126
+ < script id =" filter-script " ecosystem =" true " star-count-call-date ="ecosystemStarCountCallDate " star-count-data ="ecosystemStarCountData " src ="{{ site.baseurl }}/assets/github-stars.js "> </ script >
126
127
< script src ="//cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js "> </ script >
127
128
< script list-id ="ecosystem-index-cards " display-count ="100 " pagination ="false " src ="{{ site.baseurl }}/assets/filter-hub-tags.js "> </ script >
You can’t perform that action at this time.
0 commit comments