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;
|
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">
|
<html lang="en" class="scroll-smooth">
|
||||||
<BaseHead title={title} />
|
<BaseHead title={title} />
|
||||||
|
<script>
|
||||||
|
document.addEventListener('contextmenu', event => {
|
||||||
|
if (event.target.tagName === 'IMG') {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<body class="font-primary">
|
<body class="font-primary">
|
||||||
<slot />
|
<slot />
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue