Skip to content

Commit

Permalink
Enhanced navigation bar and made it responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
anil-dewani committed Mar 28, 2024
1 parent 44314da commit b018ba7
Show file tree
Hide file tree
Showing 2 changed files with 263 additions and 123 deletions.
20 changes: 20 additions & 0 deletions personal-website/layouts/partials/footer/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,29 @@


})
displayContent();
})
</script>
<script type="text/javascript">
function displayContent() {
// Define the threshold for mobile devices
const mobileWidthThreshold = 768;

// Get the width of the screen
const screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;

// Check if the screen width is less than the threshold
if (screenWidth < mobileWidthThreshold) {
// Display mobile content
document.getElementById("mobileContent").style.display = "block";
document.getElementById("desktopContent").style.display = "none";
} else {
// Display desktop content
document.getElementById("desktopContent").style.display = "block";
document.getElementById("mobileContent").style.display = "none";
}
}
</script>

<!-- disabled chatwoot integration
<script>
Expand Down
Loading

0 comments on commit b018ba7

Please sign in to comment.