Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fancy link - issue #1160 #1164

Closed
Closed
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
4 changes: 2 additions & 2 deletions app/(app)/create/[[...paramsArr]]/_client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ const Create = () => {
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"
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

Refactor repeated inline styles into a reusable component or class

The className attributes on lines 799 and 808 are identical and contain lengthy Tailwind CSS classes. To improve maintainability and reduce duplication, consider creating a reusable component or extracting these common styles into a custom utility class using Tailwind's @apply directive.

Also applies to: 808-808

>
this
</a>{" "}
Expand All @@ -805,7 +805,7 @@ const Create = () => {
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
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
2 changes: 1 addition & 1 deletion components/ArticlePreview/ArticlePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,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
</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