diff --git a/public/banner.webp b/public/banner.webp deleted file mode 100644 index 91699e9..0000000 Binary files a/public/banner.webp and /dev/null differ diff --git a/public/favicon.svg b/public/favicon.svg deleted file mode 100644 index f157bd1..0000000 --- a/public/favicon.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/public/banner-alt.webp b/src/assets/banner-alt.webp similarity index 100% rename from public/banner-alt.webp rename to src/assets/banner-alt.webp diff --git a/public/leg.jpg b/src/assets/leg.jpg similarity index 100% rename from public/leg.jpg rename to src/assets/leg.jpg diff --git a/public/leg.webp b/src/assets/leg.webp similarity index 100% rename from public/leg.webp rename to src/assets/leg.webp diff --git a/src/components/Certificate.astro b/src/components/Certificate.astro index bad2db0..93618e9 100644 --- a/src/components/Certificate.astro +++ b/src/components/Certificate.astro @@ -10,15 +10,15 @@ const { certificate } = Astro.props;

By: {certificate.data.provider}

{certificate.data.skills && ( - + )} {certificate.data.link && ( - View + View )} diff --git a/src/components/Music.astro b/src/components/Music.astro index 2c1794a..340ca22 100644 --- a/src/components/Music.astro +++ b/src/components/Music.astro @@ -1,7 +1,7 @@ --- import { Image } from "astro:assets"; -import leg from "../../public/leg.webp"; +import leg from "../assets/leg.webp"; --- diff --git a/src/content/posts/code-examples.md b/src/content/posts/code-examples.md index 3681943..261b723 100644 --- a/src/content/posts/code-examples.md +++ b/src/content/posts/code-examples.md @@ -1,12 +1,12 @@ --- -title: Code Examples -description: Aurghhhhhh +title: "Code Examples" +description: "Aurghhhhhh" pubDate: 2022-07-08 image: - url: https://docs.astro.build/assets/arc.webp - alt: Tennis balls + url: "https://docs.astro.build/assets/arc.webp" + alt: "Tennis balls" tags: - - Gaybo + - "Gaybo" --- Penitc diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index be70c1b..1a2574c 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,15 +1,22 @@ --- -import "../styles/styles.scss"; +import { Picture, getImage } from 'astro:assets'; -import { Image } from "astro:assets"; +import "../styles/styles.scss"; interface Props { title: string; - src?: string, + image: string, alt: string, } -const { title, src, alt } = Astro.props; +const { title, image, alt } = Astro.props; + +let imageData = await getImage({ + src: image, + format: "jpeg", + width: 1080, + height: 700, +}); --- @@ -20,7 +27,7 @@ const { title, src, alt } = Astro.props; - + @@ -29,19 +36,26 @@ const { title, src, alt } = Astro.props;
+ diff --git a/src/layouts/Markdown.astro b/src/layouts/Markdown.astro index 38b88d3..4bb38a9 100644 --- a/src/layouts/Markdown.astro +++ b/src/layouts/Markdown.astro @@ -3,6 +3,9 @@ import HomeButton from "../components/HomeButton.astro"; interface Props { post: any, + prev?: any, + next?: any, + base: string, } const { post, prev, next, base } = Astro.props; @@ -36,18 +39,20 @@ const { Content } = await post.render();
  • {prev && ( )}
  • {next && ( )}
  • diff --git a/src/pages/index.astro b/src/pages/index.astro index 9d3c403..388089b 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,12 +1,13 @@ --- import { getCollection } from "astro:content"; +import { getImage } from "astro:assets"; import { getPosts } from "../utils"; import Layout from "../layouts/Layout.astro"; import Card from "../components/Card.astro"; import Certificate from "../components/Certificate.astro"; import Music from "../components/Music.astro"; -import BannerImg from "../../public/banner-alt.webp"; +import BannerImg from "../assets/banner-alt.webp"; const tools = ["Proxmox", "JetBrain IDEs", "Docker", "Linux", "SQLite", "Postgres", "MySQL"]; const languages = ["Go", "Python", "HTML", "CSS", "Sass", "TypeScript", "JavaScript", "Scratch", "PHP", "SQL", "Bash"]; @@ -14,9 +15,11 @@ const frameworks = ["Gin", "Echo", "Flask", "Svelte", "Astro", "raylib"]; const certificates = await getCollection("certificates"); const projects = await getPosts("projects"); const posts = await getPosts("posts"); + +const image = await getImage({src: BannerImg}); --- - +

    Leggy Land

    Made with Coffee, lots of it.

    diff --git a/src/pages/leg.astro b/src/pages/leg.astro index 8a87751..e7f42ad 100644 --- a/src/pages/leg.astro +++ b/src/pages/leg.astro @@ -1,10 +1,15 @@ --- +import { Picture, getImage } from "astro:assets"; + import Layout from "../layouts/Layout.astro"; -import BannerImg from "../../../public/banner-alt.webp"; import HomeButton from "../components/HomeButton.astro"; +import GwaGwa from "../assets/leg.jpg"; +import BannerImg from "../assets/banner-alt.webp"; + +const image = await getImage({src: BannerImg}); --- - +
    @@ -14,5 +19,14 @@ import HomeButton from "../components/HomeButton.astro";
    - Two Maned wolfs having a disagreement + diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index de7060c..46c3509 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -11,7 +11,7 @@ export async function getStaticPaths() { props: { post: post, prev: i > 0 ? collection[i - 1] : undefined, - next: i < collection.length - 1 ? collection[i + 1] : undefined + next: i < collection.length - 1 ? collection[i + 1] : undefined, } })); } @@ -19,6 +19,6 @@ export async function getStaticPaths() { const { post, prev, next } = Astro.props; --- - + diff --git a/src/pages/posts/index.astro b/src/pages/posts/index.astro index c3db1d5..91de683 100644 --- a/src/pages/posts/index.astro +++ b/src/pages/posts/index.astro @@ -1,14 +1,17 @@ --- +import { getImage } from "astro:assets"; + import { getPosts } from "../../utils"; import Layout from "../../layouts/Layout.astro"; import HomeButton from "../../components/HomeButton.astro"; import Card from "../../components/Card.astro"; -import BannerImg from "../../../public/banner-alt.webp"; +import BannerImg from "../../assets/banner-alt.webp"; +const image = await getImage({src: BannerImg}); const posts = await getPosts("posts"); --- - +
    diff --git a/src/pages/projects/[...slug].astro b/src/pages/projects/[...slug].astro index 5de6d33..c4763ac 100644 --- a/src/pages/projects/[...slug].astro +++ b/src/pages/projects/[...slug].astro @@ -19,6 +19,6 @@ export async function getStaticPaths() { const { post, prev, next } = Astro.props; --- - + diff --git a/src/pages/projects/index.astro b/src/pages/projects/index.astro index 35d94ca..df15563 100644 --- a/src/pages/projects/index.astro +++ b/src/pages/projects/index.astro @@ -1,14 +1,17 @@ --- +import { getImage } from "astro:assets"; + import { getPosts } from "../../utils"; import Layout from "../../layouts/Layout.astro"; import Card from "../../components/Card.astro"; -import BannerImg from "../../../public/banner-alt.webp"; import HomeButton from "../../components/HomeButton.astro"; +import BannerImg from "../../assets/banner-alt.webp"; +const image = await getImage({src: BannerImg}); const projects = await getPosts("projects"); --- - +
    diff --git a/src/styles/_banner.scss b/src/styles/_banner.scss index 8af614b..ff54528 100644 --- a/src/styles/_banner.scss +++ b/src/styles/_banner.scss @@ -9,7 +9,7 @@ overflow: hidden; - > img { + > picture > img { width: 100%; height: 100%;