Add some classes for CSS

master
trémeur 3 weeks ago
parent 136a453cf3
commit 0b670f3df4

@ -131,7 +131,7 @@ def indexgen():
else: else:
rank = "red" rank = "red"
rankcode = re.sub(" ","",rank) rankcode = re.sub(" ","",rank)
content.write("<a href=\"/levels\"><img src=\"/assets/levels/" + rankcode + ".gif\"></a>" + tcgcore.printcard("sig_" + variables.name.lower()) + "\n<ul>\n<li>player name: " + variables.name + "</li>\n<li>" + str(len(tcgcore.ownedcards())) + " cards held (" + rank + ")</li>\n<li>started <code>" + firstdate.strftime("%Y-%m-%d") + "</code></li>\n<li>last updated <code>" + datetime.datetime.today().strftime("%Y-%m-%d") + "</code></li>\n<li><a href=\"https://git.praze.net/tre/tcg\">code</a> under construction</li>\n</ul>\n") content.write("<a href=\"/levels\"><img src=\"/assets/levels/" + rankcode + ".gif\"></a>" + tcgcore.printcard("sig_" + variables.name.lower()) + "\n<ul>\n<li>player name: <span class=\"name\">" + variables.name + "</span></li>\n<li>" + str(len(tcgcore.ownedcards())) + " cards held <span class=\"rank " + rank + "\">(" + rank + ")</span></li>\n<li>started <code>" + firstdate.strftime("%Y-%m-%d") + "</code></li>\n<li>last updated <code>" + datetime.datetime.today().strftime("%Y-%m-%d") + "</code></li>\n<li><a href=\"https://git.praze.net/tre/tcg\">code</a> under construction</li>\n</ul>\n")
crayred = 0 crayred = 0
crayorange = 0 crayorange = 0
crayyellow = 0 crayyellow = 0
@ -176,21 +176,21 @@ def indexgen():
if crayred + crayorange + crayyellow + craygreen + crayblue + craypurple + craybrown + craygrey > 0: if crayred + crayorange + crayyellow + craygreen + crayblue + craypurple + craybrown + craygrey > 0:
content.write("<table id=\"crayontable\">\n<tbody>\n<tr>\n") content.write("<table id=\"crayontable\">\n<tbody>\n<tr>\n")
if crayred > 0: if crayred > 0:
content.write("<td><img src=\"/assets/crayons/crayon1.gif\" class=\"crayon\" title=\"red\"> × " + str(crayred) + "</td>\n") content.write("<td class=\"red\"><img src=\"/assets/crayons/crayon1.gif\" class=\"crayon\" title=\"red\"> × " + str(crayred) + "</td>\n")
if crayorange > 0: if crayorange > 0:
content.write("<td><img src=\"/assets/crayons/crayon2.gif\" class=\"crayon\" title=\"orange\"> × " + str(crayorange) + "</td>\n") content.write("<td class=\"orange\"><img src=\"/assets/crayons/crayon2.gif\" class=\"crayon\" title=\"orange\"> × " + str(crayorange) + "</td>\n")
if crayyellow > 0: if crayyellow > 0:
content.write("<td><img src=\"/assets/crayons/crayon3.gif\" class=\"crayon\" title=\"yellow\"> × " + str(crayyellow) + "</td>\n") content.write("<td class=\"yellow\"><img src=\"/assets/crayons/crayon3.gif\" class=\"crayon\" title=\"yellow\"> × " + str(crayyellow) + "</td>\n")
if craygreen > 0: if craygreen > 0:
content.write("<td><img src=\"/assets/crayons/crayon4.gif\" class=\"crayon\" title=\"green\"> × " + str(craygreen) + "</td>\n") content.write("<td class=\"green\"><img src=\"/assets/crayons/crayon4.gif\" class=\"crayon\" title=\"green\"> × " + str(craygreen) + "</td>\n")
if crayblue > 0: if crayblue > 0:
content.write("<td><img src=\"/assets/crayons/crayon5.gif\" class=\"crayon\" title=\"blue\"> × " + str(crayblue) + "</td>\n") content.write("<td class=\"blue\"><img src=\"/assets/crayons/crayon5.gif\" class=\"crayon\" title=\"blue\"> × " + str(crayblue) + "</td>\n")
if craypurple > 0: if craypurple > 0:
content.write("<td><img src=\"/assets/crayons/crayon6.gif\" class=\"crayon\" title=\"purple\"> × " + str(craypurple) + "</td>\n") content.write("<td class=\"purple\"><img src=\"/assets/crayons/crayon6.gif\" class=\"crayon\" title=\"purple\"> × " + str(craypurple) + "</td>\n")
if craybrown > 0: if craybrown > 0:
content.write("<td><img src=\"/assets/crayons/crayon7.gif\" class=\"crayon\" title=\"brown\"> × " + str(craybrown) + "</td>\n") content.write("<td class=\"brown\"><img src=\"/assets/crayons/crayon7.gif\" class=\"crayon\" title=\"brown\"> × " + str(craybrown) + "</td>\n")
if craygrey > 0: if craygrey > 0:
content.write("<td><img src=\"/assets/crayons/crayon8.gif\" class=\"crayon\" title=\"") content.write("<td class=\"grey\"><img src=\"/assets/crayons/crayon8.gif\" class=\"crayon\" title=\"")
if variables.british: if variables.british:
content.write("grey") content.write("grey")
else: else:

@ -31,11 +31,12 @@ def loggen(month=False):
thefile = "build/log/index.html" thefile = "build/log/index.html"
skel.headerwrite(thefile,"log") skel.headerwrite(thefile,"log")
content = open(thefile,"a") content = open(thefile,"a")
content.write("<h1>log</h1>\n") content.write("<h1>log</h1>\n<p class=\"typefilter\">")
if month: if month:
content.write("<p><a href=\"/log\">Show all</a></p>\n") content.write("<a href=\"/log\">Show all</a>")
else: else:
content.write("<p><a href=\"/log/month\">Show current month only</a></p>\n") content.write("<a href=\"/log/month\">Show current month only</a>")
content.write("</p>\n")
if month: if month:
thelog = [] thelog = []
for event in log.log: for event in log.log:

@ -15,7 +15,7 @@ def tradegen(colour=False):
skel.headerwrite(thefile,"trade") skel.headerwrite(thefile,"trade")
content = open(thefile,"a") content = open(thefile,"a")
content.write("<h1>available for trade</h1>\n") content.write("<h1>available for trade</h1>\n")
content.write(tcgcore.filterwrite("trade",colour,True)) content.write(tcgcore.filterwrite("trade",colour,True) + "<p class=\"tradeterms\">")
if len(variables.tradestatement) > 0: if len(variables.tradestatement) > 0:
content.write(variables.tradestatement + " ") content.write(variables.tradestatement + " ")
content.write("Trade cards <a href=\"" + variables.tradepost + "\">here</a></p>\n<p>") content.write("Trade cards <a href=\"" + variables.tradepost + "\">here</a></p>\n<p>")

Loading…
Cancel
Save