feat: implement basic image protection and disable context menu
This commit is contained in:
parent
d26673f6b8
commit
225e60bac5
|
|
@ -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 />
|
||||
|
|
|
|||
Loading…
Reference in New Issue