mirror of
https://github.com/tabler/tabler.git
synced 2026-01-25 04:16:36 +00:00
remove unused dependencies, remove contentfor plugin
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -1,7 +1,5 @@
|
||||
source 'https://rubygems.org' do
|
||||
gem 'jekyll-tidy'
|
||||
gem 'octopress-autoprefixer'
|
||||
gem 'jekyll-contentblocks'
|
||||
gem 'jekyll-redirect-from'
|
||||
gem 'jekyll-toc'
|
||||
gem 'jekyll-random'
|
||||
|
||||
@@ -5,7 +5,6 @@ source: src
|
||||
|
||||
plugins:
|
||||
- jekyll-tidy
|
||||
- jekyll-contentblocks
|
||||
- jekyll-toc
|
||||
- jekyll-random
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
"gulp-autoprefixer": "^4.0.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-sass": "^3.1.0",
|
||||
"gulp-selectors": "^0.1.10",
|
||||
"npm-run-all": "^4.1.2"
|
||||
},
|
||||
"dependencies": {},
|
||||
|
||||
@@ -6,7 +6,3 @@
|
||||
<div id="chart-pie" style="height: 250px"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% contentfor scripts %}
|
||||
{% include js/pie.js %}
|
||||
{% endcontentfor %}
|
||||
@@ -5,7 +5,4 @@
|
||||
<div class="card-body">
|
||||
<canvas id="canvas1" height="200"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% contentfor scripts %}
|
||||
{% endcontentfor %}
|
||||
</div>
|
||||
@@ -605,7 +605,6 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% contentfor js %}
|
||||
<script>
|
||||
require(['jquery', 'selectize'], function ($, selectize) {
|
||||
$(document).ready(function () {
|
||||
@@ -657,5 +656,4 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endcontentfor %}
|
||||
</script>
|
||||
@@ -40,16 +40,18 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% contentfor scripts %}
|
||||
requirejs(['tablesorter'], function() {
|
||||
$('#js-table-sorted').tablesorter({
|
||||
cssHeader: 'table-header',
|
||||
cssAsc: 'table-header-asc',
|
||||
cssDesc: 'table-header-desc',
|
||||
headers: {
|
||||
0: { sorter: false },
|
||||
4: { sorter: false },
|
||||
}
|
||||
<script>
|
||||
requirejs(['tablesorter', 'jquery'], function(tablesorter, $) {
|
||||
$(document).ready(function(){
|
||||
$('#js-table-sorted').tablesorter({
|
||||
cssHeader: 'table-header',
|
||||
cssAsc: 'table-header-asc',
|
||||
cssDesc: 'table-header-desc',
|
||||
headers: {
|
||||
0: { sorter: false },
|
||||
4: { sorter: false }
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
{% endcontentfor %}
|
||||
</script>
|
||||
@@ -1,39 +1,39 @@
|
||||
{% contentfor scripts %}
|
||||
{% assign data = include.data | json_parse %}
|
||||
{% assign show-labels = include.show-labels | default: false %}
|
||||
{% assign show-legend = include.show-legend | default: true %}
|
||||
{% assign type = include.type | default: 'donut' %}
|
||||
|
||||
require(['c3'], function (c3) {
|
||||
var chart = c3.generate({
|
||||
bindto: '#{{ include.id }}',
|
||||
padding: {
|
||||
bottom: {% if show-legend %}24{% else %}0{% endif %},
|
||||
top: 0
|
||||
},
|
||||
data: {
|
||||
type: '{{ type }}',
|
||||
names: {
|
||||
{% for item in data %}
|
||||
data{{ forloop.index }}: '{{ item[0] }}',{% endfor %}
|
||||
require(['c3', 'jquery'], function (c3, $) {
|
||||
$(document).ready(function() {
|
||||
var chart = c3.generate({
|
||||
bindto: '#{{ include.id }}',
|
||||
padding: {
|
||||
bottom: {% if show-legend %}24{% else %}0{% endif %},
|
||||
top: 0
|
||||
},
|
||||
columns: [
|
||||
{% for item in data %}
|
||||
['data{{ forloop.index }}', {% if item[1].first %}{{ item[1][0] }}{% else %}{{ item[1] }}{% endif %}],{% endfor %}
|
||||
],
|
||||
colors: {
|
||||
{% for item in data %}
|
||||
{% if item[1].first %}data{{ forloop.index }}: tabler.colors.{{ item[1][1] }},{% endif %}{% endfor %}
|
||||
}
|
||||
},
|
||||
{{ type }}: {
|
||||
label: {
|
||||
show: {% if show-labels %}true{% else %}false{% endif %}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: {% if show-legend %}true{% else %}false{% endif %}
|
||||
},
|
||||
data: {
|
||||
type: '{{ type }}',
|
||||
names: {
|
||||
{% for item in data %}
|
||||
data{{ forloop.index }}: '{{ item[0] }}',{% endfor %}
|
||||
},
|
||||
columns: [
|
||||
{% for item in data %}
|
||||
['data{{ forloop.index }}', {% if item[1].first %}{{ item[1][0] }}{% else %}{{ item[1] }}{% endif %}],{% endfor %}
|
||||
],
|
||||
colors: {
|
||||
{% for item in data %}
|
||||
{% if item[1].first %}data{{ forloop.index }}: tabler.colors.{{ item[1][1] }},{% endif %}{% endfor %}
|
||||
}
|
||||
},
|
||||
{{ type }}: {
|
||||
label: {
|
||||
show: {% if show-labels %}true{% else %}false{% endif %}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: {% if show-legend %}true{% else %}false{% endif %}
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
{% endcontentfor %}
|
||||
});
|
||||
@@ -29,19 +29,5 @@
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
{% ifhascontent scripts %}
|
||||
<script type="text/javascript">
|
||||
requirejs(['jquery'], function($) {
|
||||
$(document).ready(function () {
|
||||
{% contentblock scripts no-convert %}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endifhascontent %}
|
||||
|
||||
{% ifhascontent js %}
|
||||
{% contentblock js no-convert %}
|
||||
{% endifhascontent %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user