使用了Jinja渲染模板的语法更好的适配了程序减少了html文件的数量

This commit is contained in:
MarkusJoe
2022-02-18 19:31:53 +08:00
parent 51fa583050
commit 5ef3ed6619
1 file changed
+9 -10
+9 -10
View File
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$Title$</title>
</head>
<body>
$END$
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="{{ general_width }}" height="{{ general_height }}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>{{ title }}</title>
<g>
{% for value in context %}
<image x="{{ value.position }}" y="0" width="{{ value.width }}" height="{{ value.height }}" xlink:href="{{ value.base64 }}"/>
{% endfor %}
</g>
</svg>

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 437 B