Compare commits
3 commits
main
...
playground
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
daeddd51f0 | ||
|
|
1bf7999a41 | ||
|
|
aed0ff265b |
2 changed files with 178 additions and 0 deletions
92
site/content/docs/5.0/examples/playground/index.html
Normal file
92
site/content/docs/5.0/examples/playground/index.html
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
---
|
||||
layout: examples
|
||||
title: Playground
|
||||
extra_css:
|
||||
- "playground.css"
|
||||
---
|
||||
|
||||
<div class="list-group my-5 mx-auto">
|
||||
<div class="list-group-item d-flex align-items-center">
|
||||
<div class="mb-0">Item with switch</div>
|
||||
<div class="form-check form-switch ml-auto" style="font-size: 1.25rem;">
|
||||
<input class="form-check-input ml-0" type="checkbox" id="playgroundSwitch1" checked>
|
||||
<label class="visually-hidden" for="playgroundSwitch1">Switch label</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-group-item d-flex align-items-center">
|
||||
<div class="mb-0">Another with switch</div>
|
||||
<div class="form-check form-switch ml-auto" style="font-size: 1.25rem;">
|
||||
<input class="form-check-input ml-0" type="checkbox" id="playgroundSwitch2">
|
||||
<label class="visually-hidden" for="playgroundSwitch2">Another switch label</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-group-item d-flex align-items-center">
|
||||
<div class="mb-0">Choose an option</div>
|
||||
<div class="d-flex align-items-center ml-auto">
|
||||
<span class="text-muted">Selected</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" class="bi bi-chevron-right" viewBox="0 0 20 20">
|
||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16l6-6-6-6"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="button-group my-5 mx-auto">
|
||||
<button type="button" class="button-group-item active">Selected</button>
|
||||
<button type="button" class="button-group-item">Second</button>
|
||||
<button type="button" class="button-group-item">Third</button>
|
||||
</div>
|
||||
|
||||
<div class="p-5 mx-auto">
|
||||
<nav class="btn-group d-flex justify-content-center mb-n3 rounded">
|
||||
<button class="btn btn-outline-primary active" type="button">Selected</button>
|
||||
<button class="btn btn-outline-primary" type="button">Second</button>
|
||||
<button class="btn btn-outline-primary" type="button">Third</button>
|
||||
</nav>
|
||||
<div class="border rounded p-5 bg-light">
|
||||
Example of a well with macOS style segmented nav above.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="carouselExampleIndicators" class="carousel slide mx-auto" data-bs-ride="carousel">
|
||||
<ol class="carousel-indicators d-flex justify-content-end mx-0 mb-1">
|
||||
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active"></li>
|
||||
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1"></li>
|
||||
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2"></li>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100 rounded" color="#555" background="#777" text="First slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100 rounded" color="#444" background="#666" text="Second slide" >}}
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100 rounded" color="#333" background="#555" text="Third slide" >}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="position-relative my-5 mx-auto bg-dark" style="width: 375px; height: 812px; border-radius: 1.5rem;">
|
||||
<div class="text-center p-3">
|
||||
<button type="button" class="btn btn-lg btn-primary" data-bs-toggle="modal" data-bs-target="#modal">Show</button>
|
||||
</div>
|
||||
|
||||
<div class="modal modal-sheet" tabindex="-1" role="dialog" id="modal">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header border-bottom-0">
|
||||
<h5 class="modal-title">Modal title</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body py-0">
|
||||
<p>This is a modal sheet, a variation of the modal that docs itself to the bottom of the viewport like the newer share sheets in iOS.</p>
|
||||
</div>
|
||||
<div class="modal-footer flex-column border-top-0">
|
||||
<button type="button" class="btn btn-lg btn-primary w-100 mx-0 mb-2">Save changes</button>
|
||||
<button type="button" class="btn btn-lg btn-link w-100 mx-0" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
86
site/content/docs/5.0/examples/playground/playground.css
Normal file
86
site/content/docs/5.0/examples/playground/playground.css
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
/* stylelint-disable declaration-no-important */
|
||||
|
||||
body > div {
|
||||
max-width: 40rem;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
/* margin-bottom: -50%; */
|
||||
}
|
||||
|
||||
.btn-group > .btn {
|
||||
flex: 0;
|
||||
}
|
||||
|
||||
.btn-outline-primary:not(:hover) {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.carousel-indicators {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.carousel-indicators li {
|
||||
width: .5rem;
|
||||
height: .5rem;
|
||||
background-color: currentColor;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.carousel-indicators li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
|
||||
.modal-sheet {
|
||||
position: absolute;
|
||||
/* display: block; */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modal-sheet .modal-dialog {
|
||||
position: absolute;
|
||||
right: .5rem;
|
||||
bottom: -100%;
|
||||
left: .5rem;
|
||||
margin-bottom: .5rem;
|
||||
box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
|
||||
transition: bottom .75s ease-in-out;
|
||||
}
|
||||
|
||||
.modal-sheet.show .modal-dialog {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
.modal-sheet .modal-content {
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.modal-sheet .modal-footer {
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* Hack for now */
|
||||
.modal-backdrop { display: none !important; }
|
||||
|
||||
|
||||
.button-group {
|
||||
display: flex;
|
||||
padding: .1em;
|
||||
background-color: rgba(0, 0, 0, .1);
|
||||
border: 1px solid rgba(0, 0, 0, .1);
|
||||
border-radius: 4rem;
|
||||
}
|
||||
.button-group-item {
|
||||
flex: 1 1 0;
|
||||
padding: .375rem .75rem;
|
||||
background: none;
|
||||
border: 0;
|
||||
}
|
||||
.button-group-item.active {
|
||||
background-color: #fff;
|
||||
border-radius: 3.9rem;
|
||||
box-shadow: 0 .1em .2em rgba(0, 0, 0, .1);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue