Add hiatus option

This commit is contained in:
mez 2025-08-13 19:41:42 +01:00
parent b9093d4938
commit 328b4abc2f
5 changed files with 21 additions and 4 deletions

View file

@ -28,6 +28,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
- =lowpriority=: a list of decks you’re collecting that aren’t in mass decks - =lowpriority=: a list of decks you’re collecting that aren’t in mass decks
- =trademedium=: whether to allow trading medium-priority cards away in exchange for high-priority cards (special cards will not be listed as tradeable) - =trademedium=: whether to allow trading medium-priority cards away in exchange for high-priority cards (special cards will not be listed as tradeable)
- =tradepost=: URL of your trade post on Dreamwidth - =tradepost=: URL of your trade post on Dreamwidth
- =hiatus=: set to =True= if you are on hiatus
- =faves=: a list of cards to showcase on the index page - =faves=: a list of cards to showcase on the index page
- =headerbackground=: an HTML colour to display behind your header image and set as a theme colour - =headerbackground=: an HTML colour to display behind your header image and set as a theme colour
- =british=: =True= if you want “grey” to display on the site, =False= if you want “gray” - =british=: =True= if you want “grey” to display on the site, =False= if you want “gray”

View file

@ -60,6 +60,16 @@ body > main {
} }
} }
div#hiatus {
padding: 10px;
margin-bottom: 5px;
}
div#hiatus, div#hiatus * {
color: Canvas;
background-color: CanvasText;
}
table.decktable { table.decktable {
display: inline-block; display: inline-block;
border: 1px solid CanvasText; border: 1px solid CanvasText;

View file

@ -670,7 +670,10 @@ def headerwrite(thefile,pagename):
header.write("/style.css\">\n <link rel=\"stylesheet\" href=\"") header.write("/style.css\">\n <link rel=\"stylesheet\" href=\"")
if len(variables.subfolder) > 0: if len(variables.subfolder) > 0:
header.write("/" + variables.subfolder) header.write("/" + variables.subfolder)
header.write("/user.css\">\n <meta name=\"theme-color\" content=\"" + variables.headerbackground + "\">\n <title>" + variables.name + "’s card collection :: " + pagename + "</title>\n </head>\n <body class=\"" + pagename + "\">\n <aside title=\"" + variables.hovertext + "\">\n \n </aside>\n <nav>\n <ul>\n <li>") header.write("/user.css\">\n <meta name=\"theme-color\" content=\"" + variables.headerbackground + "\">\n <title>" + variables.name + "’s card collection :: " + pagename + "</title>\n")
if variables.hiatus:
header.write("<style>\n* {-webkit-filter: grayscale(100%); filter: grayscale(100%);}\na {pointer-events: none;}</style>\n")
header.write(" </head>\n <body class=\"" + pagename + "\">\n <aside title=\"" + variables.hovertext + "\">\n \n </aside>\n <nav>\n <ul>\n <li>")
if pagename == "index": if pagename == "index":
header.write("home") header.write("home")
else: else:
@ -735,6 +738,8 @@ def headerwrite(thefile,pagename):
header.write("/" + variables.subfolder) header.write("/" + variables.subfolder)
header.write("/log\">log</a>") header.write("/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.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")
if variables.hiatus:
header.write("<div id=\"hiatus\">\n<h1>hiatus</h1>\n<p>currently on hiatus</p>\n</div>\n")
header.close() header.close()
def footerwrite(thefile): def footerwrite(thefile):

View file

@ -111,7 +111,7 @@ if donations:
print("\n<b>Your name</b>: " + variables.name + "\n<b>Card post</b>: " + variables.url) print("\n<b>Your name</b>: " + variables.name + "\n<b>Card post</b>: " + variables.url)
if len(games) > 4: if len(games) > 4:
print("<b>Category</b>: Games") print("\n<b>Category</b>: Games")
if len(games) == 35: if len(games) == 35:
print("<b>Tier</b>: VII") print("<b>Tier</b>: VII")
elif len(games) == 30: elif len(games) == 30:
@ -138,7 +138,7 @@ if len(games) > 4:
print(gamestring) print(gamestring)
if len(trades) > 2: if len(trades) > 2:
print("<b>Category</b>: Trades") print("\n<b>Category</b>: Trades")
if len(trades) == 21: if len(trades) == 21:
print("<b>Tier</b>: VII") print("<b>Tier</b>: VII")
elif len(trades) == 18: elif len(trades) == 18:
@ -165,7 +165,7 @@ if len(trades) > 2:
print(tradestring) print(tradestring)
if services > 0: if services > 0:
print("<b>Category</b>: Services") print("\n<b>Category</b>: Services")
if services == 5: if services == 5:
print("<b>Tier</b>: V") print("<b>Tier</b>: V")
elif services == 4: elif services == 4:

View file

@ -9,6 +9,7 @@ banner = False
lowpriority = ["deckname","nameofadeck"] lowpriority = ["deckname","nameofadeck"]
trademedium = True trademedium = True
tradepost = "URL" tradepost = "URL"
hiatus = False
faves = ["favecard01","favecard02"] faves = ["favecard01","favecard02"]
headerbackground = "#000000" headerbackground = "#000000"
british = True british = True