Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/(app)/get-started/_client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ const GetStarted: NextPage = () => {
</h2>
<p className="mt-2 text-center text-base text-neutral-500">
Or{" "}
<Link className="fancy-link font-medium" href="/">
<Link
className="cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text font-medium tracking-wide text-transparent hover:from-orange-300 hover:to-pink-500"
href="/"
>
return home
</Link>
</p>
Expand Down
4 changes: 2 additions & 2 deletions app/(editor)/create/[[...paramsArr]]/_client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ const Create = ({ session }: { session: Session | null }) => {
href="https://www.markdownguide.org/"
target="_blank"
rel="noopener noreferrer"
className="fancy-link"
className="cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text tracking-wide text-transparent hover:from-orange-300 hover:to-pink-500"
>
this
</a>{" "}
Expand All @@ -803,7 +803,7 @@ const Create = ({ session }: { session: Session | null }) => {
href="https://www.markdownguide.org/"
target="_blank"
rel="noopener noreferrer"
className="fancy-link"
className="cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text tracking-wide text-transparent hover:from-orange-300 hover:to-pink-500"
>
markdownguide
</a>
Expand Down
2 changes: 1 addition & 1 deletion components/ArticlePreview/ArticlePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const ArticlePreview: NextPage<Props> = ({
<div className="flex w-full content-center justify-between">
<div className="flex w-full items-center justify-between">
<Link
className="fancy-link semibold text-lg"
className="semibold cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text text-lg tracking-wide text-transparent hover:from-orange-300 hover:to-pink-500"
href={`/articles/${slug}`}
>
Read full article
Expand Down
10 changes: 8 additions & 2 deletions components/Comments/CommentsArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,17 @@ const CommentsArea = ({ postId, postOwnerId }: Props) => {
<p className="mb-2">Hey! 👋</p>
<p className="mb-2">Got something to say?</p>
<p>
<button onClick={() => signIn()} className="fancy-link">
<button
onClick={() => signIn()}
className="cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text tracking-wide text-transparent hover:from-orange-300 hover:to-pink-500"
>
Sign in
</button>{" "}
or{" "}
<button onClick={() => signIn()} className="fancy-link">
<button
onClick={() => signIn()}
className="cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text tracking-wide text-transparent hover:from-orange-300 hover:to-pink-500"
>
sign up
</button>{" "}
to leave a comment.
Expand Down
4 changes: 2 additions & 2 deletions components/EditorHints/EditorHints.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const EditorHints = () => {
href="https://www.markdownguide.org/"
target="_blank"
rel="noopener noreferrer"
className="fancy-link"
className="cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text tracking-wide text-transparent hover:from-orange-300 hover:to-pink-500"
>
this
</a>{" "}
Expand All @@ -38,7 +38,7 @@ const EditorHints = () => {
href="https://www.markdownguide.org/"
target="_blank"
rel="noopener noreferrer"
className="fancy-link"
className="cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text tracking-wide text-transparent hover:from-orange-300 hover:to-pink-500"
>
markdownguide
Comment on lines +41 to 43
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider extracting duplicate styles into a reusable class.

The gradient styling is duplicated between both links. Consider using Tailwind's @apply directive or creating a common className variable to maintain consistency and reduce duplication.

Here's how you could refactor this:

const gradientLinkStyle = "cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text tracking-wide text-transparent hover:from-orange-300 hover:to-pink-500";

// Then use it in both links:
className={gradientLinkStyle}

</a>
Expand Down
8 changes: 0 additions & 8 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ body {
@apply bg-white bg-gradient-to-r text-neutral-800 dark:bg-neutral-900 dark:text-white;
}

.fancy-link {
@apply cursor-pointer bg-gradient-to-r from-orange-400 to-pink-600 bg-clip-text tracking-wide text-transparent;
}

.fancy-link:hover {
@apply from-orange-300 to-pink-500;
}

.prose {
@apply prose-neutral dark:prose-invert lg:prose-lg;

Expand Down
Loading