Skip to content

Commit bb3b0ce

Browse files
authored
Merge pull request #1 from PriDebnath/mobile-push
enhanced quote card ui
2 parents d00571e + 93509db commit bb3b0ce

4 files changed

Lines changed: 36 additions & 21 deletions

File tree

‎frontend/src/App.tsx‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,24 @@ function App() {
7373
}, []);
7474

7575
return (
76-
<div className="">
76+
<div className="bg-purple-100">
7777
{/* Purple Header */}
78-
<header className="w-full text-white rounded-b-2xl bg-purple-600 text-white p-4 flex flex-col items-center">
78+
<header className="w-full text-white bg-purple-600 text-white p-4 flex flex-col items-center">
7979
<h1 className="p-4">Quotes Keeper 3.0</h1>
80-
<InputGroup className="mb-4 text-white border-white border">
80+
81+
</header>
82+
83+
{/* Sticky Search Bar */}
84+
<div
85+
className="rounded-b-2xl sticky top-0 bg-purple-600 p-4">
86+
<InputGroup
87+
className=" mb-4 text-white border-white border">
8188
<InputGroupInput placeholder="Search..." className='text-white' />
8289
<InputGroupAddon>
8390
<SearchIcon className='text-white'/>
8491
</InputGroupAddon>
8592
</InputGroup>
86-
</header>
93+
</div>
8794

8895
{/* Main Content */}
8996
<main className="p-4">
@@ -105,7 +112,9 @@ function App() {
105112
<BookOpen size={24} />
106113
<span>Books</span>
107114
</button> */}
108-
<Button className="fixed bottom-4 !border-gray-500 border-lg !bg-white" onClick={openAddDialog}>
115+
<Button
116+
className="shadow-[0_0px_12px_rgba(1,255,1,0.4)] fixed bottom-4 !border-gray-500 border-lg !bg-white"
117+
onClick={openAddDialog}>
109118
<PlusIcon className='!text-green-500' />
110119
</Button>
111120
{/* <button className="nav-item">

‎frontend/src/feature/quote/card/quote.card.tsx‎

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,18 @@ const QuoteCard = (props: Props) => {
2424

2525
return (<div className={
2626
cn(
27-
"bg-white rounded-xl p-5 flex justify-between items-start gap-4",
28-
"shadow-[0_2px_8px_rgba(0,0,0,0.08)]",
29-
"hover:shadow-[0_4px_12px_rgba(0,0,0,0.12)]",
27+
"bg-white rounded-xl p-5 flex flex-col justify-between items-start gap-4",
28+
"shadow-[0_2px_12px_rgba(0,0,0,0.1)]",
29+
"hover:shadow-[0_4px_12px_rgba(0,0,0,0.2)]",
3030
"transition-shadow duration-200"
3131
)
3232
}>
33+
34+
<p className="text-xl font-bold text-purple-700">"{quote.text}"</p>
35+
<p className="text-base w-full text-right">-- Pritam</p>
36+
37+
<div className="flex w-full items-end justify-between">
3338
<div className="">
34-
<p className="">{quote.text}</p>
35-
{/* {(q.author || q.book) && (
36-
<p className="quote-attribution">
37-
{q.author && q.book
38-
? `- ${q.author}, ${q.book}`
39-
: q.author
40-
? `- ${q.author}`
41-
: q.book
42-
? `- ${q.book}`
43-
: ''}
44-
</p>
45-
)} */}
4639
{/* {q.tags && q.tags.length > 0 && (
4740
<div className="quote-tags">
4841
{q.tags.map((tag, index) => (
@@ -52,8 +45,15 @@ const QuoteCard = (props: Props) => {
5245
))}
5346
</div>
5447
)} */}
48+
<span className="text-purple-400"> #tag</span>
49+
<span className="text-purple-400"> #tag</span>
50+
<span className="text-purple-400"> #tag</span>
51+
<span className="text-purple-400"> #tag</span>
52+
<span className="text-purple-400"> #tag</span>
53+
<span className="text-purple-400"> #tag</span>
54+
<span className="text-purple-400"> #tag</span>
5555
</div>
56-
<div className="flex items-center gap-2">
56+
<div className="flex items-center gap-2 ">
5757
<Button
5858
className="!bg-transparent border !border-gray-300"
5959
variant={"ghost"}
@@ -80,6 +80,7 @@ const QuoteCard = (props: Props) => {
8080
{<Trash />}
8181
</Button>
8282
</div>
83+
</div>
8384
</div>
8485
)
8586
}

‎frontend/src/feature/quote/list.quote.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export function ListQuote(props: Props) {
2929
</div>
3030
)
3131
})}
32+
<p className="text-center p-4 text-gray-400">
33+
--- end of quotes ---
34+
</p>
3235
</div>
3336
)
3437
}

‎frontend/src/index.css‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ body {
6666
min-width: 320px;
6767
min-height: 100vh;
6868
background-color: #ffffff;
69+
background-color: #F3E8FF;
70+
background-color: rgba(243, 232 ,255, 1);
6971
}
7072

7173
h1 {

0 commit comments

Comments
 (0)