diff --git a/src/articles/test.md b/src/articles/test.md new file mode 100644 index 0000000..8a4900f --- /dev/null +++ b/src/articles/test.md @@ -0,0 +1,8 @@ +--- +title: 'The greatest post of all time' +date: 'the night' +tag: '' +status: 'Public' +--- + +Here is my _great_ post! \ No newline at end of file diff --git a/src/components/Blog.astro b/src/components/Blog.astro new file mode 100644 index 0000000..79f5bf1 --- /dev/null +++ b/src/components/Blog.astro @@ -0,0 +1,150 @@ +--- +import "../styles/landing.css"; +interface Props { + file: string; + url: string; + frontmatter: { + title: string; + date: string; + description: string; + }; +} +const posts = Object.values( + import.meta.glob("../articles/*.md", { eager: true }), +); +--- + +
+
+

+ Article +

+
+
+
+ { + posts.map((post) => ( +
+

{post.frontmatter.title}

+

{post.frontmatter.date}

+
+ )) + } +
+
+ diff --git a/src/components/HelloBanner.vue b/src/components/HelloBanner.vue index d099c70..370359e 100644 --- a/src/components/HelloBanner.vue +++ b/src/components/HelloBanner.vue @@ -3,44 +3,52 @@ import { onMounted, ref, useTemplateRef, watchEffect } from 'vue'; import '../styles/landing.css' const name = useTemplateRef("name"); const light_width = ref("0px"); +const light_height = ref("0px"); onMounted(() => { if (name.value) { light_width.value = name.value.offsetWidth + "px"; + light_height.value = name.value.offsetHeight + "px"; console.log(light_width.value) } }) watchEffect(() => { if (name.value) { light_width.value = name.value.offsetWidth + "px"; + light_height.value = name.value.offsetHeight + "px"; } }) \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index ea4cff9..9b0d8d9 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -19,7 +19,17 @@ html, body { margin: 0; - width: 100dvw; - height: 100dvh; + width: calc(var(--vw, 1vw) * 100); + max-width: 100dvw; + min-height: 100dvh; + scrollbar-width: 0px; + /* scrollbar-gutter: stable; */ + scroll-behavior: smooth; } + diff --git a/src/pages/index.astro b/src/pages/index.astro index 5f15d53..89d0ea6 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -2,6 +2,7 @@ // import Welcome from '../components/Welcome.astro'; import HelloBanner from '../components/HelloBanner.vue'; import Layout from '../layouts/Layout.astro'; +import Blog from '../components/Blog.astro' // Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build // Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh. @@ -10,4 +11,5 @@ import Layout from '../layouts/Layout.astro'; + diff --git a/src/pages/posts/[id].astro b/src/pages/posts/[id].astro new file mode 100644 index 0000000..c47bf56 --- /dev/null +++ b/src/pages/posts/[id].astro @@ -0,0 +1,22 @@ +--- +import { defineCollection, z } from 'astro:content'; +import { glob, file } from 'astro/loaders'; +const blog = defineCollection({ + loader: glob({pattern: "**/*.md", base:"../articles"}), + schema: z.object({ + name: z.string(), + tag: z.string(), + date: z.string(), + status: z.enum(["Public", "Unrelease"]) + }) +}) +export function getStaticPaths() { + return [ + { params: { id: "clifford" }}, + { params: { id: "rover" }}, + { params: { id: "spot" }}, + ]; +} + +const { id } = Astro.params; +--- \ No newline at end of file diff --git a/src/styles/landing.css b/src/styles/landing.css index 24de124..3d9832c 100644 --- a/src/styles/landing.css +++ b/src/styles/landing.css @@ -1,5 +1,7 @@ :root { --background: #2c2c2c; + --background_hl: #3d3d3d; --light: #ffde21; --frontend: #858585; + --frontend_lt: #D3D3D3; } \ No newline at end of file