Skip to content

Commit

Permalink
Merge branch 'master' of github.com:aresnik11/set-game-frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
DanBehrman committed Oct 2, 2019
2 parents 2c93ef7 + 0d3b9ac commit 4bf0905
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 3 additions & 7 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@
grid-gap: 10px;
text-align: center;
}
/*
.options {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 10px;
text-align: center;
} */

.ui.statistic {
display: block;
Expand All @@ -56,6 +49,8 @@
border-color: black;
text-align: center;
border-radius: 15px;
margin: auto;
width: 95%
}

.card:hover {
Expand Down Expand Up @@ -141,6 +136,7 @@
.shapes img {
padding-left: 5px;
padding-right: 5px;
width: 23%;
}

.shapes {
Expand Down
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ function startTimer() {
//listens for clicks on the board
board.addEventListener("click", function(e) {
if (e.target.closest('.card')) {

//if it already was selected, remove the border so it is no longer selected
if (e.target.closest('.card').classList.contains("selected")) {
removeSelected(e.target.closest('.card'))
Expand Down Expand Up @@ -400,11 +401,15 @@ options.addEventListener("click", function(e) {
clearInterval(timer)
e.target.dataset.action = "play"
e.target.innerHTML = "<i class='play icon'></i>Play"
board.classList.remove("fadein")
board.classList.add("fadeout")
}
else if (e.target.dataset.action === "play") {
startTimer()
e.target.dataset.action = "pause"
e.target.innerHTML = "<i class='pause icon'></i>Pause"
board.classList.remove("fadeout")
board.classList.add("fadein")
}
})

Expand Down

0 comments on commit 4bf0905

Please sign in to comment.