mirror of https://github.com/twbs/bootstrap.git
Add docs search to homepage (#38850)
* Compliance to Success Criterion 3.2.3 Consistent Navigation * Update docs-navbar.html --------- Co-authored-by: Mark Otto <markdotto@gmail.com>
This commit is contained in:
parent
e0d54ffd32
commit
4315801856
|
@ -8,7 +8,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<div class="d-lg-none" style="width: 1.5rem;"></div>
|
<div class="d-lg-none" style="width: 4.25rem;"></div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<a class="navbar-brand p-0 me-0 me-lg-2" href="/" aria-label="Bootstrap">
|
<a class="navbar-brand p-0 me-0 me-lg-2" href="/" aria-label="Bootstrap">
|
||||||
|
@ -16,9 +16,7 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
{{ if eq .Layout "docs" }}
|
<div class="bd-search" id="docsearch" data-bd-docs-version="{{ .Site.Params.docs_version }}"></div>
|
||||||
<div class="bd-search" id="docsearch" data-bd-docs-version="{{ .Site.Params.docs_version }}"></div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<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">
|
<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>
|
<svg class="bi" aria-hidden="true"><use xlink:href="#three-dots"></use></svg>
|
||||||
|
|
|
@ -11,9 +11,7 @@
|
||||||
|
|
||||||
<link rel="canonical" href="{{ .Permalink }}">
|
<link rel="canonical" href="{{ .Permalink }}">
|
||||||
|
|
||||||
{{- if eq .Page.Layout "docs" -}}
|
|
||||||
<link rel="preconnect" href="https://AK7KMZKZHQ-dsn.algolia.net" crossorigin>
|
<link rel="preconnect" href="https://AK7KMZKZHQ-dsn.algolia.net" crossorigin>
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{ with .Params.robots -}}
|
{{ with .Params.robots -}}
|
||||||
<meta name="robots" content="{{ . }}">
|
<meta name="robots" content="{{ . }}">
|
||||||
|
|
|
@ -4,8 +4,9 @@
|
||||||
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
|
<script src="/docs/{{ .Site.Params.docs_version }}/dist/js/bootstrap.bundle.js"></script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ if eq .Page.Layout "docs" -}}
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
|
<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>
|
<script src="https://cdn.jsdelivr.net/npm/@stackblitz/sdk@1/bundles/sdk.umd.js"></script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{{ if eq .Page.Layout "docs" -}}
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{ if eq hugo.Environment "production" -}}
|
{{ if eq hugo.Environment "production" -}}
|
||||||
{{ if eq .Page.Params.direction "rtl" -}}
|
{{ if eq .Page.Params.direction "rtl" -}}
|
||||||
|
|
Loading…
Reference in New Issue