增加了更多的主题可以选择

This commit is contained in:
MarkusJoe
2022-02-08 19:42:36 +08:00
parent aa661da038
commit ef08d44ba6
8 files changed
+150 -191

No files matched your search

+2 -3
View File
@@ -12,7 +12,6 @@ from flask import request
from flask import Response
from flask import make_response
from flask import send_from_directory
from gevent import pywsgi
from bin.core.render_ import render_temp_
from bin.core.b64img import re_sort_number_image
from db.db import (fetch_data, update_data)
@@ -77,8 +76,8 @@ def build_page(name: str, length: int, theme: str) -> list[Response] | list[bool
return [False, too_lang_to_count(name)]
if 7 <= length <= 10:
zero_count = '0' * (length - len(str(count))) + str(count)
sorted_image = re_sort_number_image(zero_count, theme)
return [True, render_temp_(length, name, sorted_image, theme)]
sorted_image, width, height = re_sort_number_image(zero_count, theme)
return [True, render_temp_(length, name, sorted_image, width, height)]
else:
return [False, 'BadLength']
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env python3
# -- coding:utf-8 --
# @Author: markushammered@gmail.com
# @Development Tool: PyCharm
# @Create Time: 2022/2/8
# @File Name: insert_db.py
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env python3
# -- coding:utf-8 --
# @Author: markushammered@gmail.com
# @Development Tool: PyCharm
# @Create Time: 2022/2/8
# @File Name: download_img.py
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env python3
# -- coding:utf-8 --
# @Author: markushammered@gmail.com
# @Development Tool: PyCharm
# @Create Time: 2022/2/8
# @File Name: img_size.py
-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="680" height="150" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>{{ title }}</title>
<g>
<image x="0" y="0" width="68" height="150" xlink:href="{{ svg_img_0 }}"/>
<image x="68" y="0" width="68" height="150" xlink:href="{{ svg_img_1 }}"/>
<image x="136" y="0" width="68" height="150" xlink:href="{{ svg_img_2 }}"/>
<image x="204" y="0" width="68" height="150" xlink:href="{{ svg_img_3 }}"/>
<image x="272" y="0" width="68" height="150" xlink:href="{{ svg_img_4 }}"/>
<image x="340" y="0" width="68" height="150" xlink:href="{{ svg_img_5 }}"/>
<image x="408" y="0" width="68" height="150" xlink:href="{{ svg_img_6 }}"/>
<image x="476" y="0" width="68" height="150" xlink:href="{{ svg_img_7 }}"/>
<image x="544" y="0" width="68" height="150" xlink:href="{{ svg_img_8 }}"/>
<image x="612" y="0" width="68" height="150" xlink:href="{{ svg_img_9 }}"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="476" height="150" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>{{ title }}</title>
<g>
<image x="0" y="0" width="68" height="150" xlink:href="{{ svg_img_0 }}"/>
<image x="68" y="0" width="68" height="150" xlink:href="{{ svg_img_1 }}"/>
<image x="136" y="0" width="68" height="150" xlink:href="{{ svg_img_2 }}"/>
<image x="204" y="0" width="68" height="150" xlink:href="{{ svg_img_3 }}"/>
<image x="272" y="0" width="68" height="150" xlink:href="{{ svg_img_4 }}"/>
<image x="340" y="0" width="68" height="150" xlink:href="{{ svg_img_5 }}"/>
<image x="408" y="0" width="68" height="150" xlink:href="{{ svg_img_6 }}"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 801 B

-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="544" height="150" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>{{ title }}</title>
<g>
<image x="0" y="0" width="68" height="150" xlink:href="{{ svg_img_0 }}"/>
<image x="68" y="0" width="68" height="150" xlink:href="{{ svg_img_1 }}"/>
<image x="136" y="0" width="68" height="150" xlink:href="{{ svg_img_2 }}"/>
<image x="204" y="0" width="68" height="150" xlink:href="{{ svg_img_3 }}"/>
<image x="272" y="0" width="68" height="150" xlink:href="{{ svg_img_4 }}"/>
<image x="340" y="0" width="68" height="150" xlink:href="{{ svg_img_5 }}"/>
<image x="408" y="0" width="68" height="150" xlink:href="{{ svg_img_6 }}"/>
<image x="476" y="0" width="68" height="150" xlink:href="{{ svg_img_7 }}"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 885 B

-15
View File
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="612" height="150" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>{{ title }}</title>
<g>
<image x="0" y="0" width="68" height="150" xlink:href="{{ svg_img_0 }}"/>
<image x="68" y="0" width="68" height="150" xlink:href="{{ svg_img_1 }}"/>
<image x="136" y="0" width="68" height="150" xlink:href="{{ svg_img_2 }}"/>
<image x="204" y="0" width="68" height="150" xlink:href="{{ svg_img_3 }}"/>
<image x="272" y="0" width="68" height="150" xlink:href="{{ svg_img_4 }}"/>
<image x="340" y="0" width="68" height="150" xlink:href="{{ svg_img_5 }}"/>
<image x="408" y="0" width="68" height="150" xlink:href="{{ svg_img_6 }}"/>
<image x="476" y="0" width="68" height="150" xlink:href="{{ svg_img_7 }}"/>
<image x="544" y="0" width="68" height="150" xlink:href="{{ svg_img_8 }}"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 969 B