remove nsfw store stuff
This commit is contained in:
parent
f6fd56833d
commit
a11f1e5873
3 changed files with 0 additions and 42 deletions
|
@ -50,21 +50,6 @@ const showNsfw = Astro.url.searchParams.has('nsfw') || false;
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
|
||||||
import { nsfw } from "../lib/stores/nsfw";
|
|
||||||
|
|
||||||
// const nsfwImages = document.querySelectorAll('[data-nsfw="true"]');
|
|
||||||
// nsfw.subscribe((nsfw) => {
|
|
||||||
// if (nsfw) {
|
|
||||||
// // @ts-ignore
|
|
||||||
// nsfwImages.forEach((image) => (image.style.display = "inherit"));
|
|
||||||
// } else {
|
|
||||||
// // @ts-ignore
|
|
||||||
// nsfwImages.forEach((image) => (image.style.display = "none"));
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#parent:hover > #info {
|
#parent:hover > #info {
|
||||||
opacity: 70;
|
opacity: 70;
|
||||||
|
|
|
@ -40,33 +40,9 @@ const config = {
|
||||||
<Social href={s.url} text={s.name} image={s.icon} alt={s.name} />
|
<Social href={s.url} text={s.name} image={s.icon} alt={s.name} />
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
<br />
|
|
||||||
<button
|
|
||||||
class="border-2 border-gray-600 border-solid p-2 mt-4"
|
|
||||||
id="nsfwButton">loading...</button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<script>
|
|
||||||
// @ts-nocheck
|
|
||||||
import { nsfw } from "../lib/stores/nsfw";
|
|
||||||
|
|
||||||
function toggleNsfw() {
|
|
||||||
nsfw.set(!nsfw.get());
|
|
||||||
}
|
|
||||||
|
|
||||||
nsfw.subscribe((nsfw) => {
|
|
||||||
if (nsfw) {
|
|
||||||
document.getElementById("nsfwButton").innerText = `disable nsfw`;
|
|
||||||
} else {
|
|
||||||
document.getElementById("nsfwButton").innerText = `enable nsfw`;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById("nsfwButton").addEventListener("click", toggleNsfw);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
img.icon {
|
img.icon {
|
||||||
width: 10rem;
|
width: 10rem;
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
import { atom } from "nanostores";
|
|
||||||
|
|
||||||
export const nsfw = atom<boolean>(false);
|
|
Loading…
Add table
Reference in a new issue