Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/challenge-CSS-05/src/styles/styles.css">
<title>Reto PM FlexboxCard</title>
</head>
<body>
<div class="card">
<div class="card-container">
<section class="album">
<figure class="album-cover" alt="Rozes Under the grave album cover"></figure>
<article class="album-info">
<h2 class="album-title">Rozes</h2>
<p class="album-subtitle">Under the grave<br>(2016)</p>
</article>
</section>
<section class="album-rating">
<p>Rate this album</p>
<div class="rating-stars">
<span class="star">☆</span>
<span class="star">☆</span>
<span class="star">☆</span>
<span class="star">☆</span>
<span class="star">☆</span>
</div>
</section>
</div>
</div>
</body>
</html>
102 changes: 102 additions & 0 deletions src/styles/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400&display=swap');

*{
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root{
--gris: #E5E5E5;
--blanco: #ffffff;
--grisoscuro: #696969;
--naranja: orange;
}
html{
font-size: 62.5%;
width: 100vw;
}
body{
font-size: 1.3rem;
font-family: 'Monserrat', sans-serif;
background-color: var(--gris);
}
.card{
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
align-content: center;
margin: 5rem;
}
.card-container{
display: flex;
flex-wrap: wrap;
width: 35rem;
height: 17rem;
border-radius: .5rem;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1), 0 6px 20px 0 rgba(0, 0, 0, 0.1);
background-color: var(--blanco);
}
.album{
display: flex;
width: inherit;
height: 65%;
border-bottom: solid .1rem var(--gris);
/* box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 3px 10px 0 rgba(0, 0, 0, 0.1); */
}
.album-cover{
width: 35%;
height: 100%;
background-image: url(https://m.media-amazon.com/images/I/81YB9xgNvQL._SS500_.jpg);
background-repeat: none;
background-size: contain;
background-position: center;
margin: 0;
}
.album-info{
display: flex;
flex-direction: column;
width: 60%;
margin: 0;
padding: 1.5rem;
padding-left: 2rem;
justify-content: space-around;
}
.album-title{
font-weight: normal;
font-size: 2.5rem;
}
.album-subtitle{
font-weight: 400;
color: var(--grisoscuro);
}
.album-rating{
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
padding: 0 1.5rem 1rem 1.5rem;
}
.rating-stars{
width: 50%;
display: flex;
justify-content: space-between;
unicode-bidi: bidi-override;
direction: rtl;
}
.star{
color: var(--grisoscuro);
font-size: 2rem;
opacity: .5;
}
.rating-stars > span:hover:before,
.rating-stars > span:hover ~ span:before {
content: "\2605";
position: absolute;
color: var(--naranja);
}
p{
color: var(--grisoscuro);
font-weight: 500;
}