Skip to content

Commit 7fb44f6

Browse files
committed
fix: prevent title line break
1 parent 969d174 commit 7fb44f6

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed

website-v3/src/layouts/Header.astro

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,42 @@ const { owner, repository, config } = context.get();
1616
<div class="absolute inset-0 z-0 dark:bg-zinc-900/90 dark:text-white"></div>
1717
<div class="max-w-8xl mx-auto relative z-10">
1818
<div class="h-16 px-4 lg:px-8 mx-4 lg:mx-0 flex items-center">
19-
<div class="flex-1 flex items-center">
20-
<Link
21-
href="/"
22-
className="transition-opacity hover:opacity-75 inline-flex items-center gap-3"
23-
>
24-
{
25-
!!config.logo && (
26-
<img
27-
alt="Logo"
28-
class:list={['inline-block h-[30px]', { 'dark:hidden': !!config.logoDark }]}
29-
src={getImagePath(config.logo)}
30-
/>
31-
)
32-
}
33-
{
34-
!!config.logoDark && (
35-
<img
36-
alt="Logo"
37-
class="hidden h-[30px] dark:inline-block"
38-
src={getImagePath(config.logoDark)}
39-
/>
40-
)
41-
}
42-
{
43-
!!config.automaticallyDisplayName && (
44-
<span class="text-xl font-bold">{config.name || `${owner}/${repository}`}</span>
45-
)
46-
}
47-
</Link>
48-
</div>
19+
<Link
20+
href="/"
21+
className="transition-opacity flex-grow hover:opacity-75 flex items-center gap-3 truncate"
22+
>
23+
{
24+
!!config.logo && (
25+
<img
26+
alt="Logo"
27+
class:list={['inline-block h-[30px]', { 'dark:hidden': !!config.logoDark }]}
28+
src={getImagePath(config.logo)}
29+
/>
30+
)
31+
}
32+
{
33+
!!config.logoDark && (
34+
<img
35+
alt="Logo"
36+
class="hidden h-[30px] dark:inline-block"
37+
src={getImagePath(config.logoDark)}
38+
/>
39+
)
40+
}
41+
{
42+
!!config.automaticallyDisplayName && (
43+
<span class="text-xl font-bold">{config.name || `${owner}/${repository}`}</span>
44+
)
45+
}
46+
</Link>
4947
<div
5048
class:list={{
5149
'hidden lg:block lg:w-64 xl:w-80': !!config.docsearch,
5250
}}
5351
>
5452
{!!config.docsearch && <SearchBar />}
5553
</div>
56-
<div class="flex-1 flex gap-6 items-center justify-end">
54+
<div class="flex-shrink-0 flex gap-6 items-center justify-end">
5755
{
5856
!!config.docsearch && (
5957
<button class="h-6 w-6 lg:hidden" data-docsearch-override>

0 commit comments

Comments
 (0)