pick 部分代码

This commit is contained in:
w_xiaolizu
2023-06-27 13:52:55 +08:00
parent 5ad71f39da
commit 1e0e55df3a
4 changed files with 24 additions and 9 deletions

View File

@ -131,6 +131,19 @@ def html_tag_color(tag, color=None, font='black'):
tag = f'<span style="background-color: {color}; font-weight: bold; color: {font}">&nbsp;{tag}&ensp;</span>'
return tag
def html_a_blank(__href, name=''):
if not name:
dir_name = __href
a = f'<a href="{__href}" target="_blank" class="svelte-xrr240">{name}</a>'
return a
def html_download_blank(__href, file_name='temp', dir_name=''):
if os.path.exists(__href):
__href = f'/file={__href}'
if not dir_name:
dir_name = file_name
a = f'<a href="{__href}" target="_blank" download="{dir_name}" class="svelte-xrr240">{file_name}</a>'
return a
def ipaddr():
# 获取本地ipx