Skip to content

Commit

Permalink
Hopefully fix gallery.html
Browse files Browse the repository at this point in the history
  • Loading branch information
coffandro authored Oct 6, 2024
1 parent 128380f commit 6635f5e
Showing 1 changed file with 40 additions and 8 deletions.
48 changes: 40 additions & 8 deletions Gallery/gallery.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,49 @@
<script id="Font-Awesome" src="https://kit.fontawesome.com/5c072ddc8a.js" crossorigin="anonymous"></script>
</head>
<body>

<!--Navigation bar-->
<div id="nav-placeholder">
</div>
<script>
if (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i))
{
document.documentElement.classList.toggle("mobile");
}
$(function(){
$("#nav-placeholder").load("/Gallery/galleryNav.html");
});
LoadNavBar = function() {
// loading a different nav bar depending on phone type
if (
navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPad/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/BlackBerry/i) ||
navigator.userAgent.match(/Windows Phone/i) ||
window.innerWidth <= 800)
{
document.documentElement.classList.toggle("mobile", true);
document.getElementById('mnav').removeAttribute('disabled');
$(function(){
$("#nav-placeholder").load("/mobile-navbar.html");
});
}
// nav bar for touch-screen (mobile) devices
else
{
document.documentElement.classList.toggle("mobile", false);
document.getElementById('nav').removeAttribute('disabled');
$(function(){
$("#nav-placeholder").load("/galleryNav.html");
});
}
};

window.onresize = function() {
LoadNavBar()
};
LoadNavBar()
// nav bar for everything else (desktop)
</script>
<!--end of Navigation bar-->

<script>

let start = new Date().getTime();

Expand Down Expand Up @@ -172,4 +204,4 @@
<div class="card"><img src="https://picsum.photos/400/300?random=6"></div>
</div>
</body>
</html>
</html>

0 comments on commit 6635f5e

Please sign in to comment.