Skip to content
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

Increase search bar size on sites with few header links #2766

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Format & lint
  • Loading branch information
zenoachtig committed Jan 23, 2025
commit e0f7190229c76dae9d18c9b38edbed4221895336
3 changes: 2 additions & 1 deletion packages/gitbook/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -156,7 +156,8 @@ export function Header(props: {
'xl:ml-[max(calc((100%-18rem-48rem-14rem-3rem)/2),1.5rem)]',
'lg:mr-auto',
'page-no-toc:xl:ml-[max(calc((100%-18rem-48rem-18rem-3rem)/2),1.5rem)]',
isMultiVariants && 'page-no-toc:lg:ml-0 page-no-toc:xl:ml-0',
isMultiVariants &&
'page-no-toc:lg:ml-0 page-no-toc:xl:ml-0',
'order-last',
'lg:order-[unset]',
]
2 changes: 1 addition & 1 deletion packages/gitbook/src/components/Header/HeaderLink.tsx
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ export async function HeaderLink(props: {
);
}}
>
<DropdownMenu >
<DropdownMenu>
{link.links.map((subLink, index) => (
<SubHeaderLink key={index} {...props} link={subLink} />
))}
2 changes: 0 additions & 2 deletions packages/gitbook/src/components/Header/headerLinks.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


.linkEllipsis {
display: none;
& div > a {
4 changes: 3 additions & 1 deletion packages/gitbook/src/components/Search/SearchButton.tsx
Original file line number Diff line number Diff line change
@@ -152,7 +152,9 @@ const Shortcut = () => {
>
{operatingSystem === 'mac' ? '⌘' : 'Ctrl'}
</kbd>
<kbd className="rounded border border-dark/2 dark:border-light/2 size-5 flex justify-center items-center">K</kbd>
<kbd className="rounded border border-dark/2 dark:border-light/2 size-5 flex justify-center items-center">
K
</kbd>
</div>
);
};