Skip to content

Commit

Permalink
feat (media queries) : mobile screens (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
codexarama committed Apr 26, 2021
1 parent 13a86ff commit 0db63dc
Show file tree
Hide file tree
Showing 13 changed files with 254 additions and 83 deletions.
173 changes: 127 additions & 46 deletions css/styles.css

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

4 changes: 2 additions & 2 deletions js/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const btnContact = document.querySelector('.btn-contact');
const setId = (photographer) => {
const id = elmtFactory(
'article',
{ class: 'id' },
{ class: 'id__card' },
elmtFactory(
'div',
{ class: 'id__card' },
{ class: 'id__infos' },
elmtFactory('h2', { class: 'card__name' }, `${photographer.name}`),
elmtFactory(
'p',
Expand Down
1 change: 1 addition & 0 deletions sass/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
body {
box-sizing: border-box;
width: 90%;
max-width: 1150px;
margin: 10px auto;

a,
Expand Down
5 changes: 5 additions & 0 deletions sass/base/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ body {
}
}

nav {
text-align: center;
line-height: 2em;
}

.card {
&__name {
font-size: $l;
Expand Down
14 changes: 13 additions & 1 deletion sass/components/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
// liste déroulante FILTRES : "popularité" - "date" - "titre"
// page pro photographe
.filter {

&__title {
margin-right: 10px;
margin-top: 10px;
Expand Down Expand Up @@ -115,3 +114,16 @@
}
}
}

@media only screen and (max-width: 600px) {
.btn-homepage {
display: none;
}
.id__contact {
margin-top: 10px;
position: fixed;
bottom: 25px;
width: 90%;
text-align: center;
}
}
11 changes: 7 additions & 4 deletions sass/layout/_card.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
.card {
display: flex;
flex-direction: column;
width: 33%;
justify-content: center;
align-items: center;
text-align: center;
margin-bottom: 50px;

Expand Down Expand Up @@ -33,3 +29,10 @@
margin-top: 10px;
}
}

@media only screen and (max-width: 600px) {
.card {
width: 100%;
margin-bottom: 25px;
}
}
12 changes: 9 additions & 3 deletions sass/layout/_filter.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.filter {
display: inline-flex;
margin: 50px 0;
}
display: inline-flex;
margin: 50px 0;
}

@media only screen and (max-width: 600px) {
.filter {
display: none;
}
}
Loading

0 comments on commit 0db63dc

Please sign in to comment.