Skip to content

Commit

Permalink
docs: backport from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Mar 7, 2024
1 parent 4c51cc4 commit b665c93
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 30 deletions.
1 change: 0 additions & 1 deletion docs/layouts/partials/favicons.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{ "<!-- Favicons -->" | safeHTML }}
<link rel="apple-touch-icon" href="/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
Expand Down
25 changes: 13 additions & 12 deletions docs/layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
<div class="container py-4 py-md-5 px-4 px-md-3 text-body-secondary">
<div class="row">
<div class="col-lg-3 mb-3">
<a class="d-inline-flex align-items-center mb-2 text-body-secondary text-decoration-none" href="/" aria-label="Bootstrap">
<a class="d-inline-flex align-items-center mb-2 text-body-emphasis text-decoration-none" href="/" aria-label="Bootstrap">
{{ partial "icons/bootstrap-white-fill.svg" (dict "class" "d-block me-2" "width" "40" "height" "32") }}
<span class="fs-5">Bootstrap</span>
</a>
<ul class="list-unstyled small">
<li class="mb-2">Designed and built with all the love in the world by the <a href="{{ .Site.Params.main }}/docs/{{ .Site.Params.docs_version }}/about/team/">Bootstrap team</a> with the help of <a href="{{ .Site.Params.repo }}/graphs/contributors">our contributors</a>.</li>
<li class="mb-2">Code licensed <a href="{{ .Site.Params.repo }}/blob/main/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>.</li>
<li class="mb-2">Currently v{{ .Site.Params.version }}.</li>
</ul>
</div>
<div class="col-6 col-lg-2 offset-lg-1 mb-3">
Expand All @@ -20,7 +21,7 @@ <h5>Links</h5>
<li class="mb-2"><a href="{{ .Site.Params.icons }}">Icons</a></li>
<li class="mb-2"><a href="{{ .Site.Params.themes }}">Themes</a></li>
<li class="mb-2"><a href="{{ .Site.Params.blog }}">Blog</a></li>
<li class="mb-2"><a href="{{ .Site.Params.swag }}">Swag Store</a></li>
<li class="mb-2"><a href="{{ .Site.Params.swag }}" target="_blank" rel="noopener">Swag Store</a></li>
</ul>
</div>
<div class="col-6 col-lg-2 mb-3">
Expand All @@ -36,21 +37,21 @@ <h5>Guides</h5>
<div class="col-6 col-lg-2 mb-3">
<h5>Projects</h5>
<ul class="list-unstyled">
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/bootstrap">Bootstrap 5</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/bootstrap/tree/v4-dev">Bootstrap 4</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/icons">Icons</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/rfs">RFS</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/bootstrap-npm-starter">npm starter</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/bootstrap" target="_blank" rel="noopener">Bootstrap 5</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/bootstrap/tree/v4-dev" target="_blank" rel="noopener">Bootstrap 4</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/icons" target="_blank" rel="noopener">Icons</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/rfs" target="_blank" rel="noopener">RFS</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/examples/" target="_blank" rel="noopener">Examples repo</a></li>
</ul>
</div>
<div class="col-6 col-lg-2 mb-3">
<h5>Community</h5>
<ul class="list-unstyled">
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/bootstrap/issues">Issues</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/bootstrap/discussions">Discussions</a></li>
<li class="mb-2"><a href="https://github.com/sponsors/twbs">Corporate sponsors</a></li>
<li class="mb-2"><a href="{{ .Site.Params.opencollective }}">Open Collective</a></li>
<li class="mb-2"><a href="https://stackoverflow.com/questions/tagged/bootstrap-5">Stack Overflow</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/bootstrap/issues" target="_blank" rel="noopener">Issues</a></li>
<li class="mb-2"><a href="{{ .Site.Params.github_org }}/bootstrap/discussions" target="_blank" rel="noopener">Discussions</a></li>
<li class="mb-2"><a href="https://github.com/sponsors/twbs" target="_blank" rel="noopener">Corporate sponsors</a></li>
<li class="mb-2"><a href="{{ .Site.Params.opencollective }}" target="_blank" rel="noopener">Open Collective</a></li>
<li class="mb-2"><a href="https://stackoverflow.com/questions/tagged/bootstrap-5" target="_blank" rel="noopener">Stack Overflow</a></li>
</ul>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions docs/layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<i class="bi bi-three-dots" aria-hidden="true"></i>
</button>

