again stuff

This commit is contained in:
Ivan Dimitrov 2023-11-11 20:30:04 +02:00
parent 40c1d0b0a2
commit fe788fb0d1
6 changed files with 21 additions and 18 deletions

View File

@ -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 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 role: Design and implement the web app
date: Jul 29, 2023 - Nov 5, 2023 date: Jul 29, 2023 - Nov 5, 2023
z: 1 z: 5
--- ---
<details> <details>
@ -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. It supports Google Docs, Google Sheets, Google Slides, PDFs and regular files.

View File

@ -1,8 +1,11 @@
--- ---
title: Wells Fargo Open Banking APIs integration title: Wells Fargo Open Banking APIs integration
goal: goal: Integrate the API so that customers can use their Wells Fargo credit card to put down-payments on US orders
role: role: Plan, design and implement the integration according to the Wells Fargo specifications
date: Feb, 2021 - Aug, 2021 date: Feb, 2021 - Aug, 2021
z: 3 z: 1
draft: true draft: true
--- ---

1
new.ts
View File

@ -30,4 +30,3 @@ if (fs.existsSync(filePath)) {
} }
fs.writeFileSync(filePath, meta(), { flag: "w+" }) fs.writeFileSync(filePath, meta(), { flag: "w+" })

View File

@ -6,6 +6,7 @@ import styles from "./content.module.css"
import Image from "next/image"; import Image from "next/image";
import rehypeRaw from "rehype-raw"; import rehypeRaw from "rehype-raw";
import rehypeHighlight from "rehype-highlight"; import rehypeHighlight from "rehype-highlight";
import { notFound } from "next/navigation";
type Params = { type Params = {
slug: string[] slug: string[]
@ -23,10 +24,12 @@ export default function Content({ params }: Props) {
const imgSize = 1024; const imgSize = 1024;
const { data, content } = getContent(params.slug); const { data, content } = getContent(params.slug);
const title = () => if (data.draft) {
<span className="text-3xl"> notFound()
{data.title} }
</span>
const title = () => <span className="text-3xl">{data.title}</span>
const goal = () => const goal = () =>
data.goal ? data.goal ?
( (
@ -35,7 +38,8 @@ export default function Content({ params }: Props) {
{data.goal} {data.goal}
</div> </div>
) : ) :
"" "";
const role = () => const role = () =>
data.role ? data.role ?
( (
@ -44,7 +48,9 @@ export default function Content({ params }: Props) {
{data.role} {data.role}
</div> </div>
) : ) :
"" "";
const date = () => data.date ? (<span>{data.date}</span>) : ""
const ctnt = () => const ctnt = () =>
<Markdown <Markdown
@ -70,6 +76,7 @@ export default function Content({ params }: Props) {
{title()} {title()}
{goal()} {goal()}
{role()} {role()}
{date()}
</div> </div>
<div className="w-3/4 m-auto"> <div className="w-3/4 m-auto">
{ctnt()} {ctnt()}

View File

@ -1,11 +1,9 @@
import { GrayMatterFile } from "gray-matter";
import Link from "next/link"; import Link from "next/link";
import { getCases } from "../lib/content"; import { getCases } from "../lib/content";
const cases: GrayMatterFile<string>[] = getCases()
const Cases = () => const Cases = () =>
<div className="p-20 w-3/4 mx-auto flex flex-col gap-4"> <div className="p-20 w-3/4 mx-auto flex flex-col gap-4">
{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) =>
<div key={d.slug} className="w-full h-max flex justify-center"> <div key={d.slug} className="w-full h-max flex justify-center">
<Link className="btn flex flex-col w-full text-center" href={d.slug}> <Link className="btn flex flex-col w-full text-center" href={d.slug}>
<span className="text-lg px-6">{d.title}</span> <span className="text-lg px-6">{d.title}</span>

View File

@ -17,4 +17,3 @@ svg {
.btn { .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 @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
} }