Skip to content

Commit 7eae73f

Browse files
Camilla HallbergCamilla Hallberg
authored andcommitted
first commit. added fetch of api to get my repos
1 parent ded93a5 commit 7eae73f

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

code/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
<meta charset="UTF-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Project GitHub Tracker</title>
7+
<title>Camillas GitHub Tracker</title>
88
<link rel="stylesheet" href="./style.css" />
9+
<link rel="preconnect" href="https://fonts.googleapis.com">
10+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11+
<link href="https://fonts.googleapis.com/css2?family=Shizuru&display=swap" rel="stylesheet">
912
</head>
1013
<body>
11-
<h1>GitHub Tracker</h1>
14+
<h1>Camillas GitHub Tracker</h1>
1215
<h2>Projects:</h2>
1316
<main id="projects"></main>
1417

code/script.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const username = 'CamillaHallberg'
2+
const API_REPOS_URL = `https://api.github.com/users/${username}/repos`
3+
4+
fetch(API_REPOS_URL)
5+
.then(res => res.json())
6+
.then(data => {
7+
console.log(data, 'my repos');
8+
})
9+

code/style.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
body {
22
background: #FFECE9;
3+
}
4+
5+
h1 {
6+
font-family: 'Shizuru', cursive;
7+
font-size: 96px;
8+
color:palevioletred;
9+
text-align: center;
10+
}
11+
12+
h2 {
13+
font-family: 'Shizuru', cursive;
14+
font-size: 36px;
15+
color:mediumpurple;
16+
text-align: center;
317
}

0 commit comments

Comments
 (0)