<div class="offcanvas-lg offcanvas-end flex-grow-1" id="bdNavbar" aria-labelledby="bdNavbarOffcanvasLabel">
<div class="offcanvas-lg offcanvas-end flex-grow-1" tabindex="-1" id="bdNavbar" aria-labelledby="bdNavbarOffcanvasLabel" data-bs-scroll="true">
<div class="offcanvas-header px-4 pb-0">
<h5 class="offcanvas-title text-white" id="bdNavbarOffcanvasLabel">Bootstrap</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvas" aria-label="Close" data-bs-target="#bdNavbar"></button>
Expand Down Expand Up @@ -64,6 +64,7 @@ <h5 class="offcanvas-title text-white" id="bdNavbarOffcanvasLabel">Bootstrap</h5
</li>

<li class="nav-item dropdown">
<!-- TODO use the icons -->
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="circle-half" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 0 8 1v14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z"/>
Expand All @@ -90,28 +91,27 @@ <h5 class="offcanvas-title text-white" id="bdNavbarOffcanvasLabel">Bootstrap</h5
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme-text">
<li>
<button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="light" aria-pressed="false">
<svg class="bi me-2 opacity-50 theme-icon"><use href="#sun-fill"></use></svg>
<svg class="bi me-2 opacity-50"><use href="#sun-fill"></use></svg>
Light
<svg class="bi ms-auto d-none"><use href="#check2"></use></svg>
</button>
</li>
<li>
<button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="dark" aria-pressed="false">
<svg class="bi me-2 opacity-50 theme-icon"><use href="#moon-stars-fill"></use></svg>
<svg class="bi me-2 opacity-50"><use href="#moon-stars-fill"></use></svg>
Dark
<svg class="bi ms-auto d-none"><use href="#check2"></use></svg>
</button>
</li>
<li>
<button type="button" class="dropdown-item d-flex align-items-center active" data-bs-theme-value="auto" aria-pressed="true">
<svg class="bi me-2 opacity-50 theme-icon"><use href="#circle-half"></use></svg>
<svg class="bi me-2 opacity-50"><use href="#circle-half"></use></svg>
Auto
<svg class="bi ms-auto d-none"><use href="#check2"></use></svg>
</button>
</li>
</ul>
</li>

</ul>
</div>
</div>
Expand Down
24 changes: 14 additions & 10 deletions docs/layouts/partials/social.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{{ "<!-- Twitter -->" | safeHTML }}
{{- $pageTitle := .Title | default .Site.Title | markdownify -}}
{{- $pageDescription := .Page.Params.description | default .Site.Params.description | markdownify -}}
{{- $socialImagePath := .Site.Params.social_image_path -}}

<meta name="twitter:card" content="{{ if .IsHome }}summary_large_image{{ else }}summary{{ end }}">
<meta name="twitter:site" content="@{{ .Site.Params.twitter }}">
<meta name="twitter:creator" content="@{{ .Site.Params.twitter }}">
<meta name="twitter:title" content="{{ .Title | default .Site.Title | markdownify }}">
<meta name="twitter:description" content="{{ .Page.Params.description | default .Site.Params.description | markdownify }}">
<meta name="twitter:image" content="{{ .Site.Params.social_image_path | absURL }}">
<meta name="twitter:title" content="{{ $pageTitle }}">
<meta name="twitter:description" content="{{ $pageDescription }}">
<meta name="twitter:image" content="{{ $socialImagePath | absURL }}">

{{ "<!-- Facebook -->" | safeHTML }}
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:title" content="{{ .Title | default .Site.Title | markdownify }}">
<meta property="og:description" content="{{ .Page.Params.description | default .Site.Params.description | markdownify }}">
<meta property="og:title" content="{{ $pageTitle }}">
<meta property="og:description" content="{{ $pageDescription }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
<meta property="og:image" content="{{ .Site.Params.social_image_path | absURL }}">
<meta property="og:image" content="{{ $socialImagePath | absURL }}">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1000">
<meta property="og:image:height" content="500">
{{ with (imageConfig (path.Join "docs/static" $socialImagePath)) -}}
<meta property="og:image:width" content="{{ .Width }}">
<meta property="og:image:height" content="{{ .Height }}">
{{- end }}
4 changes: 2 additions & 2 deletions docs/layouts/partials/stylesheet.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link rel="stylesheet" href="/assets/font/bootstrap-icons.min.css">
<link href="/assets/font/bootstrap-icons.min.css" rel="stylesheet">

{{- $sassOptions := dict "targetPath" "assets/css/docs.css" "precision" 6 -}}
{{- $postcssOptions := dict "use" "autoprefixer" "noMap" true -}}
Expand All @@ -9,4 +9,4 @@

{{- $style := resources.Get "scss/docs.scss" | toCSS $sassOptions | postCSS $postcssOptions -}}

<link rel="stylesheet" href="{{ $style.Permalink | relURL }}">
<link href="{{ $style.Permalink | relURL }}" rel="stylesheet">

0 comments on commit b665c93

Please sign in to comment.