Skip to content

Commit

Permalink
Merge pull request #402 from vishalvivekm/patch34d
Browse files Browse the repository at this point in the history
disable modal for images with data-modal="false" in docs pages
  • Loading branch information
vishalvivekm authored Oct 28, 2024
2 parents 961e930 + 24a55af commit 7462f99
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<div class="col-lg-6">
<a href="/">
{{ $svg := resources.Get "icons/logo.svg" }}
<img class="footer-logo" src="{{ $svg.Permalink }}" alt="Footer Logo Layer5">
<img class="footer-logo" src="{{ $svg.Permalink }}" alt="Footer Logo Layer5" data-modal="false">
</a>
</div>
<div class="col-lg-6 footer-info footer-icons">
{{ range .Site.Params.links.footer.icons }}
<a href="{{ .url }}" class="{{ .class }}" target="_blank" rel="noreferrer">
{{ $svg1 := resources.Get .icon }}
<img height="30px" src="{{ $svg1.Permalink }}" alt="{{ .alt }}">
<img height="30px" src="{{ $svg1.Permalink }}" alt="{{ .alt }}" data-modal="false">
</a>
{{ end }}
</div>
Expand Down Expand Up @@ -87,4 +87,4 @@ <h5 class="footer-h5"><a href="{{ .url }}">{{ .name }}</a></h5>
href="https://layer5.io/company/legal/terms-of-service">Terms</a></span>
</div>
</div>
</footer>
</footer>
8 changes: 4 additions & 4 deletions layouts/partials/image-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@

document.getElementById("modalPic").src = src;
document.getElementById("myModal").style.display = "block";
document.getElementById("site-footer").style.display = "hidden";
}


// Close the Modal
function closeModal() {
document.getElementById("modalPic").src = "";
document.getElementById("myModal").style.display = "none";
document.getElementById("site-footer").style.display = "block";
}

</script>
Expand All @@ -44,8 +42,10 @@
var imgTags = document.querySelectorAll("img");
imgTags.forEach(function (img) {
img.onclick = function () {
openModal(img);
if (img.dataset.modal !== "false") {
openModal(img);
}
};
});
});
</script>
</script>
4 changes: 2 additions & 2 deletions layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<a class="navbar-brand" href="/">
<span class="navbar-brand__logo navbar-logo">
{{ $svg := resources.Get "icons/logo.svg" }}
<img class="footer-logo" src="/images/logo.svg" alt="logo" />
<img class="footer-logo" src="/images/logo.svg" alt="logo" data-modal="false" />
</span>
<span class="navbar-brand__name"></span
></a>
Expand Down Expand Up @@ -51,7 +51,7 @@
data-toggle="dropdown"
style="padding-top:6px"
>
<img width="28px" src="/images/grid-icon.svg" class="grid-icon" />
<img width="28px" src="/images/grid-icon.svg" class="grid-icon" data-modal="false" />

</div>
<div class="dropdown-menu" aria-labelledby="productsDropdown" style="margin-left:-4.5rem;visibility:hidden;">
Expand Down

0 comments on commit 7462f99

Please sign in to comment.