From b2dfbdcfb8300e97b7cb41c4a13486eca6dd98da Mon Sep 17 00:00:00 2001 From: DeMineArchiver Date: Sat, 25 May 2024 08:43:44 +0300 Subject: [PATCH] Test --- app/src/components/header/Header.astro | 29 ++++++++++++++++- app/src/content/blog/material-to-solid.mdx | 3 +- app/src/content/config.ts | 2 ++ app/src/content/showcase/material-solid.mdx | 4 +++ app/src/pages/blog/[...slug].astro | 27 ++++++++++++++-- app/src/pages/blog/index.astro | 32 +++++++++--------- app/src/pages/showcase/[...slug].astro | 36 +++++++++++++++++++++ app/src/schemas/blog.ts | 22 +++++++------ app/src/schemas/showcase.ts | 28 ++++++++++++++++ packages/material-symbols/index.ts | 31 +++++++++++++++++- 10 files changed, 182 insertions(+), 32 deletions(-) create mode 100644 app/src/content/showcase/material-solid.mdx create mode 100644 app/src/schemas/showcase.ts diff --git a/app/src/components/header/Header.astro b/app/src/components/header/Header.astro index 30b290a..2247847 100644 --- a/app/src/components/header/Header.astro +++ b/app/src/components/header/Header.astro @@ -47,7 +47,7 @@ const destinations = dynamicToStatic(Astro.url, getDestinations()); - + @@ -148,6 +148,33 @@ const destinations = dynamicToStatic(Astro.url, getDestinations()); gap: 16px; } + .home { + position: relative; + width: 48px; + height: 48px; + + display: grid; + place-items: center; + place-content: center; + + border-radius: 8px; + outline: none; + + &:focus-visible::after { + content: ""; + position: absolute; + inset: 0; + border-radius: inherit; + outline: 3px solid var(--color-secondary); + z-index: 1; + + animation-name: focus-grow, focus-shrink; + animation-delay: 0ms, 150ms; + animation-duration: 150ms, 450ms; + animation-timing-function: var(--easing-standard); + } + } + .logo { width: 40px; height: 40px; diff --git a/app/src/content/blog/material-to-solid.mdx b/app/src/content/blog/material-to-solid.mdx index 8e343bf..c23bca5 100644 --- a/app/src/content/blog/material-to-solid.mdx +++ b/app/src/content/blog/material-to-solid.mdx @@ -2,8 +2,7 @@ title: Bringing Material You to SolidJS description: Eiusmod sint incididunt ea mollit cupidatat ullamco mollit labore laborum ea sit consectetur. cover: - image: - src: ../../assets/images/covers/material-to-solid.png + src: ../../assets/images/covers/material-to-solid.png authors: - id: deminearchiver name: deminearchiver diff --git a/app/src/content/config.ts b/app/src/content/config.ts index 7725a39..41a0f7e 100644 --- a/app/src/content/config.ts +++ b/app/src/content/config.ts @@ -1,9 +1,11 @@ import { defineCollection, z } from "astro:content"; import { i18nCollection, i18nSchema } from "../schemas/i18n"; import { blogCollection } from "../schemas/blog"; +import { showcaseCollection } from "../schemas/showcase"; export const collections = { blog: blogCollection(), + showcase: showcaseCollection(), // i18n: i18nCollection(), }; diff --git a/app/src/content/showcase/material-solid.mdx b/app/src/content/showcase/material-solid.mdx new file mode 100644 index 0000000..245207d --- /dev/null +++ b/app/src/content/showcase/material-solid.mdx @@ -0,0 +1,4 @@ +--- +hide: production +title: Material 3 for Solid +--- diff --git a/app/src/pages/blog/[...slug].astro b/app/src/pages/blog/[...slug].astro index 24b7027..584f6e5 100644 --- a/app/src/pages/blog/[...slug].astro +++ b/app/src/pages/blog/[...slug].astro @@ -14,10 +14,11 @@ import ArrowBackIcon from "~icons/material-symbols-rounded/arrow-back:outlined&o import ShareIcon from "~icons/material-symbols-rounded/share:filled"; import dayjs from "dayjs"; import { Button } from "../../components/primitives/button"; +import { getBlogCollection } from "../../schemas/blog"; export const getStaticPaths: GetStaticPaths = async () => { - const posts = await getCollection("blog"); + const posts = await getBlogCollection(); return posts.map(post => ({ params: { slug: post.slug, @@ -48,8 +49,8 @@ const { Content } = await post.render(); post.data.cover && {post.data.cover.image.alt} + src={post.data.cover.src} + alt={post.data.cover.alt} /> }