0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Move subnav to partial, take first pass at conditionalizing breadcrumb links

This commit is contained in:
Mark Otto 2019-07-18 13:49:05 -07:00 committed by Mark Otto
parent b08d2b6adc
commit 5027a8086a
4 changed files with 29 additions and 32 deletions

View File

@ -7,24 +7,9 @@
{{ partial "skippy" . }}
{{ partial "docs-navbar" . }}
{{ partial "docs-subnav" . }}
<nav class="bd-subnavbar pt-2 pb-3 pb-md-2 mb-4">
<div class="container d-flex align-items-md-center flex-column flex-md-row">
<div class="d-flex align-items-center mb-2 mb-md-0 mr-md-auto">
<a class="link-dark" href="/" onclick="ga('send', 'event', 'Subnav', 'click', 'Bootstrap');">Bootstrap</a>
{{ partial "icons/booticon-chevron-right.svg" (dict "class" "booticon d-inline-block mx-2 flex-shrink-0" "width" "12px" "height" "12px") }}
<a class="link-dark" href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/" onclick="ga('send', 'event', 'Subnav', 'click', 'Documentation');">Documentation</a>
{{ partial "icons/booticon-chevron-right.svg" (dict "class" "booticon d-inline-block mx-2 flex-shrink-0" "width" "12px" "height" "12px") }}
{{ partial "docs-versions" . }}
</div>
<form class="bd-search d-flex align-items-center">
<input type="search" class="form-control" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off" data-docs-version="{{ .Site.Params.docs_version }}">
</form>
</div>
</nav>
<div class="container">
<div class="container my-4">
<div class="row flex-xl-nowrap">
<div class="col-md-3 bd-sidebar">
{{ partial "docs-sidebar" . }}

View File

@ -7,6 +7,7 @@
{{ partial "skippy" . }}
{{ partial "docs-navbar" . }}
{{ partial "docs-subnav" . }}
{{ partial "home/masthead" . }}
{{ partial "home/masthead-followup" . }}

View File

@ -7,21 +7,7 @@
{{ partial "skippy" . }}
{{ partial "docs-navbar" . }}
<nav class="bd-subnavbar pt-2 pb-3 pb-md-2 mb-4">
<div class="container d-flex align-items-md-center flex-column flex-md-row">
<div class="d-flex align-items-center mb-2 mb-md-0 mr-md-auto">
<a class="link-dark" href="/" onclick="ga('send', 'event', 'Subnav', 'click', 'Bootstrap');">Bootstrap</a>
{{ partial "icons/booticon-chevron-right.svg" (dict "class" "booticon d-inline-block mx-2 flex-shrink-0" "width" "12px" "height" "12px") }}
<a class="link-dark" href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/" onclick="ga('send', 'event', 'Subnav', 'click', 'Documentation');">Documentation</a>
{{ partial "icons/booticon-chevron-right.svg" (dict "class" "booticon d-inline-block mx-2 flex-shrink-0" "width" "12px" "height" "12px") }}
{{ partial "docs-versions" . }}
{{ partial "icons/booticon-chevron-right.svg" (dict "class" "booticon d-inline-block mx-2 flex-shrink-0" "width" "12px" "height" "12px") }}
<span class="text-muted">Examples</span>
</div>
{{ partial "docs-search" . }}
</div>
</nav>
{{ partial "docs-subnav" . }}
<header class="py-5 border-bottom">
<div class="container pt-md-1 pb-md-4">

View File

@ -0,0 +1,25 @@
<nav class="bd-subnavbar pt-2 pb-3 pb-md-2">
<div class="container d-flex align-items-md-center flex-column flex-md-row">
<div class="d-flex align-items-center mb-2 mb-md-0 mr-md-auto">
<a class="link-dark" href="/" onclick="ga('send', 'event', 'Subnav', 'click', 'Bootstrap');">Bootstrap</a>
{{ partial "icons/booticon-chevron-right.svg" (dict "class" "booticon d-inline-block mx-2 flex-shrink-0" "width" "12px" "height" "12px") }}
{{ if (eq .Page.Layout "docs") or (eq .Page.Layout "single") }}
<a class="link-dark" href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/" onclick="ga('send', 'event', 'Subnav', 'click', 'Documentation');">Documentation</a>
{{ partial "icons/booticon-chevron-right.svg" (dict "class" "booticon d-inline-block mx-2 flex-shrink-0" "width" "12px" "height" "12px") }}
{{ end }}
{{ partial "docs-versions" . }}
{{ if eq .Page.Title "Examples" }}
{{ partial "icons/booticon-chevron-right.svg" (dict "class" "booticon d-inline-block mx-2 flex-shrink-0" "width" "12px" "height" "12px") }}
<span class="text-muted">Examples</span>
{{ end }}
</div>
<form class="bd-search d-flex align-items-center">
<input type="search" class="form-control" id="search-input" placeholder="Search..." aria-label="Search for..." autocomplete="off" data-docs-version="{{ .Site.Params.docs_version }}">
</form>
</div>
</nav>