mirror of
https://github.com/sergeyyarkov/yarkov.tech.git
synced 2026-10-11 10:29:21 +03:00
projects page
This commit is contained in:
parent
943a074058
commit
2c28b35277
@ -1,21 +1,21 @@
|
|||||||
---
|
---
|
||||||
|
import { getCollection } from "astro:content";
|
||||||
import PageLayout from "@layouts/default.astro";
|
import PageLayout from "@layouts/default.astro";
|
||||||
import ProjectsList from "@components/ProjectsList.astro";
|
import ProjectsList from "@components/ProjectsList.astro";
|
||||||
import ProjectItem from "@components/ProjectItem.astro";
|
import ProjectItem from "@components/ProjectItem.astro";
|
||||||
import PageHeading from "@components/PageHeading.astro";
|
import PageHeading from "@components/PageHeading.astro";
|
||||||
import { getLanguageFromURL } from "@i18n/utils";
|
import { getLanguageFromURL } from "@i18n/utils";
|
||||||
import { getCollection } from "astro:content";
|
|
||||||
// import { useTranslation } from "@i18n/utils";
|
|
||||||
// const t = useTranslation(Astro);
|
// const t = useTranslation(Astro);
|
||||||
const lang = getLanguageFromURL(Astro.url.pathname);
|
const pageLang = getLanguageFromURL(Astro.url.pathname);
|
||||||
const projects = (await getCollection("projects")).filter(
|
const projects = (await getCollection("projects", (e) => e.slug.startsWith(`${pageLang}/`))).sort(
|
||||||
(p) => !p.data.draft && p.id.split(".")[1] === lang
|
(a, b) => b.data.year - a.data.year
|
||||||
);
|
);
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout
|
<PageLayout
|
||||||
noIndex
|
noIndex
|
||||||
lang={lang}
|
lang={pageLang}
|
||||||
title={"Проекты"}
|
title={"Проекты"}
|
||||||
description={"Несколько моих основных проектов которые были разработаны и выложены в открытый доступ."}
|
description={"Несколько моих основных проектов которые были разработаны и выложены в открытый доступ."}
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user