Skip to content

Commit fc257cf

Browse files
committed
Merge: Branch 'origin/main' into dark-mode
2 parents e94e68f + bd317f0 commit fc257cf

File tree

12 files changed

+176
-97
lines changed

12 files changed

+176
-97
lines changed

.github/workflows/release-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build preview on documentation repo upon release publish
33
on:
44
release:
55
types:
6-
- published
6+
- released
77

88
env:
99
OWNER: nginx

assets/css/v2/style.css

Lines changed: 95 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ ol li:last-child {
443443
.grid-container {
444444
display: grid;
445445
grid-template-columns: var(--sidebar-width) 1fr;
446-
grid-template-rows: var(--header-height) 1fr auto;
446+
grid-template-rows: auto 1fr auto;
447447
grid-template-areas:
448448
"sidebar header"
449449
"sidebar content"
@@ -538,23 +538,71 @@ ol li:last-child {
538538
.header {
539539
grid-area: header;
540540
display: flex;
541-
padding: 0 var(--space-s);
542541
border-bottom: 1px solid oklch(var(--color-divider));
543542
background: var(--color-background);
544543
position: sticky;
545544
top: 0;
546545
z-index: 2;
547546

547+
.header-base {
548+
width: 100%;
549+
position: relative;
550+
}
551+
552+
.header-search-dropdown {
553+
position: absolute;
554+
width: 100%;
555+
background: white;
556+
border-top: 1px solid oklch(var(--color-divider));
557+
border-bottom: 1px solid oklch(var(--color-divider));
558+
padding: var(--space-m) var(--space-s);
559+
align-items: center;
560+
display: none;
561+
562+
atomic-external {
563+
width: 100%;
564+
}
565+
566+
atomic-search-box {
567+
width: 100%;
568+
569+
&::part(wrapper) {
570+
border-color: oklch(var(--color-codeblock-border));
571+
}
572+
573+
&::part(submit-button-wrapper) {
574+
display: none;
575+
}
576+
577+
&::part(textarea) {
578+
font-size: var(--atomic-text-base);
579+
padding: var(--space-s) var(--space-s);
580+
font-weight: 400;
581+
}
582+
583+
&::part(suggestions-wrapper) {
584+
border-color: oklch(var(--color-codeblock-border));
585+
}
586+
}
587+
}
588+
589+
.header-dropdown-mobile {
590+
position: absolute;
591+
bottom: 0;
592+
width: 100%;
593+
height: 8rem;
594+
}
595+
548596
.header-container {
549597
display: flex;
550598
flex-direction: row;
599+
padding: 0 var(--space-s);
551600
justify-content: space-between;
552601
flex-wrap: wrap;
553602
column-gap: 2rem;
554603
align-items: center;
555604
width: 100%;
556605
height: 64px;
557-
position: relative;
558606

559607
/* This is fine unless we actually want it to break document flow at super tiny viewports */
560608
.header__logo {
@@ -568,6 +616,11 @@ ol li:last-child {
568616
width: 2.5rem;
569617
}
570618

619+
.header__search--mobile--search--button {
620+
cursor: pointer;
621+
display: none;
622+
}
623+
571624
.header__search {
572625
display: block;
573626
width: auto;
@@ -647,7 +700,7 @@ ol li:last-child {
647700
background-color: var(--color-background);
648701
border: var(--color-foreground) 1px solid;
649702
box-shadow: 3px 3px 0px oklch(var(--color-shadow));
650-
z-index: 1;
703+
z-index: 20;
651704
right: 0;
652705
display: none;
653706
width: 400px;
@@ -789,12 +842,10 @@ ol li:last-child {
789842
}
790843

791844
.product-selector__content {
792-
padding-bottom: 0.5rem;
845+
padding-bottom: 1rem;
793846
padding-top: 0.5rem;
794-
}
795-
796-
.product-selector__section {
797-
background: var(--product-selector-background);
847+
border: 1px solid oklch(var(--color-brand) / 0.8);
848+
border-top: none;
798849
}
799850

800851
.product-selector__toggle {
@@ -803,9 +854,17 @@ ol li:last-child {
803854
align-items: center;
804855
}
805856

857+
.product-selector__toggle-text {
858+
font-weight: 500;
859+
}
860+
861+
.product-selector__chevron {
862+
padding: 0 0.5rem;
863+
}
864+
806865
.product-selector__product-group {
807866
padding-block-start: 0.5rem;
808-
font-size: var(--font-step--1);
867+
font-size: var(--font-step--0);
809868
padding-inline-start: 1rem;
810869
}
811870

@@ -814,7 +873,7 @@ ol li:last-child {
814873
padding-inline-start: 1.5rem;
815874

816875
a {
817-
font-size: var(--font-step--1);
876+
font-size: var(--font-step--0);
818877
}
819878
}
820879

@@ -864,6 +923,13 @@ ol li:last-child {
864923

865924
/* This is our "mobile" or no sidebar breakpoint */
866925
@media (max-width: 68rem) {
926+
#search-standalone-header-panel:checked ~ .grid-container {
927+
.header {
928+
.header-search-dropdown {
929+
display: flex;
930+
}
931+
}
932+
}
867933
#sidebar-panel:not(:checked) ~ .grid-container {
868934
.header {
869935
.header__control--sidebar--close {
@@ -936,6 +1002,14 @@ ol li:last-child {
9361002
}
9371003
}
9381004

1005+
.grid-container:has(.no-sidebar) {
1006+
.header {
1007+
.header__search--mobile--search--button {
1008+
display: block;
1009+
}
1010+
}
1011+
}
1012+
9391013
.header {
9401014
.product-selector {
9411015
display: none;
@@ -953,7 +1027,9 @@ ol li:last-child {
9531027
}
9541028
.header-container {
9551029
.header__search {
956-
display: none;
1030+
#search-standalone-header {
1031+
display: none;
1032+
}
9571033
}
9581034
}
9591035
}
@@ -1039,7 +1115,7 @@ nav {
10391115

10401116
.homepage {
10411117
--content-max-width: 120rem;
1042-
margin: 0 2rem;
1118+
margin: 0 0.5rem;
10431119
line-height: 1.5rem;
10441120

10451121
* {
@@ -1050,12 +1126,12 @@ nav {
10501126
.homepage-section {
10511127
display: grid;
10521128
grid-template-columns: repeat(auto-fit, minmax(0, 500px));
1053-
gap: 1.5rem;
1129+
gap: 1rem;
10541130

10551131
justify-content: center;
10561132
max-width: 100rem;
10571133
margin: 0 auto;
1058-
padding: 1rem;
1134+
padding: 2rem 1rem;
10591135

10601136
.headerlink {
10611137
cursor: default;
@@ -1069,10 +1145,6 @@ nav {
10691145
> * {
10701146
grid-column: 1 / -1;
10711147
}
1072-
1073-
> p {
1074-
grid-column: 1;
1075-
}
10761148
}
10771149
}
10781150

@@ -1389,6 +1461,7 @@ atomic-search-box::part(textarea-expander) {
13891461
atomic-search-box::part(textarea) {
13901462
padding-left: 0;
13911463
padding-right: 0;
1464+
font-weight: 400;
13921465
}
13931466

13941467
atomic-search-box::part(wrapper) {
@@ -1412,8 +1485,8 @@ atomic-search-interface#search-standalone-header {
14121485

14131486
.header-search-box {
14141487
&::part(wrapper) {
1488+
border-color: oklch(var(--color-codeblock-border));
14151489
border-radius: 0;
1416-
border-color: var(--color-foreground);
14171490
}
14181491

14191492
&::part(textarea) {
@@ -1423,7 +1496,7 @@ atomic-search-interface#search-standalone-header {
14231496

14241497
&::part(suggestions-wrapper) {
14251498
border-radius: 0;
1426-
border-color: var(--color-foreground);
1499+
border-color: oklch(var(--color-codeblock-border));
14271500
width: calc(100% + 2px);
14281501
margin-inline-start: -1px;
14291502
}
@@ -1565,7 +1638,7 @@ nav.sidebar.sidebar__mobile-open {
15651638
padding: var(--sidebar-item-padding-tb) var(--sidebar-item-padding-lr);
15661639
margin: 2px 0 2px 0;
15671640
border-radius: 5px 0 0 5px;
1568-
color: var(--color-sidebar-link);
1641+
color: oklch(var(--color-foreground));
15691642
text-decoration: none;
15701643
transition:
15711644
background-color 0.2s ease,

exampleSite/data/product-selector.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- productGroup: Test Product
22
products:
33
- title: "Test Product"
4-
url: "/test-product"
4+
url: "test-product"
55

66
- productGroup: Test External Links
77
products:
@@ -12,4 +12,4 @@
1212
- productGroup: NGINX
1313
products:
1414
- title: "NGINX"
15-
url: "/nginx"
15+
url: "nginx"

exampleSite/hugo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ maxAge = -1
2424
[params]
2525
github_repo = "https://github.com/nginxinc/nginx-hugo-theme"
2626
github_subdir = "exampleSite"
27-
enable_last_modified = true
27+
enable_last_modified = true
28+
coveo_search_redirect = "/search.html"

layouts/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ define "main"}}
22

3-
<div class="content">
3+
<div class="content no-sidebar">
44
<div class="not-found-container">
55
<h1 class="info-header">
66
HTTP 404 - Page not found

layouts/_default/baseof.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
{{ if or ( not hugo.IsServer ) ( not ( in .Site.Params.buildtype "package" ) ) }}
9292
{{ partial "universal-tag.html" . }}
9393
{{ end }}
94+
<input type="checkbox" id="search-standalone-header-panel" class="search-standalone-header-panel" hidden/>
9495
<input type="checkbox" id="sidebar-panel" class="sidebar-panel" hidden/>
9596
<div class="grid-container">
9697
<aside class="sidebar">

layouts/partials/coveo-atomic-search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ $redirectionUrl := .redirectionUrl | default "/search.html" }}
1+
{{ $redirectionUrl := .redirectionUrl | default .Site.Params.coveo_search_redirect | default "/search.html" }}
22
{{ $id := .id | default "search-standalone-header"}}
33
<atomic-search-interface id={{ $id }}>
44
<atomic-search-box redirection-url={{ $redirectionUrl }} class="header-search-box">

0 commit comments

Comments
 (0)