Skip to content

Commit e147131

Browse files
committed
Update
1 parent e0f78ad commit e147131

File tree

2 files changed

+75
-2
lines changed

2 files changed

+75
-2
lines changed

templates/cell_simulator.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,18 @@
1414
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
1515
<link rel="stylesheet" type="text/css" href="../src/css/cell_simulator.css">
1616
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9851772843061782"
17-
crossorigin="anonymous"></script>
17+
crossorigin="anonymous"></script>
18+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
19+
<script>
20+
$(function () {
21+
$("#includedContent").load("includes/header.html");
22+
});
23+
</script>
1824
</head>
1925

2026
<body>
27+
<div id="includedContent"></div>
28+
2129
<header class="bg-light py-4 text-center">
2230
<div class="container">
2331
<div style="display: inline-block; position: relative;">
@@ -266,4 +274,4 @@ <h5 class="text-center mt-2" id="drain_id">Drain</h5>
266274

267275
</body>
268276

269-
</html>
277+
</html>

templates/includes/header.html

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>SSD Simulator</title>
8+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
9+
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
10+
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"></script>
11+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
12+
13+
<script>
14+
$(document).ready(function () {
15+
// $('.nav-link').click(function () {
16+
// $('.nav-link').removeClass('active');
17+
// $(this).addClass('active');
18+
// });
19+
20+
// Add the following code to set the active link based on the current page
21+
var currentPath = window.location.pathname;
22+
$('.nav-link').each(function () {
23+
var href = $(this).attr('href');
24+
if (href === currentPath) {
25+
$(this).addClass('active');
26+
}
27+
});
28+
});
29+
</script>
30+
31+
</head>
32+
33+
<body>
34+
<nav class="navbar navbar-expand-lg navbar-light bg-light">
35+
<a class="navbar-brand" href="/">
36+
<img src="../static/src/icon/icon.png" width="30" height="30" alt="" loading="lazy">
37+
Eyana: SSD Simulator
38+
</a>
39+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
40+
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
41+
<span class="navbar-toggler-icon"></span>
42+
</button>
43+
<div class="collapse navbar-collapse" id="navbarNav">
44+
<ul class="navbar-nav ml-auto">
45+
<li class="nav-item">
46+
<a class="nav-link" href="flash_memory.html">Home <span class="sr-only">(current)</span></a>
47+
</li>
48+
<li class="nav-item">
49+
<a class="nav-link" href="cell_simulator.html">Cell Simulator</a>
50+
</li>
51+
<li class="nav-item">
52+
<a class="nav-link" href="flash_memory.html">The SSD Simulator</a>
53+
</li>
54+
<li class="nav-item">
55+
<a class="nav-link" href="paper.html">Research Paper</a>
56+
</li>
57+
<li class="nav-item">
58+
<a class="nav-link" href="https://forms.gle/J1WJCxWN2cMfhZ4u7">Feedback</a>
59+
</li>
60+
</ul>
61+
</div>
62+
</nav>
63+
</body>
64+
65+
</html>

0 commit comments

Comments
 (0)