Implemented some placeholder stuff to the shadowbox tab
This commit is contained in:
BIN
Paradox_3-19-2023.jpg
Normal file
BIN
Paradox_3-19-2023.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 274 KiB |
@@ -35,7 +35,7 @@
|
|||||||
<script>
|
<script>
|
||||||
// Get the subnav links
|
// Get the subnav links
|
||||||
const subnavLinks = document.querySelectorAll('.subnav-links a');
|
const subnavLinks = document.querySelectorAll('.subnav-links a');
|
||||||
|
|
||||||
// Add click event listener to each link
|
// Add click event listener to each link
|
||||||
subnavLinks.forEach(link => {
|
subnavLinks.forEach(link => {
|
||||||
link.addEventListener('click', function () {
|
link.addEventListener('click', function () {
|
||||||
@@ -43,14 +43,14 @@
|
|||||||
subnavLinks.forEach(link => link.classList.remove('active'));
|
subnavLinks.forEach(link => link.classList.remove('active'));
|
||||||
// Add "active" class to clicked link
|
// Add "active" class to clicked link
|
||||||
this.classList.add('active');
|
this.classList.add('active');
|
||||||
|
|
||||||
// Get the index of the clicked link
|
// Get the index of the clicked link
|
||||||
const index = Array.from(subnavLinks).indexOf(this);
|
const index = Array.from(subnavLinks).indexOf(this);
|
||||||
|
|
||||||
// Hide all content divs
|
// Hide all content divs
|
||||||
const contentDivs = document.querySelectorAll('.content');
|
const contentDivs = document.querySelectorAll('.content');
|
||||||
contentDivs.forEach(div => div.classList.remove('shown'));
|
contentDivs.forEach(div => div.classList.remove('shown'));
|
||||||
|
|
||||||
// Show the corresponding content div
|
// Show the corresponding content div
|
||||||
contentDivs[index].classList.add('shown');
|
contentDivs[index].classList.add('shown');
|
||||||
});
|
});
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Personnel File -->
|
<!-- Personnel File -->
|
||||||
<div class="content shown">
|
<div class="content">
|
||||||
hello
|
hello
|
||||||
</div>
|
</div>
|
||||||
<!-- Activity History -->
|
<!-- Activity History -->
|
||||||
@@ -67,8 +67,10 @@
|
|||||||
hello2
|
hello2
|
||||||
</div>
|
</div>
|
||||||
<!-- Shadowbox -->
|
<!-- Shadowbox -->
|
||||||
<div class="content">
|
<div class="content shown">
|
||||||
hello3
|
<div id="shadowboxContainer">
|
||||||
|
<img src="../Paradox_3-19-2023.jpg">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -178,4 +178,18 @@ p {
|
|||||||
|
|
||||||
.shown {
|
.shown {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#shadowboxContainer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#shadowboxContainer > img {
|
||||||
|
max-height: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user