diff options
| author | Mewen Le Hô <[email protected]> | 2023-07-06 07:10:13 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-05 22:10:13 -0700 |
| commit | 4315801856b690d30091e804fb1de5d6233fe306 (patch) | |
| tree | 66561519ed92c3a153f90e94a50202300ab87e32 | |
| parent | e0d54ffd3202b7f6a6b2b738ca6ec15017748925 (diff) | |
| download | bootstrap-4315801856b690d30091e804fb1de5d6233fe306.tar.xz bootstrap-4315801856b690d30091e804fb1de5d6233fe306.zip | |
Add docs search to homepage (#38850)
* Compliance to Success Criterion 3.2.3 Consistent Navigation
* Update docs-navbar.html
---------
Co-authored-by: Mark Otto <[email protected]>
| -rw-r--r-- | site/layouts/partials/docs-navbar.html | 6 | ||||
| -rw-r--r-- | site/layouts/partials/header.html | 2 | ||||
| -rw-r--r-- | site/layouts/partials/scripts.html | 3 | ||||
| -rw-r--r-- | site/layouts/partials/stylesheet.html | 2 |
4 files changed, 4 insertions, 9 deletions
diff --git a/site/layouts/partials/docs-navbar.html b/site/layouts/partials/docs-navbar.html index 2c1403c0c..a69fb2d70 100644 --- a/site/layouts/partials/docs-navbar.html +++ b/site/layouts/partials/docs-navbar.html @@ -8,7 +8,7 @@ </button> </div> {{- else }} - <div class="d-lg-none" style="width: 1.5rem;"></div> + <div class="d-lg-none" style="width: 4.25rem;"></div> {{- end }} <a class="navbar-brand p-0 me-0 me-lg-2" href="/" aria-label="Bootstrap"> @@ -16,9 +16,7 @@ </a> <div class="d-flex"> - {{ if eq .Layout "docs" }} - <div class="bd-search" id="docsearch" data-bd-docs-version="{{ .Site.Params.docs_version }}"></div> - {{ end }} + <div class="bd-search" id="docsearch" data-bd-docs-version="{{ .Site.Params.docs_version }}"></div> <button class="navbar-toggler d-flex d-lg-none order-3 p-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#bdNavbar" aria-controls="bdNavbar" aria-label="Toggle navigation"> <svg class="bi" aria-hidden="true"><use xlink:href="#three-dots"></use></svg> diff --git a/site/layouts/partials/header.html b/site/layouts/partials/header.html index 22528ae47..6323f4908 100644 --- a/site/layouts/partials/header.html +++ b/site/layouts/partials/header.html @@ -11,9 +11,7 @@ <link rel="canonical" href="{{ .Permalink }}"> -{{- if eq .Page.Layout "docs" -}} <link rel="preconnect" href="https://AK7KMZKZHQ-dsn.algolia.net" crossorigin> -{{- end }} {{ with .Params.robots -}} <meta name="robots" content="{{ . }}"> diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html index 3378a230e..dc92d30e5 100644 --- a/site/layouts/partials/scripts.html +++ b/site/layouts/partials/scripts.html @@ -4,8 +4,9 @@ <script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script> {{- end }} -{{ if eq .Page.Layout "docs" -}} <script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script> + +{{ if eq .Page.Layout "docs" -}} <script src="https://cdn.jsdelivr.net/npm/@stackblitz/sdk@1/bundles/sdk.umd.js"></script> {{- end }} diff --git a/site/layouts/partials/stylesheet.html b/site/layouts/partials/stylesheet.html index 1aa329699..7a5b077bc 100644 --- a/site/layouts/partials/stylesheet.html +++ b/site/layouts/partials/stylesheet.html @@ -1,6 +1,4 @@ -{{ if eq .Page.Layout "docs" -}} <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3"> -{{- end }} {{ if eq hugo.Environment "production" -}} {{ if eq .Page.Params.direction "rtl" -}} |
