Skip to content

Commit

Permalink
fix(build): preview
Browse files Browse the repository at this point in the history
  • Loading branch information
kymppi committed Apr 1, 2023
1 parent d40e1ff commit 2d34142
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ pnpm-debug.log*
.astro

# nix
.direnv/
.direnv/

# vercel
.vercel/
11 changes: 11 additions & 0 deletions src/components/ProjectCard.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import type { CollectionEntry } from "astro:content";
export interface Props {
project: CollectionEntry<"projects">;
}
const { project } = Astro.props;
---

<article>{project.data.image}</article>
5 changes: 0 additions & 5 deletions src/pages/404.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
---
import BasicScripts from "../components/BasicScripts.astro";
---

<BasicScripts />
<main>404</main>
12 changes: 7 additions & 5 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
import { CollectionEntry, getCollection } from "astro:content";
import LastFMWidget from "../components/LastFMWidget.svelte";
import ProjectCard from "../components/ProjectCard.astro";
import Socials from "../components/Socials.astro";
import BaseLayout from "../layouts/BaseLayout.astro";
import { LastFMClient } from "../lib/LastFM.client";
import "../styles/global.css";
// const dprojects = await getCollection("projects", ({ data }) => {
// return data.draft !== true;
// });
const dprojects = await getCollection("projects", ({ data }) => {
return data.draft !== true;
});
// const projects: CollectionEntry<"projects">[] = Array(3).fill(dprojects[0]);
const projects: CollectionEntry<"projects">[] = Array(3).fill(dprojects[0]);
const lastfm = new LastFMClient(import.meta.env.LASTFM_API_KEY || "", "midkaa");
const lastFMData = {
track: (await lastfm.getRecentTracks(1)).tracks[0],
Expand Down Expand Up @@ -37,7 +39,7 @@ const lastFMData = {
</section>
<section class="project1 noise-container">
<div class="noise"></div>
<div class="noise-underlay">Project 1</div>
<div class="noise-underlay"><ProjectCard project={projects[0]} /></div>
</section>
<section class="project2 noise-container">
<div class="noise"></div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/projects/[...slug].astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
<!-- ---
import { CollectionEntry, getCollection } from "astro:content";
import Badge from "../../components/Badge.astro";
import BaseLayout from "../../layouts/BaseLayout.astro";
Expand Down Expand Up @@ -52,4 +52,4 @@ const { Content } = await entry.render();
<article class="prose prose-zinc prose-teal max-w-none dark:prose-invert">
<Content />
</article>
</BaseLayout>
</BaseLayout> -->

0 comments on commit 2d34142

Please sign in to comment.