Skip to content

Commit

Permalink
Merge branch 'main' into main-mc-logo-svg
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Nov 18, 2020
2 parents 53e166c + de8dbd7 commit 19e67c7
Show file tree
Hide file tree
Showing 20 changed files with 170 additions and 198 deletions.
13 changes: 10 additions & 3 deletions js/tests/browsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,18 @@ const browsers = {
browser: 'Firefox',
browser_version: 'latest'
},
iphoneX: {
iphone7: {
base: 'BrowserStack',
os: 'ios',
os_version: '11.0',
device: 'iPhone X',
os_version: '10.0',
device: 'iPhone 7',
real_mobile: true
},
iphone11: {
base: 'BrowserStack',
os: 'ios',
os_version: '13.0',
device: 'iPhone 11',
real_mobile: true
},
pixel2: {
Expand Down
6 changes: 5 additions & 1 deletion js/tests/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ const detectBrowsers = {
return debug ? ['Chrome'] : ['ChromeHeadless']
}

if (availableBrowser.includes('Chromium')) {
return debug ? ['Chromium'] : ['ChromiumHeadless']
}

if (availableBrowser.includes('Firefox')) {
return debug ? ['Firefox'] : ['FirefoxHeadless']
}

throw new Error('Please install Firefox or Chrome')
throw new Error('Please install Chrome, Chromium or Firefox')
}
}

Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"find-unused-sass-variables": "^3.0.0",
"glob": "^7.1.6",
"hammer-simulator": "0.0.1",
"hugo-bin": "^0.66.1",
"hugo-bin": "^0.66.2",
"ip": "^1.1.5",
"jquery": "^3.5.1",
"karma": "^5.2.3",
Expand All @@ -126,9 +126,9 @@
"nodemon": "^2.0.6",
"npm-run-all": "^4.1.5",
"popper.js": "^1.16.1",
"postcss": "^8.1.6",
"postcss": "^8.1.7",
"postcss-cli": "^8.2.0",
"rollup": "^2.33.1",
"rollup": "^2.33.2",
"rollup-plugin-istanbul": "^2.0.1",
"sass": "^1.29.0",
"shelljs": "^0.8.4",
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.0/components/buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Create responsive stacks of full-width, "block buttons" like those in Bootstrap
</div>
{{< /example >}}

Here we create a responsive variation, starting with vertically stacked buttons until the `md` breakpoing, where `.d-md-block` replaces the `.d-grid` class, thus nullifying the `gap-2` utility. Resize your browser to see them change.
Here we create a responsive variation, starting with vertically stacked buttons until the `md` breakpoint, where `.d-md-block` replaces the `.d-grid` class, thus nullifying the `gap-2` utility. Resize your browser to see them change.

{{< example >}}
<div class="d-grid gap-2 d-md-block">
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.0/components/dropdowns.md
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ Use `data-bs-offset` or `data-bs-reference` to change the location of the dropdo

## Usage

Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the `.show` class on the parent list item. The `data-bs-toggle="dropdown"` attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.
Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the `.show` class on the parent `.dropdown-menu`. The `data-bs-toggle="dropdown"` attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.

