-
Notifications
You must be signed in to change notification settings - Fork 29
Fix: Reduce navbar height to improve above-the-fold visibility #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ import BlogCard from "@/components/blog-card" | |
| import Pagination from "@/components/pagination" | ||
| import Link from "next/link" | ||
| import Footer from "@/components/footer" | ||
| import { ModeToggle } from "@/components/mode-toggle" | ||
|
|
||
| interface BlogPost { | ||
| slug: string | ||
|
|
@@ -98,25 +99,66 @@ export default function HomePage() { | |
| const { posts, totalPages, hasNextPage, hasPrevPage } = paginatedData | ||
|
|
||
| return ( | ||
| <div className="min-h-screen bg-gradient-to-br from-green-50 via-yellow-50 to-[#FFC517]/10"> | ||
| {/* Header */} | ||
| <header className="border-b border-gradient-to-r from-[#228B22]/20 to-[#FFBF00]/20 bg-white/90 backdrop-blur-sm sticky top-0 z-50 shadow-sm"> | ||
| <div className="max-w-6xl mx-auto px-4 py-6 flex justify-between items-center"> | ||
| <div> | ||
| <h1 className="text-5xl font-bold font-playfair bg-gradient-to-r from-[#228B22] via-[#5A981A] via-[#91A511] via-[#ADAC0D] via-[#E4B905] to-[#FFBF00] bg-clip-text text-transparent drop-shadow-sm leading-tight pb-2"> | ||
| Stable Viewpoints | ||
| </h1> | ||
| <p className="text-gray-600 mt-2 text-lg">Independent Articles about Stability</p> | ||
| </div> | ||
| <Link | ||
| href="/submit" | ||
| className="inline-flex items-center gap-2 bg-gradient-to-r from-[#228B22] to-[#91A511] hover:from-[#3E921E] hover:to-[#ADAC0D] text-white px-6 py-3 font-semibold transition-all duration-300 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5" | ||
| > | ||
| Submit an Article | ||
| </Link> | ||
| </div> | ||
| </header> | ||
| <div className="min-h-screen bg-gradient-to-br | ||
| from-green-50 via-yellow-50 to-[#FFC517]/10 | ||
| dark:from-zinc-900 dark:via-zinc-900 dark:to-black | ||
| "> | ||
|
Comment on lines
+102
to
+105
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent dark mode implementation. Dark mode gradient classes ( Decision needed: Either enable the ModeToggle to make dark mode functional, or remove all dark mode classes to keep this PR focused on navbar height reduction as per the stated objectives. 🤖 Prompt for AI Agents |
||
| {/* Header */} | ||
| <header | ||
| className=" | ||
| sticky top-0 z-50 | ||
| border-b | ||
| border-zinc-200 dark:border-zinc-800 | ||
| bg-white/90 dark:bg-zinc-900/90 | ||
| backdrop-blur-sm | ||
| shadow-sm | ||
| " | ||
| > | ||
|
Comment on lines
+107
to
+116
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify: Sticky header behavior added beyond PR scope. The header is now sticky (
Recommendation: Either document this as an intentional enhancement or consider removing the sticky behavior to keep changes focused. Verify the impact of sticky header on the above-the-fold content goal: #!/bin/bash
# Description: Search for any existing sticky header patterns or documentation about header behavior
echo "=== Checking for other sticky header usage ==="
rg -n "sticky" --type=tsx --type=jsx -g '!node_modules' -C 2
echo "=== Checking for header-related comments or documentation ==="
rg -n -i "header|navbar" --type=md -g '!node_modules' -C 3🤖 Prompt for AI Agents |
||
| <div className="max-w-6xl mx-auto px-4 py-3 flex justify-between items-center"> | ||
|
|
||
| {/* Left: Title */} | ||
| <div> | ||
| <h1 | ||
| className=" | ||
| text-3xl md:text-4xl font-bold font-playfair leading-tight pb-2 bg-gradient-to-r | ||
| from-[#228B22] via-[#E4B905] to-[#FFBF00] | ||
| bg-clip-text text-transparent | ||
| drop-shadow-sm | ||
| " | ||
| > | ||
| Stable Viewpoints | ||
| </h1> | ||
|
|
||
| <p className="mt-0.5 text-sm md:text-base text-zinc-600 dark:text-zinc-400"> | ||
| Independent Articles about Stability | ||
| </p> | ||
| </div> | ||
|
|
||
| {/* Right: Actions */} | ||
| <div className="flex items-center gap-4"> | ||
| {/* Theme Toggle */} | ||
| {/* <ModeToggle /> */} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uncomment or remove the ModeToggle placeholder. The ModeToggle is commented out, leaving unclear whether dark mode should be enabled. This creates technical debt. Options:
🤖 Prompt for AI Agents |
||
|
|
||
| {/* Submit Button */} | ||
| <Link | ||
| href="/submit" | ||
| className=" | ||
| inline-flex items-center gap-2 | ||
| bg-gradient-to-r from-[#228B22] to-[#91A511] | ||
| hover:from-[#3E921E] hover:to-[#ADAC0D] | ||
| text-white | ||
| px-4 py-2 text-sm font-medium | ||
| transition-all duration-300 | ||
| shadow-lg hover:shadow-xl | ||
| transform hover:-translate-y-0.5 | ||
| rounded-md | ||
| " | ||
| > | ||
| Submit an Article | ||
| </Link> | ||
| </div> | ||
| </div> | ||
| </header> | ||
| {/* Main Content */} | ||
| <main className="max-w-6xl mx-auto px-4 py-12"> | ||
| <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| "use client"; | ||
|
|
||
| import { Moon, Sun } from "lucide-react"; | ||
| import { useTheme } from "next-themes"; | ||
| import { useEffect, useState } from "react"; | ||
| import { Button } from "@/components/ui/button"; | ||
|
|
||
| export function ModeToggle() { | ||
| const { theme, setTheme } = useTheme(); | ||
| const [mounted, setMounted] = useState(false); | ||
|
|
||
| useEffect(() => setMounted(true), []); | ||
| if (!mounted) return null; | ||
|
|
||
| return ( | ||
| <Button | ||
| variant="ghost" | ||
| size="icon" | ||
| onClick={() => setTheme(theme === "dark" ? "light" : "dark")} | ||
| aria-label="Toggle theme" | ||
| > | ||
| {theme === "dark" ? ( | ||
| <Sun className="h-5 w-5" /> | ||
| ) : ( | ||
| <Moon className="h-5 w-5" /> | ||
| )} | ||
| </Button> | ||
| ); | ||
| } | ||
|
Comment on lines
+1
to
+29
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scope creep: Theme toggle component beyond PR objectives. This component implements dark mode toggling functionality, which is not mentioned in the PR objectives (reduce navbar height) or the linked issue #57. The component is currently imported but not rendered in Recommendation: Either remove this component and related dark mode code to keep the PR focused on navbar height reduction, or move the dark mode feature to a separate PR with proper documentation and testing. Note: If you do intend to include dark mode, the implementation here is technically sound—the mounted guard (lines 12-13) correctly prevents hydration mismatches. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,15 @@ | ||
| 'use client' | ||
| "use client"; | ||
|
|
||
| import * as React from 'react' | ||
| import { | ||
| ThemeProvider as NextThemesProvider, | ||
| type ThemeProviderProps, | ||
| } from 'next-themes' | ||
| import { ThemeProvider as NextThemesProvider } from "next-themes"; | ||
|
|
||
| export function ThemeProvider({ children, ...props }: ThemeProviderProps) { | ||
| return <NextThemesProvider {...props}>{children}</NextThemesProvider> | ||
| export function ThemeProvider({ children }: { children: React.ReactNode }) { | ||
| return ( | ||
| <NextThemesProvider | ||
| attribute="class" | ||
| defaultTheme="system" | ||
| enableSystem | ||
| > | ||
| {children} | ||
| </NextThemesProvider> | ||
| ); | ||
| } | ||
|
Comment on lines
+1
to
15
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Scope creep: Theme provider beyond PR objectives. Like the Recommendation: If dark mode is retained, this implementation is appropriate. Otherwise, remove it to maintain PR focus on navbar height reduction. 🤖 Prompt for AI Agents |
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,12 +9,14 @@ | |
| "start": "next start" | ||
| }, | ||
| "dependencies": { | ||
| "@radix-ui/react-slot": "^1.2.4", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -type f \( -name "*.md" -o -name "*.txt" \) | grep -i "readme\|issue\|description\|changelog" | head -20Repository: StabilityNexus/StableViewpoints Length of output: 86 🏁 Script executed: # Check if these packages are actually used in the codebase
rg -i "react-slot|next-themes" --type js --type ts --type jsx --type tsx -lRepository: StabilityNexus/StableViewpoints Length of output: 102 🏁 Script executed: # Get latest versions and current information
npm view @radix-ui/react-slot version 2>/dev/null || echo "Package info unavailable"
npm view next-themes version 2>/dev/null || echo "Package info unavailable"Repository: StabilityNexus/StableViewpoints Length of output: 86 🏁 Script executed: # Correct search for package usage
rg "@radix-ui/react-slot|next-themes" --type js --type ts -l 2>/dev/null || rg "@radix-ui/react-slot|next-themes"Repository: StabilityNexus/StableViewpoints Length of output: 259 🏁 Script executed: # Check README for PR/issue context
head -100 ./README.mdRepository: StabilityNexus/StableViewpoints Length of output: 4176 🏁 Script executed: # Check git log for PR description or issue references
git log --oneline --all -20 | head -20Repository: StabilityNexus/StableViewpoints Length of output: 1306 🏁 Script executed: # Check what files were changed in the latest commit (navbar height fix)
git show --name-only 8988079 | head -30Repository: StabilityNexus/StableViewpoints Length of output: 797 🏁 Script executed: # Check the package.json changes in that commit
git show 8988079 package.json | head -100Repository: StabilityNexus/StableViewpoints Length of output: 1273 🏁 Script executed: # Search for issue #57 references
git log --all --grep="#57" --oneline || echo "No #57 found in commit messages"
rg "#57|issue.*57" README.md || echo "No #57 in README"Repository: StabilityNexus/StableViewpoints Length of output: 91 🏁 Script executed: # Double-check for any security advisories via npm audit equivalent
npm audit --json 2>/dev/null | jq '.vulnerabilities | keys[] | select(. | contains("@radix-ui/react-slot") or contains("next-themes"))' || echo "npm audit not available"Repository: StabilityNexus/StableViewpoints Length of output: 57 Scope expansion: dark mode dependencies added beyond stated PR objective. This commit adds The pinned versions (1.2.4 and 0.4.6 respectively) are current and appear secure. 🤖 Prompt for AI Agents |
||
| "class-variance-authority": "^0.7.1", | ||
| "clsx": "^2.1.1", | ||
| "gray-matter": "^4.0.3", | ||
| "lucide-react": "^0.454.0", | ||
| "next": "15.2.4", | ||
| "next-mdx-remote": "^5.0.0", | ||
| "next-themes": "^0.4.6", | ||
| "react": "^19", | ||
| "react-dom": "^19", | ||
| "serve": "^14.2.4", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused import.
ModeToggleis imported but never used (its usage on Line 140 is commented out). This creates dead code.Apply this diff to remove the unused import:
-import { ModeToggle } from "@/components/mode-toggle"📝 Committable suggestion
🤖 Prompt for AI Agents