@@ -30,42 +30,47 @@ navToggle();
30
30
var githubprojectsdomelement = document . getElementById ( 'githubprojects' ) ;
31
31
32
32
let githubprojects = [
33
- {
34
- name : 'chryz-hub/chryz-hub.github.io' ,
35
- icon : 'description' ,
36
- } ,
33
+ {
34
+ name : 'chryz-hub/chryz-hub.github.io' ,
35
+ } , {
36
+ name : 'chryz-hub/opensource-4-everyone' ,
37
+ } , {
38
+ name : 'chryz-hub/top-languages-cheat' ,
39
+ } , {
40
+ name : 'chryz-hub/web-dev-resources' ,
41
+ } ,
37
42
// Here can be added some more projets if needed
38
43
] ;
39
44
40
45
githubprojects . forEach ( ( project ) => {
41
- getproject ( project . name , project . icon ) ;
46
+ getproject ( project . name ) ;
42
47
} ) ;
43
48
44
- function getproject ( project , icon ) {
49
+ function getproject ( project ) {
45
50
fetch ( `https://api.github.com/repos/${ project } ` )
46
51
. then ( ( response ) => {
47
52
return response . json ( ) ;
48
53
} )
49
54
. then ( ( project ) => {
50
55
// we add the project card directly to the html dom
51
- githubprojectsdomelement . innerHTML += createprojectcard ( project , icon ) ;
56
+ githubprojectsdomelement . innerHTML += createprojectcard ( project ) ;
52
57
} ) ;
53
58
}
54
59
55
- function createprojectcard ( project , icon ) {
60
+ function createprojectcard ( project ) {
56
61
// removing github emojis cause they are not usable in html
57
62
project . description = project . description . replace ( / : [ ^ } ] * : / , '' ) ;
58
63
59
64
// TODO: add Project Card
60
65
let projectcard = `<a href="#">
61
66
<div class="item project">
62
- <h4 class="text-secondary">Chryz-Hub Website</h4>
63
- <p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quis quos consequatur atque perferendis
64
- sapiente consectetur iusto tempora temporibus, sequi maxime.</p>
67
+ <h4 class="text-secondary">${ project . name } </h4>
68
+ <p>${ project . description } </p>
65
69
<div>
66
- <span class="fab fa-html5"></span>
70
+ <!-- TODO add icons -->
71
+ <!-- <span class="fab fa-html5"></span>
67
72
<span class="fab fa-css3-alt"></span>
68
- <span class="fab fa-js"></span>
73
+ <span class="fab fa-js"></span> -->
69
74
</div>
70
75
</div>
71
76
</a>` ;
0 commit comments