Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit caa6a5f

Browse files
committed
some tinkering
1 parent e5b24d0 commit caa6a5f

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

homework/index.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,27 @@
2121
<div id="root">
2222
<label>HYF Repositories </label>
2323
</div>
24-
<!--<select>
25-
<option value="0">alumni</option>
26-
<option value="1">angular</option>
27-
etc
28-
</select>-->
24+
2925
</header>
3026

3127
<body>
3228
<!--<p>The repositories will be displayed here</p> testing the body contents-->
3329
<div id="container">
3430
<div id="forRepoBlock"><p>Repositories</p></div>
3531

36-
<div id="forContributorsBlock"><p>Contributors</p></div>
32+
<div id="forContributorsBlock">
33+
<div id="picture"><p>Picture</p></div>
34+
<div id="contributorName"><p>Name</p></div>
35+
<div id="numberContributions"><p>Number of contributions</p></div>
36+
<!--
3737
<div id="picture"></div>
38-
<div id="contributorName"></div>
39-
38+
<div id="contributorName"></div> -->
39+
40+
4041
</div>
4142

4243
<script src="./index.js"></script>
44+
4345
</body>
4446
</html>
4547

homework/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
//createAndAppend('pre', root, { text: JSON.stringify(data, null, 2) });
4040
const select = createAndAppend('select', root);
4141
createAndAppend('option', select, { text: 'Click here to choose a Repository' });
42+
4243
data.forEach(repo => {
4344
const name = repo.name;
4445
createAndAppend('option', select, { text: name });
@@ -66,7 +67,7 @@
6667
const contribsUrl = repo.contributors_url;
6768
fetchJSON(contribsUrl, (err, contribData) => {
6869
contribData.forEach(contributor => {
69-
createAndAppend('p', contribs, { text: ':' });
70+
createAndAppend('p', contribs, { text: '' });
7071
createAndAppend('img', contribs, { src: contributor.avatar_url, height: 30, class: 'picture' });
7172
createAndAppend('div', contribs, { text: contributor.login, class: 'contributorName' });
7273
createAndAppend('div', contribs, { text: contributor.contributions, class: 'numberContributions' });

homework/style.css

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ select {
2828
display: flex;
2929
flex-direction: row;
3030
align-items: flex-start;
31+
flex-flow: row nowrap;
32+
3133
margin: 1 rem;
3234
}
3335

3436
#forRepoBlock {
35-
color: purple;
37+
color: rgb(43, 0, 43);
3638
font-size: .9rem;
3739
padding: 4px 4px;
3840
margin-left: 2px;
@@ -44,28 +46,31 @@ select {
4446
border-style: bold;
4547
border-radius: 0%;
4648
padding: 10px;
47-
background:rgb(216, 142, 188);
48-
opacity: 0.8;
49+
background:rgba(230, 178, 210, 0.5);
50+
opacity: 1;
4951

5052
box-shadow: 10px 5px 5px grey;
5153
}
5254
#forContributorsBlock {
53-
color: rgb(112, 13, 13);
55+
color: rgb(48, 0, 20);
5456
font-size: .9rem;
5557
padding: 4px 4px;
5658
margin-left: 2px;
5759

58-
display: flex;
59-
flex-direction: row;
60+
display: grid;
61+
grid-template-columns: 33.3333% 33.3333% 33.3333%;
62+
grid-template-rows: auto;
63+
6064

6165
margin: 1rem;
6266
width: 40%;
6367

68+
6469
border-style: bold;
6570
border-radius: 0%;
6671
padding: 10px;
67-
background:rgb(155, 118, 92);
68-
opacity: 0.8;
72+
background:rgba(231, 185, 152, 0.5);
73+
opacity: 1;
6974

7075
box-shadow: 10px 5px 5px grey;
7176
}

0 commit comments

Comments
 (0)