Skip to content

Commit 46bb9e7

Browse files
mdoXhmikosR
authored andcommitted
Fix homepage npm install snippet
1 parent ab37f63 commit 46bb9e7

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

site/assets/scss/_masthead.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,22 @@
2626
}
2727

2828
.highlight {
29-
padding: .5rem 4rem .5rem 1rem;
30-
line-height: 1.25;
29+
width: 100%;
30+
padding: .5rem 1rem;
31+
overflow: hidden;
32+
text-overflow: ellipsis;
33+
white-space: nowrap;
3134
background-color: rgba(var(--bs-body-color-rgb), .075);
3235
@include border-radius(.5rem);
36+
37+
@include media-breakpoint-up(lg) {
38+
padding-right: 4rem;
39+
}
3340
}
3441
.btn-clipboard {
35-
margin-top: .4rem;
42+
position: absolute;
43+
top: -.125rem;
44+
right: 0;
3645
background-color: transparent;
3746
}
3847

site/layouts/partials/home/masthead.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ <h1 class="mb-3 fw-semibold">Build fast, responsive sites with&nbsp;Bootstrap</h
1010
<p class="lead mb-4">
1111
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.
1212
</p>
13-
<div class="d-flex flex-column flex-md-row align-items-md-stretch justify-content-md-center gap-3 mb-4">
14-
<div class="d-inline-block v-align-middle fs-5" style="min-width: fit-content;">
15-
{{ highlight (printf ("npm install bootstrap@%s") .Site.Params.current_version) "sh" "" }}
13+
<div class="d-flex flex-column flex-lg-row align-items-md-stretch justify-content-md-center gap-3 mb-4">
14+
<div class="d-inline-block v-align-middle fs-5">
15+
{{ highlight (printf ("npm i bootstrap@%s") .Site.Params.current_version) "sh" "" }}
1616
</div>
1717
<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');">
1818
<svg class="bi me-2" aria-hidden="true"><use xlink:href="#book-half"></use></svg>

0 commit comments

Comments
 (0)