git repos / oastat_static_web_generator

commit 9497153e

Poul Sander · 2026-01-19 18:57
9497153e11a0dda47ac5d706eef4ec032f92958c patch · browse files
parent aa1c125d30f669cee5beda99b834a1e8adb2a94e

Also write gametype on the game page

Changed files

M src/pages/game.cpp before
M templates/game.tpl before
diff --git a/src/pages/game.cpp b/src/pages/game.cpp index 922d5fb..e1f0140 100644 --- a/src/pages/game.cpp +++ b/src/pages/game.cpp
@@ -31,6 +31,7 @@ void write_html_game(cppdb::session& database, const OastatGame& game, const std
game_tpl.SetValue("GENERATION_DATE", timestamp_now_as_string(database));
game_tpl.SetValue("GAME_NUMBER", std::to_string(game.gamenumber));
game_tpl.SetValue("GAME_MAP", game.mapname);
+ game_tpl.SetValue("GAME_GAMETYPE", getGametypeName(game.gametype));
game_tpl.SetValue("GAME_SERVERNAME", game.servername);
std::vector<std::pair<int,int>> scores;
diff --git a/templates/game.tpl b/templates/game.tpl index 886ea1c..a911240 100644 --- a/templates/game.tpl +++ b/templates/game.tpl
@@ -41,7 +41,7 @@
<body>
<div class="main-section">
<div class="intro">OpenArena Stats - Game {{GAME_NUMBER}}</div>
- {{GAME_MAP}} at {{GAME_SERVERNAME}}
+ {{GAME_GAMETYPE}} on {{GAME_MAP}} at {{GAME_SERVERNAME}}
<div class="levelshot">
<img src="../static/images/oa640x400/{{GAME_MAP}}.jpg" alt="{{GAME_MAP}}">
</div>