Skip to content

Commit

Permalink
feat(#175): make year auto, for copyright notice
Browse files Browse the repository at this point in the history
  • Loading branch information
AshGw committed Apr 30, 2024
1 parent 759463c commit 5dea01e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 49 deletions.
Empty file removed :
Empty file.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@t3-oss/env-nextjs": "^0.10.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"dotenv": "^16.3.1",
Expand All @@ -78,7 +77,6 @@
"sharp": "^0.33.2",
"sonner": "^1.3.1",
"tailwind-merge": "^2.2.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.5"
"tailwindcss-animate": "^1.0.7"
}
}
37 changes: 0 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/components/footer/copyright.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default function CopyRight() {
return (
<>
<p className="flex items-center justify-center text-secondary-center dimmed-3 text-sm">
&copy; 2024 Ashref Gwader. All rights reserved
&copy; {new Date().getFullYear()} Ashref Gwader. All rights reserved
</p>
<div className="hidden dimmed-3 flex items-center justify-center gap-2 max-w-md mx-auto sm:gap-4">
<Link
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/post/post-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function PostCard({ postData }: { postData: PostData }) {
<li className="list-disc ml-5 dimmed-0">
{formatDate(postData.parsedContent.attributes.firstModDate)}
</li>
<Link href={`${SITE_URL + '/' + BLOG_URI}/${postData.filename}`}>
<Link href={`${SITE_URL + BLOG_URI}/${postData.filename}`}>
<h2 className="text-2xl font-bold dimmed-4 lg:text-[2.5rem]">
{postData.parsedContent.attributes.title}
</h2>
Expand All @@ -28,7 +28,7 @@ export default function PostCard({ postData }: { postData: PostData }) {
<div className="flex flex-wrap items-center gap-[0.625rem] text-sm dimmed-4">
{postData.parsedContent.attributes.tags.map((tag) => (
<Link
href={`${SITE_URL + '/' + BLOG_TAG_URI}/${tag}`}
href={`${SITE_URL + BLOG_TAG_URI}/${tag}`}
key={tag}
className="relative rounded-full px-2 py-1"
>
Expand All @@ -43,7 +43,7 @@ export default function PostCard({ postData }: { postData: PostData }) {
</div>
</div>
<Link
href={`${SITE_URL + '/' + BLOG_URI}/${postData.filename}`}
href={`${SITE_URL + BLOG_URI}/${postData.filename}`}
className="relative h-full overflow-hidden rounded-[2rem]"
></Link>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { nextJS, pub } from './env';
import { nextJS, pub } from '@/lib/env';
export const BLOG_CONTENT_PATH = '/public/blogs';
export const BUSINESS_CONTENT_PATH = '/public/services';
export const BLOG_URI = '/blog';
export const BLOG_TAG_URI = 'blog/tag';
export const BLOG_TAG_URI = '/blog/tag';
export const BLOG_API_URI = '/api/blogs';
export const SITE_URL = nextJS.NEXT_DEV_URL;
export const EMAIL = pub.EMAIL;
Expand Down
6 changes: 3 additions & 3 deletions src/lib/env.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { config } from 'dotenv';
config({ path: '.env.local' });
config({ path:'.env.local' });

export const dev = {};

Expand All @@ -13,7 +13,7 @@ export const nextJS = {
};

export const pub = {
SITE_URL_PROD: nextJS.NEXT_URL,
SITE_URL_DEV: nextJS.NEXT_DEV_URL,
SITE_URL_PROD: nextJS.NEXT_URL as string,
SITE_URL_DEV: nextJS.NEXT_DEV_URL as string,
EMAIL: process.env.EMAIL as string,
};

0 comments on commit 5dea01e

Please sign in to comment.