Skip to content
Snippets Groups Projects
Commit 0c22257f authored by MaikoVoigt's avatar MaikoVoigt
Browse files

kleine Anpassungen

parent 1c629fa8
No related branches found
No related tags found
No related merge requests found
......@@ -71,7 +71,7 @@ Um auf bestimmte für das Projekt notwendige Ressourcen zugreifen zu können, m
- EINEN Zug zurücknehmen.
- Zug vorschlagen.
- Live-Chat.
- Farb- und Statusindikator
- Farb- und Statusindikator.
## Beitrag
......
......@@ -70,9 +70,12 @@ export function placePieces(fen, status){
// Status setzen
let statusIndicator = document.getElementById("statusIndicator");
let statusSymbol = statusIndicator.getElementsByClassName("chessPiece");
let statusSymbol = statusIndicator.getElementsByClassName("statusSymbol");
statusSymbol[0].innerHTML = setStatus(status);
if (status) {
statusIndicator.title = status;
}
}
export async function clickField(event){ // Hauptfunktion wenn Schachfeld angeklickt
......
......@@ -92,13 +92,13 @@ export function setStatus(status) { // reagiert auf Status
return "🕦";
case "Checkmate":
if (confirm("SCHACHMATT! \n Spiel neustarten?")) {
if (confirm("SCHACHMATT!\nSpiel neustarten?")) {
resetGame();
}
return "&#10060";
case "Draw":
if (confirm("UNENTSCHIEDEN! \n Spiel neustarten?")) {
if (confirm("UNENTSCHIEDEN!\nSpiel neustarten?")) {
resetGame();
}
return "&#8776";
......
......@@ -44,7 +44,7 @@ a {
font-size: var(--boardPosition-scale);
}
.chessPiece {
.chessPiece, .statusSymbol {
font-size: var(--chessPiece-scale);
line-height: 1.5;
font-family: 'Times New Roman', Times, serif;
......@@ -188,5 +188,4 @@ a {
left: 0.2vmin;
font-size: var(--boardPosition-scale);
color: black;
}
<div id="colorIndicator"><span class="indicatorText">Farbe</span><span class="chessPiece"></span></div>
<div id="statusIndicator"><span class="indicatorText">Status</span><span class="chessPiece"></span></div>
<div id="colorIndicator"><span class="indicatorText">Farbe am Zug</span><span class="chessPiece"></span></div>
<div id="statusIndicator"><span class="indicatorText">Status</span><span class="statusSymbol"></span></div>
<div class="container">
<header class="d-flex justify-content-center py-3">
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center mb-3">
......
<div id="colorIndicator"><span class="indicatorText">Farbe</span><span class="chessPiece"></span></div>
<div id="statusIndicator"><span class="indicatorText">Status</span><span class="chessPiece"></span></div>
<div id="colorIndicator"><span class="indicatorText">Farbe am Zug</span><span class="chessPiece"></span></div>
<div id="statusIndicator"><span class="indicatorText">Status</span><span class="statusSymbol"></span></div>
<div class="container">
<header class="d-flex justify-content-center py-3">
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center mb-3">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment