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

Added variables for different colors #1390

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 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-white bg-[--primary-100] p-4 text-white shadow-xl duration-300 transition-colors focus:ring group-hover:border-dashed group-hover:border-[--primary-60] group-hover:bg-white dark:drop-shadow-[5px_5px_8px_rgba(124,58,237,0.25)] dark:group-hover:bg-[#101623] md:border-[--primary-100] ${
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-[--primary-80]" />
</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
10 changes: 5 additions & 5 deletions components/Cards/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ const Card: FC<CardProps> = ({ data }) => {
if (descriptionRef.current) {
setIsOverflow(
descriptionRef.current.scrollHeight >
descriptionRef.current.offsetHeight
descriptionRef.current.offsetHeight
)
}
}, [])

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-[--primary-80] dark:[--primary-60] bg-[--background] shadow-lg dark:[--background-dark] dark:text-[--secondary-40] 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-[--primary-100] dark:text-[--primary-60]"
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-[--primary-100] dark:text-[--primary-60] text-right hover:text-[--primary-60] dark:hover:text-[primary-40]">
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-[--primary-100] px-6 py-2 text-center text-white duration-100 hover:border-[--primary-60] hover:bg-transparent hover:text-[--primary-80] dark:hover:text-[--primary-60]'
}
>
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-[--primary-80] 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-[--primary-80] text-white text-sm rounded-lg p-1.5 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-[--secondary-20]' : 'text-violet-700'
} `

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-[--primary-60]">
<span>&copy; {new Date().getFullYear()} LinksHub | </span>
Developed by{' '}
<Link
Expand Down
8 changes: 4 additions & 4 deletions components/ForkButton/GitHubForkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const GitHubForkButton: FC<{ repo: string }> = ({ repo }) => {
fetchForkCount()
}, [repo])

// Other Styles for Light Mode: [bg-violet-500 text-white] OR [text-black-500 border border-black]
// Other Styles for Light Mode: [bg-[--primary-80] text-white] OR [text-black-500 border border-black]

return (
<Link
Expand All @@ -32,9 +32,9 @@ export const GitHubForkButton: FC<{ repo: string }> = ({ repo }) => {
>
<div
className={
`${`inline-flex items-center px-4 py-1 text-sm font-semibold bg-transparent text-violet-500 border
border-violet-500 border-transparent rounded-sm transition-colors shadow-md transition duration-300
ease-in-out hover:text-black hover:border-black dark:hover:text-gray-300 dark:hover:border-gray-300`
`${`inline-flex items-center px-4 py-1 text-sm font-semibold bg-transparent text-[--primary-80] border
border-[--primary-80] border-transparent rounded-sm transition-colors shadow-md transition duration-300
ease-in-out hover:text-black hover:border-black dark:hover:text-[--secondary-40] dark:hover:border-[--secondary-40]`
}`
}
>
Expand Down
6 changes: 3 additions & 3 deletions components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ export const Header: FC<{}> = () => {

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-base-200 h-full w-fit flex-none px-6 py-4 dark:bg-gray-900 lg:w-[290px]">
<div className="bg-base-200 h-full w-fit flex-none px-6 py-4 dark:bg-[--secondary-200] lg:w-[290px]">
<Link href="/">
<Logo className="text-3xl" />
</Link>
</div>
<div className="bg-base-200 relative h-full grow px-8 dark:bg-gray-900 lg:bg-gray-100 lg:dark:bg-[#101623]">
<div className="bg-base-200 relative h-full grow px-8 dark:bg-[--secondary-200] lg:bg-[--secondary-10] lg:dark:bg-[--dark-background]">
<TopBar className="absolute left-8 hidden h-full md:flex" />
<div className="absolute right-8 flex h-full gap-4">
<SocialMediaIconsList className="hidden lg:flex" />
<ThemeToggler />
<button className="dark:text-gray-300 lg:hidden" onClick={toggleNav}>
<button className="dark:text-[--secondary-40] lg:hidden" onClick={toggleNav}>
<AiOutlineMenu size={24} />
</button>
</div>
Expand Down
6 changes: 3 additions & 3 deletions components/MainContainer/MainContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import React from 'react'
export const MainContainer = () => {
return (
<div className="min-h-screen flex flex-row items-center justify-center">
<h2 className="text-6xl font-bold text-violet-200">
<span className="border-b-8 border-violet-500">Links</span>
<span className="text-violet-500">Hub</span>
<h2 className="text-6xl font-bold text-[--primary-20]">
<span className="border-b-8 border-[--primary-80]">Links</span>
<span className="text-[--primary-80]">Hub</span>
</h2>
<p className="uppercase font-semibold text-xl mt-6">...coming soon</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/NewIssue/NewIssue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const NewIssue: FC<{}> = () => {
<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">
<span className="motion-safe:animate-pulse text-2xl text-[--primary-80]">
<a
href="https://github.com/rupali-codes/LinksHub/issues/new?assignees=&labels=add+link&template=add_link.yml&title=%5BAdd%5D+%3Cname%3E"
target="_blank"
Expand Down
6 changes: 3 additions & 3 deletions components/Searchbar/Searchbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export const Searchbar: React.FC<SearchbarProps> = ({ setSearch }) => {
<div className="flex items-center">
<div className="relative flex items-center">
{/* <div className="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
<SearchIcon className="w-5 h-5 text-violet-600 dark:text-violet-400" />
<SearchIcon className="w-5 h-5 text-[--primary-100] dark:text-[--primary-60]" />
</div> */}
<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"
className="block p-2.5 w-full bg-transparent text-sm text-[--secondary-200] dark:text-[--secondary-20] border border-dashed border-[--secondary-60] dark:border-[--secondary-80] focus:border-[--primary-80] dark:focus:border-[--primary-80] dark:focus:ring-[--primary-80] focus:ring-[--primary-80] dark:placeholder-[--secondary-60] outline-none transition-all ease-in-out duration-300 rounded-lg"
placeholder="Start searching..."
value={searchQuery}
onChange={handleSearchChange}
Expand All @@ -49,7 +49,7 @@ export const Searchbar: React.FC<SearchbarProps> = ({ setSearch }) => {
</div>
<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-[--primary-80] text-white rounded-md border border-dashed border-transparent hover:border-[--primary-60] hover:bg-transparent hover:text-[--primary-60] dark:hover:text-[--primary-60]"
>
<SearchIcon className="w-5 h-5" />
</button>
Expand Down
2 changes: 1 addition & 1 deletion components/SideNavbar/SideNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const SideNavbar: FC<{}> = () => {
`}
>
<SideNavbarHeader />
<SocialMediaIconsList className="bg-gray-100 px-6 py-2 dark:bg-gray-900" />
<SocialMediaIconsList className="bg-[--secondary-10] px-6 py-2 dark:bg-[--secondary-200]" />
<SideNavbarBody />
</div>,
document.getElementById('overlay-root')!
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 transition-none ease-in dark:bg-gray-900 dark:text-gray-300`,
`bg-base-200 h-full w-full overflow-x-hidden whitespace-nowrap transition-all transition-none ease-in dark:bg-[--secondary-200] dark:text-[--secondary-40]`,
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-base-200 transiton-all w-full p-4 transition-none ease-in dark:bg-[--secondary-200]">
<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-[--primary-100] dark:text-[--primary-60] dark:bg-opacity-5 hover:text-[--primary-80] dark:hover:text-[--primary-40] rounded-md focus-visible:outline-none focus-visible:ring focus-visible:ring-[--primary-60]">
<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 border-[--tertiary-5] dark:border-[--tertiary-60] -pl-0.5">
{subcategoryList}
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/SideNavbar/SideNavbarCategoryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const SideNavbarCategoryList: FC<{
)
})
) : (
<div className="dark:text-gray-200 text-gray-500 text-lg text-center py-2">
<div className="dark:text-[--secondary-20] text-[--secondary-80] text-lg text-center py-2">
No Links Found
</div>
)}
Expand Down
8 changes: 4 additions & 4 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 '
? 'border-l-4 border-[--primary-80] text-violet-700 dark:text-[--primary-60] '
: '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`}
} collapse w-full text-start pl-3 hover:text-[--primary-80] dark:hover:text-[--primary-40]
focus-visible:outline-none focus-visible:ring focus-visible:ring-[--primary-60] 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-[--primary-80]">
{name}
</div>
</Link>
Expand Down
4 changes: 2 additions & 2 deletions components/SideNavbar/SideNavbarHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export const SideNavbarHeader: FC<{}> = (props) => {

return (
<header>
<div className="flex items-center justify-between bg-gray-100 p-4 dark:bg-gray-900">
<div className="flex items-center justify-between bg-[--secondary-10] p-4 dark:bg-[--secondary-200]">
<Link href={'/'}>
<Logo className="text-3xl" />
</Link>
<button
className="h-[24px] w-[24px] dark:text-gray-300 lg:hidden"
className="h-[24px] w-[24px] dark:text-[--secondary-40] lg:hidden"
onClick={toggleNav}
>
<AiOutlineClose size={24} id="hamburger" />
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-[--primary-100] px-6 py-2 text-center text-white"
>
Skip to main content
</a>
Expand Down
6 changes: 3 additions & 3 deletions components/SocialMedia/SocialMediaIconsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const SocialMediaIconsList: FC<{ className?: string }> = (props) => {
<li>
<a
title="Link to Discord server (External Link)"
className="dark:text-gray-300"
className="dark:text-[--secondary-40]"
target="_blank"
rel="noopener noreferrer"
href="https://discord.com/invite/NvK67YnJX5"
Expand All @@ -34,7 +34,7 @@ export const SocialMediaIconsList: FC<{ className?: string }> = (props) => {
<li>
<a
title="Link to Github project (External Link)"
className="dark:text-gray-300"
className="dark:text-[--secondary-40]"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/rupali-codes/LinksHub"
Expand All @@ -50,7 +50,7 @@ export const SocialMediaIconsList: FC<{ className?: string }> = (props) => {
<li>
<a
title="Link to Twitter page (External Link)"
className="dark:text-gray-300"
className="dark:text-[--secondary-40]"
target="_blank"
rel="noopener noreferrer"
href="https://twitter.com/linkshubdotdev"
Expand Down
2 changes: 1 addition & 1 deletion components/StarButton/GitHubStarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const GitHubStarButton: FC<{ repo: string }> = ({ repo }) => {
rel="noopener noreferrer"
aria-label={`Star ${repo} on GitHub`}
>
<div className="inline-flex items-center px-4 py-1 text-sm bg-violet-500 text-white border border-dashed border-transparent rounded-sm transition-colors shadow-md hover:bg-transparent hover:border-violet-400 hover:text-violet-400">
<div className="inline-flex items-center px-4 py-1 text-sm bg-[--primary-80] text-white border border-dashed border-transparent rounded-sm transition-colors shadow-md hover:bg-transparent hover:border-[--primary-60] hover:text-[--primary-80]">
<FaStar className="mr-1" />
<span>Star</span>
<span className="ml-2">{starCount}</span>
Expand Down
4 changes: 2 additions & 2 deletions components/ThemeToggler/themeToggler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function ThemeToggler() {
}

const iconProps = {
className: 'hover:text-violet-500 transition duration-300 ease-in-out',
className: 'hover:text-[--primary-80] transition duration-300 ease-in-out',
size: '1.5rem',
}

Expand All @@ -29,7 +29,7 @@ export function ThemeToggler() {
title={`Toggle dark mode (current state: ${resolvedTheme})`}
>
{resolvedTheme === 'dark' ? (
<HiSun {...iconProps} className="text-gray-200" />
<HiSun {...iconProps} className="text-[--secondary-20]" />
) : (
<HiMoon {...iconProps} />
)}
Expand Down
6 changes: 3 additions & 3 deletions components/TopBar/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export const TopBar: FC<{ className?: string | undefined }> = (props) => {

return (
<div
className={`flex items-center text-xl dark:text-gray-300 ${className}`}
className={`flex items-center text-xl dark:text-[--secondary-40] ${className}`}
>
<FaSlackHash className="mr-2 text-gray-600 dark:text-gray-300" />
<span className="flex uppercase text-gray-900 dark:text-gray-100">
<FaSlackHash className="mr-2 text-[--secondary-100] dark:text-[--secondary-40]" />
<span className="flex uppercase text[--secondary-200] dark:text-[--secondary-10]">
{category.split('-').join(' ')}
<FaInfoCircle
className="ml-4 mt-2 text-sm cursor-pointer"
Expand Down
4 changes: 2 additions & 2 deletions components/logo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import React from 'react'
const Logo = ({ className }: { className?: string }) => {
return (
<h1 className={`font-bold ${className}`}>
<span className="border-b-4 border-violet-500 text-violet-500 dark:text-gray-200">
<span className="border-b-4 border-[--primary-80] text-[--primary-80] dark:text-[--secondary-20]">
Links
</span>
<span className="text-violet-500 dark:text-violet-400 motion-safe:animate-pulse">
<span className="text-[--primary-80] dark:text-[--primary-60] motion-safe:animate-pulse">
Hub
</span>
</h1>
Expand Down
Loading