提交 88eb4d25 编写于 作者: C chomik

remove unused dependencies, remove contentfor plugin

上级 add95f68
......@@ -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 %}
\ No newline at end of file
......@@ -5,7 +5,4 @@
<div class="card-body">
<canvas id="canvas1" height="200"></canvas>
</div>
</div>
{% contentfor scripts %}
{% endcontentfor %}
\ No newline at end of file
</div>
\ No newline at end of file
......@@ -605,7 +605,6 @@
</div>
</form>
{% contentfor js %}
<script>
require(['jquery', 'selectize'], function ($, selectize) {
$(document).ready(function () {
......@@ -657,5 +656,4 @@
});
});
});
</script>
{% endcontentfor %}
\ No newline at end of file
</script>
\ No newline at end of file
......@@ -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 %}
\ No newline at end of file
</script>
\ No newline at end of file
{% 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 %}
\ No newline at end of file
});
\ No newline at end of file
......@@ -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>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册