Skip to content

Commit f18a3f2

Browse files
committed
feat: update layout and styling for ArticlesPage, FeedPage, Home, and Filters components
1 parent 7651768 commit f18a3f2

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

app/(app)/articles/_client.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ const ArticlesPage = () => {
432432
return (
433433
<>
434434
<div className="mx-2">
435-
<div className="mt-8 flex max-w-5xl items-center justify-between pb-2 sm:mx-auto sm:max-w-2xl lg:max-w-5xl">
436-
<h1 className="text-3xl font-bold tracking-tight text-neutral-800 dark:text-neutral-50 sm:text-4xl">
435+
<div className="mt-2 flex max-w-5xl items-center justify-between sm:mx-auto sm:mt-6 sm:max-w-2xl lg:max-w-5xl">
436+
<h1 className="text-2xl font-bold tracking-tight text-neutral-800 dark:text-neutral-50">
437437
{typeof tag === "string" ? (
438438
<div className="flex items-center justify-center">
439439
<TagIcon className="mr-3 h-6 w-6 text-neutral-800 dark:text-neutral-200" />

app/(app)/feed/_client.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,11 @@ const FeedPage = () => {
109109
return (
110110
<div className="mx-2">
111111
{/* Header */}
112-
<div className="mt-8 flex max-w-5xl items-center justify-between pb-2 sm:mx-auto sm:max-w-2xl lg:max-w-5xl">
113-
<h1 className="text-3xl font-bold tracking-tight text-neutral-800 dark:text-neutral-50 sm:text-4xl">
112+
<div className="mt-2 flex max-w-5xl items-center justify-between sm:mx-auto sm:mt-6 sm:max-w-2xl lg:max-w-5xl">
113+
<h1 className="hidden text-2xl font-bold tracking-tight text-neutral-800 dark:text-neutral-50 sm:block">
114114
Feed
115115
</h1>
116+
<span />
116117
<FeedFilters
117118
sort={sort}
118119
type={type}

app/(app)/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ const Home = async () => {
4141
)}
4242

4343
<div className="mx-2" id={session ? "cta" : ""}>
44-
<div className="mt-6 flex max-w-5xl items-center justify-between pb-2 sm:mx-auto sm:max-w-2xl lg:max-w-5xl">
45-
<h3 className="text-3xl font-bold tracking-tight text-neutral-800 dark:text-neutral-50 sm:text-4xl">
44+
<div className="mt-6 flex max-w-5xl items-center justify-between sm:mx-auto sm:max-w-2xl lg:max-w-5xl">
45+
<h3 className="text-2xl font-bold tracking-tight text-neutral-800 dark:text-neutral-50">
4646
Trending
4747
</h3>
4848
</div>

components/Feed/Filters.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ const FeedFilters = ({
8080
typeOptions.find((opt) => opt.value === type) || typeOptions[0];
8181

8282
return (
83-
<div className="flex items-center gap-3" data-testid="feed-filters">
83+
<div className="flex items-center gap-2 sm:gap-3" data-testid="feed-filters">
8484
{/* Content Type Dropdown */}
8585
{showTypeFilter && onTypeChange && (
8686
<Menu as="div" className="relative" data-testid="type-filter">
87-
<MenuButton className="flex items-center gap-1 rounded-lg border border-neutral-300 bg-white px-3 py-2 text-sm font-medium text-neutral-700 transition-colors hover:bg-neutral-50 dark:border-neutral-600 dark:bg-neutral-800 dark:text-neutral-200 dark:hover:bg-neutral-700">
87+
<MenuButton className="flex items-center gap-1 rounded-lg border border-neutral-300 bg-white px-2 py-2 text-sm font-medium text-neutral-700 transition-colors hover:bg-neutral-50 sm:px-3 dark:border-neutral-600 dark:bg-neutral-800 dark:text-neutral-200 dark:hover:bg-neutral-700">
8888
<currentType.icon className="h-4 w-4" />
8989
<span>{currentType.label}</span>
9090
<ChevronDownIcon className="h-4 w-4" />
@@ -129,7 +129,7 @@ const FeedFilters = ({
129129

130130
{/* Sort Dropdown */}
131131
<Menu as="div" className="relative" data-testid="sort-filter">
132-
<MenuButton className="flex items-center gap-1 rounded-lg border border-neutral-300 bg-white px-3 py-2 text-sm font-medium text-neutral-700 transition-colors hover:bg-neutral-50 dark:border-neutral-600 dark:bg-neutral-800 dark:text-neutral-200 dark:hover:bg-neutral-700">
132+
<MenuButton className="flex items-center gap-1 rounded-lg border border-neutral-300 bg-white px-2 py-2 text-sm font-medium text-neutral-700 transition-colors hover:bg-neutral-50 sm:px-3 dark:border-neutral-600 dark:bg-neutral-800 dark:text-neutral-200 dark:hover:bg-neutral-700">
133133
<currentSort.icon className="h-4 w-4" />
134134
<span>{currentSort.label}</span>
135135
<ChevronDownIcon className="h-4 w-4" />
@@ -174,7 +174,7 @@ const FeedFilters = ({
174174
{/* Category Dropdown */}
175175
{categories.length > 0 && (
176176
<Menu as="div" className="relative" data-testid="topic-filter">
177-
<MenuButton className="flex items-center gap-1 rounded-lg border border-neutral-300 bg-white px-3 py-2 text-sm font-medium text-neutral-700 transition-colors hover:bg-neutral-50 dark:border-neutral-600 dark:bg-neutral-800 dark:text-neutral-200 dark:hover:bg-neutral-700">
177+
<MenuButton className="flex items-center gap-1 rounded-lg border border-neutral-300 bg-white px-2 py-2 text-sm font-medium text-neutral-700 transition-colors hover:bg-neutral-50 sm:px-3 dark:border-neutral-600 dark:bg-neutral-800 dark:text-neutral-200 dark:hover:bg-neutral-700">
178178
<span>{category || "All Topics"}</span>
179179
<ChevronDownIcon className="h-4 w-4" />
180180
</MenuButton>

components/Header/MinimalHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export function MinimalHeader({
8787
</Link>
8888
</div>
8989

90-
{/* Mobile: Logo in center */}
91-
<div className="flex flex-1 justify-center lg:hidden">
90+
{/* Mobile: Logo on left */}
91+
<div className="flex lg:hidden">
9292
<Link to="/">
9393
<Image
9494
src="/images/codu.png"

components/UnifiedContentCard/UnifiedContentCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ const UnifiedContentCard = ({
384384
<Link
385385
href={cardUrl}
386386
onClick={type === "LINK" ? handleExternalClick : undefined}
387-
className="relative hidden w-[120px] flex-shrink-0 self-start overflow-hidden rounded-lg sm:block"
387+
className="relative w-[80px] flex-shrink-0 self-start overflow-hidden rounded-lg sm:w-[120px]"
388388
>
389389
<img
390390
src={imageUrl}

0 commit comments

Comments
 (0)