Change stats colours
This commit is contained in:
parent
7856cd722b
commit
fb5e797988
1 changed files with 2 additions and 2 deletions
4
stats.py
4
stats.py
|
@ -618,7 +618,7 @@ while takingoff:
|
||||||
else:
|
else:
|
||||||
takingoff = False
|
takingoff = False
|
||||||
maxmonthwords = max(allmonths,key=lambda x:x["words"])
|
maxmonthwords = max(allmonths,key=lambda x:x["words"])
|
||||||
statspage.write("<table class=\"charts-css column show-heading hide-labels hide-data\">\n<caption>Words by month (scroll)</caption>\n")
|
statspage.write("<table class=\"charts-css column show-heading hide-labels hide-data\">\n<caption>Words by month (scrolls sideways)</caption>\n")
|
||||||
for month in allmonths:
|
for month in allmonths:
|
||||||
statspage.write("<tr><th scope=\"row\">" + month["month"] + "</th><td style=\"--size:" + str(round(month["words"] / maxmonthwords["words"],5)) + ";\"><span class=\"data\">" + str(month["words"]) + " words</span><span class=\"tooltip\">" + month["month"] + ": " + str(month["fics"]) + " fic")
|
statspage.write("<tr><th scope=\"row\">" + month["month"] + "</th><td style=\"--size:" + str(round(month["words"] / maxmonthwords["words"],5)) + ";\"><span class=\"data\">" + str(month["words"]) + " words</span><span class=\"tooltip\">" + month["month"] + ": " + str(month["fics"]) + " fic")
|
||||||
if month["fics"] > 1:
|
if month["fics"] > 1:
|
||||||
|
@ -627,5 +627,5 @@ for month in allmonths:
|
||||||
statspage.write("</table>\n")
|
statspage.write("</table>\n")
|
||||||
|
|
||||||
|
|
||||||
statspage.write("</section>\n </main>\n <footer>\n <ul>\n <li><a href=\"/fic\">back to fic pages</a></li>\n </ul>\n </footer>\n </div>\n <a href=\"/\"><img src=\"/a.png\" style=\"position:fixed;bottom:2px;right:2px;\" title=\"home\"></a>\n </body>\n</html>")
|
statspage.write("<p><small>With assistance from <a href=\"https://chartscss.org\" target=\"_blank\">Charts.css</a>. Colour scheme inexpertly taken from <a href=\"https://mildliners.rknight.me\" target=\"_blank\">here</a>.</small></p>\n</section>\n </main>\n <footer>\n <ul>\n <li><a href=\"/fic\">back to fic pages</a></li>\n </ul>\n </footer>\n </div>\n <a href=\"/\"><img src=\"/a.png\" style=\"position:fixed;bottom:2px;right:2px;\" title=\"home\"></a>\n </body>\n</html>")
|
||||||
statspage.close()
|
statspage.close()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue