Skip to content

Commit 56ec76e

Browse files
committed
fix: Coveo z-index + make sticky
1 parent 3344afc commit 56ec76e

File tree

4 files changed

+35
-22
lines changed

4 files changed

+35
-22
lines changed

assets/css/v2/style.css

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
--code-copy-icon-height: 1rem;
2929
--code-copy-icon-width: 1rem;
30+
--breadcrumb-max-height: 54px;
3031
--sidebar-margin: 24px;
3132
--sidebar-line-box-side-length: 8px;
3233
--sidebar-line-box-top: 6px;
@@ -91,7 +92,7 @@ p {
9192

9293
/* layout */
9394
header {
94-
margin: 2rem 2rem;
95+
margin: 2rem 2rem 0 2rem;
9596

9697
.header-container {
9798
display: flex;
@@ -209,6 +210,7 @@ nav {
209210
.content-layout {
210211
display: grid;
211212
grid-template-columns: var(--text-content-width-iphone-13) 1fr;
213+
grid-template-rows: var(--breadcrumb-max-height) 1fr;
212214
}
213215

214216
.docs-container {
@@ -219,7 +221,6 @@ nav {
219221
display: flex;
220222
flex-direction: column;
221223
position: relative;
222-
z-index: 9999;
223224
}
224225

225226
#searchbox {
@@ -238,7 +239,7 @@ nav {
238239
}
239240

240241
.breadcrumb-layout {
241-
margin: 0 2rem;
242+
grid-column: 1 / -1;
242243
}
243244

244245
.main-layout {
@@ -255,6 +256,7 @@ nav {
255256
grid-column: 1 / -1;
256257
display: grid;
257258
grid-template-columns: var(--text-content-width-iphone-13) 1fr;
259+
margin-top: 2rem;
258260
}
259261

260262
.text-content > :not(.wide) {
@@ -275,13 +277,6 @@ nav {
275277
grid-template-columns: var(--sidebar-width) 1fr;
276278
column-gap: var(--component-gap);
277279
}
278-
279-
.breadcrumb-layout {
280-
display: grid;
281-
grid-template-columns: var(--sidebar-width) 1fr;
282-
column-gap: var(--component-gap);
283-
align-items: center;
284-
}
285280
}
286281
@media (max-width: 1184px) {
287282
.sidebar-layout {
@@ -321,6 +316,7 @@ nav {
321316
--side-gutter-width
322317
);
323318
column-gap: var(--component-gap);
319+
margin-top: 2rem;
324320
}
325321

326322
.content-layout .side-gutter {
@@ -398,6 +394,12 @@ nav {
398394
--atomic-font-family: inherit;
399395
}
400396

397+
atomic-search-interface {
398+
height: fit-content;
399+
margin-bottom: 2rem;
400+
margin-top: 2rem;
401+
}
402+
401403
atomic-search-box {
402404
&::part(wrapper) {
403405
border-radius: 0;
@@ -410,6 +412,10 @@ atomic-search-box {
410412
width: calc(100% + 2px);
411413
margin-left: -1px;
412414
}
415+
416+
&::part(submit-button-wrapper) {
417+
--atomic-primary: var(--atomic-neutral-dark);
418+
}
413419
}
414420

415421
atomic-query-summary {
@@ -473,8 +479,8 @@ atomic-search-layout atomic-layout-section[section="search"] {
473479
position: sticky;
474480
top: 0;
475481
height: 100vh;
476-
margin-top: -1rem;
477-
padding-top: 1rem;
482+
margin: 0;
483+
padding: 0;
478484
}
479485

480486
.sidebar .product-selector-button {
@@ -692,7 +698,6 @@ atomic-search-layout atomic-layout-section[section="search"] {
692698

693699
.sidebar .sidebar-navigation ul li .current {
694700
background-color: var(--color-brand);
695-
z-index: 999;
696701
}
697702

698703
.sidebar .sidebar-navigation ul li .partial-box {
@@ -755,7 +760,7 @@ atomic-search-layout atomic-layout-section[section="search"] {
755760
main {
756761
flex: 1;
757762
min-width: 30rem;
758-
margin: 2rem 2rem;
763+
margin: 0 2rem 2rem 2rem;
759764
}
760765

761766
p {
@@ -767,7 +772,7 @@ p {
767772
color: var(--color-foreground);
768773
text-decoration: none;
769774
font-size: 0.875rem;
770-
grid-column: 2 / -1;
775+
margin: 0;
771776
}
772777

773778
.breadcrumb .active {
@@ -942,7 +947,7 @@ blockquote.side-callout {
942947
.nav-tabs {
943948
overflow-x: scroll;
944949
overflow-y: hidden;
945-
height: calc(100% + 1px);
950+
height: 100%;
946951
scrollbar-width: none;
947952

948953
list-style: none;

layouts/_default/baseof.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@
5757
});
5858

5959
// swap out v1 and v2 elements
60-
const v1ElementIds = ["sidebar", "footer", "toc", "api", "search-v1"]
60+
const v1ElementIds = ["sidebar", "footer", "toc", "api", "search-v1", "breadcrumb-v1"]
6161

6262
v1ElementIds.forEach((elementId) => {
6363
const element = document.getElementById(elementId);
64+
console.log(element)
6465
if (element !== null) {
6566
element.style.display = isNewTheme ? "none" : "";
6667
}
@@ -172,11 +173,7 @@
172173
</header>
173174

174175
<section class="base-layout">
175-
<section class="breadcrumb-layout">
176-
<atomic-search-interface id="search-standalone" data-mf="true" style="display:none;">
177-
<atomic-search-box redirection-url="/search.html">
178-
</atomic-search-box>
179-
</atomic-search-interface>
176+
<section id="breadcrumb-v1">
180177
{{ if not .IsHome }}
181178
{{ if not (in .Params.display_breadcrumb "false" ) }}
182179
{{ partial "breadcrumb" .}}

layouts/_default/docs.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
</div>
2323

2424
<section class="content-layout">
25+
<section class="breadcrumb-layout" data-mf="true" style="display: none;">
26+
{{ if not .IsHome }}
27+
{{ if not (in .Params.display_breadcrumb "false" ) }}
28+
{{ partial "breadcrumb" .}}
29+
{{ end }}
30+
{{ end }}
31+
</section>
2532
<div class="text-content">
2633
<h1>{{ .Title }}</h1>
2734
{{ .Content }}

layouts/partials/sidebar-v2.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
{{ $productIdentifier := index ((split $relPermalink "/")) 1 }}
2121
{{ $productName := index $productMap $productIdentifier }}
2222

23+
<atomic-search-interface id="search-standalone" data-mf="true" style="display:none;">
24+
<atomic-search-box redirection-url="/search.html">
25+
</atomic-search-box>
26+
</atomic-search-interface>
2327
<button class="product-selector-button" id="product-selector-button">
2428
{{/* product name and selector */}}
2529
<div class="product-name">{{ $productName }}</div>

0 commit comments

Comments
 (0)