Skip to content

Commit ec9fdbf

Browse files
fix-#455: custom cursor and scrolling thumb
1 parent 778bec3 commit ec9fdbf

16 files changed

+68
-19
lines changed

Diff for: backend/.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Node.js
2+
node_modules/
3+
npm-debug.log
4+
yarn-debug.log
5+
yarn-error.log
6+
7+
# Environment variables
8+
.env
9+
10+
# Build output
11+
dist/
12+
13+
# Logs
14+
logs/
15+
*.log
16+
17+
# OS-specific files
18+
.DS_Store
19+
Thumbs.db

Diff for: backend/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"scripts": {
4040
"test": "jest --watchAll --detectOpenHandles --verbose --coverage ",
41-
"start": "node server.js",
41+
"start": "node dist/server.js",
4242
"dev": "nodemon server.js",
4343
"check": "prettier --check .",
4444
"format": "prettier --write .",
@@ -69,6 +69,7 @@
6969
"lint-staged": "^15.2.2",
7070
"prettier": "^3.2.5",
7171
"supertest": "^6.3.3",
72-
"typescript": "^5.5.4"
72+
"ts-node": "^10.9.2",
73+
"typescript": "^5.8.2"
7374
}
7475
}

Diff for: backend/tsconfig.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"compilerOptions": {
33
"target": "es2016",
44
"module": "ESNext",
5-
"moduleResolution": "Node",
6-
"allowArbitraryExtensions": true,
7-
"outDir": "./dist",
5+
"moduleResolution": "Node",
6+
"allowArbitraryExtensions": true,
7+
"outDir": "./dist",
88
"esModuleInterop": true,
9-
"forceConsistentCasingInFileNames": true,
10-
"strict": true,
11-
"skipLibCheck": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"strict": true,
11+
"skipLibCheck": true
1212
}
1313
}

