Skip to content

Commit 7422693

Browse files
committed
✨ Minor ui touchups
1 parent ba32cd7 commit 7422693

3 files changed

Lines changed: 21 additions & 15 deletions

File tree

www/src/components/home/quote/index.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,27 @@ export default function Quote() {
2424
return (
2525
<HoverCard>
2626
<HoverCardTrigger asChild>
27-
<div className="mb-2 flex gap-20 cursor-help">
28-
{/* <span
29-
className="text-muted-foreground letter"
27+
<div className="mb-2 flex cursor-help gap-5">
28+
<span
29+
className="text-muted-foreground letter tracking-widest"
3030
style={{ writingMode: "vertical-rl" }}
3131
>
3232
{featuredQuote.source}
33-
</span> */}
34-
{quoteParts.map((part, index) => (
35-
<span
36-
className="text-3xl tracking-widest"
37-
key={index}
38-
style={{ writingMode: "vertical-rl" }}
39-
>
40-
{part.trim()}
41-
</span>
42-
))}
33+
</span>
34+
<div className="gap-20 flex">
35+
{quoteParts.map((part, index) => (
36+
<span
37+
className="text-3xl tracking-widest"
38+
key={index}
39+
style={{ writingMode: "vertical-rl" }}
40+
>
41+
{part.trim()}
42+
</span>
43+
))}
44+
</div>
4345
</div>
4446
</HoverCardTrigger>
45-
<HoverCardContent className="w-auto max-w-6xl">
47+
<HoverCardContent className="w-auto max-w-6xl" sideOffset={30}>
4648
<QuoteInfo quote={featuredQuote} />
4749
</HoverCardContent>
4850
</HoverCard>

www/src/components/home/quote/quote-info.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ interface IQuoteInfo {
66
quote: QuoteContent;
77
}
88
const QuoteInfo: FC<IQuoteInfo> = ({ quote }) => {
9-
const { meaning, background, pinyin } = quote;
9+
const { meaning, background, pinyin, sourceInfo } = quote;
1010

1111
return (
1212
<div className="flex flex-col gap-3">
1313
<span className="text-muted-foreground">{pinyin}</span>
1414
<Separator />
1515
<span>{meaning}</span>
16+
<br />
1617
<span>{background}</span>
18+
<Separator />
19+
<span>{sourceInfo}</span>
1720
</div>
1821
);
1922
};

www/src/types/quotes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export interface QuoteContent {
33
meaning: string;
44
background: string;
55
source: string;
6+
sourceInfo: string;
67
pinyin: string;
78
}
89

0 commit comments

Comments
 (0)