finish footer links

This commit is contained in:
2026-03-31 08:30:12 -04:00
parent 3f24f42c1f
commit 68bb25357b
6 changed files with 65 additions and 26 deletions

View File

@@ -1,9 +1,11 @@
---
export interface Props {
name: string,
width?: string,
height?: string,
};
const { name } = Astro.props;
const { name, width, height } = Astro.props;
const icons = import.meta.glob<{string: string}>('@components/icons/*.svg', { query: '?raw', import: 'default' });
const path = `/src/components/icons/${name}.svg`;
@@ -13,11 +15,11 @@ if (icons[path] === undefined) {
const icon = await icons[path]();
---
<Fragment set:html={icon} />
<span class="icon" set:html={icon} />
<style>
svg {
width: 100%;
height: 100%;
<style define:vars={{ width, height }}>
.icon :global(svg) {
width: var(--width, 100%);
height: var(--height, 100%);
}
</style>