Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sweepstake
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arjun Jhukal
sweepstake
Commits
500717a6
Commit
500717a6
authored
Oct 15, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated menu hover effect, button hover effect and base query
parent
df8b6401
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
388 additions
and
111 deletions
+388
-111
page.tsx
src/app/(dashboard)/(user)/(outsideAuth)/page.tsx
+1
-1
globals.css
src/app/globals.css
+29
-4
index.tsx
src/components/organism/Sidebar/AdminSidebar/index.tsx
+76
-18
PrimaryMenu.tsx
src/components/organism/Sidebar/UserSidebar/PrimaryMenu.tsx
+58
-8
index.tsx
src/components/organism/Sidebar/UserSidebar/index.tsx
+158
-60
index.tsx
...es/dashboard/userDashboard/games/exclusiveGames/index.tsx
+1
-1
baseQuery.ts
src/services/baseQuery.ts
+2
-2
adminPalette.ts
src/theme/adminPalette.ts
+37
-15
palette.ts
src/theme/palette.ts
+26
-2
No files found.
src/app/(dashboard)/(user)/(outsideAuth)/page.tsx
View file @
500717a6
...
...
@@ -164,7 +164,7 @@ export default async function Home() {
{
subBanner
.
cta_link
&&
(
<
Link
href=
{
subBanner
.
cta_link
}
className=
"px-[18px] py-[11px] rounded-[28px] inline-block"
className=
"
ss-btn
px-[18px] py-[11px] rounded-[28px] inline-block"
style=
{
{
background
:
index
%
2
===
0
...
...
src/app/globals.css
View file @
500717a6
...
...
@@ -117,12 +117,30 @@
@apply
py-2
px-4
lg
:
px-6
lg
:
py-3
;
border-radius
:
27px
;
text-align
:
center
;
width
:
100%
;
display
:
block
;
position
:
relative
;
overflow
:
hidden
;
}
.ss-btn
::before
{
content
:
''
;
background
:
rgba
(
255
,
255
,
255
,
0.4
);
width
:
60%
;
height
:
100%
;
top
:
0%
;
left
:
-125%
;
transform
:
skew
(
45deg
);
position
:
absolute
;
transition
:
left
0.75s
ease-in-out
;
z-index
:
9
;
}
.ss-btn
:hover::before
{
left
:
155%
;
}
:disabled
{
opacity
:
0.5
;
/* opacity: 0.5; */
cursor
:
not-allowed
;
}
}
...
...
@@ -370,8 +388,15 @@
} */
.active__menu
{
background-color
:
#FEEFFF
;
color
:
var
(
--color-primary
);
background
:
rgba
(
255
,
255
,
255
,
0.15
);
backdrop-filter
:
blur
(
12px
);
-webkit-backdrop-filter
:
blur
(
12px
);
border
:
1px
solid
rgba
(
255
,
255
,
255
,
0.25
);
border-radius
:
8px
;
box-shadow
:
0
8px
32px
0
rgba
(
0
,
0
,
0
,
0.37
),
inset
0
1px
0
0
rgba
(
255
,
255
,
255
,
0.4
),
0
0
20px
rgba
(
255
,
255
,
255
,
0.1
),
}
.active__menu
*
{
...
...
src/components/organism/Sidebar/AdminSidebar/index.tsx
View file @
500717a6
...
...
@@ -82,25 +82,83 @@ export default function AdminMenu({ open }: { open: boolean }) {
},
];
const
[
glassStyle
,
setGlassStyle
]
=
React
.
useState
({
top
:
0
,
height
:
0
,
opacity
:
0
});
const
menuListRef
=
React
.
useRef
<
HTMLUListElement
>
(
null
);
const
handleMouseEnter
=
(
e
:
React
.
MouseEvent
<
HTMLLIElement
>
)
=>
{
const
item
=
e
.
currentTarget
;
const
list
=
menuListRef
.
current
;
if
(
item
&&
list
)
{
const
itemRect
=
item
.
getBoundingClientRect
();
const
listRect
=
list
.
getBoundingClientRect
();
const
topPosition
=
itemRect
.
top
-
listRect
.
top
;
setGlassStyle
({
top
:
topPosition
,
height
:
itemRect
.
height
,
opacity
:
1
,
});
}
};
const
handleMouseLeave
=
()
=>
{
setGlassStyle
((
prev
)
=>
({
...
prev
,
opacity
:
0
}));
};
return
(
<
List
>
{
menuItems
.
map
(({
label
,
icon
,
href
,
active
},
idx
)
=>
(
<
ListItem
key=
{
idx
}
>
<
Link
href=
{
href
}
className=
{
`flex gap-2 items-center px-4 py-2 ${open ? "expanded" : "collapsed"
} ${active ? "active__menu" : ""}`
}
<
List
ref=
{
menuListRef
}
onMouseLeave=
{
handleMouseLeave
}
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
"absolute"
,
left
:
"0"
,
right
:
"0"
,
top
:
`${glassStyle.top}px`
,
height
:
`${glassStyle.height}px`
,
background
:
"rgba(255, 255, 255, 0.15)"
,
backdropFilter
:
"blur(12px)"
,
WebkitBackdropFilter
:
"blur(12px)"
,
border
:
"1px solid rgba(255, 255, 255, 0.25)"
,
borderRadius
:
"8px"
,
boxShadow
:
`
0 8px 32px 0 rgba(0, 0, 0, 0.37),
inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
0 0 20px rgba(255, 255, 255, 0.1)
`
,
transition
:
"all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1)"
,
pointerEvents
:
"none"
,
zIndex
:
1
,
opacity
:
glassStyle
.
opacity
,
transform
:
glassStyle
.
opacity
===
1
?
"translateY(0) scale(1)"
:
"translateY(0) scale(0.95)"
,
}
}
/>
{
menuItems
.
map
(({
label
,
icon
,
href
,
active
},
idx
)
=>
(
<
ListItem
key=
{
idx
}
onMouseEnter=
{
handleMouseEnter
}
style=
{
{
position
:
"relative"
,
zIndex
:
2
,
padding
:
0
}
}
>
<
ListItemIcon
className=
{
open
?
"expanded"
:
"collapsed"
}
>
{
icon
}
</
ListItemIcon
>
<
ListItemText
primary=
{
label
}
className=
{
open
?
"expanded"
:
"collapsed"
}
/>
</
Link
>
</
ListItem
>
))
}
</
List
>
<
Link
href=
{
href
}
className=
{
`flex gap-2 items-center px-4 py-2 ${open ? "expanded" : "collapsed"
} ${active ? "active__menu" : ""}`
}
>
<
ListItemIcon
className=
{
open
?
"expanded"
:
"collapsed"
}
>
{
icon
}
</
ListItemIcon
>
<
ListItemText
primary=
{
label
}
className=
{
open
?
"expanded"
:
"collapsed"
}
/>
</
Link
>
</
ListItem
>
))
}
</
List
>
);
}
src/components/organism/Sidebar/UserSidebar/PrimaryMenu.tsx
View file @
500717a6
...
...
@@ -10,6 +10,29 @@ import { usePathname } from "next/navigation";
export
default
function
PrimaryMenu
({
open
}:
{
open
:
boolean
})
{
const
{
data
,
isLoading
}
=
useGetAllUserMenuQuery
();
const
pathname
=
usePathname
();
const
[
glassStyle
,
setGlassStyle
]
=
React
.
useState
({
top
:
0
,
height
:
0
,
opacity
:
0
});
const
menuListRef
=
React
.
useRef
<
HTMLUListElement
>
(
null
);
const
handleMouseEnter
=
(
e
:
React
.
MouseEvent
<
HTMLLIElement
>
)
=>
{
const
item
=
e
.
currentTarget
;
const
list
=
menuListRef
.
current
;
if
(
item
&&
list
)
{
const
itemRect
=
item
.
getBoundingClientRect
();
const
listRect
=
list
.
getBoundingClientRect
();
const
topPosition
=
itemRect
.
top
-
listRect
.
top
;
setGlassStyle
({
top
:
topPosition
,
height
:
itemRect
.
height
,
opacity
:
1
,
});
}
};
const
handleMouseLeave
=
()
=>
{
setGlassStyle
((
prev
)
=>
({
...
prev
,
opacity
:
0
}));
};
if
(
isLoading
)
{
return
(
...
...
@@ -24,18 +47,45 @@ export default function PrimaryMenu({ open }: { open: boolean }) {
);
}
return
(
<
List
>
<
List
ref=
{
menuListRef
}
onMouseLeave=
{
handleMouseLeave
}
style=
{
{
position
:
'relative'
,
}
}
>
<
div
style=
{
{
position
:
'absolute'
,
left
:
'0'
,
right
:
'0'
,
top
:
`${glassStyle.top}px`
,
height
:
`${glassStyle.height}px`
,
background
:
'rgba(255, 255, 255, 0.15)'
,
backdropFilter
:
'blur(12px)'
,
WebkitBackdropFilter
:
'blur(12px)'
,
border
:
'1px solid rgba(255, 255, 255, 0.25)'
,
borderRadius
:
'8px'
,
boxShadow
:
`
0 8px 32px 0 rgba(0, 0, 0, 0.37),
inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
0 0 20px rgba(255, 255, 255, 0.1)
`
,
transition
:
'all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1)'
,
pointerEvents
:
'none'
,
zIndex
:
1
,
opacity
:
glassStyle
.
opacity
,
transform
:
glassStyle
.
opacity
===
1
?
'translateY(0) scale(1)'
:
'translateY(0) scale(0.95)'
,
}
}
/>
{
data
?
data
?.
data
?.
map
((
menu
:
any
)
=>
{
const
href
=
menu
.
slug
?
`/general/${menu.slug}`
:
"#"
;
const
isActive
=
pathname
.
startsWith
(
href
);
return
(
<
ListItem
key=
{
menu
?.
name
}
>
{
/* <ListItemButton component="a" href={menu.slug ? `/general/${menu.slug}` : "#"}>
<ListItemIcon>
<ReceiptEdit size={18} />
</ListItemIcon>
<ListItemText primary={menu.name} />
</ListItemButton> */
}
<
ListItem
key=
{
menu
?.
name
}
onMouseEnter=
{
handleMouseEnter
}
style=
{
{
position
:
'relative'
,
zIndex
:
2
,
padding
:
0
,
}
}
>
<
Link
href=
{
menu
.
slug
?
`/general/${menu.slug}`
:
"#"
}
className=
{
`flex gap-2 items-center px-4 py-2 rounded-md transition-all ${[
open ? "expanded" : "collapsed",
isActive ? "active__menu " : ""
...
...
src/components/organism/Sidebar/UserSidebar/index.tsx
View file @
500717a6
This diff is collapsed.
Click to expand it.
src/components/pages/dashboard/userDashboard/games/exclusiveGames/index.tsx
View file @
500717a6
...
...
@@ -31,7 +31,7 @@ export default async function ExclusiveGamePage() {
src=
{
game
.
thumbnail
||
"/assets/images/fallback.png"
}
alt=
{
game
.
name
}
fill
className=
"w-full h-[222px] object-cover group-hover:scale-1
05
transition-transform duration-300"
className=
"w-full h-[222px] object-cover group-hover:scale-1
10
transition-transform duration-300"
/>
</
Tooltip
>
</
ProtectedLink
>
...
...
src/services/baseQuery.ts
View file @
500717a6
...
...
@@ -7,8 +7,8 @@ export const baseQuery = fetchBaseQuery({
prepareHeaders
(
headers
,
{
getState
})
{
const
token
=
(
getState
()
as
RootState
).
auth
.
access_token
;
//
headers.set("Accept", "application/json");
//
headers.set("Content-Type", "application/json");
headers
.
set
(
"Accept"
,
"application/json"
);
headers
.
set
(
"Content-Type"
,
"application/json"
);
if
(
token
)
{
headers
.
set
(
"Authorization"
,
`Bearer
${
token
}
`
);
}
...
...
src/theme/adminPalette.ts
View file @
500717a6
...
...
@@ -178,16 +178,38 @@ export default function Palette(mode: ThemeMode) {
MuiButton
:
{
styleOverrides
:
{
root
:
{
borderRadius
:
'27px'
,
padding
:
'12px 24px'
,
textAlign
:
'center'
,
textTransform
:
'capitalize'
,
maxWidth
:
'fit-content'
,
'&:disabled'
:
{
opacity
:
0.2
,
cursor
:
'not-allowed'
,
color
:
"#fff"
borderRadius
:
"27px"
,
padding
:
"12px 24px"
,
textAlign
:
"center"
,
textTransform
:
"capitalize"
,
width
:
"100%"
,
position
:
"relative"
,
overflow
:
"hidden"
,
transition
:
"all 0.3s ease-in-out"
,
color
:
"#fff"
,
"&:disabled"
:
{
// opacity: 0.5,
cursor
:
"not-allowed"
,
},
// ✨ Shine effect (pseudo-element)
"&::before"
:
{
content
:
'""'
,
position
:
"absolute"
,
top
:
0
,
left
:
"-120%"
,
width
:
"60%"
,
height
:
"100%"
,
background
:
"rgba(255, 255, 255, 0.4)"
,
transform
:
"skew(45deg)"
,
transition
:
"left 0.75s ease-in-out"
,
zIndex
:
1
,
},
"&:hover::before"
:
{
left
:
"155%"
,
},
// [baseTheme.breakpoints.down("md")]: {
// padding: "8px 16px",
// },
},
},
variants
:
[
...
...
@@ -196,9 +218,9 @@ export default function Palette(mode: ThemeMode) {
style
:
{
background
:
primaryGradColors
[
0
],
color
:
"#fff"
,
"&:hover"
:
{
opacity
:
0.9
,
},
//
"&:hover": {
//
opacity: 0.9,
//
},
},
},
{
...
...
@@ -206,9 +228,9 @@ export default function Palette(mode: ThemeMode) {
style
:
{
background
:
secondaryGradColors
[
0
],
color
:
"#fff"
,
"&:hover"
:
{
opacity
:
0.9
,
},
//
"&:hover": {
//
opacity: 0.9,
//
},
},
},
],
...
...
src/theme/palette.ts
View file @
500717a6
...
...
@@ -379,10 +379,29 @@ export default function Palette(mode: ThemeMode) {
textAlign
:
"center"
,
textTransform
:
"capitalize"
,
width
:
"100%"
,
position
:
"relative"
,
overflow
:
"hidden"
,
transition
:
"all 0.3s ease-in-out"
,
"&:disabled"
:
{
opacity
:
0.5
,
cursor
:
"not-allowed"
,
},
// ✨ Shine effect (pseudo-element)
"&::before"
:
{
content
:
'""'
,
position
:
"absolute"
,
top
:
0
,
left
:
"-120%"
,
width
:
"60%"
,
height
:
"100%"
,
background
:
"rgba(255, 255, 255, 0.4)"
,
transform
:
"skew(45deg)"
,
transition
:
"left 0.75s ease-in-out"
,
zIndex
:
1
,
},
"&:hover::before"
:
{
left
:
"155%"
,
},
[
baseTheme
.
breakpoints
.
down
(
"md"
)]:
{
padding
:
"8px 16px"
,
},
...
...
@@ -394,7 +413,9 @@ export default function Palette(mode: ThemeMode) {
style
:
{
background
:
primaryGradColors
[
0
],
color
:
"#fff"
,
"&:hover"
:
{
opacity
:
0.9
},
// "&:hover": {
// opacity: 0.9,
// },
},
},
{
...
...
@@ -402,11 +423,14 @@ export default function Palette(mode: ThemeMode) {
style
:
{
background
:
secondaryGradColors
[
0
],
color
:
"#fff"
,
"&:hover"
:
{
opacity
:
0.9
},
// "&:hover": {
// opacity: 0.9,
// },
},
},
],
},
MuiList
:
{
styleOverrides
:
{
root
:
{
padding
:
0
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment