mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-31 00:59:51 +02:00
Apply utilities in docs styles (#30866)
* docs(theming): apply utilities where possible * Update docs-sidebar.html Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<main class="bd-content pl-lg-4">
|
||||
<main class="bd-content order-1 pl-lg-4">
|
||||
{{ if .Page.Params.sections }}
|
||||
<div class="row g-3">
|
||||
{{ range .Page.Params.sections }}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="bd-content py-5" id="content">
|
||||
<main class="bd-content order-1 py-5" id="content">
|
||||
<div class="container">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
@@ -4,8 +4,8 @@
|
||||
{{ partial "icons/bootstrap-logo-solid.svg" (dict "class" "d-block" "width" "32" "height" "32") }}
|
||||
</a>
|
||||
|
||||
<div class="navbar-nav-scroll order-3 order-md-0 d-flex justify-content-center justify-content-md-start">
|
||||
<ul class="navbar-nav bd-navbar-nav flex-row">
|
||||
<div class="navbar-nav-scroll order-3 order-md-0 d-flex justify-content-center justify-content-md-start mt-1 mt-md-0">
|
||||
<ul class="navbar-nav bd-navbar-nav flex-row py-2 py-md-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{{ if .IsHome }} active" aria-current="page{{ end }}" href="/" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Bootstrap');">Home</a>
|
||||
</li>
|
||||
@@ -33,22 +33,22 @@
|
||||
<ul class="navbar-nav ml-sm-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link px-1 mx-1 py-2" href="{{ .Site.Params.github_org }}" target="_blank" rel="noopener" aria-label="GitHub">
|
||||
{{ partial "icons/github.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
|
||||
{{ partial "icons/github.svg" (dict "class" "navbar-nav-svg d-inline-block align-text-top" "width" "36" "height" "36") }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link px-1 mx-1 py-2" href="https://twitter.com/{{ .Site.Params.twitter }}" target="_blank" rel="noopener" aria-label="Twitter">
|
||||
{{ partial "icons/twitter.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
|
||||
{{ partial "icons/twitter.svg" (dict "class" "navbar-nav-svg d-inline-block align-text-top" "width" "36" "height" "36") }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link px-1 mx-1 py-2" href="{{ .Site.Params.slack }}" target="_blank" rel="noopener" aria-label="Slack">
|
||||
{{ partial "icons/slack.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
|
||||
{{ partial "icons/slack.svg" (dict "class" "navbar-nav-svg d-inline-block align-text-top" "width" "36" "height" "36") }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link px-1 mx-1 py-2" href="{{ .Site.Params.opencollective }}" target="_blank" rel="noopener" aria-label="Open Collective">
|
||||
{{ partial "icons/opencollective.svg" (dict "class" "navbar-nav-svg" "width" "36" "height" "36") }}
|
||||
{{ partial "icons/opencollective.svg" (dict "class" "navbar-nav-svg d-inline-block align-text-top" "width" "36" "height" "36") }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -16,17 +16,17 @@
|
||||
{{- $is_active_group := eq $.Page.Params.group $group_slug }}
|
||||
|
||||
<li class="my-1{{ if $is_active_group }} active{{ end }}">
|
||||
<a class="{{ if not $is_active_group }}collapsed{{ end }}" data-toggle="collapse" href="#{{ $group_slug }}-collapse" role="button" aria-expanded="{{ $is_active_group }}"{{ if $is_active_group }} aria-current="true"{{ end }}>
|
||||
<a class="d-inline-flex align-items-center rounded{{ if not $is_active_group }} collapsed{{ end }}" data-toggle="collapse" href="#{{ $group_slug }}-collapse" role="button" aria-expanded="{{ $is_active_group }}"{{ if $is_active_group }} aria-current="true"{{ end }}>
|
||||
{{ $group.title }}
|
||||
</a>
|
||||
|
||||
{{- if $group.pages }}
|
||||
<ul class="list-unstyled mb-2 collapse{{ if $is_active_group }} show{{ end }}" id="{{ $group_slug }}-collapse">
|
||||
<ul class="list-unstyled font-weight-normal mb-2 collapse{{ if $is_active_group }} show{{ end }}" id="{{ $group_slug }}-collapse">
|
||||
{{- range $doc := $group.pages -}}
|
||||
{{- $doc_slug := $doc.title | urlize -}}
|
||||
{{- $is_active := and $is_active_group (eq $page_slug $doc_slug) -}}
|
||||
{{- $href := printf "/docs/%s/%s/%s/" $.Site.Params.docs_version $group_slug $doc_slug }}
|
||||
<li><a href="{{ $href }}"{{ if $is_active }} class="active" aria-current="page"{{ end }}>{{ $doc.title }}</a></li>
|
||||
<li><a href="{{ $href }}" class="d-inline-flex align-items-center rounded{{ if $is_active }} active{{ end }}"{{ if $is_active }} aria-current="page"{{ end }}>{{ $doc.title }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<li class="my-3 mx-4 border-top"></li>
|
||||
<li{{ if eq $page_slug "migration" }} class="active"{{ end }}>
|
||||
<a href="/docs/{{ $.Site.Params.docs_version }}/migration/">
|
||||
<a href="/docs/{{ $.Site.Params.docs_version }}/migration/" class="d-inline-flex align-items-center rounded">
|
||||
Migration
|
||||
</a>
|
||||
</li>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<nav class="bd-subnavbar pt-2 pb-3 pb-md-2" aria-label="Secondary navigation">
|
||||
<div class="container-xl d-flex align-items-md-center flex-wrap">
|
||||
<form class="bd-search mb-2 mb-md-0 mr-auto">
|
||||
<form class="bd-search position-relative mb-2 mb-md-0 mr-auto">
|
||||
<input type="search" class="form-control" id="search-input" placeholder="Search docs..." aria-label="Search docs for..." autocomplete="off" data-docs-version="{{ .Site.Params.docs_version }}">
|
||||
</form>
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
<footer class="bd-footer p-3 p-md-5 mt-5 bg-light text-center text-sm-left">
|
||||
<div class="container">
|
||||
<ul class="bd-footer-links">
|
||||
<li><a href="{{ .Site.Params.github_org }}">GitHub</a></li>
|
||||
<li><a href="https://twitter.com/{{ .Site.Params.twitter }}">Twitter</a></li>
|
||||
<li><a href="/docs/{{ .Site.Params.docs_version }}/examples/">Examples</a></li>
|
||||
<li><a href="/docs/{{ .Site.Params.docs_version }}/about/overview/">About</a></li>
|
||||
<ul class="bd-footer-links pl-0 mb-3">
|
||||
<li class="d-inline-block"><a href="{{ .Site.Params.github_org }}">GitHub</a></li>
|
||||
<li class="d-inline-block ml-3"><a href="https://twitter.com/{{ .Site.Params.twitter }}">Twitter</a></li>
|
||||
<li class="d-inline-block ml-3"><a href="/docs/{{ .Site.Params.docs_version }}/examples/">Examples</a></li>
|
||||
<li class="d-inline-block ml-3"><a href="/docs/{{ .Site.Params.docs_version }}/about/overview/">About</a></li>
|
||||
</ul>
|
||||
<p>Designed and built with all the love in the world by the <a href="/docs/{{ .Site.Params.docs_version }}/about/team/">Bootstrap team</a> with the help of <a href="{{ .Site.Params.repo }}/graphs/contributors">our contributors</a>.</p>
|
||||
<p>Currently v{{ .Site.Params.current_version }}. Code licensed <a href="{{ .Site.Params.repo }}/blob/master/LICENSE" target="_blank" rel="license noopener">MIT</a>, docs <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" rel="license noopener">CC BY 3.0</a>.</p>
|
||||
<p class="mb-0">Designed and built with all the love in the world by the <a href="/docs/{{ .Site.Params.docs_version }}/about/team/">Bootstrap team</a> with the help of <a href="{{ .Site.Params.repo }}/graphs/contributors">our contributors</a>.</p>
|
||||
<p class="mb-0">Currently v{{ .Site.Params.current_version }}. Code licensed <a href="{{ .Site.Params.repo }}/blob/master/LICENSE" target="_blank" rel="license noopener">MIT</a>, docs <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" rel="license noopener">CC BY 3.0</a>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{{ "<!-- Icons by Bytesize https://github.com/danklammer/bytesize-icons -->" | safeHTML }}
|
||||
|
||||
<div class="container py-3 my-3 py-md-5 my-md-5 text-center">
|
||||
<div class="home-icon home-icon-blue mx-auto mb-3">
|
||||
<div class="home-icon home-icon-blue text-white p-4 mx-auto mb-3">
|
||||
{{ partial "icons/import.svg" (dict "width" "48" "height" "48") }}
|
||||
</div>
|
||||
<h2 class="display-4">Installation</h2>
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
|
||||
<div class="container py-3 my-3 py-md-5 my-md-5 text-center">
|
||||
<div class="home-icon home-icon-purple mx-auto mb-3">
|
||||
<div class="home-icon home-icon-purple text-white p-4 mx-auto mb-3">
|
||||
{{ partial "icons/download.svg" (dict "width" "48" "height" "48") }}
|
||||
</div>
|
||||
<h2 class="display-4">BootstrapCDN</h2>
|
||||
@@ -35,7 +35,7 @@
|
||||
</div>
|
||||
|
||||
<div class="container py-3 my-3 py-md-5 my-md-5 text-center">
|
||||
<div class="home-icon home-icon-yellow mx-auto mb-3">
|
||||
<div class="home-icon home-icon-yellow text-white p-4 mx-auto mb-3">
|
||||
{{ partial "icons/lightning.svg" (dict "width" "48" "height" "48") }}
|
||||
</div>
|
||||
<h2 class="display-4">Official Themes</h2>
|
||||
|
Reference in New Issue
Block a user