mirror of
https://github.com/xushier/HD-Icons.git
synced 2025-12-06 12:27:29 +08:00
测试 svg
This commit is contained in:
parent
2d60832b43
commit
b0f5737bf3
@ -83,6 +83,12 @@
|
||||
|
||||
<!-- END CIRCLE ICONS -->
|
||||
|
||||
## SVG 图标
|
||||
<!-- START SVG ICONS -->
|
||||
|
||||
<!-- END SVG ICONS -->
|
||||
|
||||
|
||||
<!-- LEGAL -->
|
||||
|
||||
# 赞助
|
||||
|
||||
15
_generate.py
15
_generate.py
@ -17,8 +17,9 @@ imgs = sorted(Path("./border-radius").glob("*.png"))
|
||||
img_tags = [generate_img_tag(x,"border-radius") for x in imgs]
|
||||
circle_imgs = sorted(Path("./circle").glob("*.png"))
|
||||
circle_img_tags = [generate_img_tag(x,"circle") for x in circle_imgs]
|
||||
line_number = 0
|
||||
all_nums = len(img_tags) + len(circle_img_tags)
|
||||
svg_imgs = sorted(Path("./svg").glob("*.svg"))
|
||||
svg_img_tags = [generate_img_tag(x,"svg") for x in svg_imgs]
|
||||
all_nums = len(img_tags) + len(circle_img_tags) + len(svg_img_tags)
|
||||
|
||||
# Read the template file
|
||||
with open(template_path, "r", encoding="UTF-8") as f:
|
||||
@ -33,10 +34,15 @@ for line in lines:
|
||||
if line.startswith("<!-- START CIRCLE ICONS -->"):
|
||||
circle_line_number = lines.index(line)
|
||||
break
|
||||
for line in lines:
|
||||
if line.startswith("<!-- START SVG ICONS -->"):
|
||||
svg_line_number = lines.index(line)
|
||||
break
|
||||
|
||||
# Insert the icons after the line
|
||||
lines.insert(line_number + 1, " ".join(img_tags))
|
||||
lines.insert(circle_line_number + 1, " ".join(circle_img_tags))
|
||||
lines.insert(circle_line_number + 2, " ".join(circle_img_tags))
|
||||
lines.insert(svg_line_number + 3, " ".join(svg_img_tags))
|
||||
|
||||
lines = ["# 图标预览(当前共计 " + str(all_nums) + " 个)" if '# 图标预览(当前共计 0 个)' in i else i for i in lines]
|
||||
|
||||
@ -45,5 +51,4 @@ with open(readme_path, "w", encoding="UTF-8") as f:
|
||||
f.write("".join(lines))
|
||||
f.write("\n")
|
||||
|
||||
print("完成!")
|
||||
print("README.md 文件已更新。")
|
||||
print("文件已更新!")
|
||||
|
||||
1
svg/Actual_A.svg
Normal file
1
svg/Actual_A.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.2" viewBox="0 0 1024 1024"><rect width="100%" height="100%" fill="#8444e9"/><path fill="#fff" d="m224.2 786.5 273.1-580.1c1-2.2 3.3-3.7 5.7-3.7h12c2.4 0 4.6 1.4 5.7 3.6l176.2 362 55.2-21.2c3.3-1.2 6.9.4 8.1 3.6L775 589c1.2 3.3-.4 6.9-3.6 8.1l-51 19.6 62.8 129.2c1.6 3.1.2 6.9-2.9 8.4l-36.8 18c-3.2 1.5-6.9.2-8.5-2.9l-64.8-133.3-434.9 167.3c-3.3 1.2-7-.4-8.3-3.6v-.2l-3-8.2c-.6-1.6-.5-3.4.2-4.9zm285.4-480.4L317.5 714.3l329.1-126.6z"/><path fill="#fff" d="m632.6 472.7 18.5 50.4L231.5 677c-3.3 1.2-6.9-.5-8.1-3.9l-14.1-38.4c-1.2-3.2.5-6.9 3.7-8.1z"/></svg>
|
||||
|
After Width: | Height: | Size: 606 B |
Loading…
Reference in New Issue
Block a user