mirror of
https://github.com/tabler/tabler.git
synced 2026-07-27 13:34:37 +04:00
remove tabler-charts.js, peity charts, apexcharts
This commit is contained in:
@@ -1,39 +1,33 @@
|
||||
{% assign chart-type = include.chart-type | default: 'line' %}
|
||||
{% assign chart-position = include.chart-position | default: 'right' %}
|
||||
<div class="card">
|
||||
<div class="card-body p-3 d-flex align-items-center">
|
||||
{% if include.icon %}
|
||||
<span class="{% if include.color %}bg-{{ include.color }} text-white{% endif %} stamp mr-3">{% include_cached ui/icon.html icon=include.icon %}</span>
|
||||
{% elsif include.person-id %}
|
||||
{% include ui/avatar.html person-id=include.person-id class="mr-3 rounded" %}
|
||||
{% endif %}
|
||||
<div class="card-body p-3 d-flex align-items-center">
|
||||
{% if include.icon %}
|
||||
<span class="{% if include.color %}bg-{{ include.color }} text-white{% endif %} stamp mr-3">{% include_cached ui/icon.html icon=include.icon %}</span>
|
||||
{% elsif include.person-id %}
|
||||
{% include ui/avatar.html person-id=include.person-id class="mr-3 rounded" %}
|
||||
{% endif %}
|
||||
|
||||
{% if include.chart-data and chart-position=="left" %}
|
||||
<div class="mr-3">
|
||||
{% include ui/sparkline.html data=include.chart-data type=chart-type color=include.color label=include.chart-label label-icon=include.chart-label-icon %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if include.chart-data and chart-position == "left" %}
|
||||
<div class="mr-3">
|
||||
{% include ui/sparkline.html data=include.chart-data type=chart-type color=include.color label=include.chart-label label-icon=include.chart-label-icon %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="mr-3">
|
||||
<div>
|
||||
<strong>{{ include.count | default: 1700 | format_number }}</strong> {{ include.subtitle }}
|
||||
{% if include.small-icon %}
|
||||
{% include_cached ui/icon.html icon=include.small-icon color=include.color class="icon-sm ml-1" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-muted text-h5">{{ include.description | default: "Users" }}</div>
|
||||
</div>
|
||||
<div class="mr-3 leading-tight">
|
||||
<div class="strong">
|
||||
{{ include.count | default: 1700 | format_number }} {{ include.subtitle }}
|
||||
{% if include.small-icon %}
|
||||
{% include_cached ui/icon.html icon=include.small-icon color=include.color class="icon-sm ml-1" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="text-muted">{{ include.description | default: "Users" }}</div>
|
||||
</div>
|
||||
|
||||
{% if include.second-icon %}
|
||||
<div class="ml-auto">
|
||||
{% include_cached ui/icon.html icon=include.second-icon color=include.color class="icon-lg icon-thin" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if include.chart-data and chart-position=="right" %}
|
||||
<div class="ml-auto">
|
||||
{% include ui/sparkline.html data=include.chart-data type=chart-type color=include.color label=include.chart-label label-icon=include.chart-label-icon %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if include.chart-data and chart-position=="right" %}
|
||||
<div class="ml-auto">
|
||||
{% include ui/sparkline.html data=include.chart-data type=chart-type color=include.color label=include.chart-label label-icon=include.chart-label-icon %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
{% assign person-id = include.person-id | default: 0 %}
|
||||
{% assign person = site.data.people[person-id] %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row row-sm align-items-center">
|
||||
<div class="col-auto">
|
||||
{% include ui/avatar.html person=person size="lg" %}
|
||||
</div>
|
||||
<div class="col">
|
||||
<h4 class="card-title m-0">
|
||||
<a href="#">{{ person.full_name }}</a>
|
||||
</h4>
|
||||
<div class="text-muted">
|
||||
Working in {{ person.company }}
|
||||
</div>
|
||||
<div class="small mt-1">
|
||||
<span class="text-success">●</span> Online
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a href="#" class="btn btn-sm btn-secondary d-none d-md-inline-block">
|
||||
Subscribe
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="dropdown">
|
||||
<button class="btn-options" type="button" data-toggle="dropdown">
|
||||
{% include_cached ui/icon.html icon="more-vertical" %}
|
||||
</button>
|
||||
{% include_cached ui/dropdown-menu.html right=true %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row row-sm align-items-center">
|
||||
<div class="col-auto">
|
||||
{% include ui/avatar.html person=person size="lg" %}
|
||||
</div>
|
||||
<div class="col">
|
||||
<h4 class="card-title m-0">
|
||||
<a href="#">{{ person.full_name }}</a>
|
||||
</h4>
|
||||
<div class="text-muted">
|
||||
Working in {{ person.company }}
|
||||
</div>
|
||||
<div class="small mt-1">
|
||||
<span class="text-success">●</span> Online
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a href="#" class="btn btn-sm btn-secondary d-none d-md-inline-block">
|
||||
Subscribe
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="dropdown">
|
||||
<button class="btn-options" type="button" data-toggle="dropdown">
|
||||
{% include_cached ui/icon.html icon="more-vertical" %}
|
||||
</button>
|
||||
{% include_cached ui/dropdown-menu.html right=true %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
{% assign person-id = include.person-id | default: 0 %}
|
||||
{% assign person = site.data.people[person-id] %}
|
||||
<a class="card card-link" href="#">
|
||||
<div class="card-body">
|
||||
<div class="float-{% if include.right %}right{% else %}left mr-3{% endif %}">
|
||||
{% include ui/avatar.html person=person %}
|
||||
</div>
|
||||
<div class="card-title mb-1">{{ person.full_name }}</div>
|
||||
<div class="text-muted">{{ person.job_title }}</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="float-{% if include.right %}right{% else %}left mr-3{% endif %}">
|
||||
{% include ui/avatar.html person=person class="rounded" %}
|
||||
</div>
|
||||
<div class="leading-tight">
|
||||
<div class="strong">{{ person.full_name }}</div>
|
||||
<div class="text-muted">{{ person.job_title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -12,4 +12,3 @@
|
||||
|
||||
<!-- Tabler Plugins -->
|
||||
<link href="{{ site.base }}/dist/css/tabler-flags{% if jekyll.environment == 'production' %}.min{% endif %}.css?{{ site.time | date: '%s' }}" rel="stylesheet"/>
|
||||
<link href="{{ site.base }}/dist/css/tabler-charts{% if jekyll.environment == 'production' %}.min{% endif %}.css?{{ site.time | date: '%s' }}" rel="stylesheet"/>
|
||||
|
||||
@@ -11,6 +11,3 @@
|
||||
|
||||
<!-- Tabler Core -->
|
||||
<script src="{{ site.base }}/dist/js/tabler{% if jekyll.environment == 'production' %}.min{% endif %}.js?{{ site.time | date: '%s' }}"></script>
|
||||
|
||||
<!-- Tabler Plugins -->
|
||||
<script src="{{ site.base }}/dist/js/tabler-charts{% if jekyll.environment == 'production' %}.min{% endif %}.js?{{ site.time | date: '%s' }}"></script>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<li class="nav-item dropdown">
|
||||
<a href="#" data-toggle="dropdown"
|
||||
class="nav-link d-flex align-items-center py-0 px-lg-0 px-2 text-reset ml-2">
|
||||
{% include ui/avatar.html src=person.photo %}
|
||||
{% include ui/avatar.html src=person.photo size="sm" %}
|
||||
<span class="ml-2 d-none d-lg-block leading-none">
|
||||
{{ person.full_name }}
|
||||
<span class="text-muted d-block mt-1 text-h6">Administrator</span>
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
{% assign src = include.src %}
|
||||
{% assign placeholder = include.placeholder %}
|
||||
{% 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 %}
|
||||
{% elsif include.person %}
|
||||
{% assign person = include.person %}
|
||||
{% assign src = person.photo %}
|
||||
{% unless src %}
|
||||
{% assign placeholder = person.full_name | first_letters %}
|
||||
{% endunless %}
|
||||
{% 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 %}
|
||||
{% elsif include.person %}
|
||||
{% assign person = include.person %}
|
||||
{% assign src = person.photo %}
|
||||
{% unless src %}
|
||||
{% assign placeholder = person.full_name | first_letters %}
|
||||
{% endunless %}
|
||||
{% endif %}
|
||||
{% assign link = include.link | default: false %}
|
||||
{% assign el = 'span' %}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{% capture script %}
|
||||
<script>
|
||||
// @formatter:off
|
||||
document.addEventListener("DOMContentLoaded", function (event) {
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
{% if jekyll.environment == 'development' %}
|
||||
window.tabler_chart = window.tabler_chart || {};
|
||||
{% endif %}
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
{% assign type = include.type %}
|
||||
{% assign square = false %}
|
||||
{% if type == "pie" or type == "donut" %}
|
||||
{% assign square = true %}
|
||||
{% endif %}
|
||||
{% assign id = 0 | random_id %}
|
||||
{% assign color = include.color | default: 'blue' %}
|
||||
|
||||
{% append_lib peity %}
|
||||
<div class="sparkline{% if square %} sparkline-square{% endif %}{% if include.wide %} sparkline-wide{% endif %}" data-spark="{{ include.data }}" data-spark-type="{{ include.type }}" {% if include.color %}data-spark-color="{{ include.color | default: 'blue' | tabler_color }}" data-spark-color-bg="{{ include.color | tabler_color: '100' }}"{% endif %}>
|
||||
{% if include.label %}
|
||||
<div class="sparkline-label">
|
||||
{{ include.label }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if include.label-icon %}
|
||||
<div class="sparkline-label">
|
||||
{% include_cached ui/icon.html icon=include.label-icon color=include.color %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="chart-sparkline{% if type == 'pie' %} chart-sparkline-square{% endif %}{% if include.wide %} chart-sparkline-wide{% endif %}" id="sparkline-{{ id }}"></div>
|
||||
|
||||
{% capture_global scripts %}
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
$().peity && $('#sparkline-{{ id }}').text("{{ include.data }}").peity("{{ type | default: 'bar' }}", {
|
||||
width: {% if type == 'pie' %}40{% else %}64{% endif %},
|
||||
height: 40,
|
||||
stroke: "{{ color | tabler_color }}",
|
||||
strokeWidth: 2,
|
||||
fill: {% if type == 'pie' %}["{{ color | default: 'blue' | tabler_color }}", "{{ 'border-color' | tabler_color }}"]{% elsif type == 'bar' %}["{{ color | tabler_color }}"]{% else %}"transparent"{% endif %},
|
||||
padding: .2,
|
||||
innerRadius: 16,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endcapture_global %}
|
||||
Reference in New Issue
Block a user