Add EsLint

This commit is contained in:
2023-12-23 15:36:22 +01:00
parent 5a5cce199b
commit 8fcab610fb
22 changed files with 2215 additions and 468 deletions

View File

@@ -1,11 +1,11 @@
---
import { Image } from "astro:assets";
import Basic from "./Basic.astro";
import '../styles/button.css';
import localLogo from "../images/logo.png"
import {YoutubeSolid, DiscordSolid, CaretDownOutline} from "flowbite-svelte-icons"
import "../styles/button.css";
import localLogo from "../images/logo.png";
import {YoutubeSolid, DiscordSolid, CaretDownOutline} from "flowbite-svelte-icons";
import {t} from "astro-i18n";
import {l} from "../util/util"
import {l} from "../util/util";
import ServerStatus from "../components/ServerStatus.svelte";
@@ -83,26 +83,26 @@ const { title } = Astro.props;
</div>
</nav-bar>
<script>
class Navbar extends HTMLElement {
constructor() {
super();
if (window.scrollY != 0) {
this.classList.add("scrolled");
} else {
this.classList.remove("scrolled");
}
class Navbar extends HTMLElement {
constructor() {
super();
if (window.scrollY != 0) {
this.classList.add("scrolled");
} else {
this.classList.remove("scrolled");
}
window.onscroll = e => {
if (window.scrollY != 0) {
this.classList.add("scrolled");
} else {
this.classList.remove("scrolled");
}
}
}
}
;
customElements.define('nav-bar', Navbar);
window.onscroll = e => {
if (window.scrollY != 0) {
this.classList.add("scrolled");
} else {
this.classList.remove("scrolled");
}
};
}
}
customElements.define("nav-bar", Navbar);
</script>
<main class="flex-1">
<slot />