Skip to content

Commit

Permalink
fix: use astro:assets Image
Browse files Browse the repository at this point in the history
  • Loading branch information
mrshmllow committed May 4, 2024
1 parent 6725bc6 commit 48d0a60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
interface Props {}
import { getLangFromUrl, useTranslations } from '../i18n/utils';
import { Image } from 'astro:assets';
import aux from '../../public/aux.svg';
const lang = getLangFromUrl(Astro.url);
const translation = useTranslations(lang);
Expand All @@ -10,7 +12,7 @@ const translation = useTranslations(lang);
<header>
<div class="left">
<a href="https://aux.computer" class="brand">
<img class="icon" src="/aux.svg" />
<Image class="icon" src={aux} alt="aux.computer logo" />
<span class="title">aux.computer</span>
</a>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/Hero.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
import { getLangFromUrl, useTranslations } from '../i18n/utils';
import { Image } from 'astro:assets';
import aux from '../../public/aux.svg';
const lang = getLangFromUrl(Astro.url);
const translation = useTranslations(lang);
Expand All @@ -8,7 +10,7 @@ const translation = useTranslations(lang);
<div class="hero">
<div class="content">
<div class="icon">
<img src="/aux.svg" alt="" />
<Image src={aux} alt="aux.computer logo" />
</div>
<h1 class="title">aux.computer</h1>
<div class="description">{translation("root.description")}</div>
Expand Down

0 comments on commit 48d0a60

Please sign in to comment.