Skip to content

Commit

Permalink
Docs: replace twbs/bootstrap-npm-starter by `twbs/examples/tree/mai…
Browse files Browse the repository at this point in the history
…n/icons-font` (#37671)

* Docs: replace twbs/bootstrap-npm-starter by twbs/examples/tree/main/icons-font

* Revamp starter template to use new .icon-link, fix Bootstrap icon and text at top

* Remove extra CSS file

* Change links to twbs/examples

* Fix icon name

* Adjust icon link offset to more reasonable and scaling distance

Co-authored-by: Mark Otto <markdotto@gmail.com>
  • Loading branch information
julien-deramond and mdo authored Jan 4, 2023
1 parent 846d660 commit 8a35408
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 29 deletions.
2 changes: 1 addition & 1 deletion scss/helpers/_icon-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
gap: .375rem;
align-items: center;
text-decoration-color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, .5));
text-underline-offset: .5rem;
text-underline-offset: .25em;
backface-visibility: hidden;

> .bi {
Expand Down
87 changes: 71 additions & 16 deletions site/content/docs/5.3/examples/starter-template/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
---
layout: examples
title: Starter Template
extra_css:
- "starter-template.css"
---

<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="arrow-right-circle" viewBox="0 0 16 16">
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z"/>
</symbol>
<symbol id="bootstrap" viewBox="0 0 118 94">
<title>Bootstrap</title>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z"></path>
</symbol>
</svg>

<div class="col-lg-8 mx-auto p-4 py-md-5">
<header class="d-flex align-items-center pb-3 mb-5 border-bottom">
<a href="/" class="d-flex align-items-center text-dark text-decoration-none">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="me-2" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"></path></svg>
<a href="/" class="d-flex align-items-center text-body-emphasis text-decoration-none">
<svg class="bi me-2" width="40" height="32"><use xlink:href="#bootstrap"/></svg>
<span class="fs-4">Starter template</span>
</a>
</header>

<main>
<h1>Get started with Bootstrap</h1>
<h1 class="text-body-emphasis">Get started with Bootstrap</h1>
<p class="fs-5 col-md-8">Quickly and easily get started with Bootstrap's compiled, production-ready files with this barebones example featuring some basic HTML and helpful links. Download all our examples to get started.</p>

<div class="mb-5">
Expand All @@ -25,23 +33,70 @@ <h1>Get started with Bootstrap</h1>

<div class="row g-5">
<div class="col-md-6">
<h2>Starter projects</h2>
<h2 class="text-body-emphasis">Starter projects</h2>
<p>Ready to beyond the starter template? Check out these open source projects that you can quickly duplicate to a new GitHub repository.</p>
<ul class="icon-list ps-0">
<li class="d-flex align-items-start mb-1"><a href="https://github.com/twbs/bootstrap-npm-starter" rel="noopener" target="_blank">Bootstrap npm starter</a></li>
<li class="text-muted d-flex align-items-start mb-1">Bootstrap Parcel starter (coming soon!)</li>
<ul class="list-unstyled ps-0">
<li>
<a class="icon-link mb-1" href="https://github.com/twbs/examples/tree/main/icons-font" rel="noopener" target="_blank">
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
Bootstrap npm starter
</a>
</li>
<li>
<a class="icon-link mb-1" href="https://github.com/twbs/examples/tree/main/parcel" rel="noopener" target="_blank">
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
Bootstrap Parcel starter
</a>
</li>
<li>
<a class="icon-link mb-1" href="https://github.com/twbs/examples/tree/main/vite" rel="noopener" target="_blank">
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
Bootstrap Vite starter
</a>
</li>
<li>
<a class="icon-link mb-1" href="https://github.com/twbs/examples/tree/main/webpack" rel="noopener" target="_blank">
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
Bootstrap Webpack starter
</a>
</li>
</ul>
</div>

<div class="col-md-6">
<h2>Guides</h2>
<h2 class="text-body-emphasis">Guides</h2>
<p>Read more detailed instructions and documentation on using or contributing to Bootstrap.</p>
<ul class="icon-list ps-0">
<li class="d-flex align-items-start mb-1"><a href="{{< docsref "/getting-started/introduction" >}}">Bootstrap quick start guide</a></li>
<li class="d-flex align-items-start mb-1"><a href="{{< docsref "/getting-started/webpack" >}}">Bootstrap Webpack guide</a></li>
<li class="d-flex align-items-start mb-1"><a href="{{< docsref "/getting-started/parcel" >}}">Bootstrap Parcel guide</a></li>
<li class="d-flex align-items-start mb-1"><a href="{{< docsref "/getting-started/vite" >}}">Bootstrap Vite guide</a></li>
<li class="d-flex align-items-start mb-1"><a href="{{< docsref "/getting-started/contribute" >}}">Contributing to Bootstrap</a></li>
<ul class="list-unstyled ps-0">
<li>
<a class="icon-link mb-1" href="{{< docsref "/getting-started/introduction" >}}">
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
Bootstrap quick start guide
</a>
</li>
<li>
<a class="icon-link mb-1" href="{{< docsref "/getting-started/webpack" >}}">
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
Bootstrap Webpack guide
</a>
</li>
<li>
<a class="icon-link mb-1" href="{{< docsref "/getting-started/parcel" >}}">
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
Bootstrap Parcel guide
</a>
</li>
<li>
<a class="icon-link mb-1" href="{{< docsref "/getting-started/vite" >}}">
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
Bootstrap Vite guide
</a>
</li>
<li>
<a class="icon-link mb-1" href="{{< docsref "/getting-started/contribute" >}}">
<svg class="bi" width="16" height="16"><use xlink:href="#arrow-right-circle"/></svg>
Contributing to Bootstrap
</a>
</li>
</ul>
</div>
</div>
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion site/layouts/partials/callouts/info-npm-starter.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
**Get started with Bootstrap via npm with our starter project!** Head to the [twbs/bootstrap-npm-starter](https://github.com/twbs/bootstrap-npm-starter) template repository to see how to build and customize Bootstrap in your own npm project. Includes Sass compiler, Autoprefixer, Stylelint, PurgeCSS, and Bootstrap Icons.
**Get started with Bootstrap via npm with our starter project!** Head to the [Sass & JS example](https://github.com/twbs/examples/tree/main/sass-js) template repository to see how to build and customize Bootstrap in your own npm project. Includes Sass compiler, Autoprefixer, Stylelint, PurgeCSS, and Bootstrap Icons.
2 changes: 1 addition & 1 deletion site/layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h5>Projects</h5>
<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 }}/examples/">Examples repo</a></li>
</ul>
</div>
<div class="col-6 col-lg-2 mb-3">
Expand Down
2 changes: 1 addition & 1 deletion site/layouts/partials/home/get-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2 class="display-5 mb-3 fw-semibold lh-sm">Get started any way you&nbsp;want</
<svg class="bi mb-2 fs-2 text-muted"><use xlink:href="#box-seam"></use></svg>
<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.
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/examples/">use any demo from our Examples repo</a> to quickly jumpstart Bootstrap projects.
</p>
{{ highlight (printf ("npm install bootstrap@%s") .Site.Params.current_version) "sh" "" }}
{{ highlight (printf ("gem install bootstrap -v %s") .Site.Params.current_ruby_version) "sh" "" }}
Expand Down

0 comments on commit 8a35408

Please sign in to comment.