From f22e2994ce5cd8b9564c5e7e205fb8659a5029b5 Mon Sep 17 00:00:00 2001 From: 0ceanSlim Date: Wed, 21 Feb 2024 10:31:56 -0500 Subject: [PATCH] styling stats --- static/js/updateMonsterFamily.js | 2 +- static/js/updateMonsterName.js | 2 +- static/js/updateMonsterStats.js | 13 +++++++------ static/style/output.css | 8 ++++++++ templates/app.html | 32 ++++++++++++++++++-------------- 5 files changed, 35 insertions(+), 22 deletions(-) diff --git a/static/js/updateMonsterFamily.js b/static/js/updateMonsterFamily.js index 40fda5c..2a70cbf 100644 --- a/static/js/updateMonsterFamily.js +++ b/static/js/updateMonsterFamily.js @@ -8,7 +8,7 @@ function updateMonsterFamily() { .then(data => { // Update the HTML content with the monster family var familyContainer = document.getElementById("monsterFamilyContainer"); - familyContainer.innerHTML = `

${data.Family}

`; + familyContainer.innerHTML = `

Family: ${data.Family}

`; }) .catch(error => { console.error("Error fetching monster family:", error); diff --git a/static/js/updateMonsterName.js b/static/js/updateMonsterName.js index 24677dc..ca7ba39 100644 --- a/static/js/updateMonsterName.js +++ b/static/js/updateMonsterName.js @@ -8,7 +8,7 @@ function updateMonsterName() { .then(data => { // Update the HTML content with the monster name var nameContainer = document.getElementById("monsterNameContainer"); - nameContainer.innerHTML = `

${data.name}

`; + nameContainer.innerHTML = `

${data.name}

`; }) .catch(error => { console.error("Error fetching monster name:", error); diff --git a/static/js/updateMonsterStats.js b/static/js/updateMonsterStats.js index c047950..50f96b1 100644 --- a/static/js/updateMonsterStats.js +++ b/static/js/updateMonsterStats.js @@ -8,13 +8,14 @@ function updateMonsterStats() { .then(data => { // Update the HTML content with the monster stats var statsContainer = document.getElementById("monsterStatsContainer"); - statsContainer.innerHTML = `

Agility: ${data.Agility}

-

Attack: ${data.Attack}

-

Defense: ${data.Defense}

-

Experience: ${data.Experience}

-

Health Points: ${data["Health Points"]}

+ statsContainer.innerHTML = `

Max Level: ${data["Max Level"]}

+

Experience: ${data.Experience}

+

Health Points: ${data["Health Points"]}

+

Attack: ${data.Attack}

+

Defense: ${data.Defense}

+

Agility: ${data.Agility}

Intelligence: ${data.Intelligence}

-

Max Level: ${data["Max Level"]}

`; + `; }) .catch(error => { console.error("Error fetching monster stats:", error); diff --git a/static/style/output.css b/static/style/output.css index 1b8f4ac..52f71a1 100644 --- a/static/style/output.css +++ b/static/style/output.css @@ -585,6 +585,10 @@ video { margin-top: 1rem; } +.ml-2 { + margin-left: 0.5rem; +} + .block { display: block; } @@ -626,6 +630,10 @@ video { grid-template-columns: repeat(2, minmax(0, 1fr)); } +.content-center { + align-content: center; +} + .items-center { align-items: center; } diff --git a/templates/app.html b/templates/app.html index bcc9ee8..bec11b6 100644 --- a/templates/app.html +++ b/templates/app.html @@ -29,22 +29,26 @@ > -
- -
+
+
+ +
-
- +
+ +
+ +
+ +
+ +
+ +
+
+ +
- -
- -
- -
- -
-