feat: implement basic image protection and disable context menu

This commit is contained in:
Esteban 2026-03-02 08:40:59 -05:00
parent d26673f6b8
commit 225e60bac5
1 changed files with 15 additions and 0 deletions

View File

@ -10,9 +10,24 @@ import "@fontsource-variable/kameron";
const { title } = Astro.props;
---
<style is:global>
img {
-webkit-touch-callout: none;
-webkit-user-select: none;
user-select: none;
pointer-events: none;
}
</style>
<html lang="en" class="scroll-smooth">
<BaseHead title={title} />
<script>
document.addEventListener('contextmenu', event => {
if (event.target.tagName === 'IMG') {
event.preventDefault();
}
});
</script>
<body class="font-primary">
<slot />
<Footer />