added favicon

This commit is contained in:
evanpelle
2024-08-24 13:42:51 -07:00
parent 3c3bb7af54
commit 1c181fa1e2
2 changed files with 10 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

+10
View File
@@ -7,6 +7,8 @@ import {loadTerrainMap, TerrainMap} from "../core/TerrainMapLoader";
import {ClientGame, createClientGame} from "./ClientGame";
import {v4 as uuidv4} from 'uuid';
import backgroundImage from '../../resources/images/VintageMap.png';
import favicon from '../../resources/images/Favicon.png';
import './styles.css';
@@ -30,6 +32,7 @@ class Client {
}
initialize(): void {
setFavicon()
this.terrainMap = loadTerrainMap()
this.startLobbyPolling()
}
@@ -145,3 +148,10 @@ document.addEventListener('DOMContentLoaded', () => {
document.body.style.backgroundImage = `url(${backgroundImage})`;
function setFavicon(): void {
const link = document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'shortcut icon';
link.href = favicon;
document.head.appendChild(link);
}