Files
17th_Site_Front_End/Profile Page/profile.html

86 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Profile Page</title>
<link rel="stylesheet" href="styles2.css">
<script src="scripts.js"></script>
</head>
<body>
<nav class="navbar">
<ul class="nav-links">
<li><a href="#">Home</a></li>
<li><a href="#">Users</a></li>
<li><a href="#">Stuff</a></li>
<li><a href="#">Things</a></li>
</ul>
</nav>
<div id="profileWrapper">
<div id="fileHeader">
<div id="images">
</div>
<div id="details">
<h1>Name:</h1>
<h1>Rank:</h1>
<h1>Unit:</h1>
</div>
<div class="subnav">
<ul class="subnav-links">
<li><a href="#" class="active">Personnel File</a></li>
<li><a href="#">Activity History</a></li>
<li><a href="#">Shadowbox</a></li>
</ul>
<script>
// Get the subnav links
const subnavLinks = document.querySelectorAll('.subnav-links a');
// Add click event listener to each link
subnavLinks.forEach(link => {
link.addEventListener('click', function () {
// Remove "active" class from all links
subnavLinks.forEach(link => link.classList.remove('active'));
// Add "active" class to clicked link
this.classList.add('active');
// Get the index of the clicked link
const index = Array.from(subnavLinks).indexOf(this);
// Hide all content divs
const contentDivs = document.querySelectorAll('.content');
contentDivs.forEach(div => div.classList.remove('shown'));
// Show the corresponding content div
contentDivs[index].classList.add('shown');
});
});
</script>
</div>
</div>
<!-- Personnel File -->
<div class="content">
hello
</div>
<!-- Activity History -->
<div class="content">
hello2
</div>
<!-- Shadowbox -->
<div class="content shown">
<div id="shadowboxContainer">
<img src="../eParadox_3-19-2023.jpg" onerror="
this.onerror=null; this.style.display='none';
document.getElementById('shadowboxFallback').style.display='flex';">
<div id="shadowboxFallback" style="display:flex" onclick="uploadShadowbox()">
<p>Click to upload shadowbox</p>
<input type="file" name="shadowboxInput" onchange="handleShadowboxUpload(this)" style="display: none;">
</div>
</div>
</div>
</div>
</body>
</html>