mirror of
https://github.com/zadam/trilium.git
synced 2026-02-08 15:37:03 +01:00
feat(website/resources): display icon packs
This commit is contained in:
@@ -1,12 +1,30 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import Card from "../../components/Card";
|
||||
import Section from "../../components/Section";
|
||||
import { usePageTitle } from "../../hooks";
|
||||
|
||||
const iconPacksMeta = Object.values(import.meta.glob("../../assets/resources/icon-packs/*.json", {
|
||||
eager: true
|
||||
}));
|
||||
|
||||
export default function Resources() {
|
||||
const { t } = useTranslation();
|
||||
usePageTitle(t("resources.title"));
|
||||
|
||||
return (
|
||||
<p>Resources go here.</p>
|
||||
<Section>
|
||||
<h2>{t("resources.icon_packs")}</h2>
|
||||
|
||||
<div className="grid-3-cols">
|
||||
{iconPacksMeta.map(meta => (
|
||||
<Card
|
||||
key={meta.name}
|
||||
title={`${meta.name} ${meta.version}`}
|
||||
moreInfoUrl={meta.website}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</Section>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -198,6 +198,7 @@
|
||||
"download_triliumcc": "Alternatively see trilium.cc"
|
||||
},
|
||||
"resources": {
|
||||
"title": "Resources"
|
||||
"title": "Resources",
|
||||
"icon_packs": "Icon packs"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user