-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
120 lines (92 loc) · 3.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="data:,">
<title>GitHub-Repos-WebCards Demo</title>
<style>
body {
text-align: center;
}
ul {
display: inline-block;
text-align: left;
}
.hr-big {
height: 4px;
background-color: black;
}
.hr-small {
height: 2px;
background-color: blue;
width: 20vw;
}
p {
padding-left: 30vw;
padding-right: 30vw;
}
</style>
</head>
<body>
<h1>This is just an example of how GitHub-Repos-WebCards works (demo).</h1>
<h2>Single repo's data...</h2>
<gh-repos-cards style="display: none;" data-user="JULIUSNIXI" data-repo="bOgGle">
<div class="gh-repos-cards-div">
<h3>Repo's data:</h3>
<p class="gh-repos-cards-name">Repo's name: </p>
<p class="gh-repos-cards-description">Repo's description: </p>
</div>
</gh-repos-cards>
<br /> <br />
<hr class="hr-big" />
<br /> <br />
<h2>Single repo's data...</h2>
<gh-repos-cards style="display: none;" data-user="withastro" data-repo="astro">
<div class="gh-repos-cards-div">
<h3>Owner's data:</h3>
<img width="50px" height="50px" class="gh-repos-cards-avatar" />
<p class="gh-repos-cards-username">Owner's username: </p>
<h3>Repo's data:</h3>
<p class="gh-repos-cards-name">Repo's name: </p>
<p class="gh-repos-cards-description">Repo's description: </p>
<ul class="gh-repos-cards-topics">Repo's topics: </ul>
<ul class="gh-repos-cards-languages">Repo's languages: </ul>
<p class="gh-repos-cards-stars">Repo's stars: </p>
<p class="gh-repos-cards-watchers">Repo's watchers: </p>
<p class="gh-repos-cards-updatedat">Repo updated at: </p>
<p class="gh-repos-cards-forks">Repo's forks: </p>
</div>
</gh-repos-cards>
<br /> <br />
<hr class="hr-big" />
<br /> <br />
<h2>Bulk (all) repo's data...</h2>
<gh-repos-cards style="display: none;" data-user="JuliusNixi" data-repo="%all" data-sort="created" data-direction="desc">
<div class="gh-repos-cards-div">
<h3>Owner's data:</h3>
<img width="50px" height="50px" class="gh-repos-cards-avatar" />
<p class="gh-repos-cards-username">Owner's username: </p>
<h3>Repo's data:</h3>
<p class="gh-repos-cards-name">Repo's name: </p>
<p class="gh-repos-cards-description">Repo's description: </p>
<ul class="gh-repos-cards-topics">Repo's topics: </ul>
<ul class="gh-repos-cards-languages">Repo's languages: </ul>
<p class="gh-repos-cards-stars">Repo's stars: </p>
<p class="gh-repos-cards-watchers">Repo's watchers: </p>
<p class="gh-repos-cards-updatedat">Repo updated at: </p>
<p class="gh-repos-cards-forks">Repo's forks: </p>
<hr class="hr-small" />
</div>
</gh-repos-cards>
</body>
<script src="https://cdn.jsdelivr.net/gh/juliusnixi/GitHub-Repos-WebCards@2.0.0/ghreposcards.js"></script>
<script>
console.log("GitHub-Repos-WebCards: Project functions APIs example:")
GHRepoCardsInit(true).then(result => {
// Use APIs functions here.
// Optionally here you can also process the data injected however you want.
result.getData(`users/octocat/followers`).then(e => console.log(e));
});
</script>
</html>