linkr/render.py

9 lines
378 B
Python
Raw Normal View History

2023-11-17 00:06:02 +11:00
def links(links,host=""):
host = "https://"+host+"/"
html = ""
for link in links:
html += "<div class='link'><a href='"+link[3]+"' target='_blank' class='no_display'>"+host+link[2] +" -> " + link[3]+"</a>"
html += "<div class='link-delete'><a class='no_display' href='/delete/"+link[2]+"'>Delete</a></div>"
html += "</div>\n"
return html