Skip to content

Commit 5295c4c

Browse files
committed
fix: Updating navbar styling
1 parent 5f1d75c commit 5295c4c

File tree

3 files changed

+34
-20
lines changed

3 files changed

+34
-20
lines changed
Lines changed: 11 additions & 0 deletions
Loading

docs-starlight/src/components/Header.astro

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ const shouldRenderSearch =
1616
---
1717

1818
<div class="header sl-flex">
19-
<div class="title-wrapper sl-flex">
19+
<!-- <div class="title-wrapper sl-flex"> -->
2020
<SiteTitle {...Astro.props} />
21-
</div>
21+
<!-- </div> -->
2222
<div class="sl-flex print:hidden">
2323
{shouldRenderSearch && <Search {...Astro.props} />}
2424
</div>
2525
<div class="sl-hidden md:sl-flex print:hidden right-group">
2626
<div class="sl-flex social-icons">
2727
<SocialIcons {...Astro.props} />
2828
</div>
29-
<div class="sl-flex social-icons">
29+
<div class="sl-hidden lg:sl-flex pipelines-pill">
3030
<a href="https://www.gruntwork.io/platform/pipelines" class="pipeline-pill">
3131
<span class="pipeline-icon">
32-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none"><circle cx="10" cy="10" r="10" fill="#A78BFA"/><circle cx="10" cy="10" r="4" fill="#fff"/></svg>
32+
<img src="/src/assets/pipelines.svg" width="24" height="24" class="product-icon" alt="Pipeline" />
3333
</span>
3434
<span class="pipeline-text">
35-
<span class="pipeline-title">Learn about Gruntwork Pipelines</span>
36-
<span class="pipeline-subtitle">CI/CD built for Terragrunt & Stacks</span>
35+
<span class="pipeline-title">Automate your pipeline</span>
36+
<span class="pipeline-subtitle">CI/CD built for Terragrunt</span>
3737
</span>
3838
<span class="pipeline-arrow">
3939
<svg width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M8 6l4 4-4 4" stroke="#A78BFA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -42,7 +42,7 @@ const shouldRenderSearch =
4242
</div>
4343
<div class="sl-flex social-icons">
4444
<a href="https://www.gruntwork.io/services/terragrunt" class="support-btn">
45-
Enterprise Support
45+
Support
4646
<span class="support-arrow">
4747
<svg width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M8 6l4 4-4 4" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
4848
</span>
@@ -61,15 +61,6 @@ const shouldRenderSearch =
6161
height: 100%;
6262
}
6363

64-
.title-wrapper {
65-
/* Prevent long titles overflowing and covering the search and menu buttons on narrow viewports. */
66-
overflow: clip;
67-
/* Avoid clipping focus ring around link inside title wrapper. */
68-
padding: 0.25rem;
69-
margin: -0.25rem;
70-
min-width: 0;
71-
}
72-
7364
.right-group,
7465
.social-icons {
7566
gap: 1rem;
@@ -115,7 +106,7 @@ const shouldRenderSearch =
115106
.pipeline-pill {
116107
display: flex;
117108
align-items: center;
118-
background: rgba(167, 139, 250, 0.08);
109+
/* background: rgba(167, 139, 250, 0.08); */
119110
border-radius: 999px;
120111
padding: 0.5rem 1.25rem 0.5rem 0.5rem;
121112
gap: 0.75rem;
@@ -171,4 +162,5 @@ const shouldRenderSearch =
171162
align-items: center;
172163
margin-left: 0.25rem;
173164
}
165+
174166
</style>

docs-starlight/src/components/SiteTitle.astro

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
import { logos } from 'virtual:starlight/user-images';
33
import config from 'virtual:starlight/user-config';
44
import type { Props } from '@astrojs/starlight/props';
5-
const { siteTitle, siteTitleHref } = Astro.props;
5+
const { siteTitleHref } = Astro.props;
66
---
77

88
<a href={siteTitleHref} class="site-title sl-flex">
99
{
1010
config.logo && logos.dark && (
1111
<>
1212
<img
13-
class:list={{ 'light:sl-hidden print:hidden': !('src' in config.logo) }}
13+
class:list={{ 'light:sl-hidden print:hidden light-logo': !('src' in config.logo) }}
1414
alt={config.logo.alt}
1515
src={logos.dark.src}
1616
width={logos.dark.width}
@@ -19,7 +19,7 @@ const { siteTitle, siteTitleHref } = Astro.props;
1919
{/* Show light alternate if a user configure both light and dark logos. */}
2020
{!('src' in config.logo) && (
2121
<img
22-
class="dark:sl-hidden print:block"
22+
class="dark:sl-hidden print:block dark-logo"
2323
alt={config.logo.alt}
2424
src={logos.light?.src}
2525
width={logos.light?.width}
@@ -45,7 +45,18 @@ const { siteTitle, siteTitleHref } = Astro.props;
4545
height: calc(var(--sl-nav-height) - 2 * var(--sl-nav-pad-y));
4646
width: auto;
4747
max-width: 100%;
48+
min-width: var(--sl-nav-height);
4849
object-fit: contain;
4950
object-position: 0 50%;
5051
}
52+
53+
@media (max-width: 768px) {
54+
img.dark-logo {
55+
content: url('/src/assets/logo-dark.svg');
56+
}
57+
58+
img.light-logo {
59+
content: url('/src/assets/logo-light.svg');
60+
}
61+
}
5162
</style>

0 commit comments

Comments
 (0)