{{< callout info >}}
On touch-enabled devices, opening a dropdown adds empty `mouseover` handlers to the immediate children of the `<body>` element. This admittedly ugly hack is necessary to work around a [quirk in iOS' event delegation](https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html), which would otherwise prevent a tap anywhere outside of the dropdown from triggering the code that closes the dropdown. Once the dropdown is closed, these additional empty `mouseover` handlers are removed.
Expand Down
8 changes: 4 additions & 4 deletions site/content/docs/5.0/examples/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
extra_css:
- "dashboard.css"
extra_js:
- src: "https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.24.1/feather.min.js"
integrity: "sha384-EbSscX4STvYAC/DxHse8z5gEDaNiKAIGW+EpfzYTfQrgIlHywXXrM9SUIZ0BlyfF"
- src: "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"
integrity: "sha384-i+dHPTzZw7YVZOx9lbH5l6lP74sLRtMtwN2XjVqjf3uAGAREAF4LMIUDTWEVs4LI"
- src: "https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js"
integrity: "sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE"
- src: "https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"
integrity: "sha384-zNy6FEbO50N+Cg5wap8IKA4M/ZnLJgzc6w2NqACZaK0u0FXfOWRRJOnQtpZun8ha"
- src: "dashboard.js"
---

Expand Down
4 changes: 2 additions & 2 deletions site/content/docs/5.0/examples/masonry/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: examples
title: Masonry example
extra_js:
- src: "https://cdnjs.cloudflare.com/ajax/libs/masonry/4.2.2/masonry.pkgd.min.js"
- src: "https://cdn.jsdelivr.net/npm/masonry-layout@4.2.2/dist/masonry.pkgd.min.js"
integrity: "sha384-GNFwBvfVxBkLMJpYMOABq3c+d3KnQxudP/mGPkzpZSTYykLBNsZEnG2D9G/X/+7D"
async: true
---
Expand All @@ -14,7 +14,7 @@ <h1>Bootstrap and Masonry</h1>
<p>Masonry is not included in Bootstrap. Add it by including the JavaScript plugin manually, or using a CDN like so:</p>

<pre><code>
&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/masonry/4.2.2/masonry.pkgd.min.js&quot; integrity=&quot;sha384-GNFwBvfVxBkLMJpYMOABq3c+d3KnQxudP/mGPkzpZSTYykLBNsZEnG2D9G/X/+7D&quot; crossorigin=&quot;anonymous&quot; async&gt;&lt;/script&gt;
&lt;script src=&quot;https://cdn.jsdelivr.net/npm/masonry-layout@4.2.2/dist/masonry.pkgd.min.js&quot; integrity=&quot;sha384-GNFwBvfVxBkLMJpYMOABq3c+d3KnQxudP/mGPkzpZSTYykLBNsZEnG2D9G/X/+7D&quot; crossorigin=&quot;anonymous&quot; async&gt;&lt;/script&gt;
</code></pre>

<p>By adding <code>data-masonry='{"percentPosition": true }'</code> to the <code>.row</code> wrapper, we can combine the powers of Bootstrap's responsive grid and Masonry's positioning.</p>
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.0/forms/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Custom feedback styles apply custom colors, borders, focus styles, and backgroun
</div>
<div class="col-md-4">
<label for="validationCustomUsername" class="form-label">Username</label>
<div class="input-group">
<div class="input-group has-validation">
<span class="input-group-text" id="inputGroupPrepend">@</span>
<input type="text" class="form-control" id="validationCustomUsername" aria-describedby="inputGroupPrepend" required>
<div class="invalid-feedback">
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.0/utilities/position.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Here are some real life examples of these classes:
</button>

<button type="button" class="btn btn-dark position-relative">
Marker <svg width="1em" height="1em" viewBox="0 0 16 16" class="position-absolute top-100 left-50 translate-middle mt-1 bi bi-caret-down-fill" fill="#343a40" xmlns="http://www.w3.org/2000/svg"><path d="M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>
Marker <svg width="1em" height="1em" viewBox="0 0 16 16" class="position-absolute top-100 left-50 translate-middle mt-1 bi bi-caret-down-fill" fill="#212529" xmlns="http://www.w3.org/2000/svg"><path d="M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>
</button>

<button type="button" class="btn btn-primary position-relative">
Expand Down
24 changes: 6 additions & 18 deletions site/layouts/_default/404.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
<!doctype html>
<html lang="en">
<head>
{{ partial "header" . }}
</head>
<body class="d-flex flex-column min-vh-100">
{{ partial "skippy" . }}

{{ partial "docs-navbar" . }}

<main class="my-auto p-5" id="content">
{{ .Content }}
</main>

{{ partial "footer" . }}
{{ partial "scripts" . }}
</body>
</html>
{{ define "body_override" }}<body class="d-flex flex-column min-vh-100">{{ end }}
{{ define "main" }}
<main class="my-auto p-5" id="content">
{{ .Content }}
</main>
{{ end }}
20 changes: 20 additions & 0 deletions site/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!doctype html>
<html lang="en">
<head>
{{ partial "header" . }}
</head>
{{ block "body_override" . }}<body>{{ end }}
{{ partial "skippy" . }}

{{ partial "docs-navbar" . }}

{{ block "main" . }}
{{ end }}

{{ partial "footer" . }}
{{ partial "scripts" . }}

{{ block "footer" . }}
{{ end }}
</body>
</html>
101 changes: 45 additions & 56 deletions site/layouts/_default/docs.html
Original file line number Diff line number Diff line change
@@ -1,60 +1,49 @@
<!doctype html>
<html lang="en">
<head>
{{ partial "header" . }}
</head>
<body>
{{ partial "skippy" . }}

{{ partial "docs-navbar" . }}
{{ partial "docs-subnav" . }}

<div class="container-xxl my-md-4 bd-layout">
<aside class="bd-sidebar">
{{ partial "docs-sidebar" . }}
</aside>

<main class="bd-main order-1">
<div class="bd-intro pl-lg-4">
<div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
<a class="btn btn-sm btn-bd-light mb-2 mb-md-0" href="{{ .Site.Params.repo }}/blob/main/site/content/{{ .Page.File.Path | replaceRE `\\` "/" }}" title="View and edit this file on GitHub" target="_blank" rel="noopener">View on GitHub</a>
<h1 class="bd-title" id="content">{{ .Title | markdownify }}</h1>
</div>
<p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p>
{{ partial "ads" . }}
{{ define "main" }}
{{ partial "docs-subnav" . }}

<div class="container-xxl my-md-4 bd-layout">
<aside class="bd-sidebar">
{{ partial "docs-sidebar" . }}
</aside>

<main class="bd-main order-1">
<div class="bd-intro pl-lg-4">
<div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
<a class="btn btn-sm btn-bd-light mb-2 mb-md-0" href="{{ .Site.Params.repo }}/blob/main/site/content/{{ .Page.File.Path | replaceRE `\\` "/" }}" title="View and edit this file on GitHub" target="_blank" rel="noopener">View on GitHub</a>
<h1 class="bd-title" id="content">{{ .Title | markdownify }}</h1>
</div>

{{ if (eq .Page.Params.toc true) }}
<div class="bd-toc mt-4 mb-5 my-md-0 pl-xl-3 mb-lg-5 text-muted">
<strong class="d-block h6 my-2 pb-2 border-bottom">On this page</strong>
{{ .TableOfContents }}
<p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p>
{{ partial "ads" . }}
</div>

{{ if (eq .Page.Params.toc true) }}
<div class="bd-toc mt-4 mb-5 my-md-0 pl-xl-3 mb-lg-5 text-muted">
<strong class="d-block h6 my-2 pb-2 border-bottom">On this page</strong>
{{ .TableOfContents }}
</div>
{{ end }}

<div class="bd-content pl-lg-4">
{{ if .Page.Params.sections }}
<div class="row g-3">
{{ range .Page.Params.sections }}
<div class="col-md-6">
<a class="d-block text-decoration-none" href="../{{ urlize .title }}/">
<strong class="d-block h5 mb-0">{{ .title }}</strong>
<span class="text-secondary">{{ .description }}</span>
</a>
</div>
{{ end }}
</div>
{{ end }}

<div class="bd-content pl-lg-4">
{{ if .Page.Params.sections }}
<div class="row g-3">
{{ range .Page.Params.sections }}
<div class="col-md-6">
<a class="d-block text-decoration-none" href="../{{ urlize .title }}/">
<strong class="d-block h5 mb-0">{{ .title }}</strong>
<span class="text-secondary">{{ .description }}</span>
</a>
</div>
{{ end }}
</div>
{{ end }}

{{ .Content }}
</div>
</main>
</div>

{{ partial "footer" . }}
{{ partial "scripts" . }}

{{ range .Page.Params.extra_js -}}
<script{{ with .async }} async{{ end }} src="{{ .src }}"></script>
{{- end -}}
</body>
</html>
{{ .Content }}
</div>
</main>
</div>
{{ end }}
{{ define "footer" }}
{{ range .Page.Params.extra_js -}}
<script{{ with .async }} async{{ end }} src="{{ .src }}"></script>
{{- end -}}
{{ end }}
29 changes: 8 additions & 21 deletions site/layouts/_default/home.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
<!doctype html>
<html lang="en">
<head>
{{ partial "header" . }}
</head>
<body>
{{ partial "skippy" . }}

{{ partial "docs-navbar" . }}

<main>
{{ partial "home/masthead" . }}
{{ partial "home/masthead-followup" . }}
</main>

{{ .Content }}

{{ partial "footer" . }}
{{ partial "scripts" . }}
</body>
</html>
{{ define "main" }}
<main>
{{ partial "home/masthead" . }}
{{ partial "home/masthead-followup" . }}
</main>

{{ .Content }}
{{ end }}
12 changes: 1 addition & 11 deletions site/layouts/_default/redirect.html
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ .Page.Params.redirect | absURL }}</title>
<link rel="canonical" href="{{ .Page.Params.redirect | absURL }}">
<meta name="robots" content="noindex">
<meta http-equiv="refresh" content="0; url={{ .Page.Params.redirect | absURL }}">
</head>
</html>
{{ partial "redirect" (.Page.Params.redirect | absURL) }}
Loading

0 comments on commit 19e67c7

Please sign in to comment.