diff --git a/js/index.js b/js/index.js index 518b3ec..1fdbc1a 100644 --- a/js/index.js +++ b/js/index.js @@ -80,13 +80,13 @@ document.addEventListener("DOMContentLoaded", () => { dataInfo.textContent = ""; const data = [ - { text: "Aliases", value: response.name }, - { text: "Strength", value: response.powerstats.strength }, - { text: "Speed", value: response.powerstats.speed }, - { text: "Gender", value: response.appearance.gender }, - { text: "Place of Birth", value: response.biography["place-of-birth"] }, + { text: "Aliases : ", value: response.name }, + { text: "Strength : ", value: response.powerstats.strength }, + { text: "Speed : ", value: response.powerstats.speed }, + { text: "Gender : ", value: response.appearance.gender }, + { text: "Place of Birth : ", value: response.biography["place-of-birth"] }, { - text: "First Appearance", + text: "First Appearance : ", value: response.biography["first-appearance"], }, ]; @@ -96,7 +96,14 @@ document.addEventListener("DOMContentLoaded", () => { let p = document.createElement("p"); h2.textContent = value.text; - p.textContent = value.value || "-"; + // p.textContent = value.text; + let resultSpan = document.createElement("span"); + resultSpan.textContent = value.value || "-"; + resultSpan.style.color = "white"; + resultSpan.style.fontSize = "smaller"; + + h2.appendChild(resultSpan); + root.appendChild(h2); root.appendChild(p); diff --git a/styles/main.css b/styles/main.css index 036614d..b013314 100644 --- a/styles/main.css +++ b/styles/main.css @@ -38,14 +38,18 @@ img { } h1, -h2, +/* h2, */ h3, h4, -h5, -p { +h5{ + text-align: center; color: white; } +h2, p{ + text-align: justify; +} + a { text-decoration: none; }