-
Notifications
You must be signed in to change notification settings - Fork 1
Add centered brand to solver header #19
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
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 |
|---|---|---|
|
|
@@ -44,26 +44,29 @@ export const ProblemSolverHeader: React.FC<ProblemSolverHeaderProps> = ({ | |
|
|
||
| return ( | ||
| <div className="border-b border-border bg-background p-4 flex-shrink-0"> | ||
| <div className="flex items-center justify-between"> | ||
| <div className="flex items-center space-x-4"> | ||
| <div className="grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-4"> | ||
| <div className="flex min-w-0 items-center space-x-4"> | ||
| {showNavigation && ( | ||
| <> | ||
| <Button | ||
| variant="ghost" | ||
| size="sm" | ||
| onClick={() => navigate("/problems")} | ||
| className="shrink-0" | ||
| > | ||
| <ArrowLeft className="w-4 h-4 mr-2" /> | ||
| Back | ||
| </Button> | ||
| <ProblemSelector | ||
| problems={problems} | ||
| currentProblemId={problemId} | ||
| /> | ||
| <div className="min-w-0"> | ||
| <ProblemSelector | ||
| problems={problems} | ||
| currentProblemId={problemId} | ||
| /> | ||
| </div> | ||
| </> | ||
| )} | ||
| <div className="flex items-center space-x-3"> | ||
| <h1 className="text-xl font-bold text-foreground"> | ||
| <div className="flex min-w-0 items-center space-x-3"> | ||
| <h1 className="truncate text-xl font-bold text-foreground"> | ||
| {problem.title} | ||
| </h1> | ||
| <Badge className={getDifficultyColor(problem.difficulty)}> | ||
|
|
@@ -75,7 +78,18 @@ export const ProblemSolverHeader: React.FC<ProblemSolverHeaderProps> = ({ | |
| </div> | ||
| </div> | ||
|
|
||
| <div className="flex items-center space-x-2"> | ||
| <div className="flex items-center justify-center gap-3 whitespace-nowrap"> | ||
| <img | ||
| src="/simplyalgo-logo.png" | ||
| alt="SimplyAlgo logo" | ||
| className="h-9 w-9 rounded-md object-cover" | ||
| /> | ||
| <div className="text-2xl font-bold text-foreground"> | ||
| Simplyalgo.dev | ||
| </div> | ||
|
Comment on lines
+82
to
+89
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 brand name capitalisation between the
🤖 Prompt for AI Agents |
||
| </div> | ||
|
|
||
| <div className="flex min-w-0 items-center justify-end space-x-2"> | ||
| <FeedbackButton /> | ||
| <Timer /> | ||
| <ShortcutsHelp /> | ||
|
|
||
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.
h1needsmin-w-0fortruncateto function inside a flex container.Flex items have
min-width: autoby default, so theh1will never shrink below its text content width. Even though every ancestor flex container hasmin-w-0, theh1itself — as a flex item of thespace-x-3row — retains its full content width andtruncate'soverflow: hiddennever fires.🐛 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents