Skip to content

Commit

Permalink
fixed dropdown final
Browse files Browse the repository at this point in the history
  • Loading branch information
SmithMack68 committed Jan 21, 2022
1 parent 373a7f2 commit 4d1d64a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
24 changes: 1 addition & 23 deletions javascripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,13 @@ const insultUrl = "https://shakespeare1.p.rapidapi.com/shakespeare/generate/insu
const insultButton = document.querySelector('#shakesBtn');
const translateContainer = document.querySelector(".translate-container")
const collapsibleHeader = document.querySelector('.collapsible')
//const collapsibleInfo = document.getElementById("info")

//** Event Listeners**//
document.addEventListener('DOMContentLoaded', () => {
translateButton.addEventListener('click', handleTranslate)
insultButton.addEventListener('click', getInsult)
collapsibleHeader.addEventListener('click', hideTranslateContainer)
//collapsibleInfo.addEventListener('click', hideTranslateContainer)
})

//**Functions **//

function hideTranslateContainer(){
if (translateContainer.style.display !== "none") {
translateContainer.style.display = "none"
} else {
translateContainer.style.display = "block"
}
}
// if (collapsibleHeader.style.display = "block") {
// translateContainer.style.display = "none"
// } if (translateContainer.style.display !== "none"){
// translateContainer.style.display = "block"
// } else {
// collapsibleHeader.style.display = "block"
// translateContainer.style.display ="block"
// }
// }

//**Fetches**/
function getInsult(e){
fetch("https://shakespeare1.p.rapidapi.com/shakespeare/generate/insult?limit=5", {
"method": "GET",
Expand Down
3 changes: 2 additions & 1 deletion stylesheets/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ body {
background-color: rgb(24, 23, 23);
color: rgb(247, 240, 231);
margin-top: auto;
z-index: 10;
}

.brand-logo {
Expand All @@ -47,7 +48,7 @@ body {
background-image: url('../shakes2.png');
border: black;
top:38%;
left:7%;
left:4%;
background-color: black;
position: absolute;
width: .05px;
Expand Down

0 comments on commit 4d1d64a

Please sign in to comment.