-
Notifications
You must be signed in to change notification settings - Fork 0
Unify app headers and brand metadata #4
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
Open
Acex187x
wants to merge
1
commit into
main
Choose a base branch
from
t3code/7e6cefab
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,48 +1,33 @@ | ||
| "use client"; | ||
|
|
||
| import { Button, ThemeToggle } from "@wikipefia/ui"; | ||
| import { AppHeader, AppWordmark, Button } from "@wikipefia/ui"; | ||
| import Link from "next/link"; | ||
| import { FONT } from "@/lib/theme"; | ||
|
|
||
| /** | ||
| * Inverted dark top bar carrying the wordmark + actions. Shared by all pages | ||
| * so the app reads as one piece. `onUpload`, when provided, renders the Upload | ||
| * action button. | ||
| * Inverted dark top bar carrying the wordmark + actions. Built on the shared | ||
| * {@link AppHeader} so it stays identical to the other Wikipefia apps. | ||
| * `onUpload`, when provided, renders the Upload action button. | ||
| */ | ||
| export function Masthead({ onUpload }: { onUpload?: () => void }) { | ||
| return ( | ||
| <header className="noise-overlay relative z-20 border-b border-white/10 bg-invert text-invert-fg"> | ||
| <div className="relative z-10 mx-auto flex h-12 max-w-6xl items-center justify-between px-5"> | ||
| <Link href="/" className="flex items-baseline gap-2"> | ||
| <span | ||
| className="text-[11px] font-bold uppercase tracking-[0.28em]" | ||
| style={{ fontFamily: FONT.mono }} | ||
| > | ||
| Wikipefia | ||
| </span> | ||
| <span | ||
| className="text-[11px] uppercase tracking-[0.28em] text-accent" | ||
| style={{ fontFamily: FONT.mono }} | ||
| > | ||
| Library | ||
| </span> | ||
| <AppHeader | ||
| innerClassName="mx-auto max-w-6xl" | ||
| brand={ | ||
| <Link href="/"> | ||
| <AppWordmark product="Library" /> | ||
| </Link> | ||
| <div className="flex items-center gap-2"> | ||
| {onUpload && ( | ||
| <Button | ||
| size="sm" | ||
| onClick={onUpload} | ||
| className="border-accent bg-accent text-white hover:opacity-80" | ||
| > | ||
| + Upload | ||
| </Button> | ||
| )} | ||
| <ThemeToggle | ||
| size="icon-sm" | ||
| className="border-white/25 text-invert-fg hover:border-accent hover:text-accent" | ||
| /> | ||
| </div> | ||
| </div> | ||
| </header> | ||
| } | ||
| right={ | ||
| onUpload ? ( | ||
| <Button | ||
| size="sm" | ||
| onClick={onUpload} | ||
| className="border-accent bg-accent text-white hover:opacity-80" | ||
| > | ||
| + Upload | ||
| </Button> | ||
| ) : null | ||
| } | ||
| /> | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export { C } from "@wikipefia/mdx-renderer"; | ||
| export { C } from "@wikipefia/ui"; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Use theme color tokens and uppercase label for the Upload action.
This new button uses a hardcoded color (
text-white) and a mixed-case label, which breaks the TSX styling conventions in this repo.Suggested patch
import { AppHeader, AppWordmark, Button } from "`@wikipefia/ui`"; import Link from "next/link"; +import { C } from "`@/lib/theme`"; @@ <Button size="sm" onClick={onUpload} - className="border-accent bg-accent text-white hover:opacity-80" + className="uppercase tracking-wider hover:opacity-80" + style={{ + borderColor: C.accent, + backgroundColor: C.accent, + color: C.bgWhite, + fontFamily: "var(--font-mono)", + }} > - + Upload + + UPLOAD </Button>As per coding guidelines, "Use CSS variables (C.bg, C.bgWhite, C.text, C.textMuted, C.accent, C.border, C.borderLight, C.headerBg, C.headerText) imported from
@/lib/themefor all styling; never hardcode colors except for subject palette colors" and "Apply uppercase styling to all headers, labels, navigation, badges, and breadcrumbs using text-transform or Tailwind uppercase utility".🤖 Prompt for AI Agents
Source: Coding guidelines