mirror of
https://github.com/tabler/tabler.git
synced 2026-08-25 20:34:25 +04:00
added bagde-avatar badge-tag and changed color of the dafault badge
This commit is contained in:
@@ -1 +1,18 @@
|
||||
<span class="badge bg-{{ include.color | default: 'primary' }}{% if include.class %} {{ include.class }}{% endif %}">{{ include.text }}</span>
|
||||
{% assign el = 'span' %}
|
||||
<{{ el }} class="badge bg-{{ include.color | default: 'primary' }}{% if include.class %} {{ include.class }}{% endif %}">
|
||||
{% if include.person-id %}
|
||||
{% assign person-id = include.person-id | minus: 1 %}
|
||||
{% assign person = site.data.people[person-id] %}
|
||||
{% assign src = person.photo %}
|
||||
{% unless src %}
|
||||
{% assign placeholder = person.full_name | first_letters %}
|
||||
{% endunless %}
|
||||
<{{ el }} class="badge-avatar" style="background-image: url({{ site.base }}/{{ src }})">{% unless src %}{{ person.full_name | first_letters }}{% endunless %}</{{ el }}>
|
||||
{% endif %}
|
||||
{% if include.text %}
|
||||
{{ include.text }}
|
||||
{% else %}
|
||||
{{ person.full_name }}
|
||||
{% endif %}
|
||||
{% if include.addon %}<{{ el }} class="badge-addon {% if include.addon-color%}bg-{{ include.addon-color }}{% endif %}">{{ include.addon }}</{{ el }}>{% endif %}
|
||||
</{{ el }}>
|
||||
|
||||
Reference in New Issue
Block a user