Skip to content

Commit

Permalink
feat: add last updated timestamp to guides
Browse files Browse the repository at this point in the history
add: pqoqubbw/icons and calltoinspiration
  • Loading branch information
bryan308 committed Jan 8, 2025
1 parent 1fe9904 commit 30755b4
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 1 deletion.
9 changes: 9 additions & 0 deletions app/guides/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ import { DocsPage, DocsBody, DocsTitle, DocsDescription } from "fumadocs-ui/page
import { notFound } from "next/navigation"
import { MDXContent } from "@content-collections/mdx/react"
import { components } from "@/components/shared/mdx-components"
import { getGithubLastEdit } from "fumadocs-core/server"

export default async function Page(props: { params: Promise<{ slug?: string[] }> }) {
const params = await props.params
const page = guides.getPage(params.slug)
if (!page) notFound()

const time = await getGithubLastEdit({
owner: "bryan308",
repo: "ca-resources",
sha: "main",
path: `content/resources/${page.file.flattenedPath}.mdx`,
})

return (
<DocsPage
lastUpdate={time ? new Date(time) : new Date()}
tableOfContent={{
style: "clerk",
single: false,
Expand Down
9 changes: 9 additions & 0 deletions app/resources/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ import { DocsPage, DocsBody, DocsTitle, DocsDescription } from "fumadocs-ui/page
import { notFound } from "next/navigation"
import { MDXContent } from "@content-collections/mdx/react"
import { components } from "@/components/shared/mdx-components"
import { getGithubLastEdit } from "fumadocs-core/server"

export default async function Page(props: { params: Promise<{ slug?: string[] }> }) {
const params = await props.params
const page = resources.getPage(params.slug)
if (!page) notFound()

const time = await getGithubLastEdit({
owner: "bryan308",
repo: "ca-resources",
sha: "main",
path: `content/resources/${page.file.flattenedPath}.mdx`,
})

return (
<DocsPage
lastUpdate={time ? new Date(time) : new Date()}
tableOfContent={{
style: "clerk",
single: false,
Expand Down
6 changes: 6 additions & 0 deletions content/resources/icons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ description: Explore a variety of icons for your projects.
href="https://thenounproject.com/"
icon="/resources/icons/nounproject.png"
/>
<CustomCard
title="pqoqubbw/icons"
description="beautifully crafted animated icons"
href="https://icons.pqoqubbw.dev/"
icon="/resources/icons/pqoqubbw.png"
/>
<CustomCard
title="Streamline"
description="8 icon designers rebels. Creating from scratch innovative and harmonious icons sets."
Expand Down
6 changes: 6 additions & 0 deletions content/resources/inspirations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ description: Explore a variety of inspiration sources to ignite your creativity
description="Join 50M+ members in the world’s largest creative network to showcase work, find inspiration and get hired. Connect with top freelance talent across every creative field."
icon="/resources/inspirations/behance.jpg"
/>
<CustomCard
title="calltoinspiration"
href="https://calltoinspiration.com/"
description="Call for inspiration using the purple hat for when you have inspiration blocks or need fresh new ideas. A great tool created by a deisnger for web professionals."
icon="/resources/inspirations/calltoinspiration.png"
/>
<CustomCard
title="Dark"
href="https://www.dark.design/"
Expand Down
2 changes: 1 addition & 1 deletion content/resources/ui-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ description: A collection of customizable Tailwind CSS components for building r
icon="/resources/ui-components/uiverse.png"
title="Uiverse"
description="Community-made library of free and customizable UI elements made with CSS or Tailwind. It's all free to copy and use in your projects. Uiverse can save you many hours spent on building & customizing UI components for your next project."
href="https://codepen.io/"
href="https://uiverse.io/"
/>
</Cards>
Binary file added public/resources/icons/pqoqubbw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 30755b4

Please sign in to comment.