Skip to content

Commit

Permalink
some Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoubmamouni committed Nov 26, 2021
1 parent dc078e3 commit 6b7b13e
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 3 deletions.
73 changes: 73 additions & 0 deletions public/images/icons/change.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions public/images/icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 38 additions & 1 deletion public/styles/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/styles/css/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions public/styles/sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ body {
font-family: "Merienda", sans-serif;
background: $primaryColor;
}
a {
text-decoration: none;
}
35 changes: 34 additions & 1 deletion public/styles/sass/page/_play.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ body {
@extend %flexbox;
width: 100%;
padding: 5px;
padding-top: 1rem;
padding-top: 0.3rem;
position: absolute;
top: 0;
z-index: 10;
.user-click-counter {
border: 1px solid $scrollBarColor;
background: $citiesCardBorder;
padding: 1rem;
padding-bottom: 0;
border-radius: 5px;
color: $greyColor;
width: 100%;
Expand All @@ -39,6 +40,38 @@ body {
text-align: center;
background: $primaryColor;
}

.info {
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
@media screen and (max-width: 400px) {
// display: block;
flex-direction: column;
}
img {
width: 20px;
object-fit: contain;
margin-left: 10px;
}
.item {
cursor: pointer;
margin: 2px;
background: $greyColor;
border: 1px solid $scrollBarColor;
color: $cardColor;
padding: 2px;
border-radius: 3px;
display: flex;
align-items: center;
transition: 200ms;
&:hover {
background: darken($greyColor, 10%);
transform: scale(1.03);
}
}
}
}
}

Expand Down
21 changes: 21 additions & 0 deletions views/play.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,21 @@
<div class="user-click-counter">
<h1 id="city"></h1>
<h1 id="userClicks">0</h1>

<div class="info">
<div class="item change-my-city">
<small>Change your city</small>
<img src="images/icons/change.svg" alt="change icon svg">
</div>
<a href="#">
<div class="item view-on-github">
<small>View on github</small>
<img src="images/icons/github.svg" alt="github svg icon">
</div>
</a>
</div>
</div>

</div>

<div class="main-image"></div>
Expand Down Expand Up @@ -84,6 +98,13 @@
let topCity = document.querySelector('#top-city');
let theCityName = document.querySelector('.theCityName');
let changeTheCity = document.querySelector('.change-my-city');
changeTheCity.addEventListener('click', () => {
localStorage.clear()
document.location.reload()
})
userCityName.innerText = data.userCity
topCity.innerText = theCityName.innerText
Expand Down

0 comments on commit 6b7b13e

Please sign in to comment.