Diff for: frontend/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"format": "prettier --write .",
1212
"test": "vitest run",
1313
"coverage": "vitest run --coverage ",
14-
"prepare": "cd .. && npm install"
14+
"prepare": "cd .. && npm install",
15+
"serve":"vite preview"
1516
},
1617
"lint-staged": {
1718
"src/**/*.{js,ts,tsx,jsx}": [

Diff for: frontend/public/travelCursor.png

1.01 KB
Loading

Diff for: frontend/src/components/admin-container.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { Outlet } from 'react-router-dom';
33

44
const AdminContainer = () => {
55
return (
6-
<div className="relative flex flex-grow flex-col bg-light dark:bg-dark sm:flex-row">
6+
<div
7+
className="relative flex flex-grow flex-col bg-light dark:bg-dark sm:flex-row"
8+
style={{ cursor: 'url(/travelCursor.png),auto' }}
9+
>
710
<AdminSidebar />
811
<Outlet />
912
</div>

Diff for: frontend/src/components/featured-post-card.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function FeaturedPostCard({
2121
<img
2222
src={post.imageLink}
2323
alt={post.title}
24-
className={`sm:group-hover:scale-hover h-48 w-full rounded-lg object-cover shadow-lg transition-transform ease-in-out sm:h-full`}
24+
className={`sm:group-hover:scale-hover h-48 w-full rounded-lg object-cover shadow-lg transition-transform duration-700 ease-in-out sm:h-full`}
2525
/>
2626
</div>
2727
<div className="flex h-full w-full flex-col gap-2 p-3 sm:w-2/3">

Diff for: frontend/src/components/post-card.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function PostCard({ post, testId = 'postcard' }: { post: Post } &
2121
<img
2222
src={post.imageLink}
2323
alt={post.title}
24-
className={`sm:group-hover:scale-hover h-full w-full rounded-t-lg object-cover transition-transform ease-in-out`}
24+
className={`sm:group-hover:scale-hover h-full w-full rounded-t-lg object-cover transition-transform duration-700 ease-in-out`}
2525
/>
2626
</div>
2727
<div className="p-3">

Diff for: frontend/src/index.css

+13
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,16 @@
1010
transform: scale(0.95);
1111
}
1212
}
13+
14+
body,
15+
html {
16+
cursor: url('/travelCursor.png'), pointer;
17+
}
18+
body::-webkit-scrollbar {
19+
background: transparent;
20+
}
21+
body::-webkit-scrollbar-thumb {
22+
background: rgb(41, 126, 199);
23+
border-radius: 50px;
24+
box-shadow: inset 0px 0px 15px rgba(0, 0, 0, 0.3);
25+
}

Diff for: frontend/src/pages/admin-blogs.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const AdminBlogs = () => {
3838

3939
return (
4040
<>
41-
<div className="w-full p-3 px-5 sm:p-12">
41+
<div className="w-full p-3 px-5 sm:p-12" style={{ cursor: 'url(/travelCursor.png),auto' }}>
4242
<h1 className="absolute left-16 top-3 text-2xl font-bold text-light-title dark:text-dark-title sm:static">
4343
Blogs
4444
</h1>

Diff for: frontend/src/pages/admin-users.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const AdminUsers = () => {
4040
}, []);
4141

4242
return (
43-
<div className="w-full p-3 px-5 sm:p-12">
43+
<div className="w-full p-3 px-5 sm:p-12" style={{ cursor: 'url(/travelCursor.png),auto' }}>
4444
<h1 className="absolute left-16 top-3 text-2xl font-bold text-light-title dark:text-dark-title sm:static">
4545
Users
4646
</h1>

Diff for: frontend/src/pages/details-page.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ export default function DetailsPage() {
9090

9191
if (!loading)
9292
return (
93-
<div className="flex-grow bg-light dark:bg-dark">
93+
<div
94+
className="flex-grow bg-light dark:bg-dark"
95+
style={{ cursor: 'url(/travelCursor.png),auto' }}
96+
>
9497
<div className="relative flex flex-col">
9598
<img src={post.imageLink} alt={post.title} className="h-80 w-full object-cover sm:h-96" />
9699
<div className="absolute left-0 top-0 h-full w-full bg-slate-950/60"></div>

Diff for: frontend/src/pages/home-page.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ function HomePage() {
2121
}, []);
2222

2323
return (
24-
<div className="w-full cursor-default bg-light dark:bg-dark">
24+
<div
25+
className="w-full cursor-default bg-light dark:bg-dark"
26+
style={{ cursor: 'url(/travelCursor.png),auto' }}
27+
>
2528
<Header />
2629
<div className="mx-4 sm:mx-8 lg:mx-16">
2730
<BlogFeed />

Diff for: frontend/src/pages/not-found.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function NotFound() {
2525
}, []);
2626

2727
return (
28-
<div>
28+
<div style={{ cursor: 'url(/travelCursor.png),auto' }}>
2929
<div className="relative -mt-2 ">
3030
<div className="absolute inset-0 bg-black opacity-50"></div>
3131
<div className="absolute inset-0 flex flex-col bg-white px-4 py-8 text-black dark:bg-dark dark:text-slate-50 sm:px-16">

Diff for: frontend/src/pages/signin-page.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ function signin() {
107107
};
108108

109109
return (
110-
<div className="flex-grow cursor-default bg-white py-4 dark:bg-dark-card">
110+
<div
111+
className="flex-grow cursor-default bg-white py-4 dark:bg-dark-card"
112+
style={{ cursor: 'url(/travelCursor.png),auto' }}
113+
>
111114
<div className="m-4 mb-4 flex justify-center">
112115
<div className="flex w-full items-center justify-center">
113116
<h2 className="w-2/4 pl-2 text-center text-lg font-bold text-black dark:text-dark-primary sm:text-xl md:w-3/4 md:pl-48">

Diff for: frontend/src/pages/signup-page.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ function Signup() {
102102
};
103103

104104
return (
105-
<div className="flex-grow cursor-default bg-white py-4 dark:bg-dark-card">
105+
<div
106+
className="flex-grow cursor-default bg-white py-4 dark:bg-dark-card"
107+
style={{ cursor: 'url(/travelCursor.png),auto' }}
108+
>
106109
<div className="m-4 mb-4 flex justify-center">
107110
<div className="flex w-full items-center justify-center">
108111
<h2 className="w-2/4 pl-2 text-center text-lg font-bold text-black dark:text-dark-primary sm:text-xl md:w-3/4 md:pl-48">

0 commit comments

Comments
 (0)