tangled
alpha
login
or
join now
thecoded.prof
/
CMU
0
fork
atom
CMU Coding Bootcamp
0
fork
atom
overview
issues
pulls
pipelines
feat(html): nov 5
thecoded.prof
4 months ago
e973da63
20d13211
verified
This commit was signed with the committer's
known signature
.
thecoded.prof
SSH Key Fingerprint:
SHA256:ePn0u8NlJyz3J4Zl9MHOYW3f4XKoi5K1I4j53bwpG0U=
+109
-18
4 changed files
expand all
collapse all
unified
split
html
css
styles.css
index.html
js
script.js
page2.html
+69
-2
html/css/styles.css
···
1
1
-
.h1 {
2
2
-
font-size: 32px;
1
1
+
h1 {
2
2
+
font-size: 48px;
3
3
+
margin: 0;
4
4
+
color: #8aadf4;
5
5
+
}
6
6
+
7
7
+
h2 {
8
8
+
font-size: 36px;
9
9
+
margin: 0;
10
10
+
}
11
11
+
12
12
+
.heading {
13
13
+
color: #a5adcb;
14
14
+
}
15
15
+
16
16
+
* {
17
17
+
font-family:
18
18
+
system-ui,
19
19
+
-apple-system,
20
20
+
BlinkMacSystemFont,
21
21
+
"Segoe UI",
22
22
+
Roboto,
23
23
+
Oxygen,
24
24
+
Ubuntu,
25
25
+
Cantarell,
26
26
+
"Open Sans",
27
27
+
"Helvetica Neue",
28
28
+
sans-serif;
29
29
+
color: #cad3f5;
30
30
+
}
31
31
+
32
32
+
body {
33
33
+
background-color: #24273a;
34
34
+
}
35
35
+
36
36
+
main {
37
37
+
margin: none;
38
38
+
display: flex;
39
39
+
flex-direction: column;
40
40
+
gap: 5rem;
41
41
+
align-items: center;
42
42
+
}
43
43
+
44
44
+
.hr {
45
45
+
width: 80rem;
46
46
+
border-top: 2px solid #6e738d;
47
47
+
}
48
48
+
49
49
+
.container {
50
50
+
display: flex;
51
51
+
width: 160rem;
52
52
+
flex-direction: column;
53
53
+
gap: 0.1rem;
54
54
+
align-items: center;
55
55
+
}
56
56
+
57
57
+
.card {
58
58
+
width: 15rem;
59
59
+
height: 20rem;
60
60
+
background-color: #363950;
61
61
+
border-radius: 0.5rem;
62
62
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
63
63
+
transition: transform 0.15s ease-in-out;
64
64
+
cursor: pointer;
65
65
+
}
66
66
+
67
67
+
.card:hover {
68
68
+
transform: scale(1.05);
69
69
+
transition: transform 0.15s ease-in-out;
3
70
}
+32
-3
html/index.html
···
4
4
<link rel="stylesheet" href="css/styles.css" />
5
5
<script src="js/script.js"></script>
6
6
</head>
7
7
-
<body>
8
8
-
<h1>Hello World</h1>
9
9
-
<button id="nav" onclick="navigateToPage('page2.html')">Page 2</button>
7
7
+
<body style="margin: 0; padding: 8px">
8
8
+
<main>
9
9
+
<h1>Samuel Shuert</h1>
10
10
+
<div class="container">
11
11
+
<h2 class="heading">Projects</h2>
12
12
+
<div class="hr"></div>
13
13
+
<div
14
14
+
style="
15
15
+
display: flex;
16
16
+
flex-direction: row;
17
17
+
justify-content: center;
18
18
+
padding-top: 2rem;
19
19
+
gap: 1rem;
20
20
+
"
21
21
+
>
22
22
+
<div class="card" onclick="openProject('temp')"></div>
23
23
+
<div class="card" onclick="openProject('temp')"></div>
24
24
+
<div class="card" onclick="openProject('temp')"></div>
25
25
+
</div>
26
26
+
</div>
27
27
+
<div class="container">
28
28
+
<div class="hr" style="width: 20rem; margin-bottom: 2rem"></div>
29
29
+
<h2 class="heading">Education</h2>
30
30
+
<div class="hr"></div>
31
31
+
</div>
32
32
+
<div class="container">
33
33
+
<div class="hr" style="width: 20rem; margin-bottom: 2rem"></div>
34
34
+
<h2 class="heading">Skills</h2>
35
35
+
<div class="hr"></div>
36
36
+
</div>
37
37
+
<div class="hr" style="width: 20rem"></div>
38
38
+
</main>
10
39
</body>
11
40
</html>
+8
-2
html/js/script.js
···
1
1
-
navigateToPage = (page) => {
2
2
-
window.location.href = page;
1
1
+
const projects = {};
2
2
+
3
3
+
const openProject = (project) => {
4
4
+
if (Object.keys(projects).includes(project)) {
5
5
+
window.location.href = projects[project];
6
6
+
} else {
7
7
+
alert("Project not found");
8
8
+
}
3
9
};
-11
html/page2.html
···
1
1
-
<html>
2
2
-
<head>
3
3
-
<title>Another Page</title>
4
4
-
<link rel="stylesheet" href="css/styles.css" />
5
5
-
<script src="js/script.js"></script>
6
6
-
</head>
7
7
-
<body>
8
8
-
<h1>Page 2!</h1>
9
9
-
<button id="nav" onclick="navigateToPage('index.html')">Index</button>
10
10
-
</body>
11
11
-
</html>