Skip to content

Commit 7ec4066

Browse files
committed
Add SearchBox
1 parent 6909200 commit 7ec4066

File tree

9 files changed

+319
-190
lines changed

9 files changed

+319
-190
lines changed

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"plugins": [
3+
"prettier-plugin-tailwindcss"
4+
],
5+
"printWidth": 120,
6+
"tabWidth": 4,
7+
"singleQuote": true,
8+
"arrowParens": "avoid",
9+
"experimentalTernaries": true
10+
}

app/(home)/page.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
export default function Home() {
2+
return (
3+
<main className="grid min-h-screen place-items-center">
4+
<div className="max-w-screen-md text-center md:-translate-y-1/4">
5+
<h1 className="text-gradient text-7xl font-bold">Lorem dolor sit</h1>
6+
<p className="text-gradient mt-2 text-3xl font-medium ">
7+
Lorem ipsum dolor sit amet consectetur adipisicing elit.
8+
</p>
9+
10+
<form className="mx-auto group mt-28 flex max-w-screen-sm items-center gap-3 rounded-full border border-gray-600 px-2 py-2 focus-within:border-2 focus-within:border-gray-400 ">
11+
<input
12+
className="block flex-1 bg-transparent pl-4 text-xl outline-none"
13+
type="text"
14+
placeholder="Enter your github Username"
15+
/>
16+
17+
<button className="btn text-xl group-focus-within:bg-gray-700 ">Search</button>
18+
</form>
19+
</div>
20+
</main>
21+
);
22+
}

app/globals.css

Lines changed: 0 additions & 33 deletions
This file was deleted.

app/globals.scss

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@layer base {
6+
body {
7+
@apply min-h-screen bg-gray-900 text-gray-200;
8+
@extend .background;
9+
}
10+
}
11+
12+
@layer components {
13+
.btn {
14+
@apply flex items-center justify-center gap-2 rounded-full border border-gray-600 bg-gray-700/50 px-6 py-1 text-lg transition-all;
15+
16+
&:hover {
17+
@apply bg-gray-600;
18+
}
19+
}
20+
}
21+
22+
// .background {
23+
// position: absolute;
24+
// top: 0;
25+
// z-index: -2;
26+
// height: 100vh;
27+
// width: 100%;
28+
// --tw-bg-opacity: 1;
29+
// background-color: rgb(9 9 11 / var(--tw-bg-opacity));
30+
// background-image: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(120, 119, 198, 0.3), hsla(0, 0%, 100%, 0));
31+
// }
32+
33+
.background {
34+
--tw-bg-opacity: 1;
35+
// background-color: rgb(9 9 11 / var(--tw-bg-opacity));
36+
// background-image: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(120, 119, 198, 0.3), hsla(0, 0%, 100%, 0));
37+
background-image: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(255, 255, 255, 0.13), hsla(0, 0%, 100%, 0));
38+
39+
}
40+
41+
.text-gradient {
42+
// background-clip: text;
43+
// color: transparent;
44+
// background-image: linear-gradient(to bottom, #e5e5e5, #737373);
45+
@apply bg-gradient-to-b from-white to-gray-500 bg-clip-text text-transparent;
46+
}

app/layout.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
import { Inter } from "next/font/google";
2-
import "./globals.css";
3-
4-
const inter = Inter({ subsets: ["latin"] });
1+
import './globals.scss';
52

63
export const metadata = {
7-
title: "Create Next App",
8-
description: "Generated by create next app",
4+
title: 'Create Next App',
5+
description: 'Generated by create next app',
96
};
107

118
export default function RootLayout({ children }) {
12-
return (
13-
<html lang="en">
14-
<body className={inter.className}>{children}</body>
15-
</html>
16-
);
9+
return (
10+
<html lang="en">
11+
<body>{children}</body>
12+
</html>
13+
);
1714
}

app/page.js

Lines changed: 0 additions & 113 deletions
This file was deleted.

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12+
"@octokit/graphql": "^8.0.1",
13+
"axios": "^1.6.8",
14+
"next": "14.1.4",
1215
"react": "^18",
1316
"react-dom": "^18",
14-
"next": "14.1.4"
17+
"react-icons": "^5.0.1",
18+
"sass": "^1.72.0"
1519
},
1620
"devDependencies": {
1721
"autoprefixer": "^10.0.1",
1822
"postcss": "^8",
23+
"prettier-plugin-tailwindcss": "^0.5.12",
1924
"tailwindcss": "^3.3.0"
2025
}
2126
}

0 commit comments

Comments
 (0)