Skip to content

Commit 48cc152

Browse files
Kara HowesKara Howes
authored andcommitted
applied same margins and borders to all containers
1 parent 6eb4cff commit 48cc152

4 files changed

Lines changed: 100 additions & 27 deletions

File tree

code/assets/KH_profile.jpeg

65.1 KB
Loading

code/index.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<title>Project GitHub Tracker- Kara Howes</title>
88
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
99
<link href="https://fonts.googleapis.com/css2?family=Special+Elite&display=swap" rel="stylesheet">
10-
10+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap" rel="stylesheet">
1111
<link rel="stylesheet" href="./style.css" />
1212
</head>
1313
<body>
@@ -24,6 +24,18 @@
2424

2525
</header>
2626
<section class="profile-container">
27+
<div class="profile-wrapper">
28+
<div class="profile-photo">
29+
<img src="./assets/KH_profile.jpeg" alt="Profile Picture of User">
30+
</div>
31+
<div class="profile-username">
32+
<h1>Kara</h1>
33+
<h2>KaraHowes</h1>
34+
</div>
35+
</div>
36+
<div class="profile-text">
37+
<p> New to coding, a little more experienced at life. PhD in Chemistry (UK), Post-doc at ETH Zürich. Always looking for new opportunities to learn and grow</p>
38+
</div>
2739

2840
</section>
2941

code/script.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,35 @@ const getRepos = ()=>{
1515
//Here, I filter only the projects forked from Technigo, starting from 2021 (since I have earlier projects also forked from Technigo)
1616
const forkedProjects = data.filter(repo => repo.fork && repo.name.startsWith('project-') && repo.created_at.startsWith('2021-'))
1717
// Here I update the projectsContainer.innerHTML to show a list of all forked repos
18-
forkedProjects.forEach(repo => projectsContainer.innerHTML += `<p>${repo.name}</p>`)
18+
//forkedProjects.forEach(repo => projectsContainer.innerHTML += `<p>${repo.name}</p>`)
1919
// Here I update the cards.Container to show cards with data extracted from the GitHUb API
2020

2121
forkedProjects.forEach(repo => cardsContainer.innerHTML += `
2222
<section class="js-card">
2323
<div class="card-projectname" id="cardProjectName">
24-
Project Name: <span class="space">${repo.name}</span></div>
24+
<span class="field">Project Name:</span> <span class="space">${repo.name}</span></div>
2525
<div class="updated" id="cardUpdated">
26-
Most recent update: <span class="space"> ${new Date(repo.pushed_at).toDateString()}</span>
26+
Most recent update:<span class="space"> ${new Date(repo.pushed_at).toDateString()}</span>
2727
</div>
2828
<div class= "branch" id="cardBranch">
29-
Name of default branch:<span class="space">${repo.default_branch}</span>
29+
Name of default branch:<span class="space">${repo.default_branch}</span>
3030
</div>
3131
<div class= "URL" id="cardURL">
32-
URL: <span class="space"><a href="${repo.html_url} ">Clicky</a></span>
32+
URL: <span class="space"><a href="${repo.html_url} ">Clicky</span></a>
3333
</div>
3434
<div class= "number-commits" id="commit-${repo.name}">
35-
Number of commit Messages:
35+
Number of commit Messages:
3636
</div>
3737
<div class= "times-forked" id="cardForked">
38-
Number of times forked: <span class="space">${repo.forks}</span>
39-
</div>
40-
<div class= "blank-line" id="cardBlank">
41-
blank
38+
Number of times forked:<span class="space">${repo.forks}</span>
4239
</div>
40+
4341
4442
45-
</section>`)
43+
</section>`
44+
45+
)
46+
4647
// Here we store the forkedProjects.length and console.log to make sure it is correct.
4748
drawChart(forkedProjects.length)
4849
//console.log('hello', forkedProjects.length)

code/style.css

Lines changed: 75 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
1+
html {
2+
font-size: 16px;
3+
}
14
body {
25
background-color: white;
36
font-family: 'Special Elite', cursive;
47
margin: 0;
58
}
69

10+
h1 {
11+
font-weight: 400;
12+
font-size: 2rem;
13+
padding: 0 5px;
14+
margin:0;
15+
16+
}
17+
h2 {
18+
font-weight: 300;
19+
font-size: 1.5 rem;
20+
padding: 0 5px;
21+
margin:0;
22+
23+
}
24+
25+
26+
p {
27+
font-family: 'Roboto', sans-serif;
28+
font-weight: 300;
29+
}
730
/* Header*/
831
.header {
932
width: 100%;
@@ -27,37 +50,59 @@ body {
2750

2851
.header img {
2952
width: 250px;
30-
margin: 0 0 5px 50px;
53+
margin: 0 auto 5px auto;
54+
display: block;
55+
3156
}
3257
/* Profile styling and image*/
58+
.profile-container{
59+
width:90%;
60+
margin: 0 auto;
61+
62+
}
63+
.profile-wrapper{
64+
display: flex;
65+
flex-direction: row;
66+
}
67+
.profile-photo {
68+
width:30%;
69+
}
70+
.profile-photo img{
71+
width: 100%;
72+
border-radius: 50%;
73+
filter: grayscale(100%);
74+
75+
}
3376

77+
.profile-username{
78+
font-family: 'Roboto', sans-serif;
79+
padding: 0 5px;
80+
margin:0;
81+
align-items: center;
82+
}
83+
84+
.profile-text {
85+
/*margin: 5px;
86+
padding: 5px;*/
87+
text-align: justify;
88+
}
3489

3590
/* Cards styling*/
3691
.projects-container{
3792
width: 90%;
38-
margin: 20px, auto;
93+
margin: 0 auto;
3994
}
4095

4196
.cards-container {
42-
width: 90%;
43-
margin: 20px auto;
44-
}
45-
/*.html-card {
46-
width: 90%;
47-
background-color: white;
48-
border: 1px solid #DADBDB;
49-
box-shadow: 1px 1px 3px rgba(0,0,0,.25);
50-
margin: 50px;
97+
width: 100%;
5198

5299
}
53-
*/
54100
.js-card {
55101
width: 90%;
56102
background-color: white;
57103
border: 1px solid #DADBDB;
58104
box-shadow: 1px 1px 3px rgba(0,0,0,.25);
59-
margin: 50px;
60-
105+
margin: 20px auto;
61106
}
62107

63108
.card-projectname {
@@ -71,11 +116,26 @@ margin: 20px, auto;
71116
padding: 6px 0 0 0;
72117
border-bottom: 1px solid #B2B3B4;
73118
}
119+
.URL a {
120+
text-decoration: none;
74121

122+
}
123+
.URL a:hover{
124+
cursor: pointer;
125+
color: #87bee7;
126+
}
127+
.URL a:visited{
128+
color:#87bee7;
129+
}
75130
.space {
76-
margin-left: 5px;
131+
margin-left: 8px;
132+
color: #87bee7;
77133
}
78134

135+
.field {
136+
color:#87bee7;
137+
}
138+
79139
/* Chart styling*/
80140
.canvas-chart{
81141
max-width: 500px;

0 commit comments

Comments
 (0)