(home) optimize image
This commit is contained in:
parent
4c4eb9ed2a
commit
a84b511402
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -24,6 +24,9 @@ pnpm-debug.log*
|
||||||
public/**/*.jpg
|
public/**/*.jpg
|
||||||
public/**/*.png
|
public/**/*.png
|
||||||
public/**/*.webp
|
public/**/*.webp
|
||||||
|
src/**/*.jpg
|
||||||
|
src/**/*.png
|
||||||
|
src/**/*.webp
|
||||||
|
|
||||||
# obsidian
|
# obsidian
|
||||||
.obsidian/
|
.obsidian/
|
||||||
|
|
|
@ -30,6 +30,9 @@ export default defineConfig({
|
||||||
theme: 'min-light'
|
theme: 'min-light'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
experimental: {
|
||||||
|
assets: true,
|
||||||
|
},
|
||||||
integrations: [
|
integrations: [
|
||||||
mdx(),
|
mdx(),
|
||||||
solid(),
|
solid(),
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
---
|
---
|
||||||
const image = "/static/iotm/20221016-170316_1.jpg";
|
import image from "@assets/home/20221016-170316_1.jpg";
|
||||||
|
import Image from "astro/components/Image.astro";
|
||||||
|
|
||||||
const alt = "A building covered by multicolor Ivy.";
|
const alt = "A building covered by multicolor Ivy.";
|
||||||
---
|
---
|
||||||
<section class="p-card p-card-image">
|
<section class="p-card p-card-image">
|
||||||
<h2 class="p-card__header">Image of the Month</h2>
|
<h2 class="p-card__header">Image of the Month</h2>
|
||||||
<a href={image}>
|
<a href={image.src}>
|
||||||
<img class="p-card-image__image" src={image} alt={alt}>
|
<Image src={image} alt={alt} class="p-card-image__image" />
|
||||||
</a>
|
</a>
|
||||||
</section>
|
</section>
|
||||||
|
|
2
src/env.d.ts
vendored
2
src/env.d.ts
vendored
|
@ -1,2 +1,2 @@
|
||||||
/// <reference path="../.astro/types.d.ts" />
|
/// <reference path="../.astro/types.d.ts" />
|
||||||
/// <reference types="astro/client" />
|
/// <reference types="astro/client-image" />
|
||||||
|
|
|
@ -45,6 +45,6 @@
|
||||||
|
|
||||||
&__text {
|
&__text {
|
||||||
text-indent: 1em;
|
text-indent: 1em;
|
||||||
line-height: 1.2em;
|
line-height: 1.4em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue