You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.7 KiB
Python
37 lines
1.7 KiB
Python
import variables
|
|
|
|
def headerwrite(thefile,pagename):
|
|
header = open(thefile,"a")
|
|
header.write("<!DOCTYPE html>\n<html lang=\"en\" style=\"--headbg:" + variables.headerbackground + ";\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <link rel=\"stylesheet\" href=\"/style.css\">\n <meta name=\"theme-color\" content=\"" + variables.headerbackground + "\">\n <title>TCG :: " + pagename + "</title>\n </head>\n <body>\n <aside>\n \n </aside>\n <nav>\n <ul>\n <li>")
|
|
if pagename == "index":
|
|
header.write("home")
|
|
else:
|
|
header.write("<a href=\"/\">home</a>")
|
|
header.write("</li>\n <li>")
|
|
if pagename == "collecting":
|
|
header.write("collecting")
|
|
else:
|
|
header.write("<a href=\"/collecting\">collecting</a>")
|
|
header.write("</li>\n <li>")
|
|
if pagename == "owned":
|
|
header.write("owned")
|
|
else:
|
|
header.write("<a href=\"/owned\">owned</a>")
|
|
header.write("</li>\n <li>")
|
|
if pagename == "wanted":
|
|
header.write("wanted")
|
|
else:
|
|
header.write("<a href=\"/wanted\">wanted</a>")
|
|
header.write("</li>\n <li>")
|
|
if pagename == "log":
|
|
header.write("log")
|
|
else:
|
|
header.write("<a href=\"/log\">log</a>")
|
|
header.write("</li>\n <li><a href=\"" + variables.tradepost + "\" target=\"_blank\">trade post @ dw</a></li>\n <li><a href=\"https://colors-tcg.eu/services.php\" target=\"_blank\">service links</a></li>\n </ul>\n </nav>\n <main>\n")
|
|
header.close()
|
|
|
|
def footerwrite(thefile):
|
|
footer = open(thefile,"a")
|
|
footer.write(" </main>\n </body>\n</html>")
|
|
footer.close()
|