mirror of
https://github.com/tabler/tabler.git
synced 2026-07-29 14:34:37 +04:00
typography, alerts, card actions
This commit is contained in:
@@ -55,13 +55,12 @@ Add the `alert-link` class to any links inside the alert box to create "matching
|
|||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
||||||
### Alert with avatar
|
### Alert with avatar
|
||||||
{% assign person = site.data.people[1] %}
|
|
||||||
{% example %}
|
{% example %}
|
||||||
{% for variant in site.variants %}
|
{% for variant in site.variants %}
|
||||||
{% capture variant-text %}
|
{% capture variant-text %}
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
{% include ui/alert.html type=variant.name text=variant-text avatar=true person=person %}
|
{% include ui/alert.html type=variant.name text=variant-text person-id=forloop.index %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
{% assign person = include.person %}
|
|
||||||
<div class="alert alert-{{ include.type | default: 'primary'}}{%if include.close %} alert-dismissible{% endif %}{% if include.avatar %} alert-avatar{% endif %}" role="alert">
|
<div class="alert alert-{{ include.type | default: 'primary'}}{%if include.close %} alert-dismissible{% endif %}{% if include.avatar %} alert-avatar{% endif %}" role="alert">
|
||||||
{% if include.avatar %}{% include ui/avatar.html person=person %}{% endif %}
|
{% if include.person-id %}{% include ui/avatar.html person-id=include.person-id %}{% endif %}
|
||||||
{% if include.icon %}{% include ui/icon.html icon=include.icon class="mr-1" %}{% endif %} {{ include.text | default:
|
{% if include.icon %}
|
||||||
"This is a custom alert box!" }}
|
{% include ui/icon.html icon=include.icon class="mr-1" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ include.text | default: "This is a custom alert box!" }}
|
||||||
|
|
||||||
{% if include.buttons %}
|
{% if include.buttons %}
|
||||||
<div class="btn-list">
|
<div class="btn-list">
|
||||||
<a href="#" class="btn btn-success">Save changes</a>
|
<a href="#" class="btn btn-success">Save changes</a>
|
||||||
<a href="#" class="btn btn-secondary">Cancel</a>
|
<a href="#" class="btn btn-secondary">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if include.close %}<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>{% endif %}
|
{% if include.close %}<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">
|
||||||
|
Configuration
|
||||||
|
</h3>
|
||||||
|
<div class="card-actions">
|
||||||
|
<a href="#">
|
||||||
|
Edit configuration{% include ui/icon.html icon="edit" class="ml-1" %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<dl class="row">
|
||||||
|
<dt class="col-5">Date:</dt>
|
||||||
|
<dd class="col-7">2020-01-05 16:42:29 UTC</dd>
|
||||||
|
|
||||||
|
<dt class="col-5">Account:</dt>
|
||||||
|
<dd class="col-7">tabler</dd>
|
||||||
|
|
||||||
|
<dt class="col-5">Location:</dt>
|
||||||
|
<dd class="col-7">{% include ui/flag.html flag="pl" %} Poland</dd>
|
||||||
|
|
||||||
|
<dt class="col-5">IP Address:</dt>
|
||||||
|
<dd class="col-7">46.113.11.3</dd>
|
||||||
|
|
||||||
|
<dt class="col-5">Operating system:</dt>
|
||||||
|
<dd class="col-7">OS X 10.15.2 64-bit</dd>
|
||||||
|
|
||||||
|
<dt class="col-5">Browser:</dt>
|
||||||
|
<dd class="col-7">Chrome</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -183,6 +183,9 @@ $container-max-widths: (
|
|||||||
|
|
||||||
//alerts
|
//alerts
|
||||||
$alert-link-font-weight: $font-weight-bold !default;
|
$alert-link-font-weight: $font-weight-bold !default;
|
||||||
|
$alert-bg-level: -8 !default;
|
||||||
|
$alert-border-level: -6 !default;
|
||||||
|
$alert-color-level: 8 !default;
|
||||||
|
|
||||||
//breadcrumb
|
//breadcrumb
|
||||||
$breadcrumb-variants: (
|
$breadcrumb-variants: (
|
||||||
|
|||||||
@@ -118,6 +118,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-actions {
|
||||||
|
margin-left: auto;
|
||||||
|
font-size: $h5-font-size;
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.card-header {
|
.card-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -51,6 +51,14 @@ blockquote {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dl {
|
||||||
|
dd {
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
background: rgba($code-color, .03);
|
background: rgba($code-color, .03);
|
||||||
|
|||||||
Reference in New Issue
Block a user