Skip to content

Commit c94eb04

Browse files
Merge pull request #49 from afrin-k/staging
readme and design
2 parents 146a038 + f5a7b98 commit c94eb04

File tree

9 files changed

+85
-65
lines changed

9 files changed

+85
-65
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,25 @@
2828

2929
## 🏁 Get Started
3030

31-
To get started, fork your own copy and clone the master branch. To clone a branch you can run the following:
31+
The repository has two branches, 'prod' and 'staging'.
32+
33+
prod (Production Branch) represents the live, user-facing version of the project where bug-free, well-tested code resides.
34+
35+
staging (Staging Branch) serves as a pre-production environment, where features and fixes are tested before they go live.
36+
37+
To get started, fork your own copy and clone your chosen branch. To clone a branch you can run the following:
38+
39+
Clone the 'prod' branch (production)
3240

3341
```bash
34-
git clone -b master https://github.com/<Your username>/papers-codechef.git
42+
git clone -b prod https://github.com/<Your username>/papers-codechef.git
43+
```
44+
OR
45+
46+
Clone the 'staging' branch (staging)
47+
48+
```bash
49+
git clone -b staging https://github.com/<Your username>/papers-codechef.git
3550
```
3651

3752
Run these commands on your bash/terminal and open it in a code editor of your choice.
@@ -47,7 +62,8 @@ To start your development server run:
4762
```bash
4863
pnpm dev
4964
```
50-
Before getting started, please ensure that the .env file is properly configured. The .env.example file has been provided for your reference, with examples of environment variables to be listed.
65+
66+
Before getting started, please ensure that the .env file is properly configured. The .env.example file has been provided for your reference, with examples of environment variables to be listed.
5167

5268
## License
5369

src/app/page.tsx

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,47 +10,46 @@ const HomePage = () => {
1010
<div>
1111
<Navbar />
1212
</div>
13-
<div className="mt-2 flex flex-grow flex-col items-center justify-center gap-y-6">
14-
<div className="w-full max-w-2xl space-y-6 text-center">
15-
<h1 className="phonk text-2xl font-bold tracking-wider md:text-3xl">
16-
Built by students for students
13+
<div className="mt-2 flex flex-grow flex-col items-center justify-center gap-y-10">
14+
15+
<div className="w-full max-w-2xl space-y-10 text-center">
16+
17+
<h1 className="phonk text-2xl md:text-3xl mx-auto">
18+
Built by Students for Students
1719
</h1>
18-
<p className="text-base font-semibold">
20+
21+
<p className="text-md font-semibold font-sans w-[90%] mx-auto md:w-full">
1922
Prepare to excel in your CATs and FATs with CodeChef-VIT&apos;s dedicated
2023
repository of past exam papers. Access key resources to review
2124
concepts, tackle challenging questions, and familiarize yourself
2225
with exam patterns. Boost your confidence, sharpen your strategy,
2326
and get ready to ace your exams!
2427
</p>
25-
<div className="flex flex-wrap justify-center gap-4">
26-
<Button
27-
variant="outline"
28-
className="rounded-full px-6 py-6 text-xs font-semibold"
29-
>
30-
NO SIGN UP REQUIRED
31-
</Button>
32-
<Button
33-
variant="outline"
34-
className="rounded-full px-6 py-6 text-xs font-semibold"
35-
>
36-
FILTERED SEARCH
37-
</Button>
38-
<Button
39-
variant="outline"
40-
className="rounded-full px-6 py-6 text-xs font-semibold"
41-
>
42-
FLEXIBLE DOWNLOAD
43-
</Button>
28+
29+
<div className="flex flex-wrap justify-center gap-4 text-sm font-bold">
30+
{["NO SIGN UP REQUIRED", "FILTERED SEARCH", "FLEXIBLE DOWNLOAD"].map((text) => (
31+
<div key={text} className="p-[2px] bg-gradient-to-r from-[#562EE7] to-[#bd21b4] rounded-full">
32+
<div className="rounded-full bg-white dark:bg-black px-6 py-3 tracking-wider text-black dark:text-white font-sans">
33+
{text}
34+
</div>
35+
</div>
36+
))}
4437
</div>
38+
4539
</div>
40+
4641
<div className="z-20 w-full max-w-xl">
4742
<SearchBar />
4843
</div>
44+
4945
<div className="max-3xl w-full">
5046
<StoredPapers />
5147
</div>
48+
5249
</div>
50+
5351
<Footer />
52+
5453
</div>
5554
);
5655
};

