From 6a8a0c40e64ffb5b15c09a78953050deacda16f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Wed, 5 Jun 2024 21:30:43 +0100 Subject: [PATCH] Make the unibar clickable --- build/backloggery.css | 4 +++- library.py | 37 +++++++++++++++++++++++++++++++------ sublibrary.py | 35 ++++++++++++++++++++++++++++++----- 3 files changed, 64 insertions(+), 12 deletions(-) diff --git a/build/backloggery.css b/build/backloggery.css index d905682..38e68ca 100644 --- a/build/backloggery.css +++ b/build/backloggery.css @@ -239,7 +239,9 @@ svg text { width:100% } - +.unibar a { + color: inherit; +} .Added,.unplayed,.Unplayed { background-color:var(--unplayed-color)!important; diff --git a/library.py b/library.py index 31f86a7..4cf1f3b 100644 --- a/library.py +++ b/library.py @@ -1,5 +1,5 @@ import os -import cardstring,gamesort,skeleton +import cardstring,gamesort,skeleton,variables """ Generates library page @@ -17,15 +17,40 @@ def library(local=False): filewrite = open(output, "a") filewrite.write("
\n
\n
\n
\n Total Found " + str(gamesort.total(gamesort.games)) + "\n
\n") if gamesort.unplayed(gamesort.games) > 0: - filewrite.write("
" + str(gamesort.unplayed(gamesort.games)) + "
\n") + filewrite.write(" \n") if gamesort.unfinished(gamesort.games) > 0: - filewrite.write("
" + str(gamesort.unfinished(gamesort.games)) + "
\n") + filewrite.write(" \n") if gamesort.beaten(gamesort.games) > 0: - filewrite.write("
" + str(gamesort.beaten(gamesort.games)) + "
\n") + filewrite.write(" \n") if gamesort.completed(gamesort.games) > 0: - filewrite.write("
" + str(gamesort.completed(gamesort.games)) + "
\n") + filewrite.write(" \n") if gamesort.endless(gamesort.games) > 0: - filewrite.write("
" + str(gamesort.endless(gamesort.games)) + "
\n") + filewrite.write(" \n") filewrite.write("
\n
\n") newgames = sorted(gamesort.games,key=lambda d: d["id"]) diff --git a/sublibrary.py b/sublibrary.py index 0c11a7f..7fcaeb6 100644 --- a/sublibrary.py +++ b/sublibrary.py @@ -128,15 +128,40 @@ def sublibrary(local=False): filewrite.write("\">1 Statusx\n") filewrite.write("
\n
\n
\n Total Found " + str(gamesort.total(filterlist)) + "\n
\n") if gamesort.unplayed(filterlist) > 0: - filewrite.write("
" + str(gamesort.unplayed(filterlist)) + "
\n") + filewrite.write(" \n") if gamesort.unfinished(filterlist) > 0: - filewrite.write("
" + str(gamesort.unfinished(filterlist)) + "
\n") + filewrite.write(" \n") if gamesort.beaten(filterlist) > 0: - filewrite.write("
" + str(gamesort.beaten(filterlist)) + "
\n") + filewrite.write(" \n") if gamesort.completed(filterlist) > 0: - filewrite.write("
" + str(gamesort.completed(filterlist)) + "
\n") + filewrite.write(" \n") if gamesort.endless(filterlist) > 0: - filewrite.write("
" + str(gamesort.endless(filterlist)) + "
\n") + filewrite.write(" \n") filewrite.write("
\n
\n") newgames = sorted(filterlist,key=lambda d: d["id"])