Skip to content

Commit

Permalink
chore: fix colors
Browse files Browse the repository at this point in the history
  • Loading branch information
rupali-codes committed Jul 23, 2023
1 parent 0877bb1 commit 20a6e9c
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 95 deletions.
4 changes: 2 additions & 2 deletions components/BackToTop/BackToTopButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const BackToTopButton = () => {
return null
}

const buttonClasses = `focus:animate-button-press rounded-full border border-white bg-violet-600 p-4 text-white shadow-xl duration-300 transition-colors focus:ring group-hover:border-dashed group-hover:border-violet-400 group-hover:bg-white dark:drop-shadow-[5px_5px_8px_rgba(124,58,237,0.25)] dark:group-hover:bg-[#101623] md:border-violet-600 ${
const buttonClasses = `focus:animate-button-press rounded-full border border-light-primary bg-theme-secondary p-4 text-light-primary shadow-xl duration-300 transition-colors focus:ring group-hover:border-dashed group-hover:border-theme-primary group-hover:bg-light-primary dark:drop-shadow-[5px_5px_8px_rgba(124,58,237,0.25)] dark:group-hover:bg-[#101623] md:border-violet-600 ${
status === 'preEnter' || status === 'exiting'
? 'opacity-0 translate-y-3'
: ''
Expand All @@ -53,7 +53,7 @@ export const BackToTopButton = () => {
onClick={handleClick}
title="Back to top"
>
<FaArrowUp className="group-hover:text-violet-500" />
<FaArrowUp className="group-hover:text-theme-secondary" />
</button>
<span className="absolute left-1/2 top-1/2 -z-10 hidden -translate-x-1/2 -translate-y-1/2 rotate-0 text-2xl transition-all duration-100 ease-in-out group-hover:ml-8 group-hover:block group-hover:rotate-45">
👾
Expand Down
8 changes: 4 additions & 4 deletions components/Cards/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const Card: FC<CardProps> = ({ data }) => {
}, [])

return (
<article className="z-10 h-full w-full rounded-3xl border border-dashed border-violet-500 dark:border-violet-400 bg-gray-100 shadow-lg dark:bg-gray-900 dark:text-gray-300 dark:shadow-sm">
<article className="z-10 h-full w-full rounded-3xl border border-dashed border-theme-secondary dark:border-theme-primary bg-[rgba(255,255,255,0.3)] shadow-md dark:bg-dark dark:text-text-primary dark:shadow-sm">
<div className="card-body">
<header className="flex justify-between items-center">
<h2
className="cursor-default md:truncate ... text-xl text-violet-600 dark:text-violet-400"
className="cursor-default md:truncate ... text-xl text-theme-secondary dark:text-theme-primary"
title={name}
>
{name}
Expand All @@ -41,7 +41,7 @@ const Card: FC<CardProps> = ({ data }) => {
{description}
</div>
{isOverflow && (
<p className="text-sm underline text-violet-600 dark:text-violet-400 text-right hover:text-violet-400 dark:hover:text-violet-300">
<p className="text-sm underline text-theme-secondary dark:text-theme-primary text-right hover:text-theme-primary dark:hover:text-text-primary">
Read More
</p>
)}
Expand All @@ -53,7 +53,7 @@ const Card: FC<CardProps> = ({ data }) => {
target="_blank"
rel="noopener noreferrer"
className={
'mt-2 flex w-full items-center justify-center gap-2 rounded-2xl border border-dashed border-transparent bg-violet-600 px-6 py-2 text-center text-white duration-100 hover:border-violet-400 hover:bg-transparent hover:text-violet-500 dark:hover:text-violet-400'
'mt-2 flex w-full items-center justify-center gap-2 rounded-2xl border border-dashed border-transparent bg-theme-secondary px-6 py-2 text-center text-light-primary duration-100 hover:border-theme-primary hover:bg-transparent hover:text-theme-secondary dark:hover:text-theme-primary'
}
>
Visit site
Expand Down
4 changes: 2 additions & 2 deletions components/CopyToClipboard/CopyToClipboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const CopyToClipboard = ({ url }: CopyToClipboardProps): JSX.Element => {
<div className="dropdown dropdown-left dropdown-hover">
<FaRegCopy
size={'1.3rem'}
className="text-violet-500 cursor-pointer"
className="text-theme-primary cursor-pointer"
title="Copy link"
onClick={(e) => handleCopy(e)}
/>
<p className="dropdown-content bg-violet-500 text-white text-sm rounded-lg p-1.5 cursor-default">
<p className="dropdown-content bg-theme-secondary text-white text-sm rounded-lg px-3 py-1 cursor-default">
{success ? 'Copied!' : 'Copy'}
</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export const Footer: FC = () => {
const isDarkMode = resolvedTheme === 'dark'

const nameStyles = `underline ${
isDarkMode ? 'text-gray-200' : 'text-violet-700'
isDarkMode ? 'text-light-primary' : 'text-theme-secondary'
} `

return (
<footer className="z-10 mb-4 flex w-full items-baseline justify-center rounded-lg py-2 backdrop-blur-md sm:py-3">
<p className="leading-7 tracking-wide text-center text-black dark:text-violet-400">
<p className="leading-7 tracking-wide text-center text-black dark:text-theme-primary">
<span>&copy; {new Date().getFullYear()} LinksHub | </span>
Developed by{' '}
<Link
Expand Down
2 changes: 1 addition & 1 deletion components/ForkButton/GitHubForkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const GitHubForkButton: FC<{ repo: string }> = ({ repo }) => {
aria-label={`Fork ${repo} on GitHub`}
>
<div
className="inline-flex items-center py-1 text-sm font-semibold bg-transparent text-theme-secondary rounded-sm transition-colors transition duration-300 ease-in-out hover:text-text-secondary transition duration-300 ease-in-out dark:hover:text-gray-300 dark:text-theme-primary hover:underline"
className="inline-flex items-center py-1 text-sm font-semibold bg-transparent text-theme-secondary rounded-sm transition-colors transition duration-300 ease-in-out hover:text-text-secondary transition duration-300 ease-in-out dark:hover:text-text-primary dark:text-theme-primary"
>
<FaCodeBranch className="mr-1" />
<span className="font-semibold">Fork</span>
Expand Down
4 changes: 2 additions & 2 deletions components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export const Header: FC = () => {
const { toggleNav } = useContext(GlobalContext)

return (
<header className="fixed top-0 left-0 z-30 row-start-1 row-end-2 flex h-[76px] w-screen items-center justify-between">
<div className="bg-light-primary h-full w-fit flex-none px-6 py-4 dark:bg-dark lg:w-[290px]">
<header className="fixed top-0 left-0 z-30 row-start-1 row-end-2 flex h-[76px] w-screen items-center justify-between bg-light-primary dark:bg-dark">
<div className="bg-[rgba(255,255,255,0.3)] h-full w-fit flex-none px-6 py-4 dark:bg-dark lg:w-[290px]">
<Link href="/">
<Logo className="text-3xl" />
</Link>
Expand Down
13 changes: 0 additions & 13 deletions components/MainContainer/MainContainer.tsx

This file was deleted.

1 change: 0 additions & 1 deletion components/MainContainer/index.ts

This file was deleted.

15 changes: 6 additions & 9 deletions components/NewIssue/NewIssue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,16 @@ import Link from 'next/link'

const NewIssue: FC = () => {
return (
<p className="pt-6 md:p-0 coming-soon">
<span className="text-2xl">
Be the first to add by creating a GitHub issue
</span>{' '}
<span className="motion-safe:animate-pulse text-2xl text-purple-500">
<Link
<div className="pt-6 md:p-0 text-xl w-fit m-auto">
<span>Be the first to add by creating a GitHub issue </span>
<Link
className="dark:text-theme-primary text-theme-secondary underline"
href="https://github.com/rupali-codes/LinksHub/issues/new?assignees=&labels=add+link&template=add_link.yml&title=%5BAdd%5D+%3Cname%3E"
target="_blank"
>
<u>here</u>
here
</Link>
</span>
</p>
</div>
)
}

Expand Down
21 changes: 7 additions & 14 deletions components/Searchbar/Searchbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ interface SearchbarProps {
setSearch: (search: string) => void
}

// const subcategory =subcategoryArray;

// const subcategoryList: SubCategory[] = Object.keys(SubCategory).filter(
// (key) => isNaN(Number(key))
// ) as SubCategory[];

const searchOptions = subcategoryArray

export const Searchbar: React.FC<SearchbarProps> = ({ setSearch }) => {
const router = useRouter()
Expand All @@ -34,7 +27,7 @@ export const Searchbar: React.FC<SearchbarProps> = ({ setSearch }) => {
setSuggestions([])
setSearch('')
} else {
const filteredSuggestions = searchOptions.filter((option) =>
const filteredSuggestions = subcategoryArray.filter((option) =>
option.toLowerCase().includes(trimmedValue)
)
setSuggestions(filteredSuggestions)
Expand Down Expand Up @@ -80,31 +73,31 @@ export const Searchbar: React.FC<SearchbarProps> = ({ setSearch }) => {
<input
type="text"
id="simple-search"
className="block p-2.5 w-full bg-transparent text-sm text-gray-900 dark:text-gray-200 border border-dashed border-gray-400 dark:border-gray-500 focus:border-violet-500 dark:focus:border-violet-500 dark:focus:ring-violet-500 focus:ring-violet-500 dark:placeholder-gray-400 outline-none transition-all ease-in-out duration-300 rounded-lg"
placeholder="Start searching..."
className="block p-2.5 w-full bg-transparent text-sm text-dark dark:text-text-primary border border-dashed border-gray-text focus:border-theme-secondary dark:focus:border-theme-primary dark:focus:ring-theme-primary focus:ring-theme-secondary dark:placeholder-gray-text outline-none transition-all ease-in-out duration-300 rounded-lg capitalize"
placeholder="Quick search..."
value={searchQuery}
onChange={handleSearchChange}
required
/>
<button
type="submit"
className="ml-2 px-4 py-2.5 bg-violet-500 text-white rounded-md border border-dashed border-transparent hover:border-violet-400 hover:bg-transparent hover:text-violet-400 dark:hover:text-violet-400"
className="ml-2 px-4 py-2.5 bg-theme-secondary text-light-primary rounded-md border border-dashed border-transparent hover:border-theme-primary hover:bg-transparent hover:text-theme-primary dark:hover:text-theme-primary transition-colors transition duration-300 ease-in-out"
>
<SearchIcon className="w-5 h-5" />
</button>
</div>
{suggestions.length > 0 && (
<ul
ref={dropdownRef}
className="absolute z-10 bg-white dark:bg-gray-800 w-full py-2 mt-1 rounded-lg shadow-lg"
className="absolute z-10 text-light-primary bg-theme-secondary w-full mt-1 rounded-lg shadow-2xl"
>
{suggestions.map((suggestion) => (
<li
key={suggestion}
className="px-4 py-2 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700"
className="px-4 py-2 cursor-pointer hover:bg-[rgba(0,0,0,0.2)] capitalize"
onClick={() => handleSuggestionClick(suggestion)}
>
{suggestion}
{suggestion.split('-').join(' ')}
</li>
))}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion components/SideNavbar/SideNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const SideNavbar: FC = () => {
>
<SideNavbarHeader />
<SocialMediaIconsList
className="bg-gray-100 px-6 py-2 dark:bg-gray-900"
className="bg-light-primary px-6 py-2 dark:bg-dark"
showGithubButtons={true} // to show the Star & Fork Button below social media icons
/>
<SideNavbarBody />
Expand Down
4 changes: 2 additions & 2 deletions components/SideNavbar/SideNavbarBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export const SideNavbarBody: FC = () => {
return (
<div
className={classNames(
`bg-base-200 h-full w-full overflow-x-hidden whitespace-nowrap transition-all ease-in dark:bg-gray-900 dark:text-gray-300`,
`bg-[rgba(255,255,255,0.3)] h-full w-full overflow-x-hidden whitespace-nowrap transition-all ease-in dark:bg-dark dark:text-text-primary`,
theme === 'light' ? 'scrollColorLight' : 'scrollColorDark'
)}
>
<div className="bg-base-200 transiton-all w-full p-4 transition-none ease-in dark:bg-gray-900">
<div className="bg-primary-light transiton-all w-full p-4 transition-none ease-in dark:bg-dark">
<Searchbar setSearch={setSearch} />
</div>
<SideNavbarCategoryList
Expand Down
4 changes: 2 additions & 2 deletions components/SideNavbar/SideNavbarCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const SideNavbarCategory: FC<{
))

return (
<li className="relative w-full transition-all ease-in-out text-violet-600 dark:text-violet-400 dark:bg-opacity-5 hover:text-violet-500 dark:hover:text-violet-300 rounded-md focus-visible:outline-none focus-visible:ring focus-visible:ring-violet-400">
<li className="relative w-full transition-all ease-in-out text-theme-secondary dark:text-theme-primary dark:bg-opacity-5 hover:text-theme-secondary dark:hover:text-theme-primary rounded-md focus-visible:outline-none focus-visible:ring focus-visible:ring-theme-primary">
<button
className="flex w-full cursor-pointer justify-between py-2"
onClick={handleToggle}
Expand All @@ -40,7 +40,7 @@ export const SideNavbarCategory: FC<{
isOpen ? 'max-h-screen' : ''
}`}
>
<ul className="relative ml-1 border-l-2 border-slate-300 dark:border-slate-700 -pl-0.5">
<ul className="relative ml-1 border-l-2 dark:border-zinc-500 border-zinc-300 -pl-0.5">
{subcategoryList}
</ul>
</div>
Expand Down
10 changes: 5 additions & 5 deletions components/SideNavbar/SideNavbarElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export const SideNavbarElement = ({ name, url }: SubCategories) => {
onClick={closeNav}
className={`${
router.asPath === url
? 'border-l-4 border-violet-500 text-violet-700 dark:text-violet-400 '
: 'text-slate-600 dark:text-slate-400'
} collapse w-full text-start pl-3 hover:text-violet-500 dark:hover:text-violet-300
focus-visible:outline-none focus-visible:ring focus-visible:ring-violet-400 focus-visible:rounded-lg`}
? 'border-l-4 border-theme-primary text-theme-secondary dark:text-theme-primary '
: 'text-text-secondary dark:text-gray-text'
} collapse w-full text-start pl-3 hover:text-theme-secondary dark:hover:text-violet-300
focus-visible:outline-none focus-visible:ring focus-visible:ring-theme-primary focus-visible:rounded-lg`}
>
<div className="ml-2 text-lg py-2 capitalize transition-all duration-300 hover:pl-2 dark:border-violet-500">
<div className="ml-2 text-lg py-2 capitalize transition-all duration-300 hover:pl-2 dark:border-theme-secondary">
{name}
</div>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion components/SkipLink/SkipLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const SkipLink: FC = () => (
<div className="z-40 flex absolute left-1/2 transform -translate-x-1/2">
<a
href="#main"
className="-translate-y-20 focus:transform-none mt-2 flex items-center justify-center gap-2 rounded-2xl border border-dashed border-transparent bg-violet-600 px-6 py-2 text-center text-white"
className="-translate-y-20 focus:transform-none mt-2 flex items-center justify-center gap-2 rounded-2xl border border-dashed border-transparent bg-theme-secondary px-6 py-2 text-center text-light-primary"
>
Skip to main content
</a>
Expand Down
2 changes: 1 addition & 1 deletion components/StarButton/GitHubStarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const GitHubStarButton: FC<{ repo: string }> = ({ repo }) => {
rel="noopener noreferrer"
aria-label={`Star ${repo} on GitHub`}
>
<div className="inline-flex items-center py-1 text-sm font-semibold bg-transparent text-theme-secondary rounded-sm transition-colors transition duration-300 ease-in-out hover:text-text-secondary transition duration-300 ease-in-out dark:hover:text-gray-300 dark:text-theme-primary hover:underline">
<div className="inline-flex items-center py-1 text-sm font-semibold bg-transparent text-theme-secondary rounded-sm transition-colors transition duration-300 ease-in-out hover:text-text-secondary transition duration-300 ease-in-out dark:hover:text-text-primary dark:text-theme-primary">
<FaRegStar className="mr-1" />
<span>Star</span>
<span className="ml-2">{starCount}</span>
Expand Down
2 changes: 1 addition & 1 deletion components/logo/logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react'
const Logo = ({ className }: { className?: string }) => {
return (
<h1 className={`font-semibold ${className}`}>
<span className="border-b-4 border-theme-secondary dark:border-theme-primary text-text-secondary dark:text-light-primary">
<span className="border-b-4 border-theme-primary text-text-secondary dark:text-light-primary">
Links
</span>
<span className="text-theme-secondary dark:text-theme-primary motion-safe:animate-pulse">
Expand Down
8 changes: 4 additions & 4 deletions components/popup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ const Popup: React.FC<{
onClick={(e) => e.stopPropagation()}
className={`fixed left-1/2 top-1/2 z-[150] max-w-[500px] -translate-x-1/2 -translate-y-1/2 transition-all ${
currentCard ? 'animate-scale-appearance' : 'animate-scale-hide'
} flex h-fit w-[90%] flex-col justify-between gap-5 overflow-hidden rounded-2xl border border-dashed border-violet-500 dark:border-violet-400 bg-gray-100 px-5 py-10 dark:bg-gray-900`}
} flex h-fit w-[90%] flex-col justify-between gap-5 overflow-hidden rounded-2xl border border-dashed border-theme-secondary dark:border-theme-primary bg-light-primary px-5 py-10 dark:bg-dark`}
role="dialog"
title={`${currentCard?.name ?? 'Card'} Popup`}
>
<div className="flex flex-col gap-5">
<div className="flex justify-between items-center">
<div className="w-full flex justify-between items-center">
<h2 className="text-2xl text-violet-400 capitalize">
<h2 className="text-2xl text-theme-primary capitalize">
{currentCard?.name}
</h2>
</div>
<div className="max-w-[25]%] text-xsm text-violet-500 capitalize flex items-center gap-2">
<div className="max-w-[25]%] text-xsm text-theme-secondary capitalize flex items-center gap-2">
<CopyToClipboard url={currentCard?.url ?? ''} />
{currentCard?.language ? (
<>
Expand All @@ -61,7 +61,7 @@ const Popup: React.FC<{
href={currentCard?.url}
target="_blank"
rel="noreferrer"
className="mt-2 px-6 py-2 text-white text-center bg-violet-600 rounded-2xl w-full hover:bg-transparent hover:text-violet-500 border border-dashed border-transparent duration-100 hover:border-violet-400 bottom-0 flex items-center justify-center bottom-0 relative"
className="mt-2 px-6 py-2 text-white text-center bg-theme-secondary rounded-2xl w-full hover:bg-transparent hover:text-theme-secondary border border-dashed border-transparent duration-100 hover:border-theme-primary bottom-0 flex items-center justify-center bottom-0 relative"
>
Visit site
</a>
Expand Down
4 changes: 2 additions & 2 deletions components/popup/popupCategoryDesc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ const PopupDesc: React.FC<{
onClick={(e) => e.stopPropagation()}
className={`fixed left-1/2 top-1/2 z-[150] max-w-[500px] -translate-x-1/2 -translate-y-1/2 transition-all ${
currentCategory ? 'animate-scale-appearance' : 'animate-scale-hide'
} flex h-fit w-[90%] flex-col justify-between gap-5 overflow-hidden rounded-2xl border border-dashed border-violet-500 dark:border-violet-400 bg-gray-100 px-5 py-10 dark:bg-gray-900`}
} flex h-fit w-[90%] flex-col justify-between gap-5 overflow-hidden rounded-2xl border border-dashed border-theme-secondary dark:border-theme-primary bg-light-primary px-5 py-10 dark:bg-dark`}
role="dialog"
title={`${name ?? 'Card'} Popup`}
>
<div className="flex flex-col gap-5">
<div className="flex justify-between items-center">
<div className="w-full flex justify-between items-center">
<h2 className="max-w-[80%] text-2xl text-violet-400 capitalize">
<h2 className="max-w-[80%] text-2xl text-theme-primary capitalize">
{name}
</h2>
</div>
Expand Down
Loading

0 comments on commit 20a6e9c

Please sign in to comment.