-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
238 lines (227 loc) · 11.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="Website to visualized algorithms and concepts in computer science." />
<meta name="author" content="Lennard Schober" />
<title>cs visualized</title>
<!-- Favicon -->
<link rel="icon" href="assets/img/favicons/favicon.ico?v=M44lzPylqQ" sizes="128x128">
<link rel="mask-icon" href="assets/img/favicons/icon.svg?v=M44lzPylqQ" color="#000000">
<link rel="icon" href="assets/img/favicons/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="assets/img/favicons/apple-touch-icon.png"> <!-- 180×180 -->
<!-- Favicon -->
<!-- Font Awesome icons (free version)-->
<script src="https://use.fontawesome.com/releases/v6.3.0/js/all.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Google fonts-->
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet" />
<link
href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="css/styles.css" rel="stylesheet" />
</head>
<body id="page-top">
<!-- Navigation-->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container px-4 px-lg-5">
<a class="navbar-brand" href="#page-top">
<img src="assets/img/logo/logo_512.png" style="max-height:2rem;" />
cs visualized
</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false"
aria-label="Toggle navigation">
Menu
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ms-auto">
<li class="nav-item"><a class="nav-link" href="#projects">Projects</a></li>
<li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
</ul>
</div>
</div>
</nav>
<!-- Masthead-->
<header class="masthead">
<div class="container px-4 px-lg-5 d-flex h-100 align-items-center justify-content-center">
<div class="d-flex justify-content-center">
<div class="text-center">
<h1 class="mx-auto my-0 text-uppercase">computer science visualized</h1>
<h2 class="text-white-50 mx-auto mt-2 mb-5">Visualize algorithms for better understanding and
intuition.</h2>
<a class="btn btn-primary" href="#projects" style="margin-top:100px">browse projects</a>
</div>
</div>
</div>
</header>
<!-- Projects-->
<section class="projects-section bg-light" id="projects">
<div class="container px-4 px-lg-5">
<!-- Featured Project Row-->
<div class="grid-container" style="margin-top: 100px">
<div class="grid-item">
<a href="sorting.html">
<img src="assets/img/sortingSiteCover.png" />
</a>
<h4 class="h4-style2">
sorting.
</h4>
</div>
<div class="grid-item">
<a href="pathfinding.html">
<img src="assets/img/pathfindingSiteCover.png" />
</a>
<h4 class="h4-style2">
pathfinding.
</h4>
</div>
<div class="grid-item">
<a href="rasterization.html">
<img src="assets/img/rasterizationSiteCover.png" />
</a>
<h4 class="h4-style2">
rasterization.
</h4>
</div>
<div class="grid-item">
<a href="simplex.html">
<img src="assets/img/WIP_cover.png" />
</a>
<h4 class="h4-style2">
graphs.
</h4>
</div>
</div>
</div>
</section>
<!-- Contact-->
<section class="contact-section bg-black" id="contact">
<div class="container px-4 px-lg-5" style="margin-top: 250px">
<div class="row gx-4 gx-lg-5">
<!-- change col-md-4 to col-md-3 if you add a fourth contacts slot-->
<div class="col-md-4 mb-3 mb-md-0">
<a href="https://github.com/lennardschober" class="card-link" target="_blank">
<div class="card py-4 h-100">
<div class="card-body text-center">
<i class="fab fa-github text-primary mb-2"></i>
<h4 class="text-uppercase m-0">GitHub</h4>
<hr class="my-4 mx-auto" />
<div class="small text-black-50">@lennardschober</div>
</div>
</div>
</a>
</div>
<!-- change col-md-4 to col-md-3 if you add a fourth contacts slot-->
<div class="col-md-4 mb-3 mb-md-0">
<a href="mailto:computerscience.visualized@gmail.com" class="card-link" target="_blank">
<div class="card py-4 h-100">
<div class="card-body text-center">
<i class="fas fa-envelope text-primary mb-2"></i>
<h4 class="text-uppercase m-0">Email</h4>
<hr class="my-4 mx-auto" />
<div class="small text-black-50">computerscience.visualized@gmail.com</div>
</div>
</div>
</a>
</div>
<!-- change col-md-4 to col-md-3 if you add a fourth contacts slot-->
<div class="col-md-4 mb-3 mb-md-0">
<a href="https://www.linkedin.com/in/lennardschober/" class="card-link" target="_blank">
<div class="card py-4 h-100">
<div class="card-body text-center">
<i class="fab fa-linkedin text-primary mb-2"></i>
<h4 class="text-uppercase m-0">LinkedIn</h4>
<hr class="my-4 mx-auto" />
<div class="small text-black-50">@lennardschober</div>
</div>
</div>
</a>
</div>
</div>
<!--
<div class="social d-flex justify-content-center">
<a class="mx-2" href="#!"><i class="fab fa-twitter"></i></a>
<a class="mx-2" href="#!"><i class="fab fa-facebook-f"></i></a>
<a class="mx-2" href="#!"><i class="fab fa-github"></i></a>
</div>
-->
</div>
</section>
<!-- Footer-->
<footer class="footer bg-white small text-center text-black-50">
<div class="container px-4 px-lg-5">© Lennard Schober 2024</div>
</footer>
<!-- Bootstrap core JS-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Core theme JS-->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-->
<!-- * * SB Forms JS * *-->
<!-- * * Activate your form at https://startbootstrap.com/solution/contact-forms * *-->
<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-->
<script src="https://cdn.startbootstrap.com/sb-forms-latest.js"></script>
<script>
window.addEventListener('DOMContentLoaded', event => {
// Function to set active navbar item
var setActiveNavItem = function (navItemSelector) {
const navbarLinks = document.querySelectorAll('.nav-link');
navbarLinks.forEach(link => {
if (link.getAttribute('href') === navItemSelector) {
link.classList.add('active');
} else {
link.classList.remove('active');
}
});
};
// Navbar shrink function
var navbarShrink = function () {
const navbarCollapsible = document.body.querySelector('#mainNav');
var navbarHeight = document.getElementById('mainNav').offsetHeight; // Get the height of the navbar
// get distance from top of doc to top of section (accounting for navbar)
var projects = document.getElementById('projects');
var top1 = projects.getBoundingClientRect().top + window.scrollY - navbarHeight;
var contact = document.getElementById('contact');
var top2 = contact.getBoundingClientRect().top + window.scrollY - navbarHeight;
var scrollPos = window.scrollY;
if (!navbarCollapsible) {
return;
}
// decide which navbar to show depending on scroll position
if (scrollPos < top1) { // transparent navbar
navbarCollapsible.classList.remove('navbar-shrink');
navbarCollapsible.classList.remove('navbar-shrink2');
setActiveNavItem('#home'); // Set the home element as active
} else if (scrollPos >= top1 && scrollPos < top2) { // white navbar
navbarCollapsible.classList.remove('navbar-shrink2');
navbarCollapsible.classList.add('navbar-shrink');
setActiveNavItem('#projects'); // Set the projects element as active
} else { // black navbar
navbarCollapsible.classList.remove('navbar-shrink');
navbarCollapsible.classList.add('navbar-shrink2');
setActiveNavItem('#contact'); // Set the contact element as active
}
};
// Shrink the navbar
navbarShrink();
// Shrink the navbar when page is scrolled
document.addEventListener('scroll', navbarShrink);
// Collapse responsive navbar when toggler is visible
const navbarToggler = document.body.querySelector('.navbar-toggler');
const responsiveNavItems = [].slice.call(
document.querySelectorAll('#navbarResponsive .nav-link')
);
responsiveNavItems.map(function (responsiveNavItem) {
responsiveNavItem.addEventListener('click', () => {
if (window.getComputedStyle(navbarToggler).display !== 'none') {
navbarToggler.click();
}
});
});
updateWindow();
});
</script>
</body>
</html>