cineflex/public/css/main/main.css

84 lines
1.4 KiB
CSS

header {
background: var(--second-bg);
display: grid;
grid-template-columns: 1.5fr 0.5fr;
height: 7vh;
align-items: center;
}
header span {
font-size: 1.5rem;
font-weight: bold;
margin: 0.5rem 1rem;
}
header div {
text-align: right;
display: inline;
}
header div a {
padding: 1.5rem;
}
header div a:hover {
font-size: 1.2rem;
}
main {
margin: 0 auto;
padding: 1rem;
max-width: 800px;
}
/* #movies needs to be a grid with movie poster and show details on hover */
#movies {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-gap: 1rem;
}
#movies a {
position: relative;
overflow: hidden;
border-radius: 0.5rem;
}
#movies a img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s;
}
#movies a:hover img {
transform: scale(1.1);
}
#movies a .details {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
opacity: 0;
padding: 1rem;
max-width: calc(100% - 2rem);
transition: opacity 0.5s;
}
#movies a .details span {
overflow: hidden;
text-overflow: ellipsis;
}
#movies a:hover .details {
opacity: 1;
}