From fe788fb0d17905bf33abc4a17e73265d51b2a9f5 Mon Sep 17 00:00:00 2001 From: Ivan Dimitrov Date: Sat, 11 Nov 2023 20:30:04 +0200 Subject: [PATCH] again stuff --- _content/cases/stepsy.wiki.md | 5 +---- _content/cases/wellsfargo.md | 9 ++++++--- new.ts | 1 - src/app/c/[...slug]/page.tsx | 19 +++++++++++++------ src/app/components/cases.tsx | 4 +--- src/app/globals.css | 1 - 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/_content/cases/stepsy.wiki.md b/_content/cases/stepsy.wiki.md index e939ea1..0349747 100644 --- a/_content/cases/stepsy.wiki.md +++ b/_content/cases/stepsy.wiki.md @@ -3,7 +3,7 @@ title: Multi-tenant knowledge base website based on Google APIs goal: Create a modern multi-tenant web app that lets users use their Google Drive as a knowledge base role: Design and implement the web app date: Jul 29, 2023 - Nov 5, 2023 -z: 1 +z: 5 ---
@@ -40,6 +40,3 @@ This project aims to be a Google Drive frontend. It uses the Google APIs to fetc It supports Google Docs, Google Sheets, Google Slides, PDFs and regular files. - - - diff --git a/_content/cases/wellsfargo.md b/_content/cases/wellsfargo.md index 0cb7eaf..004712b 100644 --- a/_content/cases/wellsfargo.md +++ b/_content/cases/wellsfargo.md @@ -1,8 +1,11 @@ --- title: Wells Fargo Open Banking APIs integration -goal: -role: +goal: Integrate the API so that customers can use their Wells Fargo credit card to put down-payments on US orders +role: Plan, design and implement the integration according to the Wells Fargo specifications date: Feb, 2021 - Aug, 2021 -z: 3 +z: 1 draft: true --- + + + diff --git a/new.ts b/new.ts index 363d796..8bb3c06 100644 --- a/new.ts +++ b/new.ts @@ -30,4 +30,3 @@ if (fs.existsSync(filePath)) { } fs.writeFileSync(filePath, meta(), { flag: "w+" }) - diff --git a/src/app/c/[...slug]/page.tsx b/src/app/c/[...slug]/page.tsx index 19d2e89..11f0ad6 100644 --- a/src/app/c/[...slug]/page.tsx +++ b/src/app/c/[...slug]/page.tsx @@ -6,6 +6,7 @@ import styles from "./content.module.css" import Image from "next/image"; import rehypeRaw from "rehype-raw"; import rehypeHighlight from "rehype-highlight"; +import { notFound } from "next/navigation"; type Params = { slug: string[] @@ -23,10 +24,12 @@ export default function Content({ params }: Props) { const imgSize = 1024; const { data, content } = getContent(params.slug); - const title = () => - - {data.title} - + if (data.draft) { + notFound() + } + + const title = () => {data.title} + const goal = () => data.goal ? ( @@ -35,7 +38,8 @@ export default function Content({ params }: Props) { {data.goal} ) : - "" + ""; + const role = () => data.role ? ( @@ -44,7 +48,9 @@ export default function Content({ params }: Props) { {data.role} ) : - "" + ""; + + const date = () => data.date ? ({data.date}) : "" const ctnt = () =>
{ctnt()} diff --git a/src/app/components/cases.tsx b/src/app/components/cases.tsx index b4dbf88..42f9abf 100644 --- a/src/app/components/cases.tsx +++ b/src/app/components/cases.tsx @@ -1,11 +1,9 @@ -import { GrayMatterFile } from "gray-matter"; import Link from "next/link"; import { getCases } from "../lib/content"; -const cases: GrayMatterFile[] = getCases() const Cases = () =>
- {cases.filter(c => !c.data.draft).sort(c => c.data.z).map((c) => c.data).map((d) => + {getCases().filter(c => !c.data.draft).sort(c => Number(c.data.z)).reverse().map((c) => c.data).map((d) =>
{d.title} diff --git a/src/app/globals.css b/src/app/globals.css index ecf0861..da968af 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -17,4 +17,3 @@ svg { .btn { @apply bg-gray-900 text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium data-[selected=true]:bg-gray-600 } -