mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
docs: drop Scratch usage (#36337)
This commit is contained in:
parent
6c10d60711
commit
ce650e7c7d
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
{{- $versions_link := "" -}}
|
{{- $versions_link := "" -}}
|
||||||
{{- if and (eq .Layout "docs") (eq $page_version .Site.Params.docs_version) -}}
|
{{- if and (eq .Layout "docs") (eq $page_version .Site.Params.docs_version) -}}
|
||||||
{{- .Scratch.Set "versions_link" (printf "%s/%s/" $group_slug $page_slug) -}}
|
{{- $versions_link = printf "%s/%s/" $group_slug $page_slug -}}
|
||||||
{{- else if (eq .Layout "single") }}
|
{{- else if (eq .Layout "single") }}
|
||||||
{{- .Scratch.Set "versions_link" (printf "%s/" $page_slug) -}}
|
{{- $versions_link = printf "%s/" $page_slug -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-versions">
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-versions">
|
||||||
<li><h6 class="dropdown-header">v5 releases</h6></li>
|
<li><h6 class="dropdown-header">v5 releases</h6></li>
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item current" aria-current="true" href="/docs/{{ .Site.Params.docs_version }}/{{ .Scratch.Get "versions_link" }}">
|
<a class="dropdown-item current" aria-current="true" href="/docs/{{ .Site.Params.docs_version }}/{{ $versions_link }}">
|
||||||
Latest ({{ .Site.Params.docs_version }}.x)
|
Latest ({{ .Site.Params.docs_version }}.x)
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -25,14 +25,14 @@
|
|||||||
{{- if (eq .Page.Params.added "5.2") }}
|
{{- if (eq .Page.Params.added "5.2") }}
|
||||||
<div class="dropdown-item disabled">v5.1.3</div>
|
<div class="dropdown-item disabled">v5.1.3</div>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<a class="dropdown-item" href="https://getbootstrap.com/docs/5.1/{{ .Scratch.Get "versions_link" }}">v5.1.3</a>
|
<a class="dropdown-item" href="https://getbootstrap.com/docs/5.1/{{ $versions_link }}">v5.1.3</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
{{- if or (eq .Page.Params.added "5.1") (eq .Page.Params.added "5.2") }}
|
{{- if or (eq .Page.Params.added "5.1") (eq .Page.Params.added "5.2") }}
|
||||||
<div class="dropdown-item disabled">v5.0.2</div>
|
<div class="dropdown-item disabled">v5.0.2</div>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<a class="dropdown-item" href="https://getbootstrap.com/docs/5.0/{{ .Scratch.Get "versions_link" }}">v5.0.2</a>
|
<a class="dropdown-item" href="https://getbootstrap.com/docs/5.0/{{ $versions_link }}">v5.0.2</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</li>
|
</li>
|
||||||
<li><hr class="dropdown-divider"></li>
|
<li><hr class="dropdown-divider"></li>
|
||||||
|
Loading…
Reference in New Issue
Block a user