-
Notifications
You must be signed in to change notification settings - Fork 466
feat(web): add hover-reveal links for VS pages and use cases in footer #2134
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9c2dcc0
feat(web): add dropdown menus for Compare and Platforms in footer Res…
devin-ai-integration[bot] b018663
refactor(web): simplify footer links to hover-reveal pattern
devin-ai-integration[bot] c95858d
feat(web): shuffle random item on each hover
devin-ai-integration[bot] 2c0b44c
chore(web): change 'Hyprnote for ???' to 'For ???'
devin-ai-integration[bot] fa2aa3d
feat(web): replace ??? with blurred text that reveals on hover
devin-ai-integration[bot] d779bbc
feat(footer): improve accessibility and interaction for links
ComputelessComputer c45fae0
feat(web): add research solution page for Hyprnote
ComputelessComputer e6a4192
feat(footer): update footer links and navigation structure
ComputelessComputer 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,35 @@ | ||
| import { Link, useRouterState } from "@tanstack/react-router"; | ||
| import { ExternalLinkIcon, MailIcon } from "lucide-react"; | ||
| import { useState } from "react"; | ||
|
|
||
| import { Image } from "@/components/image"; | ||
|
|
||
| function getNextRandomIndex(length: number, prevIndex: number): number { | ||
| if (length <= 1) return 0; | ||
| let next = prevIndex; | ||
| while (next === prevIndex) { | ||
| next = Math.floor(Math.random() * length); | ||
| } | ||
| return next; | ||
| } | ||
|
|
||
| const vsList = [ | ||
| { slug: "otter", name: "Otter.ai" }, | ||
| { slug: "granola", name: "Granola" }, | ||
| { slug: "fireflies", name: "Fireflies" }, | ||
| { slug: "fathom", name: "Fathom" }, | ||
| { slug: "notion", name: "Notion" }, | ||
| { slug: "obsidian", name: "Obsidian" }, | ||
| ]; | ||
|
|
||
| const useCasesList = [ | ||
| { to: "/solution/sales", label: "Sales" }, | ||
| { to: "/solution/recruiting", label: "Recruiting" }, | ||
| { to: "/solution/consulting", label: "Consulting" }, | ||
| { to: "/solution/coaching", label: "Coaching" }, | ||
| { to: "/solution/research", label: "Research" }, | ||
| { to: "/solution/journalism", label: "Journalism" }, | ||
| ]; | ||
|
|
||
| function getMaxWidthClass(pathname: string): string { | ||
| const isBlogOrDocs = | ||
|
|
@@ -30,7 +60,7 @@ function BrandSection({ currentYear }: { currentYear: number }) { | |
| return ( | ||
| <div className="lg:flex-1"> | ||
| <Link to="/" className="inline-block mb-4"> | ||
| <img | ||
| <Image | ||
| src="/api/images/hyprnote/logo.svg" | ||
| alt="Hyprnote" | ||
| className="h-6" | ||
|
|
@@ -146,12 +176,30 @@ function ProductLinks() { | |
| } | ||
|
|
||
| function ResourcesLinks() { | ||
| const [vsIndex, setVsIndex] = useState(() => | ||
| Math.floor(Math.random() * vsList.length), | ||
| ); | ||
| const [useCaseIndex, setUseCaseIndex] = useState(() => | ||
| Math.floor(Math.random() * useCasesList.length), | ||
| ); | ||
|
|
||
| const currentVs = vsList[vsIndex]; | ||
| const currentUseCase = useCasesList[useCaseIndex]; | ||
|
|
||
| return ( | ||
| <div> | ||
| <h3 className="text-sm font-semibold text-neutral-900 mb-4 font-serif"> | ||
| Resources | ||
| </h3> | ||
| <ul className="space-y-3"> | ||
| <li> | ||
| <Link | ||
| to="/pricing" | ||
| className="text-sm text-neutral-600 hover:text-stone-600 transition-colors no-underline hover:underline hover:decoration-dotted" | ||
| > | ||
| Pricing | ||
| </Link> | ||
| </li> | ||
| <li> | ||
| <a | ||
| href="/docs/faq" | ||
|
|
@@ -161,13 +209,20 @@ function ResourcesLinks() { | |
| </a> | ||
| </li> | ||
| <li> | ||
| <a | ||
| href="mailto:[email protected]" | ||
| className="text-sm text-neutral-600 hover:text-stone-600 transition-colors inline-flex items-center gap-1 no-underline hover:underline hover:decoration-dotted" | ||
| <Link | ||
| to="/company-handbook" | ||
| className="text-sm text-neutral-600 hover:text-stone-600 transition-colors no-underline hover:underline hover:decoration-dotted" | ||
| > | ||
| Support | ||
| <MailIcon className="size-3" /> | ||
| </a> | ||
| Company Handbook | ||
| </Link> | ||
| </li> | ||
| <li> | ||
| <Link | ||
| to="/gallery" | ||
| className="text-sm text-neutral-600 hover:text-stone-600 transition-colors no-underline hover:underline hover:decoration-dotted" | ||
| > | ||
| Prompt Gallery | ||
| </Link> | ||
| </li> | ||
| <li> | ||
| <a | ||
|
|
@@ -181,27 +236,60 @@ function ResourcesLinks() { | |
| </a> | ||
| </li> | ||
| <li> | ||
| <Link | ||
| to="/pricing" | ||
| className="text-sm text-neutral-600 hover:text-stone-600 transition-colors no-underline hover:underline hover:decoration-dotted" | ||
| <a | ||
| href="mailto:[email protected]" | ||
| className="text-sm text-neutral-600 hover:text-stone-600 transition-colors inline-flex items-center gap-1 no-underline hover:underline hover:decoration-dotted" | ||
| > | ||
| Pricing | ||
| </Link> | ||
| Support | ||
| <MailIcon className="size-3" /> | ||
| </a> | ||
| </li> | ||
| <li> | ||
| <Link | ||
| to="/gallery" | ||
| className="text-sm text-neutral-600 hover:text-stone-600 transition-colors no-underline hover:underline hover:decoration-dotted" | ||
| to={currentUseCase.to} | ||
| className="group text-sm text-neutral-600 hover:text-stone-600 transition-colors no-underline hover:underline hover:decoration-dotted" | ||
| aria-label={`Hyprnote for ${currentUseCase.label}`} | ||
| onMouseEnter={() => { | ||
| setUseCaseIndex((prev) => | ||
| getNextRandomIndex(useCasesList.length, prev), | ||
| ); | ||
| }} | ||
| onFocus={() => { | ||
| setUseCaseIndex((prev) => | ||
| getNextRandomIndex(useCasesList.length, prev), | ||
| ); | ||
| }} | ||
| > | ||
| Prompt Gallery | ||
| 👍 for{" "} | ||
| <span className="inline-block blur-sm group-hover:blur-none group-focus:blur-none transition-all duration-150"> | ||
| {currentUseCase.label} | ||
| </span> | ||
| </Link> | ||
| </li> | ||
| <li> | ||
| <Link | ||
| to="/company-handbook" | ||
| className="text-sm text-neutral-600 hover:text-stone-600 transition-colors no-underline hover:underline hover:decoration-dotted" | ||
| to="/vs/$slug" | ||
| params={{ slug: currentVs.slug }} | ||
| className="group text-sm text-neutral-600 hover:text-stone-600 transition-colors no-underline hover:underline hover:decoration-dotted" | ||
| aria-label={`Versus ${currentVs.name}`} | ||
| onMouseEnter={() => { | ||
| setVsIndex((prev) => getNextRandomIndex(vsList.length, prev)); | ||
| }} | ||
| onFocus={() => { | ||
| setVsIndex((prev) => getNextRandomIndex(vsList.length, prev)); | ||
| }} | ||
| > | ||
| Company Handbook | ||
| <img | ||
| src="/api/images/hyprnote/icon.png" | ||
| alt="Hyprnote" | ||
| width={12} | ||
| height={12} | ||
| className="size-4 rounded border border-neutral-100 inline" | ||
| />{" "} | ||
| vs{" "} | ||
| <span className="inline-block blur-sm group-hover:blur-none group-focus:blur-none transition-all duration-150"> | ||
| {currentVs.name} | ||
| </span> | ||
| </Link> | ||
| </li> | ||
| </ul> | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.