-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: Accordion | ||
--- | ||
|
||
<div class="card"> | ||
<div class="card-body"> | ||
|
||
<div class="accordion" id="accordion-example"> | ||
{% for i in (1..4) %} | ||
<div class="accordion-item"> | ||
<h2 class="accordion-header" id="heading-{{ i }}"> | ||
<button class="accordion-button {% unless i == 1 %}collapsed{% endunless %}" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-{{ i }}" aria-expanded="{% if i == 1 %}true{% else %}false{% endif %}"> | ||
Accordion Item #{{ i }} | ||
</button> | ||
</h2> | ||
<div id="collapse-{{ i }}" class="accordion-collapse collapse{% if i == 1 %} show{% endif %}" data-bs-parent="#accordion-example"> | ||
<div class="accordion-body pt-0"> | ||
<strong>This is the {% cycle 'first', 'second', 'third', 'fourth' %} item's accordion body.</strong> It is hidden by default, until the collapse plugin adds the appropriate classes that we use to style each element. These classes control the overall appearance, as well as the showing and hiding via CSS transitions. You can modify any of this with custom CSS or overriding our default variables. It's also worth noting that just about any HTML can go within the <code>.accordion-body</code>, though the transition does limit overflow. | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
|
||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.accordion-button { | ||
&:focus:not(:focus-visible) { | ||
outline: none; | ||
box-shadow: none; | ||
} | ||
|
||
&:after { | ||
opacity: $text-muted-opacity; | ||
} | ||
|
||
&:not(.collapsed) { | ||
font-weight: $font-weight-bold; | ||
border-bottom-color: transparent; | ||
|
||
&:after { | ||
opacity: 1; | ||
} | ||
} | ||
} |