mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-20 20:35:43 +01:00
feat: move to locale
This commit is contained in:
1 parent
60ab845326
commit
1843eb3bcf
44 files changed
+234
-223
No files matched your search
@@ -0,0 +1,26 @@
|
||||
---
|
||||
import type { Avatar } from '../../../../components/Gallery/List';
|
||||
import { galleryTool } from '../../../../constants/tools';
|
||||
import { fetchGlossary } from '../../../../core/blitz/fetchGlossary';
|
||||
import ToolLayout from '../../../layouts/ToolLayout.astro';
|
||||
import { Page } from './_index';
|
||||
|
||||
const glossary = await fetchGlossary();
|
||||
const avatars = Object.entries(glossary)
|
||||
.filter(
|
||||
([key, value]) =>
|
||||
key.startsWith('avatar') &&
|
||||
!key.endsWith('_part') &&
|
||||
value.image_url !== null,
|
||||
)
|
||||
.map(
|
||||
([key, value]) =>
|
||||
({ id: key.replace('avatar_', ''), name: value.title }) satisfies Avatar,
|
||||
)
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
const lastUpdated = new Date().toLocaleDateString();
|
||||
---
|
||||
|
||||
<ToolLayout tool={galleryTool}>
|
||||
<Page {avatars} {lastUpdated} client:load />
|
||||
</ToolLayout>
|
||||
Reference in new issue
Block a user