Add some more classes for CSS

master
trémeur 4 days ago
parent 13aa8bd1ef
commit f9961bf6d4

@ -31,6 +31,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
- =tradestatement=: statement to place on your trading page
- =maxmastered=: maximum number of most recently mastered decks to show on the index page
- =ownedpage=: =True= if you want a page displaying your entire collection, =False= otherwise
- =firstmasteries=: a list of decks you mastered first
- =masscollect=: list (python dict) of series/themes being mass collected and which decks to include in each one
- Run the following:
#+BEGIN_SRC bash

@ -2,4 +2,4 @@
python3 generate.py
rclone copy build prazevps:/var/www/tcg/public -P
rclone copy build prazevps:/var/www/tcg/public -P -L

@ -248,7 +248,13 @@ def indexgen():
masteredcount = 0
for deck in mastereddecks:
if masteredcount < variables.maxmastered:
content.write("<img src=\"/decks/" + deck["name"] + "/master.gif\" title=\"mastered " + deck["name"] + "\">")
content.write("<img src=\"/decks/" + deck["name"] + "/master.gif\" title=\"mastered " + deck["name"])
try:
if deck["name"] in variables.firstmasteries:
content.write(" (first)\" class=\"first")
except:
pass
content.write("\">")
masteredcount += 1
if len(mastereddecks) > variables.maxmastered:
content.write(" <a href=\"mastered\">see all</a>")

@ -53,7 +53,13 @@ def massseriesgen(series,massindex):
massmastered.append(deck)
if len(massmastered) > 0:
for deck in massmastered:
content.write("<img src=\"/decks/" + deck + "/master.gif\" title=\"mastered " + deck + "\">")
content.write("<img src=\"/decks/" + deck + "/master.gif\" title=\"mastered " + deck)
try:
if deck in variables.firstmasteries:
content.write(" (first)\" class=\"first")
except:
pass
content.write("\">")
content.write("</p><p>")
for card in massowned[series]:
content.write(tcgcore.printcard(card))

@ -195,7 +195,13 @@ def printdeck(deck,fold=True):
deckstring += " </tr>\n"
test += 1
if deckmastered(deck):
deckstring += " <tr>\n <td colspan=\"5\" align=\"center\"><img src=\"/decks/" + deck + "/master.gif\" title=\"mastered " + deck + "\"><td>\n</tr>\n"
deckstring += " <tr>\n <td colspan=\"5\" align=\"center\"><img src=\"/decks/" + deck + "/master.gif\" title=\"mastered " + deck
try:
if deck in variables.firstmasteries:
deckstring += " (first)\" class=\"first"
except:
pass
deckstring += "\"><td>\n</tr>\n"
deckstring += "</tbody>\n</table>\n"
if fold:
deckstring += "</details>\n"
@ -204,7 +210,7 @@ def printdeck(deck,fold=True):
def filterwrite(page,colour=False,sigs=False):
filterstring = "<p class=\"typefilter\">"
if colour:
filterstring += "Filtered to <b>"
filterstring += "Filtered to <span class=\"" + colour + "\"><b>"
if colour == "gray":
if variables.british:
filterstring += "grey"
@ -212,7 +218,7 @@ def filterwrite(page,colour=False,sigs=False):
filterstring += "gray"
else:
filterstring += colour
filterstring += "</b>. <a href=\"/" + page + "\">Show all</a>"
filterstring += "</b></span>. <a href=\"/" + page + "\">Show all</a>"
else:
filterstring += "Filter: <a href=\"/" + page + "/red\" title=\"red\">🔴</a> <a href=\"/" + page + "/orange\" title=\"orange\">🟠</a> <a href=\"/" + page + "/yellow\" title=\"yellow\">🟡</a> <a href=\"/" + page + "/green\" title=\"green\">🟢</a> <a href=\"/" + page + "/blue\" title=\"blue\">🔵</a> <a href=\"/" + page + "/purple\" title=\"purple\">🟣</a> <a href=\"/" + page + "/brown\" title=\"brown\">🟤</a> <a href=\"/" + page + "/gray\" title=\""
if variables.british:

@ -13,4 +13,5 @@ keepsig = False
tradestatement = ""
maxmastered = 20
ownedpage = False
firstmasteries = ["deckname","nameofdeck"]
masscollect = {"series":["firstdeck","seconddeck"]}

Loading…
Cancel
Save