Skip to content

Commit

Permalink
feat: add manifest.json and update footer links to be dynamically loa…
Browse files Browse the repository at this point in the history
…ded from manifest
  • Loading branch information
sean1832 committed Jun 4, 2024
1 parent 883289c commit 4c2ab09
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
11 changes: 10 additions & 1 deletion components/section/footer.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { Separator } from "../ui/separator";
import ExternalTextLink from "../ui/external-text-link";
import manifest from "@/data/manifest";

const Footer = () => {
return (
Expand All @@ -13,11 +14,19 @@ const Footer = () => {
{/* Source code Links */}
<div className="flex items-center space-x-4">
<ExternalTextLink
href="https://github.com/sean1832/portfolio"
href={manifest.repository.url}
className={`text-gray-600 dark:text-gray-400 text-sm uppercase text-center`}
>
Source Code
</ExternalTextLink>

{/* Version */}
<ExternalTextLink
href={manifest.repository.latestRelease}
className={`text-gray-600 dark:text-gray-400 text-sm uppercase text-center`}
>
Version: {manifest.version}
</ExternalTextLink>
</div>
</footer>
</div>
Expand Down
3 changes: 2 additions & 1 deletion components/ui/button/githubFloatingButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import React from "react";
import FloatingButton from "./floatingButton";
import { GitHubLogoIcon } from "@radix-ui/react-icons";
import Link from "next/link";
import manifest from "@/data/manifest";

const GithubFloatingButton = () => {
return (
<Link href="https://github.com/sean1832/portfolio" target="_blank">
<Link href={manifest.repository.url} target="_blank">
<FloatingButton
scrollOffset={300}
className="h-8 md:w-[152px] w-8 opacity-80 hover:opacity-100"
Expand Down
10 changes: 10 additions & 0 deletions data/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Zeke Zhang Portfolio",
"version": "0.1.0",
"description": "My personal portfolio website built with Next.js and Tailwind CSS. The website showcases my past projects, skills, and experiences.",
"repository": {
"type": "git",
"url": "https://github.com/sean1832/portfolio.git",
"latestRelease": "https://github/sean1832/portfolio/releases/latest"
}
}

0 comments on commit 4c2ab09

Please sign in to comment.