使用了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> <?xml version="1.0" encoding="UTF-8"?>
<html lang="en"> <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">
<head> <title>{{ title }}</title>
<meta charset="UTF-8"> <g>
<title>$Title$</title> {% for value in context %}
</head> <image x="{{ value.position }}" y="0" width="{{ value.width }}" height="{{ value.height }}" xlink:href="{{ value.base64 }}"/>
<body> {% endfor %}
$END$ </g>
</body> </svg>
</html>

Before

Width:  |  Height:  |  Size: 126 B

After

Width:  |  Height:  |  Size: 437 B