bottom navbar primary color

This commit is contained in:
hamid zarghami
2025-12-17 16:38:12 +03:30
parent 32c197a105
commit 340937ca8d
7 changed files with 32 additions and 32 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -300,6 +300,10 @@ html[data-theme="light"] {
/* #292D32 */ /* #292D32 */
} }
* {
outline: none !important;
}
html[data-theme="dark"] { html[data-theme="dark"] {
/* --background: oklch(0.145 0 0); /* --background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0); --foreground: oklch(0.985 0 0);
+5 -2
View File
@@ -1,8 +1,10 @@
import React from 'react'; import React from 'react';
type Props = React.SVGProps<SVGSVGElement>; type Props = React.SVGProps<SVGSVGElement> & {
variant?: 'Outline' | 'Bold';
};
const HomeIcon: React.FC<Props> = ({ ...props }) => { const HomeIcon: React.FC<Props> = ({ variant = 'Outline', ...props }) => {
return ( return (
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@@ -10,6 +12,7 @@ const HomeIcon: React.FC<Props> = ({ ...props }) => {
height='24' height='24'
viewBox="0 0 24 24" viewBox="0 0 24 24"
fill="none" fill="none"
className={variant === 'Bold' ? 'fill-current text-primary' : 'stroke-current text-primary'}
{...props} {...props}
> >
<path d="M17.79 22.75H6.21c-2.74 0-4.96-2.23-4.96-4.97v-7.41c0-1.36.84-3.07 1.92-3.91l5.39-4.2C10.18 1 12.77.94 14.45 2.12l6.18 4.33c1.19.83 2.12 2.61 2.12 4.06v7.28c0 2.73-2.22 4.96-4.96 4.96Z" /> <path d="M17.79 22.75H6.21c-2.74 0-4.96-2.23-4.96-4.97v-7.41c0-1.36.84-3.07 1.92-3.91l5.39-4.2C10.18 1 12.77.94 14.45 2.12l6.18 4.33c1.19.83 2.12 2.61 2.12 4.06v7.28c0 2.73-2.22 4.96-4.96 4.96Z" />
+13 -15
View File
@@ -69,10 +69,10 @@ function BottomNavBar({ onPagerClick }: BottomNavBarProps) {
{onPagerClick ? ( {onPagerClick ? (
<button <button
onClick={onPagerClick} onClick={onPagerClick}
className="flex flex-col justify-arround items-center gap-[5px] text-disabled2 pointer-events-auto dark:**:stroke-neutral-500" className="flex flex-col justify-arround items-center gap-[5px] text-primary pointer-events-auto **:stroke-primary"
> >
<PagerIcon width={20} height={20} /> <PagerIcon width={20} height={20} />
<span className="text-xs2 text-disabled-text"> <span className="text-xs2">
{t('Pager')} {t('Pager')}
</span> </span>
</button> </button>
@@ -82,33 +82,31 @@ function BottomNavBar({ onPagerClick }: BottomNavBarProps) {
<BottomNavHighlightLink <BottomNavHighlightLink
href={`/${name}`} href={`/${name}`}
icon={ icon={
<HomeIcon className='transition-all duration-200' <HomeIcon
fill={isHomeRoute ? 'white' : 'transparent'} className={clsx(
stroke={isHomeRoute ? 'black' : 'white'} 'transition-all duration-200 stroke-primary'
strokeWidth={1} )}
fill="white"
stroke="currentColor"
variant={isHomeRoute ? 'Bold' : 'Outline'}
width={20} width={20}
height={20} />} height={20} />}
value={t('Menu')} /> value={t('Menu')} />
<Link <Link
href={`/${name}/about`} href={`/${name}/about`}
className={clsx( className={clsx(
'flex flex-col justify-arround items-center gap-[5px] text-disabled2 pointer-events-auto dark:**:stroke-neutral-500 min-w-0', 'flex flex-col justify-arround items-center gap-[5px] text-primary pointer-events-auto **:stroke-primary min-w-0'
isAboutRoute && 'text-foreground **:stroke-foreground'
)} )}
> >
<div className="shrink-0"> <div className="shrink-0 text-primary">
<Building <Building
key={`building-${buildingVariant}-${isAboutRoute}`} key={`building-${buildingVariant}-${isAboutRoute}`}
size={20} size={20}
variant={buildingVariant as 'Bold' | 'Outline'} variant={buildingVariant as 'Bold' | 'Outline'}
color={isAboutRoute ? undefined : "#8C90A3"} color="currentColor"
style={isAboutRoute ? { fill: 'currentColor' } : undefined}
/> />
</div> </div>
<span className={clsx( <span className="text-xs2 text-center truncate w-full">
'text-xs2 text-disabled-text text-center truncate w-full',
isAboutRoute && 'text-foreground'
)}>
{t('about')} {t('about')}
</span> </span>
</Link> </Link>
+3 -4
View File
@@ -17,16 +17,15 @@ function BottomNavLink({ icon, value, href, ...restProps }: Props) {
return ( return (
<Link {...restProps} href={href} className={clsx( <Link {...restProps} href={href} className={clsx(
'flex flex-col justify-arround items-center gap-[5px] text-disabled2 pointer-events-auto dark:**:stroke-neutral-500 min-w-0', 'flex flex-col justify-arround items-center gap-[5px] text-primary pointer-events-auto **:stroke-primary min-w-0',
isActive && 'text-foreground **:stroke-foreground', isActive && 'text-primary-foreground **:stroke-primary-foreground',
restProps.className ?? '', restProps.className ?? '',
)}> )}>
<div className="shrink-0"> <div className="shrink-0">
{icon} {icon}
</div> </div>
<span className={clsx( <span className={clsx(
'text-xs2 text-disabled-text text-center truncate w-full', 'text-xs2 text-center truncate w-full',
isActive && 'text-foreground'
)}> )}>
{value} {value}
</span> </span>
@@ -17,19 +17,15 @@ function BottomNavHighlightLink({ icon, value, href, ...restProps }: Props) {
return ( return (
<Link {...restProps} href={href} className={clsx( <Link {...restProps} href={href} className={clsx(
'flex flex-col justify-arround items-center gap-[5px] text-disabled2 pointer-events-auto', 'flex flex-col justify-arround items-center gap-[5px] text-primary pointer-events-auto',
isActive && 'text-foreground',
restProps.className ?? '', restProps.className ?? '',
)}> )}>
<div className={clsx( <div className={clsx(
'bg-primary text-white p-3.5 rounded-full', 'bg-primary text-primary-foreground p-3.5 rounded-full',
)}> )}>
{icon} {icon}
</div> </div>
<span className={clsx( <span className="text-xs2">
'text-xs2 text-disabled-text',
isActive && 'text-foreground'
)}>
{value} {value}
</span> </span>
</Link> </Link>
+3 -3
View File
@@ -140,7 +140,7 @@ export default function SplashScreen({
repeat: Infinity, repeat: Infinity,
ease: "easeInOut" ease: "easeInOut"
}} }}
// className="w-3 h-3 rounded-full bg-primary shadow-lg shadow-primary/50" className="w-3 h-3 rounded-full bg-primary shadow-lg shadow-primary/50"
/> />
<motion.div <motion.div
animate={{ animate={{
@@ -153,7 +153,7 @@ export default function SplashScreen({
repeat: Infinity, repeat: Infinity,
ease: "easeInOut" ease: "easeInOut"
}} }}
// className="w-3 h-3 rounded-full bg-primary shadow-lg shadow-primary/50" className="w-3 h-3 rounded-full bg-primary shadow-lg shadow-primary/50"
/> />
<motion.div <motion.div
animate={{ animate={{
@@ -166,7 +166,7 @@ export default function SplashScreen({
repeat: Infinity, repeat: Infinity,
ease: "easeInOut" ease: "easeInOut"
}} }}
// className="w-3 h-3 rounded-full bg-primary shadow-lg shadow-primary/50" className="w-3 h-3 rounded-full bg-primary shadow-lg shadow-primary/50"
/> />
</motion.div> </motion.div>
</motion.div> </motion.div>