Skip to content

Commit

Permalink
use local echarts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiwen-Zhu committed Aug 27, 2024
1 parent 839e6f7 commit 7c8c61e
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 28 deletions.
4 changes: 3 additions & 1 deletion src/compilation/compile_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ def compile_index(env: Environment, output_path: Path):
print("编译索引...", end=' ')
stdout.flush()

copytree(Path("src", "static"), output_path / 'static')
static_path = output_path / 'static'
if not static_path.exists():
copytree(Path("src", "static"), static_path)
render_page(env, 'index.html', output_path, '{}史.html'.format(env.globals['name']))

print("完成")
Expand Down
22 changes: 0 additions & 22 deletions src/static/echarts4.7.0.min.js

This file was deleted.

45 changes: 45 additions & 0 deletions src/static/echarts5.2.0.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/templates/charts/diplomatic_relationship.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<title>外交关系</title>
<script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
<script src="../static/echarts5.2.0.min.js"></script>
</head>
<body>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/templates/charts/line_chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<title>多折线图</title>
<script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
<script src="../static/echarts5.2.0.min.js"></script>
</head>
<body>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/templates/charts/pop_size.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<title>人口规模</title>
<script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
<script src="../static/echarts5.2.0.min.js"></script>
</head>
<body>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/templates/charts/wars.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<title>战争</title>
<script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
<script src="../static/echarts5.2.0.min.js"></script>
</head>
<body>
<div id="chart" class="chart-container" style="width: 1000px"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<title>{{ name }}史</title>
<link rel="stylesheet" href="./static/element-plus2.7.7.index.css" />
<script src="./static/echarts4.7.0.min.js"></script>
<script src="./static/echarts5.2.0.min.js"></script>
<script src="./static/[email protected]"></script>
<script src="./static/element-plus2.7.7.index.full.min.js"></script>

Expand Down

0 comments on commit 7c8c61e

Please sign in to comment.