fix: removed repetitve code

This commit is contained in:
shahdlala66
2026-04-19 00:12:13 +02:00
parent 2582f8e4d6
commit 8c97a726a7
2 changed files with 20 additions and 19 deletions
+17 -18
View File
@@ -65,14 +65,6 @@ h2 {
color: #5A2C28; color: #5A2C28;
} }
.move-form input {
border: 2px solid #5A2C28;
border-radius: 10px;
background: #B9DAD1;
padding: 0.6rem 0.75rem;
min-width: 180px;
}
.move-form button { .move-form button {
border: 2px solid #5A2C28; border: 2px solid #5A2C28;
border-radius: 10px; border-radius: 10px;
@@ -88,6 +80,22 @@ h2 {
color: #F3C8A0; color: #F3C8A0;
} }
/* Unified form input class for all text inputs and textareas */
.form-input {
border: 2px solid #5A2C28;
border-radius: 10px;
background: #B9DAD1;
padding: 0.6rem 0.75rem;
font-family: inherit;
min-width: 180px;
}
.form-input:focus {
outline: none;
background: #B9C2DA;
border-color: #BA6D4B;
}
.center-column { .center-column {
width: 100%; width: 100%;
} }
@@ -118,21 +126,12 @@ h2 {
} }
.import-card textarea { .import-card textarea {
border: 2px solid #5A2C28;
border-radius: 8px;
background: #B9DAD1;
padding: 0.6rem 0.75rem;
resize: vertical; resize: vertical;
min-height: 100px; min-height: 100px;
font-family: inherit;
} }
.import-card input { .import-card input {
border: 2px solid #5A2C28; min-width: unset;
border-radius: 8px;
background: #B9DAD1;
padding: 0.6rem 0.75rem;
font-family: inherit;
} }
.btn { .btn {
+3 -1
View File
@@ -18,6 +18,7 @@
<textarea <textarea
id="fenImport" id="fenImport"
name="fenImport" name="fenImport"
class="form-input"
[(ngModel)]="facade.fenInput" [(ngModel)]="facade.fenInput"
rows="4" rows="4"
placeholder="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" placeholder="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
@@ -32,7 +33,7 @@
<section class="top-section"> <section class="top-section">
<form class="move-form" (ngSubmit)="facade.submitMove()"> <form class="move-form" (ngSubmit)="facade.submitMove()">
<label for="uciMove">Play move (UCI)</label> <label for="uciMove">Play move (UCI)</label>
<input id="uciMove" name="uciMove" [(ngModel)]="facade.moveInput" placeholder="e2e4" /> <input id="uciMove" name="uciMove" class="form-input" [(ngModel)]="facade.moveInput" placeholder="e2e4" />
<button type="submit">Send Move</button> <button type="submit">Send Move</button>
</form> </form>
<p class="board-hint">Click your piece to highlight legal targets.</p> <p class="board-hint">Click your piece to highlight legal targets.</p>
@@ -56,6 +57,7 @@
<textarea <textarea
id="pgnImport" id="pgnImport"
name="pgnImport" name="pgnImport"
class="form-input"
[(ngModel)]="facade.pgnInput" [(ngModel)]="facade.pgnInput"
rows="4" rows="4"
placeholder="1. e4 e5 2. Nf3 Nc6 *" placeholder="1. e4 e5 2. Nf3 Nc6 *"