-
Notifications
You must be signed in to change notification settings - Fork 93
Add bookmark banner to landing page #42
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 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,46 @@ | ||||||||||||||||||
| "use client"; | ||||||||||||||||||
|
|
||||||||||||||||||
| import { useSyncExternalStore } from "react"; | ||||||||||||||||||
|
|
||||||||||||||||||
| const emptySubscribe = () => () => {}; | ||||||||||||||||||
|
|
||||||||||||||||||
| function useIsMac() { | ||||||||||||||||||
| return useSyncExternalStore( | ||||||||||||||||||
| emptySubscribe, | ||||||||||||||||||
| () => navigator.platform.toLowerCase().includes("mac"), | ||||||||||||||||||
| () => true // Assume Mac on server for SSR | ||||||||||||||||||
| ); | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| export function BookmarkBanner() { | ||||||||||||||||||
| const isMac = useIsMac(); | ||||||||||||||||||
|
|
||||||||||||||||||
| return ( | ||||||||||||||||||
| <div | ||||||||||||||||||
| className="inline-flex items-center gap-2 rounded-lg px-3 py-2 text-xs text-foreground" | ||||||||||||||||||
| style={{ | ||||||||||||||||||
| backdropFilter: "blur(40px)", | ||||||||||||||||||
| WebkitBackdropFilter: "blur(40px)", | ||||||||||||||||||
| backgroundImage: | ||||||||||||||||||
| "linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0px, rgba(0, 0, 0, 0) 100%), linear-gradient(100deg, rgba(255, 255, 255, 0.1) 25%, rgba(0, 0, 0, 0) 25%)", | ||||||||||||||||||
| boxShadow: | ||||||||||||||||||
| "rgba(255, 255, 255, 0.1) 0px 0px 0px 1px inset, rgba(0, 0, 0, 0.05) 0px 0px 0px 2px", | ||||||||||||||||||
| }} | ||||||||||||||||||
| > | ||||||||||||||||||
| <span | ||||||||||||||||||
| style={{ textShadow: "rgba(0, 0, 0, 0.05) 0px 1px 0px" }} | ||||||||||||||||||
| > | ||||||||||||||||||
| Bookmark us! | ||||||||||||||||||
| </span> | ||||||||||||||||||
|
Comment on lines
+30
to
+34
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. inline
Suggested change
Context Used: Context from Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||||||||||||||||||
| <span className="inline-flex items-center gap-1"> | ||||||||||||||||||
| <kbd className="inline-flex min-h-[26px] min-w-[26px] items-center justify-center rounded-md border border-border bg-background px-2 font-mono text-xs text-foreground shadow-sm [border-bottom-width:2px]"> | ||||||||||||||||||
| {isMac ? "⌘" : "Ctrl"} | ||||||||||||||||||
| </kbd> | ||||||||||||||||||
| <span className="text-[11px] text-muted-foreground">+</span> | ||||||||||||||||||
| <kbd className="inline-flex min-h-[26px] min-w-[26px] items-center justify-center rounded-md border border-border bg-background px-2 font-mono text-xs text-foreground shadow-sm [border-bottom-width:2px]"> | ||||||||||||||||||
| D | ||||||||||||||||||
| </kbd> | ||||||||||||||||||
| </span> | ||||||||||||||||||
| </div> | ||||||||||||||||||
| ); | ||||||||||||||||||
| } | ||||||||||||||||||
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.
violates design philosophy - uses inline
styleprop with hardcoded rgba values and complex gradients instead of semantic design tokensPer DESIGN_PHILOSOPHY.md:
bg-accent,bg-card,border-border) that auto-adapt to dark modegray-100,gray-800)" - this applies to inline rgba values tooContext Used: Context from
dashboard- AGENTS.md (source)Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!