Skip to content

Commit 63d58fa

Browse files
committed
fix: Coveo z-index + make sticky
1 parent 1ca737f commit 63d58fa

File tree

5 files changed

+38
-22
lines changed

5 files changed

+38
-22
lines changed

assets/css/v2/style.css

Lines changed: 23 additions & 14 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,8 @@ 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;
214+
z-index: 1;
212215
}
213216

214217
.docs-container {
@@ -219,7 +222,7 @@ nav {
219222
display: flex;
220223
flex-direction: column;
221224
position: relative;
222-
z-index: 9999;
225+
z-index: 2;
223226
}
224227

225228
#searchbox {
@@ -238,7 +241,7 @@ nav {
238241
}
239242

240243
.breadcrumb-layout {
241-
margin: 0 2rem;
244+
grid-column: 1 / -1;
242245
}
243246

244247
.main-layout {
@@ -255,6 +258,7 @@ nav {
255258
grid-column: 1 / -1;
256259
display: grid;
257260
grid-template-columns: var(--text-content-width-iphone-13) 1fr;
261+
margin-top: 2rem;
258262
grid-auto-rows: max-content;
259263
}
260264

@@ -276,13 +280,6 @@ nav {
276280
grid-template-columns: var(--sidebar-width) 1fr;
277281
column-gap: var(--component-gap);
278282
}
279-
280-
.breadcrumb-layout {
281-
display: grid;
282-
grid-template-columns: var(--sidebar-width) 1fr;
283-
column-gap: var(--component-gap);
284-
align-items: center;
285-
}
286283
}
287284
@media (max-width: 1184px) {
288285
.sidebar-layout {
@@ -322,6 +319,7 @@ nav {
322319
--side-gutter-width
323320
);
324321
column-gap: var(--component-gap);
322+
margin-top: 2rem;
325323
}
326324

327325
.content-layout .side-gutter {
@@ -399,6 +397,14 @@ nav {
399397
--atomic-font-family: inherit;
400398
}
401399

400+
atomic-search-interface {
401+
height: fit-content;
402+
margin-bottom: 2rem;
403+
margin-top: 2rem;
404+
min-height: 54px;
405+
max-height: 54px;
406+
}
407+
402408
atomic-search-box {
403409
&::part(wrapper) {
404410
border-radius: 0;
@@ -411,6 +417,10 @@ atomic-search-box {
411417
width: calc(100% + 2px);
412418
margin-left: -1px;
413419
}
420+
421+
&::part(submit-button-wrapper) {
422+
--atomic-primary: var(--atomic-neutral-dark);
423+
}
414424
}
415425

416426
atomic-query-summary {
@@ -500,7 +510,7 @@ atomic-search-layout atomic-layout-section[section="search"] {
500510
position: absolute;
501511
top: 0;
502512
min-width: 80%;
503-
margin-top: 1rem;
513+
margin-top: 7.375rem;
504514
margin-left: 44rem;
505515
padding: 1rem 1.5rem;
506516
background-color: white;
@@ -693,7 +703,6 @@ atomic-search-layout atomic-layout-section[section="search"] {
693703

694704
.sidebar .sidebar-navigation ul li .current {
695705
background-color: oklch(var(--color-brand));
696-
z-index: 999;
697706
}
698707

699708
.sidebar .sidebar-navigation ul li .partial-box {
@@ -779,7 +788,7 @@ atomic-search-layout atomic-layout-section[section="search"] {
779788
main {
780789
flex: 1;
781790
min-width: 30rem;
782-
margin: 2rem 2rem;
791+
margin: 0 2rem 2rem 2rem;
783792
}
784793

785794
p {
@@ -791,7 +800,7 @@ p {
791800
color: var(--color-foreground);
792801
text-decoration: none;
793802
font-size: 0.875rem;
794-
grid-column: 2 / -1;
803+
margin: 0;
795804
}
796805

797806
.breadcrumb .active {

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>

layouts/search/single.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@
121121

122122
<!-- Facet Section -->
123123
<atomic-layout-section section="facets">
124-
<atomic-search-box style="display: none;">
125-
</atomic-search-box>
124+
<atomic-search-box></atomic-search-box>
126125
<atomic-facet field="f5_product" label="Show by product"></atomic-facet>
127126
<atomic-refine-toggle></atomic-refine-toggle>
128127
</atomic-layout-section>

0 commit comments

Comments
 (0)