Favicon embed, places on run pages

This commit is contained in:
Zachary Talis 2021-06-27 00:30:26 -04:00
parent c4bf815026
commit b97e0bffc6
5 changed files with 17 additions and 4 deletions

View file

@ -8,10 +8,11 @@ from utils.gen import runs as gen_runs
print("Generating homepage...")
gen_index.generate("../templates", "..", "index.html")
print("Generating leaderboard pages for each category...")
gen_categories.generate("../templates", "../categories", "category.html")
print("Generating details pages for each run...")
gen_runs.generate("../templates", "../runs", "run.html")
print("Generating leaderboard pages for each category...")
gen_categories.generate("../templates", "../categories", "category.html")
print("Done generating site!")

View file

@ -92,7 +92,16 @@ def generate(templatedir, destinationdir, templateFilename):
thisDate = thisRun["tk_run_date"]
lk_leaderboard += f'<tr><th>{place}.</th><th>{thisRunner}</th><th><a href="{thisLink}">{thisDuration}</a></th><th>{thisDate}</th></tr>'
# Also handle replacing lk_run_place on run pages
util_file.replaceTextInFile(
f"{destinationdir}/../runs/{thisRunId}/index.html",
"lk_run_place",
str(place),
)
place += 1
lk_leaderboard += "</table>"
util_file.replaceTextInFile(

View file

@ -14,6 +14,7 @@
<meta property="og:type" content="website" />
<meta property="og:description" content="tk_category_rules" />
<meta property="og:url" content="tk_url/tk_category_dashname/index.html" />
<meta property="og:image" content="https://tk_url/assets/img/logo.png" />
<meta property="og:image:secure_url" content="https://tk_url/assets/img/logo.png" />
<meta property="og:image:alt" content="tk_logo_alt" />

View file

@ -14,6 +14,7 @@
<meta property="og:type" content="website" />
<meta property="og:description" content="tk_game_description" />
<meta property="og:url" content="tk_url" />
<meta property="og:image" content="https://tk_url/assets/img/logo.png" />
<meta property="og:image:secure_url" content="https://tk_url/assets/img/logo.png" />
<meta property="og:image:alt" content="tk_logo_alt" />

View file

@ -14,6 +14,7 @@
<meta property="og:type" content="website" />
<meta property="og:description" content="tk_run_description" />
<meta property="og:url" content="tk_url/tk_run_id/index.html" />
<meta property="og:image" content="https://tk_url/assets/img/logo.png" />
<meta property="og:image:secure_url" content="https://tk_url/assets/img/logo.png" />
<meta property="og:image:alt" content="tk_logo_alt" />
@ -24,7 +25,7 @@
<body>
<h1><a href="../../">tk_game_name</a> - tk_run_runner's run</h1>
<h2><a href="../../categories/tk_category_dashname">tk_category_name<a></h2>
<p>lk_run_duration</p>
<p>lk_run_duration (rank #lk_run_place)</p>
<p>Verified by <strong>tk_run_verifier</strong></p>
<p>Took place on <strong>tk_run_date</strong></p>
lk_run_link