{t("navbar.links.rules.title")}
@@ -101,7 +101,7 @@ const { title } = Astro.props;
}
}
}
-
+;
customElements.define('nav-bar', Navbar);
diff --git a/src/pages/announcements/index.astro b/src/pages/announcements/index.astro
index 5346bd9..310e83c 100644
--- a/src/pages/announcements/index.astro
+++ b/src/pages/announcements/index.astro
@@ -2,11 +2,11 @@
import { getCollection } from "astro:content"
import PageLayout from "../../layouts/PageLayout.astro";
import {astroI18n, t} from "astro-i18n";
-import moment from "moment";
import PostComponent from "../../components/PostComponent.astro";
+import * as dayjs from "dayjs";
const posts = (await getCollection("announcements", (entry) => entry.id.split("/")[0] === astroI18n.locale))
- .sort((a, b) => moment(b.data.created).unix() - moment(a.data.created).unix());
+ .sort((a, b) => dayjs(b.data.created).unix() - dayjs(a.data.created).unix());
---
diff --git a/src/pages/announcements/tags/[tag].astro b/src/pages/announcements/tags/[tag].astro
index e28b89c..e129507 100644
--- a/src/pages/announcements/tags/[tag].astro
+++ b/src/pages/announcements/tags/[tag].astro
@@ -1,16 +1,15 @@
---
-import moment from "moment/moment";
import {CollectionEntry} from "astro:content";
import {astroI18n, createGetStaticPaths, t} from "astro-i18n";
import {getCollection} from "astro:content";
import PageLayout from "../../../layouts/PageLayout.astro";
-import {l} from "../../../util/util";
import {capitalize} from "../../../components/admin/util";
import PostComponent from "../../../components/PostComponent.astro";
+import * as dayjs from "dayjs";
export const getStaticPaths = createGetStaticPaths(async () => {
const posts = (await getCollection('announcements', entry => entry.id.split("/")[0] === astroI18n.locale))
- .sort((a, b) => moment(b.data.created).unix() - moment(a.data.created).unix());
+ .sort((a, b) => dayjs(b.data.created).unix() - dayjs(a.data.created).unix());
let groupedByTags: Record[]> = {}
posts.forEach(post => {
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 0e60cd1..9784af7 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -41,8 +41,7 @@ function mapMap(i: Map, fn: (key: T, value: K) => J): J[] {
{t("home.subtitle.1")}