Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add the version in npm/yarn commands #36345

Merged
merged 2 commits into from May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -48,8 +48,8 @@ Several quick start options are available:

- [Download the latest release](https://github.com/twbs/bootstrap/archive/v5.2.0-beta1.zip)
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap`
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap@v5.2.0-beta1`
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@v5.2.0-beta1`
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:5.2.0-beta1`
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`

Expand Down
15 changes: 12 additions & 3 deletions site/assets/scss/_masthead.scss
Expand Up @@ -26,13 +26,22 @@
}

.highlight {
padding: .5rem 4rem .5rem 1rem;
line-height: 1.25;
width: 100%;
padding: .5rem 1rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background-color: rgba(var(--bs-body-color-rgb), .075);
@include border-radius(.5rem);

@include media-breakpoint-up(lg) {
padding-right: 4rem;
}
}
.btn-clipboard {
margin-top: .4rem;
position: absolute;
top: -.125rem;
right: 0;
background-color: transparent;
}

Expand Down
4 changes: 2 additions & 2 deletions site/content/docs/5.2/getting-started/download.md
Expand Up @@ -59,7 +59,7 @@ Pull in Bootstrap's **source files** into nearly any project with some of the mo
Install Bootstrap in your Node.js powered apps with [the npm package](https://www.npmjs.com/package/bootstrap):

```sh
npm install bootstrap
npm install bootstrap@{{< param "current_version" >}}
```

`const bootstrap = require('bootstrap')` or `import bootstrap from 'bootstrap'` will load all of Bootstrap's plugins onto a `bootstrap` object.
Expand All @@ -79,7 +79,7 @@ Bootstrap's `package.json` contains some additional metadata under the following
Install Bootstrap in your Node.js powered apps with [the yarn package](https://yarnpkg.com/en/package/bootstrap):

```sh
yarn add bootstrap
yarn add bootstrap@{{< param "current_version" >}}
```

### RubyGems
Expand Down
2 changes: 1 addition & 1 deletion site/layouts/partials/home/masthead-followup.html
Expand Up @@ -22,7 +22,7 @@ <h3 class="fw-semibold">Install via package manager</h3>
<p class="pe-lg-5">
Install Bootstrap’s source Sass and JavaScript files via npm, RubyGems, Composer, or Meteor. Package managed installs don’t include documentation or our full build scripts. You can also <a href="https://github.com/twbs/bootstrap-npm-starter">use our npm template repo</a> to quickly generate a Bootstrap project via npm.
</p>
{{ highlight "npm install bootstrap" "sh" "" }}
{{ highlight (printf ("npm install bootstrap@%s") .Site.Params.current_version) "sh" "" }}
{{ highlight (printf ("gem install bootstrap -v %s") .Site.Params.current_ruby_version) "sh" "" }}
<p>
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/download/">Read our installation docs</a> for more info and additional package managers.
Expand Down
6 changes: 3 additions & 3 deletions site/layouts/partials/home/masthead.html
Expand Up @@ -10,9 +10,9 @@ <h1 class="mb-3 fw-semibold">Build fast, responsive sites with&nbsp;Bootstrap</h
<p class="lead mb-4">
Powerful, extensible, and feature-packed frontend toolkit. Build and customize with Sass, utilize prebuilt grid system and components, and bring projects to life with powerful JavaScript plugins.
</p>
<div class="d-flex flex-column flex-md-row align-items-md-stretch justify-content-md-center gap-3 mb-4">
<div class="d-inline-block v-align-middle fs-5" style="min-width: fit-content;">
{{ highlight "npm i bootstrap" "sh" "" }}
<div class="d-flex flex-column flex-lg-row align-items-md-stretch justify-content-md-center gap-3 mb-4">
<div class="d-inline-block v-align-middle fs-5">
{{ highlight (printf ("npm i bootstrap@%s") .Site.Params.current_version) "sh" "" }}
</div>
<a href="/docs/{{ .Site.Params.docs_version }}/getting-started/introduction/" class="btn btn-lg bd-btn-lg btn-bd-primary d-flex align-items-center justify-content-center fw-semibold" onclick="ga('send', 'event', 'Jumbotron actions', 'Get started', 'Get started');">
<svg class="bi me-2" aria-hidden="true"><use xlink:href="#book-half"></use></svg>
Expand Down