src/components/Card.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,38 +56,41 @@ const Card = ({
5656
return (
5757
<div
5858
key={paper._id}
59-
className={`flex flex-col justify-between w-56 space-y-1 rounded-xl border border-black dark:border-[#7480FF]/25 ${checked ? "bg-[#EEF2FF] dark:bg-[#050b1f]" : ""} p-4 `}
59+
className={`flex flex-col mb-2 justify-between w-[65%] md:w-64 space-y-1 rounded-xl border-2 bg-white dark:bg-black hover:border-[#434dba] dark:border-[#434dba] dark:hover:border-white border-black ${checked ? "bg-[#EEF2FF] dark:bg-[#050b1f]" : ""} p-4 `}
6060
>
6161
<Link href={`/paper/${paper._id}`} target="_blank" rel="noopener noreferrer">
6262
<Image
6363
src={paper.thumbnailUrl}
6464
alt={paper.subject}
6565
width={320}
6666
height={180}
67-
className="mb-2 h-[180px] w-full cursor-pointer object-cover"
67+
className="mb-2 h-[160px] md:h-[180px] w-full object-cover"
6868
/>
6969
</Link>
70-
71-
<div className="text-sm font-medium">
72-
{extractBracketContent(paper.subject)}
73-
</div>
74-
<div className="text-md font-medium">
75-
{extractWithoutBracketContent(paper.subject)}
76-
</div>
77-
<div className="flex gap-2 py-2">
78-
{capsule(paper.exam)}
79-
{capsule(paper.slot)}
80-
{capsule(paper.year)}
70+
71+
<div className="justify-center space-y-2 h-28">
72+
<div className="text-sm font-sans font-medium">
73+
{extractBracketContent(paper.subject)}
74+
</div>
75+
<div className="text-base font-sans font-semibold">
76+
{extractWithoutBracketContent(paper.subject)}
77+
</div>
78+
<div className="flex gap-2 py-2">
79+
{capsule(paper.exam)}
80+
{capsule(paper.slot)}
81+
{capsule(paper.year)}
82+
</div>
8183
</div>
82-
<div className="hidden items-center justify-between gap-2 md:flex">
83-
<div className="flex items-center gap-1">
84+
85+
<div className="hidden items-center pt-4 justify-between gap-2 md:flex">
86+
<div className="flex items-center gap-2">
8487
<input
8588
checked={checked}
8689
onChange={handleCheckboxChange}
87-
className="h-3 w-3 rounded-lg"
90+
className="h-4 w-4 rounded-lg"
8891
type="checkbox"
8992
/>
90-
<p className="text-sm">Select</p>
93+
<p className="text-sm font-sans">Select</p>
9194
</div>
9295
<div className="flex gap-2">
9396
<Link href={`/paper/${paper._id}`} target="_blank" rel="noopener noreferrer">

src/components/CatalogueContent.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,17 @@ const CatalogueContent = () => {
175175
/>
176176
)}{" "}
177177
<div className=" hidden items-center justify-center gap-2 md:flex md:justify-end 2xl:mr-4">
178-
<Button variant="outline" onClick={handleSelectAll}>
178+
<Button variant="outline" onClick={handleSelectAll} className="font-sans font-semibold border-2 border-black dark:border-[#434dba] hover:bg-slate-800 hover:text-white dark:hover:bg-slate-900 dark:hover:border-white">
179179
Select All
180180
</Button>
181-
<Button variant="outline" onClick={handleDeselectAll}>
181+
<Button variant="outline" onClick={handleDeselectAll} className="font-sans font-semibold border-2 border-black dark:border-[#434dba] hover:bg-slate-800 hover:text-white dark:hover:bg-slate-900 dark:hover:border-white">
182182
Deselect All
183183
</Button>
184184
<Button
185185
variant="outline"
186186
onClick={handleDownloadAll}
187187
disabled={selectedPapers.length === 0}
188+
className="font-sans font-semibold border-2 border-black dark:border-[#434dba] hover:bg-slate-800 hover:text-white dark:hover:bg-slate-900 dark:hover:border-white"
188189
>
189190
Download All ({selectedPapers.length})
190191
</Button>

src/components/Navbar.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Link from "next/link";
77

88
function Navbar() {
99
return (
10-
<div className="flex items-center justify-between gap-x-3 px-2 py-6 md:px-12">
10+
<div className="flex items-center justify-between gap-x-3 w-[90%] md:w-full overflow-x-hidden px-2 py-6 md:px-12">
1111
<div className="hidden w-[20%] md:block">
1212
<a href="https://www.codechefvit.com/" className="inline-block">
1313
<Image
@@ -21,7 +21,7 @@ function Navbar() {
2121
<div>
2222
<Link
2323
href="/"
24-
className="jost bg-gradient-to-r from-[#562EE7] to-[rgba(116,128,255,0.8)] bg-clip-text text-center text-5xl font-bold text-transparent dark:from-[#562EE7] dark:to-[#FFC6E8] md:w-[60%] md:text-6xl"
24+
className="jost tracking-wide bg-gradient-to-r from-[#562EE7] to-[#bd21b4] bg-clip-text text-center text-4xl font-extrabold text-transparent dark:from-[#562EE7] dark:to-[#bd21b4] md:w-[60%] md:text-6xl"
2525
>
2626
Papers
2727
</Link>
@@ -32,14 +32,13 @@ function Navbar() {
3232
</div>
3333

3434
<Link href="/upload">
35-
<Button
36-
variant="outline"
37-
className="mt-2 rounded-full px-6 py-4 text-xs md:mt-0 md:text-sm"
38-
>
39-
<ArrowUpToLine />
40-
<span>UPLOAD PAPERS</span>
41-
</Button>
35+
<div className="md:p-[2px] bg-gradient-to-r from-[#562EE7] to-[#bd21b4] rounded-full">
36+
<div className="rounded-full font-bold text-xs md:text-sm mt-2 md:mt-0 bg-slate-200 dark:bg-black px-4 md:px-6 py-3 tracking-wider text-black dark:text-white font-sans hover:bg-white dark:hover:bg-slate-700">
37+
⇱ UPLOAD PAPERS
38+
</div>
39+
</div>
4240
</Link>
41+
4342
</div>
4443
</div>
4544
);

src/components/PreviewCard.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,23 @@ const PreviewCard = ({ paper }: { paper: Paper }) => {
1414
return (
1515
<div
1616
key={paper._id}
17-
className="w-56 space-y-1 rounded-xl border border-black border-opacity-50 p-4 dark:border-[#7480FF]/25"
17+
className="w-[65%] md:w-64 space-y-1 rounded-xl border-2 bg-white dark:bg-black hover:border-[#434dba] dark:hover:border-white border-black p-4 dark:border-[#434dba]"
1818
>
1919
<Link href={`/paper/${paper._id}`} target="_blank" rel="noopener noreferrer">
2020
<Image
2121
src={paper.thumbnailUrl}
2222
alt={paper.subject}
2323
width={180}
2424
height={180}
25-
className="mb-2 h-[150px] w-full object-cover"
25+
className="mb-2 h-[160px] md:h-[180px] w-full object-cover"
2626
/>
2727
</Link>
28-
<div className="flex flex-col justify-between h-28">
29-
<div className="text-sm font-medium">
28+
29+
<div className="flex flex-col justify-center space-y-2 h-28">
30+
<div className="text-sm font-sans font-medium">
3031
{extractBracketContent(paper.subject)}
3132
</div>
32-
<div className="text-md font-medium">
33+
<div className="text-base font-sans cursor-pointer font-semibold">
3334
{extractWithoutBracketContent(paper.subject)}
3435
</div>
3536
<div className="flex gap-2">
@@ -38,6 +39,7 @@ const PreviewCard = ({ paper }: { paper: Paper }) => {
3839
{capsule(paper.year)}
3940
</div>
4041
</div>
42+
4143
</div>
4244
);
4345
};

src/components/StoredPapers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function StoredPapers() {
2929

3030
return (
3131
<>
32-
<p className="mb-4 text-center font-semibold">Most Viewed Papers</p>
32+
<p className="mt-8 mb-6 text-center font-sans text-2xl md:text-3xl font-semibold">Most Viewed Papers</p>
3333
<div className="flex flex-wrap justify-center gap-4">
3434
{displayPapers.map((paper: Paper) => (
3535
<PreviewCard key={paper._id} paper={paper} />

src/components/searchbar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function SearchBar() {
8585
value={searchText}
8686
onChange={handleSearchChange}
8787
placeholder="Search by subject..."
88-
className={`w-full rounded-xl border bg-[#7480FF] px-4 py-6 pr-10 text-white shadow-sm placeholder:text-white focus:outline-none focus:ring-2 ${loading ? "opacity-70" : ""}`}
88+
className={`w-full font-sans text-md font-semibold tracking-wider rounded-full border bg-[#434dba] px-4 py-6 pr-10 text-white shadow-sm placeholder:text-white focus:outline-none focus:ring-2 ${loading ? "opacity-70" : ""}`}
8989
/>
9090
<button
9191
type="submit"
@@ -96,14 +96,14 @@ function SearchBar() {
9696
<Search className="h-5 w-5 text-white " />
9797
</button>
9898
{loading && (
99-
<div className="absolute z-20 mt-2 w-full max-w-xl rounded-md border border-[#7480FF] bg-white p-2 text-center dark:bg-[#030712]">
99+
<div className="font-sans text-md font-semibold tracking-wider absolute z-20 mt-2 w-full max-w-xl rounded-md border border-[#434dba] bg-white p-2 text-center dark:bg-[#030712]">
100100
Loading suggestions...
101101
</div>
102102
)}
103103
{(suggestions.length > 0 || error) && !loading && (
104104
<ul
105105
ref={suggestionsRef}
106-
className="absolute z-20 mx-0.5 mt-2 w-full max-w-xl rounded-md border border-[#7480FF] bg-white text-center dark:bg-[#030712] md:mx-0"
106+
className="absolute z-20 mx-0.5 mt-2 w-full max-w-xl rounded-md border border-[#434dba] bg-white text-center dark:bg-[#030712] md:mx-0"
107107
>
108108
{error ? (
109109
<li className="text-red p-2">{error}</li>

src/components/theme-provider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"use client"
1+
"use client";
22

33
import * as React from "react"
44
import { ThemeProvider as NextThemesProvider } from "next-themes"

0 commit comments

Comments
 (0)