提交 22e5fcb7 编写于 作者: C codecalm

newest bootstrap `data-XXX` => `data-bs-XXX` fixes

上级 5455cbd6
......@@ -2,7 +2,7 @@
import autosize from 'autosize';
const elements = document.querySelectorAll('[data-toggle="autosize"]');
const elements = document.querySelectorAll('[data-bs-toggle="autosize"]');
if (elements.length) {
elements.forEach(function (element) {
autosize(element);
......
......@@ -9,7 +9,7 @@ dropdowns.forEach(dropdown => {
dropdown.addEventListener('mousedown', (e) => {
e.stopPropagation();
if (e.target.dataset.toggle && e.target.dataset.toggle === 'dropdown') {
if (e.target.dataset.bsToggle && e.target.dataset.bsToggle === 'dropdown') {
currentTarget = e.currentTarget;
}
});
......
......@@ -7,7 +7,7 @@ import './dropdown';
(function() {
/**
*/
let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-toggle="tooltip"]'));
let tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTriggerList.map(function (tooltipTriggerEl) {
let options = {
delay: {show: 50, hide: 50},
......@@ -19,7 +19,7 @@ import './dropdown';
/**
*/
let popoverTriggerList = [].slice.call(document.querySelectorAll('[data-toggle="popover"]'));
let popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
popoverTriggerList.map(function (popoverTriggerEl) {
let options = {
delay: {show: 50, hide: 50},
......@@ -29,13 +29,13 @@ import './dropdown';
return new bootstrap.Popover(popoverTriggerEl, options);
});
let dropdownTriggerList = [].slice.call(document.querySelectorAll('[data-toggle="dropdown"]'));
let dropdownTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="dropdown"]'));
dropdownTriggerList.map(function (dropdownTriggerEl) {
return new bootstrap.Dropdown(dropdownTriggerEl);
});
let switchesTriggerList = [].slice.call(document.querySelectorAll('[data-toggle="switch-icon"]'));
let switchesTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="switch-icon"]'));
switchesTriggerList.map(function (switchTriggerEl) {
switchTriggerEl.addEventListener('click', (e) => {
e.stopPropagation();
......
......@@ -225,21 +225,21 @@ Create a dropdown button that will encourage users to click for more options. Yo
{% capture code %}
<div class="dropdown">
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown">
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
{% include ui/icon.html icon="calendar" %}
</button>
{% include ui/dropdown-menu.html %}
</div>
<div class="dropdown">
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown">
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
{% include ui/icon.html icon="calendar" %}Show calendar
</button>
{% include ui/dropdown-menu.html %}
</div>
<div class="dropdown">
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown">
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
Show calendar
</button>
{% include ui/dropdown-menu.html %}
......
......@@ -10,6 +10,6 @@ menu: docs.components.form-helpers
Use an input helper to display additional information about a form element. The text label will appear once a user hovers over the helper.
{% capture code %}
<span class="form-help" data-toggle="popover" data-placement="top" data-content="<p>ZIP Code must be US or CDN format. You can use an extended ZIP+4 code to determine address more accurately.</p><p class='mb-0'><a href=''>USP ZIP codes lookup tools</a></p>">?</span>
<span class="form-help" data-bs-toggle="popover" data-placement="top" data-content="<p>ZIP Code must be US or CDN format. You can use an extended ZIP+4 code to determine address more accurately.</p><p class='mb-0'><a href=''>USP ZIP codes lookup tools</a></p>">?</span>
{% endcapture %}
{% include example.html code=code %}
......@@ -11,16 +11,16 @@ bootstrap-link: components/tooltips/
Use the default markup to create tooltips that will help users understand particular elements of your interface. You can decide where the text label is to be displayed - at the top, bottom or on either side of the element.
{% capture code %}
<button type="button" class="btn" data-toggle="tooltip" data-placement="top" title="Tooltip on top">
<button type="button" class="btn" data-bs-toggle="tooltip" data-placement="top" title="Tooltip on top">
Tooltip on top
</button>
<button type="button" class="btn" data-toggle="tooltip" data-placement="right" title="Tooltip on right">
<button type="button" class="btn" data-bs-toggle="tooltip" data-placement="right" title="Tooltip on right">
Tooltip on right
</button>
<button type="button" class="btn" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">
<button type="button" class="btn" data-bs-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">
Tooltip on bottom
</button>
<button type="button" class="btn" data-toggle="tooltip" data-placement="left" title="Tooltip on left">
<button type="button" class="btn" data-bs-toggle="tooltip" data-placement="left" title="Tooltip on left">
Tooltip on left
</button>
{% endcapture %}
......@@ -32,7 +32,7 @@ Use the default markup to create tooltips that will help users understand partic
If the default tooltip is not enough, you can add the option to use HTML code in the text to highlight particular bits of information and make the content more attractive.
{% capture code %}
<button type="button" class="btn" data-toggle="tooltip" data-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">
<button type="button" class="btn" data-bs-toggle="tooltip" data-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>">
Tooltip with HTML
</button>
{% endcapture %}
......
......@@ -6,7 +6,7 @@
<!-- Cards navigation -->
<ul class="nav nav-tabs{% if include.bottom %} nav-tabs-bottom{% endif %}">
{% for tab in tabs %}
<li class="nav-item"><a href="#tab-{{ id }}-{{ tab }}" class="nav-link{% if forloop.first %} active{% endif %}" data-toggle="tab">Tab {{ tab }}</a></li>
<li class="nav-item"><a href="#tab-{{ id }}-{{ tab }}" class="nav-link{% if forloop.first %} active{% endif %}" data-bs-toggle="tab">Tab {{ tab }}</a></li>
{% endfor %}
</ul>
{% endcapture %}
......
......@@ -21,8 +21,8 @@
</p>
<div class="small">
<span class="text-success mr-1">+{{ forloop.index | random_number: 20, 50 }}</span>
<a href="#" data-toggle="tooltip" data-placement="top" title="Vote Up">{% include ui/icon.html icon="chevron-up" %}</a>
<a href="#" class="mr-1" data-toggle="tooltip" data-placement="top" title="Vote Down">
<a href="#" data-bs-toggle="tooltip" data-placement="top" title="Vote Up">{% include ui/icon.html icon="chevron-up" %}</a>
<a href="#" class="mr-1" data-bs-toggle="tooltip" data-placement="top" title="Vote Down">
{% include ui/icon.html icon="chevron-down" %}
</a>
<span class="mr-1">·</span>
......
......@@ -27,7 +27,7 @@
<div class="demo-icons-list-wrap">
<div class="demo-icons-list">
{% for icon in icons limit: limit %}
<a href="#" class="demo-icons-list-item" data-toggle-icon="{{ icon }}" title="{{ icon }}" data-icon-svg="{% capture svg %}{% highlight html %}{% include ui/icon.html icon=icon %}{% endhighlight %}{% endcapture %}{{ svg | escape }}">
<a href="#" class="demo-icons-list-item" data-bs-toggle-icon="{{ icon }}" title="{{ icon }}" data-icon-svg="{% capture svg %}{% highlight html %}{% include ui/icon.html icon=icon %}{% endhighlight %}{% endcapture %}{{ svg | escape }}">
{% include ui/icon.html icon=icon %}
<div class="mt-1 text-muted text-h5">{{ icon }}</div>
</a>
......@@ -52,7 +52,7 @@
};
(function () {
const elements = document.querySelectorAll('[data-toggle-icon]');
const elements = document.querySelectorAll('[data-bs-toggle-icon]');
if (elements.length) {
elements.forEach(function (element) {
......
......@@ -61,7 +61,7 @@
<td class="text-right">
<span class="dropdown">
<button class="btn dropdown-toggle align-text-top" data-boundary="viewport" data-toggle="dropdown">Actions</button>
<button class="btn dropdown-toggle align-text-top" data-boundary="viewport" data-bs-toggle="dropdown">Actions</button>
{% include ui/dropdown-menu.html right=true %}
</span>
</td>
......
<div class="card">
<div class="card-header">
<h4 class="card-title">Most Visited Pages</h4>
<h3 class="card-title">Most Visited Pages</h3>
</div>
<div class="table-responsive">
<table class="table card-table table-vcenter">
......
......@@ -27,7 +27,7 @@
</div>
<div class="col-auto lh-1">
<div class="dropdown">
<a href="#" class="link-secondary" data-toggle="dropdown">{% include ui/icon.html icon="dots" %}</a>
<a href="#" class="link-secondary" data-bs-toggle="dropdown">{% include ui/icon.html icon="dots" %}</a>
{% include ui/dropdown-menu.html right=true %}
</div>
</div>
......
......@@ -8,17 +8,17 @@
<ul class="social-links list-inline mb-0 mt-2">
<li class="list-inline-item">
<a href="#" title="Facebook" data-toggle="tooltip">
<a href="#" title="Facebook" data-bs-toggle="tooltip">
{% include ui/icon.html icon="brand-facebook" %}
</a>
</li>
<li class="list-inline-item">
<a href="#" title="Twitter" data-toggle="tooltip">
<a href="#" title="Twitter" data-bs-toggle="tooltip">
{% include ui/icon.html icon="brand-twitter" %}
</a>
</li>
<li class="list-inline-item">
<a href="#" title="1234567890" data-toggle="tooltip">
<a href="#" title="1234567890" data-bs-toggle="tooltip">
{% include ui/icon.html icon="phone" %}
</a>
</li>
......
{% assign services = 'Instagram:3550,Twitter:1798,Facebook:1245,TikTok:986,Pinterest:854,VK:650,Pinterest:420' | split: ',' %}
<div class="card">
<div class="card-header">
<h4 class="card-title">Social Media Traffic</h4>
<h3 class="card-title">Social Media Traffic</h3>
</div>
<table class="table card-table table-vcenter">
<thead>
......
......@@ -9,35 +9,35 @@
{% assign reverse = include.reverse | default: false %}
<div class="card">
<ul class="nav nav-tabs{% if include.alternative %} nav-tabs-alt{% endif %}{% if reverse %} flex-row-reverse{% endif %}{% if include.justified %} nav-fill{% endif %}" data-toggle="tabs">
<ul class="nav nav-tabs{% if include.alternative %} nav-tabs-alt{% endif %}{% if reverse %} flex-row-reverse{% endif %}{% if include.justified %} nav-fill{% endif %}" data-bs-toggle="tabs">
<li class="nav-item">
<a href="#tabs-home-{{ id }}" class="nav-link active" data-toggle="tab">{% if include.icons %}{% include ui/icon.html icon="home" class=icon-class %}{% endif %}{% unless include.hide-text %}Home{% endunless %}</a>
<a href="#tabs-home-{{ id }}" class="nav-link active" data-bs-toggle="tab">{% if include.icons %}{% include ui/icon.html icon="home" class=icon-class %}{% endif %}{% unless include.hide-text %}Home{% endunless %}</a>
</li>
<li class="nav-item">
<a href="#tabs-profile-{{ id }}" class="nav-link" data-toggle="tab">{% if include.icons %}{% include ui/icon.html icon="user" class=icon-class %}{% endif %}{% unless include.hide-text %}Profile{% endunless %}</a>
<a href="#tabs-profile-{{ id }}" class="nav-link" data-bs-toggle="tab">{% if include.icons %}{% include ui/icon.html icon="user" class=icon-class %}{% endif %}{% unless include.hide-text %}Profile{% endunless %}</a>
</li>
{% if include.activity %}
<li class="nav-item">
<a href="#tabs-activity-{{ id }}" class="nav-link" data-toggle="tab">{% if include.icons %}{% include ui/icon.html icon="activity" class=icon-class %}{% endif %}{% unless include.hide-text %}Activity{% endunless %}</a>
<a href="#tabs-activity-{{ id }}" class="nav-link" data-bs-toggle="tab">{% if include.icons %}{% include ui/icon.html icon="activity" class=icon-class %}{% endif %}{% unless include.hide-text %}Activity{% endunless %}</a>
</li>
{% endif %}
{% if include.disabled %}
<li class="nav-item">
<a href="#tabs-activity-{{ id }}" class="nav-link disabled" data-toggle="tab">{% if include.icons %}{% include ui/icon.html icon="x" class=icon-class %}{% endif %}{% unless include.hide-text %}Disabled{% endunless %}</a>
<a href="#tabs-activity-{{ id }}" class="nav-link disabled" data-bs-toggle="tab">{% if include.icons %}{% include ui/icon.html icon="x" class=icon-class %}{% endif %}{% unless include.hide-text %}Disabled{% endunless %}</a>
</li>
{% endif %}
{% if include.dropdown %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a>
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Dropdown</a>
{% include ui/dropdown-menu.html %}
</li>
{% endif %}
{% if include.settings %}
<li class="nav-item {% if reverse %}mr-auto{% else %}ml-auto{% endif %}">
<a href="#tabs-settings-{{ id }}" class="nav-link" title="Settings" data-toggle="tab">{% include ui/icon.html icon="settings" %}</a>
<a href="#tabs-settings-{{ id }}" class="nav-link" title="Settings" data-bs-toggle="tab">{% include ui/icon.html icon="settings" %}</a>
</li>
{% endif %}
</ul>
......
<div class="card">
<div class="card-header">
<h4 class="card-title">Tasks</h4>
<h3 class="card-title">Tasks</h3>
</div>
<div class="table-responsive">
<table class="table card-table table-vcenter">
......
......@@ -11,7 +11,7 @@
{% assign current-item = true %}
{% endif %}
<a href="{% if item.children %}#menu-{{ key }}{% else %}{{ site.base }}{{ item.url | relative_url }}{% endif %}" class="nav-link{% unless item.children %}{% if current-item %} active{% endif %}{% endunless %}"{% if item.children %} data-toggle="collapse" aria-expanded="{% if current-item %}true{% else %}false{% endif %}"{% endif %}>
<a href="{% if item.children %}#menu-{{ key }}{% else %}{{ site.base }}{{ item.url | relative_url }}{% endif %}" class="nav-link{% unless item.children %}{% if current-item %} active{% endif %}{% endunless %}"{% if item.children %} data-bs-toggle="collapse" aria-expanded="{% if current-item %}true{% else %}false{% endif %}"{% endif %}>
{% if item.icon %}
<span class="nav-link-icon">{% include ui/icon.html icon=item.icon %}</span>
{% endif %}
......
......@@ -31,7 +31,7 @@
<button class="btn" type="button">Go!</button>
</div>
<div class="input-group">
<button type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Action
</button>
{% include ui/dropdown-menu.html %}
......@@ -43,7 +43,7 @@
<div class="input-group">
<input type="text" class="form-control">
<button type="button" class="btn">Action</button>
<button data-toggle="dropdown" type="button" class="btn dropdown-toggle dropdown-toggle-split"></button>
<button data-bs-toggle="dropdown" type="button" class="btn dropdown-toggle dropdown-toggle-split"></button>
{% include ui/dropdown-menu.html right=true %}
</div>
</div>
......@@ -59,7 +59,7 @@
<input type="text" class="form-control" placeholder="Search for…">
</div>
<div class="col-auto align-self-center">
<span class="form-help" data-toggle="popover" data-placement="top"
<span class="form-help" data-bs-toggle="popover" data-placement="top"
data-content="<p>ZIP Code must be US or CDN format. You can use an extended ZIP+4 code to determine address more accurately.</p><p class='mb-0'><a href='#'>USP ZIP codes lookup tools</a></p>"
data-html="true">?</span>
</div>
......
......@@ -21,7 +21,7 @@
<button type="button" class="btn">Option 2</button>
<button type="button" class="btn btn-primary">Option 3</button>
<div class="btn-group" role="group">
<button id="btnGroupDrop1" type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button id="btnGroupDrop1" type="button" class="btn dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Other
</button>
<div class="dropdown-menu dropdown-menu-right">
......
{% assign prefix = include.prefix | default: 'navbar' %}
{% assign breakpoint = include.breakpoint | default: 'lg' %}
<a href="{{ site.base }}" class="{{ prefix }}-brand {{ prefix }}-brand-autodark{% if include.class %} {{ include.class }}{% endif %}">
{% unless include.hide-logo %}
{% capture class-attr %}class="{{ prefix }}-brand {{ prefix }}-brand-autodark{% if include.class %} {{ include.class }}{% endif %}"{% endcapture %}
{% if include.header %}
<h1 {{ class-attr }}>
<a href="{{ site.base }}">
{% else %}
<a href="{{ site.base }}" {{ class-attr }}>
{% endif %}
{% unless include.hide-logo %}
{% if include.small-logo %}
<img src="{{ site.base }}/static/logo-small{% if include.dark %}-white{% endif %}.svg" width="32" height="32" alt="{{ site.title }}" class="navbar-brand-image{% if include.show-title %} mr-3{% endif %}">
<img src="{{ site.base }}/static/logo-small{% if include.dark %}-white{% endif %}.svg" width="32" height="32" alt="{{ site.title }}" class="navbar-brand-image{% if include.show-title %} mr-3{% endif %}">
{% else %}
<img src="{{ site.base }}/static/logo{% if include.dark %}-white{% endif %}.svg" width="110" height="32" alt="{{ site.title }}" class="navbar-brand-image{% if include.show-title %} mr-3{% endif %}">
<img src="{{ site.base }}/static/logo{% if include.dark %}-white{% endif %}.svg" width="110" height="32" alt="{{ site.title }}" class="navbar-brand-image{% if include.show-title %} mr-3{% endif %}">
{% endif %}
{% endunless %}
{% endunless %}
{% if include.show-title %}
{% if include.show-title %}
Dashboard
{% endif %}
{% endif %}
{% if include.header %}
</a>
</h1>
{% else %}
</a>
{% endif %}
\ No newline at end of file
......@@ -11,7 +11,7 @@
{% for level-1 in menu %}
{% assign icon = level-1[1].icon %}
<li class="nav-item{% if level-1[0] == current-page[0] or level-1[1].active %} active{% endif %}{% if level-1[1].children %} dropdown{% endif %}">
<a class="nav-link{% if level-1[1].children %} dropdown-toggle{% endif %}{% if level-1[1].disabled %} disabled{% endif %}" {% if level-1[1].children %}href="#navbar-{{ level-1[0] }}" data-toggle="dropdown" role="button" aria-expanded="{% if include.auto-open and level-1[0] == current-page[0] %}true{% else %}false{% endif %}" {% else %}href="{{ site.base }}/{{ level-1[1].url }}" {% endif %}>
<a class="nav-link{% if level-1[1].children %} dropdown-toggle{% endif %}{% if level-1[1].disabled %} disabled{% endif %}" {% if level-1[1].children %}href="#navbar-{{ level-1[0] }}" data-bs-toggle="dropdown" role="button" aria-expanded="{% if include.auto-open and level-1[0] == current-page[0] %}true{% else %}false{% endif %}" {% else %}href="{{ site.base }}/{{ level-1[1].url }}" {% endif %}>
{% unless hide-icons %}
<span class="nav-link-icon d-md-none d-lg-inline-block">{% include ui/icon.html icon=icon %}</span>
{% endunless %}
......@@ -47,7 +47,7 @@
{% if level-2[1].children %}<div class="dropright">{% endif %}
<a class="dropdown-item{% if level-2[1].children %} dropdown-toggle{% endif %}{% if level-1[0] == current-page[0] and level-2[0] == current-page[1] and current-page.size == 2 %} active{% endif %}" {% if level-2[1].children %}href="#sidebar-{{ level-2[0] }}" data-toggle="dropdown" role="button" aria-expanded="false" {% else %}href="{{ site.base }}/{{ level-2[1].url }}" {% endif %}>
<a class="dropdown-item{% if level-2[1].children %} dropdown-toggle{% endif %}{% if level-1[0] == current-page[0] and level-2[0] == current-page[1] and current-page.size == 2 %} active{% endif %}" {% if level-2[1].children %}href="#sidebar-{{ level-2[0] }}" data-bs-toggle="dropdown" role="button" aria-expanded="false" {% else %}href="{{ site.base }}/{{ level-2[1].url }}" {% endif %}>
{{ level-2[1].title }}
</a>
......@@ -70,7 +70,7 @@
{% comment %}
<li class="nav-item d-none-navbar-vertical">
<a href="#" class="nav-link" data-toggle="modal" data-target="#modal-customize">
<a href="#" class="nav-link" data-bs-toggle="modal" data-target="#modal-customize">
<span class="nav-link-icon">{% include ui/icon.html icon="adjustments" %}</span>
<span class="nav-link-title">Customize</span>
</a>
......
......@@ -2,7 +2,7 @@
{% assign person = site.data.people[person-id] %}
<div class="navbar-nav flex-row{% if include.class %} {{ include.class }}{% endif %}">
<div class="nav-item dropdown d-none d-md-flex mr-3">
<a href="#" class="nav-link px-0" data-toggle="dropdown" tabindex="-1">
<a href="#" class="nav-link px-0" data-bs-toggle="dropdown" tabindex="-1">
{% include ui/icon.html icon="bell" %}
<span class="badge bg-red"></span>
</a>
......@@ -12,7 +12,7 @@
</div>
<div class="nav-item dropdown">
<a href="#" class="nav-link d-flex lh-1 text-reset p-0" data-toggle="dropdown">
<a href="#" class="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown">
{% include ui/avatar.html person-id=person-id size="sm" %}
{% unless include.hide-username %}
......
<button class="navbar-toggler" type="button" data-toggle="collapse"{% if include.target %} data-target="#{{ include.target }}"{% endif %}>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"{% if include.target %} data-target="#{{ include.target }}"{% endif %}>
<span class="navbar-toggler-icon"></span>
</button>
\ No newline at end of file
......@@ -10,7 +10,7 @@
{% include layout/navbar-toggler.html target="navbar-menu" %}
{% unless include.hide-brand %}
{% include layout/navbar-logo.html dark=include.dark small-logo=include.small-logo hide-logo=include.hide-logo class="d-none-navbar-horizontal pr-0 pr-md-3" breakpoint=breakpoint show-title=include.show-title %}
{% include layout/navbar-logo.html dark=include.dark small-logo=include.small-logo hide-logo=include.hide-logo class="d-none-navbar-horizontal pr-0 pr-md-3" breakpoint=breakpoint show-title=include.show-title header=true %}
{% endunless %}
{% include layout/navbar-side.html class="order-md-last" hide-username=include.hide-username person-id=include.person-id %}
......
......@@ -5,7 +5,7 @@
{% include layout/navbar-toggler.html target="navbar-menu" %}
{% unless include.hide-brand %}
{% include layout/navbar-logo.html dark=include.dark breakpoint=breakpoint %}
{% include layout/navbar-logo.html dark=include.dark breakpoint=breakpoint header=true %}
{% endunless %}
{% include layout/navbar-side.html class="d-lg-none" hide-username=include.hide-username person-id=include.person-id %}
......
<div class="dropdown">
<a class="dropdown-toggle text-muted" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ include.value | default: 'Last 7 days' }}</a>
<a class="dropdown-toggle text-muted" href="#" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ include.value | default: 'Last 7 days' }}</a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item active" href="#">Last 7 days</a>
<a class="dropdown-item" href="#">Last 30 days</a>
......
......@@ -21,6 +21,6 @@
{% endif %}
{% assign el = 'span' %}
{% if link %}{% assign el = 'a' %}{% endif %}
<{{ el }} class="avatar{% if include['size'] %} avatar-{{ include['size'] }}{% endif %}{% if include.thumb %} avatar-thumb{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.shape %} {{ include.shape }}{% endif %}{% if include.color %} bg-{{ include.color }}-lt{% endif %}{% if include.rounded %} avatar-rounded{% endif %}"{% if src %} style="background-image: url({{ site.base }}/{{ src }})"{% endif %}{% if include.dropdown %} data-toggle="dropdown"{% endif %}>{% if include.status %}
<{{ el }} class="avatar{% if include['size'] %} avatar-{{ include['size'] }}{% endif %}{% if include.thumb %} avatar-thumb{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.shape %} {{ include.shape }}{% endif %}{% if include.color %} bg-{{ include.color }}-lt{% endif %}{% if include.rounded %} avatar-rounded{% endif %}"{% if src %} style="background-image: url({{ site.base }}/{{ src }})"{% endif %}{% if include.dropdown %} data-bs-toggle="dropdown"{% endif %}>{% if include.status %}
<span class="badge bg-{{ include.status }}">{% if include.status-text %}{{ include.status-text }}{% elsif include.status-icon %}{% include ui/icon.html icon=include.status-icon class="avatar-status-icon" %}{% endif %}</span>{% endif %}{% if placeholder %}{{ placeholder }}{% elsif include.icon %}{% include ui/icon.html icon=include.icon class="avatar-icon" %}{% endif %}</{{ el }}>
{% endremoveemptylines %}
......@@ -19,7 +19,7 @@
{% endif %}
{% assign e = include.element | default: 'a' %}
<{{ e }}{% if e == 'a' %} href="{{ href }}"{% endif %}{% if include.type %} type="{{ include.type }}"{% endif %} class="btn{% if include.height %} btn-{{ include.height }}{% endif %}{% if color %} btn-{% if include.outline %}outline-{% elsif include.ghost %}ghost-{% endif %}{{ color }}{% endif %}{% if include.disabled %} disabled{% endif %}{% if include.square %} btn-square{% endif %}{% if include.loading %} btn-loading{% endif %}{% if include.pill %} btn-pill{% endif %}{% if include['size'] %} btn-{{ include['size'] }}{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.block %} w-100{% endif %}{% if include.link %} btn-link{% endif %}{% if include.icon-only %} btn-icon{% endif %}"{% if include.external %} target="_blank" rel="noreferrer"{% endif %}{% if include.modal-id %} data-toggle="modal" data-target="#modal-{{ include.modal-id }}"{% endif %}{% if include.icon-only %} aria-label="{{ include.text | default: "Button" }}"{% endif %}{% if include.dismiss %} data-dismiss="modal"{% endif %}>
<{{ e }}{% if e == 'a' %} href="{{ href }}"{% endif %}{% if include.type %} type="{{ include.type }}"{% endif %} class="btn{% if include.height %} btn-{{ include.height }}{% endif %}{% if color %} btn-{% if include.outline %}outline-{% elsif include.ghost %}ghost-{% endif %}{{ color }}{% endif %}{% if include.disabled %} disabled{% endif %}{% if include.square %} btn-square{% endif %}{% if include.loading %} btn-loading{% endif %}{% if include.pill %} btn-pill{% endif %}{% if include['size'] %} btn-{{ include['size'] }}{% endif %}{% if include.class %} {{ include.class }}{% endif %}{% if include.block %} w-100{% endif %}{% if include.link %} btn-link{% endif %}{% if include.icon-only %} btn-icon{% endif %}"{% if include.external %} target="_blank" rel="noreferrer"{% endif %}{% if include.modal-id %} data-bs-toggle="modal" data-target="#modal-{{ include.modal-id }}"{% endif %}{% if include.icon-only %} aria-label="{{ include.text | default: "Button" }}"{% endif %}{% if include.dismiss %} data-dismiss="modal"{% endif %}>
{% if include.spinner %}
{% include ui/spinner.html color=false size="sm" class=spinner-class element="span" %}{% endif %}
{% if include.icon %}{% include ui/icon.html icon=include.icon use-svg=true color=include.icon-color %}{% endif %}
......
{% assign menu = include.menu | default: 'Import,Export,Download,Another action' | split: ',' %}
{% assign icon = include.icon | default: 'dots-vertical' %}
<div class="dropdown{% if include.class %} {{ include.class }}{% endif %}">
<a href="#" class="card-dropdown" data-toggle="dropdown" aria-expanded="false">
<a href="#" class="card-dropdown" data-bs-toggle="dropdown" aria-expanded="false">
{% include ui/icon.html icon=icon %}
</a>
<div class="dropdown-menu dropdown-menu-right">
......
......@@ -31,7 +31,7 @@
{% assign icon = b[0] %}
{% assign description = b[1] %}
<a href="#" class="link-secondary{% unless forloop.first %} ml-2{% endunless %}{% if forloop.index == 3 %} disabled{% endif %}" title="{{ description }}" data-toggle="tooltip">{% include ui/icon.html icon=icon %}</a>
<a href="#" class="link-secondary{% unless forloop.first %} ml-2{% endunless %}{% if forloop.index == 3 %} disabled{% endif %}" title="{{ description }}" data-bs-toggle="tooltip">{% include ui/icon.html icon=icon %}</a>
{% endfor %}
</span>
{% endif %}
......
<textarea class="form-control{% if include.class %} {{ include.class }}{% endif %}" data-toggle="autosize" placeholder="{{ include.placeholder | default: 'Type something…' }}"{% if include.rows %} rows="{{ include.rows }}"{% endif %}></textarea>
<textarea class="form-control{% if include.class %} {{ include.class }}{% endif %}" data-bs-toggle="autosize" placeholder="{{ include.placeholder | default: 'Type something…' }}"{% if include.rows %} rows="{{ include.rows }}"{% endif %}></textarea>
......@@ -4,7 +4,7 @@
{% for i in (1..count) %}
{% assign elem = 'a' %}
{% if i > active %}{% assign elem = 'span' %}{% endif %}
<{{ elem }} href="#" class="step-item{% if i == active %} active{% endif %}"{% if include.show-tooltip %} data-toggle="tooltip" title="Step {{ i }} description"{% endif %}>{% if include.show-title %}
<{{ elem }} href="#" class="step-item{% if i == active %} active{% endif %}"{% if include.show-tooltip %} data-bs-toggle="tooltip" title="Step {{ i }} description"{% endif %}>{% if include.show-title %}
Step {{ i }}
{% endif %}</{{ elem }}>
{% endfor %}
......
......@@ -9,7 +9,7 @@
{% assign icon-b-class = include.icon-b-class %}
{% endif %}
<button class="switch-icon{% if include.variant %} switch-icon-{{ include.variant }}{% endif %}" data-toggle="switch-icon">
<button class="switch-icon{% if include.variant %} switch-icon-{{ include.variant }}{% endif %}" data-bs-toggle="switch-icon">
<span class="switch-icon-a text-{{ icon-a-color }}">
{% include ui/icon.html icon=icon %}
</span>
......
......@@ -72,7 +72,7 @@
<div class="btn-list flex-nowrap">
{% include ui/button.html text="Edit" %}
<div class="dropdown">
<button class="btn dropdown-toggle align-text-top" data-boundary="viewport" data-toggle="dropdown">
<button class="btn dropdown-toggle align-text-top" data-boundary="viewport" data-bs-toggle="dropdown">
Actions
</button>
{% include ui/dropdown-menu.html right=true %}
......
{% assign person-id = include.person-id | default: 2 %}
{% assign person = site.data.people[person-id] %}
<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true" data-autohide="false" data-toggle="toast">
<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true" data-autohide="false" data-bs-toggle="toast">
{% unless include.hide-header %}
<div class="toast-header">
{% include ui/avatar.html person=person class="mr-2" size="xs" %}
......
......@@ -256,6 +256,7 @@ Navbar brand
display: inline-flex;
align-items: center;
font-weight: $navbar-brand-font-weight;
margin: 0;
}
.navbar-brand-image {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册