Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive design #14

Merged
merged 14 commits into from
Jun 19, 2019
2 changes: 1 addition & 1 deletion maquetado/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body class="body-detail body-background">
<a href="books-list.html" class="redirect-arrow">Atrás</a>
<div class="book-container row">
<div class="book-container">
<img src="./assets/book-cover.png" class="book-cover">
<div class="column book-info-container">
<div class="row book-title-container">
Expand Down
61 changes: 55 additions & 6 deletions maquetado/scss/books.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
background: url('./assets/book-badge.png') no-repeat center/contain;
content: '';
height: 100px;
left: 220px;
left: 260px;
position: absolute;
top: 0;
transform: rotate(15deg);
Expand All @@ -21,9 +21,9 @@

.book-cover {
display: block;
height: 360px;
margin-right: 40px;
margin-right: 60px;
position: relative;
height: 400px;
}

.book-detail-name {
Expand All @@ -44,7 +44,6 @@

.book-info-container {
flex-grow: 1;
margin-right: 100px;
}

.books-list {
Expand Down Expand Up @@ -76,19 +75,69 @@

.book-title {
font-size: 32px;
margin: 20px 0 40px;
margin: 0;
}

.book-title-container {
align-items: baseline;
margin-bottom: 40px;
margin-bottom: 30px;
position: relative;
&::before {
background-color: $earls-green;
bottom: 20px;
content:'';
height: 4px;
position: absolute;
top: 30px;
width: 100%;
}
}

@media only screen and (max-width: 1024px) {
.book-info-container {
flex-grow: 0;
}

.book-title-container {
margin-bottom: 25px;
}

.book-title {
font-size: 20px;
margin-right: 10px;
}

.book-gender {
font-size: 16px;
}

.book-detail-name {
font-size: 14px;
margin-right: 10px;
margin-bottom: 20px;
}

.book-detail-value {
font-size: 14px;
margin-bottom: 0;
}

.book-container {
flex-direction: column;
max-width: 350px;
Dorian30 marked this conversation as resolved.
Show resolved Hide resolved
margin-bottom: 30px;
padding: 30px;
width: 100%;
&::after {
left: auto;
right: 30px;
top: 15px;
}
}

.book-cover {
height: 300px;
margin: 0 auto 10px;
width: 210px;
}
}
22 changes: 21 additions & 1 deletion maquetado/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

.redirect-arrow {
font-size: 20px;
margin-left: 100px;
position: relative;
transform: translateX(70%);
&::before {
content: '';
background: url(./assets/back-arrow.png) no-repeat;
Expand All @@ -56,3 +56,23 @@
display: flex;
flex-direction: row;
}

@media only screen and (max-width: 1024px) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove empty line

.body-detail {
display: flex;
align-items: center;
flex-direction: column;
Dorian30 marked this conversation as resolved.
Show resolved Hide resolved
}

.redirect-arrow {
margin: 0;
order: 1;
Dorian30 marked this conversation as resolved.
Show resolved Hide resolved
transform: translateX(10%);
}

.height {
line-height: 16px;
}

}