Skip to content

Commit

Permalink
finalised the modal, by adding the font and sty;ing
Browse files Browse the repository at this point in the history
  • Loading branch information
eliza-an committed Feb 14, 2023
1 parent f279f72 commit b088e4c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
12 changes: 2 additions & 10 deletions assets/js/final.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@


// iterate localStorage
for (var i = 0; i < localStorage.length; i++) {

// set iteration key name
var key = localStorage.key(i);

// use key name to retrieve the corresponding value
var value = localStorage.getItem(key);

// console.log the iteration key and value
console.log(key + ": " + value);
const textsection= document.createElement("p");
const paratext = document.createTextNode(key + ": " + value);
textsection.appendChild(paratext);

const appenddiv = document.getElementById("div1");
appenddiv.appendChild(textsection);
window.localStorage.removeItem(`debug`);
window.localStorage.removeItem(`randomName`)
}

var inputval= nameinput.value

if (inputval=null){
document.getElementById("startBtn").disabled = true;
}else{
document.getElementById("startBtn").disabled = false;
}
2 changes: 1 addition & 1 deletion assets/js/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ $.ajax({
function getRandom(response) {
let randomName = [];
randomName.push(pokeNames[Math.floor(Math.random() * pokeNames.length)]);
localStorage.setItem(`randomName`, randomName.toString())
localStorage.setItem(`Your Pokemon Name`, randomName.toString())
return randomName;

}
Expand Down
5 changes: 4 additions & 1 deletion assets/results-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,7 @@ body {
border: 8px solid rgb(255, 0, 0); */
}


.card-body{
font-family: 'DotGothic16', sans-serif;
text-transform:capitalize
}
6 changes: 3 additions & 3 deletions results.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<h5 class="modal-title" id="exampleModalLabel">Previous Result</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
Expand All @@ -34,7 +34,7 @@ <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
<div class="card" style="width: 18rem;">
<img src="..." class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<h5 class="card-title" id="randomNameTitle"></h5>
<p id ="div1" class="card-text"></p>

</div>
Expand All @@ -44,7 +44,7 @@ <h5 class="card-title">Card title</h5>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>

</div>
</div>
</div>
Expand Down

0 comments on commit b088e4c

Please sign in to comment.