diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-10-07 16:51:46 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-10 18:16:55 +0100 |
commit | f882ef1e282191424ffad024df64694e9423def2 (patch) | |
tree | 86e3c16f8ed2acd52999a896b15eb1c14dda9cc4 | |
parent | c90f1e3a43709736d7a61c517e94f19b2dff8e8e (diff) | |
download | plantagenet-f882ef1e282191424ffad024df64694e9423def2.tar.gz |
dynamic favicons based on player role
TODO: ... based on current heir
-rw-r--r-- | favicon.png | bin | 17081 -> 0 bytes | |||
-rw-r--r-- | favicons/favicon_henry_vi.png (renamed from favicon_henry_vi.png) | bin | 11353 -> 11353 bytes | |||
-rw-r--r-- | favicons/favicon_march.png (renamed from favicon_march.png) | bin | 14779 -> 14779 bytes | |||
-rw-r--r-- | favicons/favicon_margaret.png (renamed from favicon_margaret.png) | bin | 11615 -> 11615 bytes | |||
-rw-r--r-- | favicons/favicon_warwick.png | bin | 0 -> 14943 bytes | |||
-rw-r--r-- | favicons/favicon_york.png (renamed from favicon_york.png) | bin | 14112 -> 14112 bytes | |||
-rw-r--r-- | play.html | 2 | ||||
-rw-r--r-- | play.js | 13 |
8 files changed, 14 insertions, 1 deletions
diff --git a/favicon.png b/favicon.png Binary files differdeleted file mode 100644 index fbe6ddb..0000000 --- a/favicon.png +++ /dev/null diff --git a/favicon_henry_vi.png b/favicons/favicon_henry_vi.png Binary files differindex 3d7b22c..3d7b22c 100644 --- a/favicon_henry_vi.png +++ b/favicons/favicon_henry_vi.png diff --git a/favicon_march.png b/favicons/favicon_march.png Binary files differindex c6225ad..c6225ad 100644 --- a/favicon_march.png +++ b/favicons/favicon_march.png diff --git a/favicon_margaret.png b/favicons/favicon_margaret.png Binary files differindex 3d9bc1c..3d9bc1c 100644 --- a/favicon_margaret.png +++ b/favicons/favicon_margaret.png diff --git a/favicons/favicon_warwick.png b/favicons/favicon_warwick.png Binary files differnew file mode 100644 index 0000000..1baf53c --- /dev/null +++ b/favicons/favicon_warwick.png diff --git a/favicon_york.png b/favicons/favicon_york.png Binary files differindex 0ffb8be..0ffb8be 100644 --- a/favicon_york.png +++ b/favicons/favicon_york.png @@ -5,7 +5,7 @@ <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1"> <meta charset="utf-8"> <title>PLANTAGENET</title> -<link rel="icon" href="favicon_york.png"> +<link id="favicon" rel="icon" href="favicons/favicon_warwick.png"> <link rel="stylesheet" href="/fonts/fonts.css"> <link rel="stylesheet" href="/common/play.css"> <link rel="stylesheet" href="play.css"> @@ -558,6 +558,7 @@ let expand_calendar = -1 let expand_track = -1 const ui = { + favicon: document.getElementById("favicon"), locale: [], locale_name: [], locale_markers: [], @@ -1460,6 +1461,18 @@ function update_vassals() { function on_update() { restart_cache() + switch (player) { + case "York": + ui.favicon.href = "favicons/favicon_york.png" + break + case "Lancaster": + ui.favicon.href = "favicons/favicon_henry_vi.png" + break + default: + ui.favicon.href = "favicons/favicon_warwick.png" + break + } + for (let i = 0; i <= 16; ++i) { calendar_layout_cylinder[i] = [] calendar_layout_vassal[i] = [] |