feat: Upgrade template based on projects made with it
Some checks failed
Build, check & Test / run (push) Failing after 42s

Signed-off-by: Florian Bouillon <f.bouillon@aptatio.com>
This commit is contained in:
2023-10-09 11:47:11 +02:00
parent bf06e41238
commit e26b4eb4a5
42 changed files with 934 additions and 136 deletions

View File

@ -0,0 +1,24 @@
---
import { getImage } from 'astro:assets'
export interface Props {
svg: ImageMetadata
png: ImageMetadata
icoPath?: string
}
if (Astro.props.icoPath !== '/favicon.ico') {
console.warn('It is recommanded that the ICO file should be located at /favicon.ico')
}
const appleTouch = await getImage({src: Astro.props.png, width: 180, height: 180})
---
<>
<link rel="icon" href={Astro.props.icoPath ?? "/favicon.ico"} sizes="any">
<link rel="icon" href={Astro.props.svg.src} type="image/svg+xml">
<link rel="apple-touch-icon" href={appleTouch.src} />
<!-- Currently not integrated until I find a way to. -->
<!-- <link rel="manifest" href="/site.webmanifest" /> -->
</>