Files
blitzkit/packages/preforged/tools/embed/[embed]/index.astro
T

50 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-10-26 14:33:04 -05:00
---
import type { GetStaticPaths } from 'astro';
2024-10-27 22:40:44 -05:00
import { capitalize } from 'lodash-es';
2024-12-27 12:38:38 -06:00
import { embedConfigurations } from '../../../../../constants/embeds';
2024-12-27 12:59:56 -06:00
import BaseLayout from '../../../../../layouts/BaseLayout.astro';
2024-12-27 13:16:51 -06:00
import { getStaticPaths as parentGetStaticPaths } from '../index.astro';
2024-10-26 14:33:04 -05:00
import { Page } from './_index';
export const getStaticPaths = (() => {
2024-12-27 13:16:51 -06:00
const parentPaths = parentGetStaticPaths();
return Object.keys(embedConfigurations)
.map((embed) =>
parentPaths.map((parent) => ({
params: {
...parent.params,
embed: embed as keyof typeof embedConfigurations,
},
})),
)
.flat();
2024-10-26 14:33:04 -05:00
}) satisfies GetStaticPaths;
2025-01-15 13:55:24 -06:00
const { locale } = Astro.params;
2024-10-26 14:33:04 -05:00
---
2024-10-27 22:40:44 -05:00
<title>BlitzKit - {capitalize(Astro.params.embed)} embed</title>
2024-11-01 10:52:54 -05:00
<style is:global>
@keyframes fade-out-border {
from {
outline: 1rem solid #ff0000ff;
}
to {
outline: 0.75rem solid #ff000000;
}
}
.preview-container-animated {
animation: fade-out-border 0.5s linear;
}
.preview-container-animated:hover {
outline: 1rem solid #ff000080;
}
</style>
2024-10-26 14:33:04 -05:00
<BaseLayout>
2025-01-15 13:55:24 -06:00
<Page {locale} client:load embed={Astro.params.embed} />
2024-10-26 14:33:04 -05:00
</BaseLayout>