Skip to content

Commit 6bbfec6

Browse files
AK-007aswinzz
authored andcommitted
added star and fork (#258)
1 parent 2abf488 commit 6bbfec6

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

css/style.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,33 @@ header .card-underline{
246246
#footer{
247247
height: 90px;
248248
}
249+
#star-box,#fork-box
250+
{
251+
padding: 7px;
252+
outline: none;
253+
user-select: none;
254+
border-radius: 5px 0px 0px 5px;
255+
background-color: #6B6F74;
256+
color: white;
257+
}
258+
#star,#fork
259+
{
260+
261+
padding: 7px;
262+
outline: none;
263+
user-select: none;
264+
border-radius: 0px 5px 5px 0px;
265+
background-color: #D3AD7D;
266+
color: #14100C;
267+
}
268+
.st,.fo
269+
{
270+
position: relative;
271+
top: 50%;
272+
transform: translate(0%,-50%);
273+
margin-left: 10px;
274+
left: 60%;
275+
}
249276

250277
#snow{
251278
background-image:

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@
101101
<li class="nav-item">
102102
<a class="nav-link js-scroll-trigger" href="#works">Projects</a>
103103
</li>
104+
<li class="nav-item">
105+
<div class="st">
106+
<span id="star-box"><i class="fa fa-star" aria-hidden="true"></i> Stars</span>
107+
<span id="star"></span>
108+
</div>
109+
</li>
110+
<li class="nav-item">
111+
<div class="fo">
112+
<span id="fork-box"><i class="fa fa-code-fork" aria-hidden="true"></i> Forks</span>
113+
<span id="fork"></span>
114+
</div>
115+
</li>
104116
</ul>
105117
</div>
106118
</div>
@@ -494,5 +506,6 @@ <h4 class="contact_head">Mubaris NK</h4>
494506
<script src="js/contestant.js"></script>
495507
<script src="js/projects.js"></script>
496508
<script src="countDown.js"></script>
509+
<script src="js/apicall.js"></script>
497510

498511
</html>

js/apicall.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(function($) {
2+
"use strict"; // Start of use strict
3+
4+
var url="https://api.github.com/orgs/opencode18/repos?callback";
5+
$.getJSON(url,function(data)
6+
{
7+
var stars=data[3].watchers;
8+
var forks=data[3].forks;
9+
$('#star').text(stars);
10+
$('#fork').text(forks);
11+
});
12+
})(jQuery);

0 commit comments

Comments
 (0)