Fix sketchpad issue, add tooltips to deck tables

master
trémeur 3 weeks ago
parent 193e10c197
commit f6594cc0f8

@ -1,4 +1,5 @@
import datetime,os,re import datetime,os,re
from collections import Counter
import log,skel,variables,tcgcore import log,skel,variables,tcgcore
def indexgen(): def indexgen():
@ -210,7 +211,7 @@ def indexgen():
tradein.append(event["event"]) tradein.append(event["event"])
except: except:
pass pass
tradecommon = list(set(tradeout).intersection(tradein)) tradecommon = list((Counter(tradeout) & Counter(tradein)).elements())
sketch = len(tradecommon) sketch = len(tradecommon)
if sketch > 0: if sketch > 0:
content.write("<table class=\"sketchpads\">\n<tbody>\n<tr>\n<td><img src=\"/assets/sketch/") content.write("<table class=\"sketchpads\">\n<tbody>\n<tr>\n<td><img src=\"/assets/sketch/")

@ -86,15 +86,15 @@ def printdeck(deck):
while test < 21: while test < 21:
if test % 5 == 1: if test % 5 == 1:
deckstring += " <tr>\n" deckstring += " <tr>\n"
deckstring += " <td><img src=\"/decks/" + deck + "/" deckstring += " <td>"
if test in deckcards(deck): if test in deckcards(deck):
if test > 9: if test > 9:
deckstring += str(test) deckstring += printcard(deck + str(test))
else: else:
deckstring += "0" + str(test) deckstring += printcard(deck + "0" + str(test))
else: else:
deckstring += "00" deckstring += "<img src=\"/decks/" + deck + "/00.gif\">"
deckstring += ".gif\"></td>\n" deckstring += "</td>\n"
if test % 5 == 0: if test % 5 == 0:
deckstring += " </tr>\n" deckstring += " </tr>\n"
test += 1 test += 1

Loading…
Cancel
Save