mirror of
https://github.com/tabler/tabler.git
synced 2025-12-22 01:44:25 +04:00
@@ -136,3 +136,12 @@ Make the list stack once a certain number of avatars is reached to make it look
|
|||||||
</div>
|
</div>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
{% include example.html code=code centered=true %}
|
{% include example.html code=code centered=true %}
|
||||||
|
|
||||||
|
{% capture code %}
|
||||||
|
<div class="avatar-list avatar-list-stacked">
|
||||||
|
{% for person in site.data.people limit: 8 offset: 10 %}
|
||||||
|
{% include ui/avatar.html person=person element="a" class="rounded-circle" size="sm" %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endcapture %}
|
||||||
|
{% include example.html code=code centered=true %}
|
||||||
|
|||||||
@@ -21,6 +21,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% assign el = 'span' %}
|
{% assign el = 'span' %}
|
||||||
{% if link %}{% assign el = 'a' %}{% endif %}
|
{% 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-bs-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 %} 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 }}>
|
<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 %}
|
{% endremoveemptylines %}
|
||||||
|
|||||||
@@ -384,6 +384,7 @@ $aspect-ratios: (
|
|||||||
|
|
||||||
// Shadows
|
// Shadows
|
||||||
$shadow: rgba(var(--#{$prefix}body-color-rgb), .04) 0 2px 4px 0 !default;
|
$shadow: rgba(var(--#{$prefix}body-color-rgb), .04) 0 2px 4px 0 !default;
|
||||||
|
$shadow-inset: inset rgba(var(--#{$prefix}body-color-rgb), .04) 0 0 0 1px !default;
|
||||||
$shadow-transparent: 0 0 0 0 transparent !default;
|
$shadow-transparent: 0 0 0 0 transparent !default;
|
||||||
$shadow-button: 0 1px 0 rgba(var(--#{$prefix}body-color-rgb), .04) !default;
|
$shadow-button: 0 1px 0 rgba(var(--#{$prefix}body-color-rgb), .04) !default;
|
||||||
$shadow-button-inset: inset 0 -1px 0 rgba(var(--#{$prefix}body-color-rgb), .2) !default;
|
$shadow-button-inset: inset 0 -1px 0 rgba(var(--#{$prefix}body-color-rgb), .2) !default;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
.avatar {
|
.avatar {
|
||||||
--#{$prefix}avatar-size: #{$avatar-size};
|
--#{$prefix}avatar-size: #{$avatar-size};
|
||||||
--#{$prefix}avatar-bg: var(--#{$prefix}gray-100);
|
--#{$prefix}avatar-bg: var(--#{$prefix}gray-100);
|
||||||
|
--#{$prefix}avatar-shadow: #{$shadow-inset};
|
||||||
position: relative;
|
position: relative;
|
||||||
width: var(--#{$prefix}avatar-size);
|
width: var(--#{$prefix}avatar-size);
|
||||||
height: var(--#{$prefix}avatar-size);
|
height: var(--#{$prefix}avatar-size);
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
background: var(--#{$prefix}avatar-bg) no-repeat center/cover;
|
background: var(--#{$prefix}avatar-bg) no-repeat center/cover;
|
||||||
border-radius: $avatar-border-radius;
|
border-radius: $avatar-border-radius;
|
||||||
|
box-shadow: var(--#{$prefix}avatar-shadow);
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
width: calc(var(--#{$prefix}avatar-size) / #{divide(40, 24)});
|
width: calc(var(--#{$prefix}avatar-size) / #{divide(40, 24)});
|
||||||
@@ -50,7 +52,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Avatar list
|
||||||
|
//
|
||||||
.avatar-list {
|
.avatar-list {
|
||||||
@include elements-list;
|
@include elements-list;
|
||||||
|
|
||||||
@@ -62,12 +66,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.avatar-list-stacked {
|
.avatar-list-stacked {
|
||||||
|
display: block;
|
||||||
|
--#{$prefix}list-gap: 0;
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
margin-right: -.5rem !important;
|
margin-right: calc(-.5 * var(--#{$prefix}avatar-size)) !important;
|
||||||
box-shadow: 0 0 0 2px 0 0 0 2px var(--#{$prefix}card-cap-bg, var(--#{$prefix}card-bg, var(--#{$prefix}bg-surface)));
|
box-shadow: var(--#{$prefix}avatar-shadow), 0 0 0 2px var(--#{$prefix}card-bg, var(--#{$prefix}bg-surface));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Avatar upload
|
||||||
|
//
|
||||||
.avatar-upload {
|
.avatar-upload {
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user