style(jinja2):修改模板的复用方式

This commit is contained in:
zhengxinonly
2022-05-24 18:53:37 +08:00
parent d54eb4dc3e
commit 9fc2eb0ae3
24 changed files with 2954 additions and 2963 deletions
+98 -90
View File
@@ -1,8 +1,12 @@
<!DOCTYPE html>
<html>
<html lang="zh-CN">
<head>
<title>首页</title>
{% include 'admin/common/header.html' %}
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/static/admin/component/pear/css/pear.css"/>
<link rel="stylesheet" href="/static/admin/admin/css/other/console1.css"/>
<!-- 主 题 更 换 -->
@@ -290,124 +294,128 @@
</div>
</div>
</div>
<!--</div>-->
{% include 'admin/common/footer.html' %}
<script src="/static/admin/component/layui/layui.js"></script>
<script src="/static/admin/component/pear/pear.js"></script>
<script>
layui.use(['layer', 'echarts', 'element', 'count'], function () {
layui.use(['layer', 'echarts', 'element', 'count'], function() {
var $ = layui.jquery,
layer = layui.layer,
element = layui.element,
count = layui.count,
echarts = layui.echarts
layer = layui.layer,
element = layui.element,
count = layui.count,
echarts = layui.echarts;
count.up('value1', {
time: 4000,
num: 440.34,
bit: 2,
regulator: 50
})
regulator: 50,
});
count.up('value2', {
time: 4000,
num: 236.30,
bit: 2,
regulator: 50
})
regulator: 50,
});
count.up('value3', {
time: 4000,
num: 634.43,
bit: 2,
regulator: 50
})
regulator: 50,
});
count.up('value4', {
time: 4000,
bit: 2,
num: 373.23,
regulator: 50
})
regulator: 50,
});
var echartsRecords = echarts.init(document.getElementById('echarts-records'), 'walden')
var echartsRecords = echarts.init(document.getElementById('echarts-records'), 'walden');
var option = {
tooltip: {
trigger: 'axis'
trigger: 'axis',
},
xAxis: [{
type: 'category',
data: ['2019-01', '2019-02', '2019-03', '2019-04', '2019-05', '2019-06'],
axisLine: {
lineStyle: {
color: '#999'
}
}
}],
yAxis: [{
type: 'value',
splitNumber: 4,
splitLine: {
lineStyle: {
type: 'dashed',
color: '#DDD'
}
},
axisLine: {
show: false,
lineStyle: {
color: '#333'
},
},
nameTextStyle: {
color: '#999'
},
splitArea: {
show: false
}
}],
series: [{
name: '课时',
type: 'line',
data: [23, 60, 20, 36, 23, 85],
lineStyle: {
normal: {
width: 8,
color: {
type: 'linear',
colorStops: [{
offset: 0,
color: '#A9F387' // 0% 处的颜色
}, {
offset: 1,
color: '#48D8BF' // 100% 处的颜色
}],
globalCoord: false // 缺省为 false
xAxis: [
{
type: 'category',
data: ['2019-01', '2019-02', '2019-03', '2019-04', '2019-05', '2019-06'],
axisLine: {
lineStyle: {
color: '#999',
},
shadowColor: 'rgba(72,216,191, 0.3)',
shadowBlur: 10,
shadowOffsetY: 20
}
},
itemStyle: {
normal: {
color: '#fff',
borderWidth: 10,
/*shadowColor: 'rgba(72,216,191, 0.3)',
shadowBlur: 100,*/
borderColor: '#A9F387'
}
},
smooth: true
}]
}
echartsRecords.setOption(option)
},
}],
yAxis: [
{
type: 'value',
splitNumber: 4,
splitLine: {
lineStyle: {
type: 'dashed',
color: '#DDD',
},
},
axisLine: {
show: false,
lineStyle: {
color: '#333',
},
},
nameTextStyle: {
color: '#999',
},
splitArea: {
show: false,
},
}],
series: [
{
name: '课时',
type: 'line',
data: [23, 60, 20, 36, 23, 85],
lineStyle: {
normal: {
width: 8,
color: {
type: 'linear',
window.onresize = function () {
echartsRecords.resize()
}
colorStops: [
{
offset: 0,
color: '#A9F387', // 0% 处的颜色
}, {
offset: 1,
color: '#48D8BF', // 100% 处的颜色
}],
globalCoord: false, // 缺省为 false
},
shadowColor: 'rgba(72,216,191, 0.3)',
shadowBlur: 10,
shadowOffsetY: 20,
},
},
itemStyle: {
normal: {
color: '#fff',
borderWidth: 10,
/*shadowColor: 'rgba(72,216,191, 0.3)',
shadowBlur: 100,*/
borderColor: '#A9F387',
},
},
smooth: true,
}],
};
echartsRecords.setOption(option);
})
window.onresize = function() {
echartsRecords.resize();
};
});
</script>
</body>
</html>