v3
This commit is contained in:
parent
bd1a0b96c9
commit
018ea4ccf9
@ -17,5 +17,16 @@
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
// Change navbar background on scroll
|
||||
const nav = document.getElementById('main-nav');
|
||||
window.addEventListener('scroll', () => {
|
||||
if (window.scrollY >= 50) {
|
||||
nav.classList.add('navbar-scrolled');
|
||||
} else {
|
||||
nav.classList.remove('navbar-scrolled');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
<div class="page-wrapper">
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top">
|
||||
<div class="container-fluid px-lg-5">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top" id="main-nav">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">AmaFlix</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
@ -29,67 +29,63 @@
|
||||
|
||||
<!-- Hero Section -->
|
||||
{% if featured_movie %}
|
||||
<header class="hero-section" style="background-image: url('{{ featured_movie.thumbnail_url }}');">
|
||||
<div class="hero-content-wrapper">
|
||||
<div class="hero-content">
|
||||
<h1 class="hero-title">{{ featured_movie.title }}</h1>
|
||||
<p class="hero-description">{{ featured_movie.description|truncatewords:30 }}</p>
|
||||
<div class="hero-buttons">
|
||||
<a href="{{ featured_movie.video_url }}" target="_blank" class="btn btn-play"><i class="bi bi-play-fill"></i> Play</a>
|
||||
<a href="#" class="btn btn-more-info"><i class="bi bi-info-circle"></i> More Info</a>
|
||||
</div>
|
||||
<header class="hero-section">
|
||||
<div class="hero-backdrop" style="background-image: url('{{ featured_movie.thumbnail_url }}');"></div>
|
||||
<div class="hero-content">
|
||||
<h1 class="hero-title">{{ featured_movie.title }}</h1>
|
||||
<p class="hero-description">{{ featured_movie.description|truncatewords:30 }}</p>
|
||||
<div class="hero-buttons">
|
||||
<a href="{{ featured_movie.video_url }}" target="_blank" class="btn btn-play">
|
||||
<i class="bi bi-play-fill"></i> Play
|
||||
</a>
|
||||
<a href="#" class="btn btn-more-info">
|
||||
<i class="bi bi-info-circle"></i> More Info
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-fade"></div>
|
||||
</header>
|
||||
{% endif %}
|
||||
|
||||
<!-- Movie Carousels -->
|
||||
<main class="container-fluid movie-sections">
|
||||
<main class="movie-sections">
|
||||
<section class="movie-carousel-section">
|
||||
<h2 class="section-title">Trending Now</h2>
|
||||
<div class="movie-carousel-wrapper">
|
||||
<div class="movie-carousel">
|
||||
{% for movie in trending_movies %}
|
||||
<div class="movie-card">
|
||||
<img src="{{ movie.thumbnail_url }}" alt="{{ movie.title }}">
|
||||
<div class="movie-card-overlay">
|
||||
<h5 class="movie-card-title">{{ movie.title }}</h5>
|
||||
<div class="movie-card-actions">
|
||||
<a href="#" class="btn btn-sm btn-play-icon"><i class="bi bi-play-circle-fill"></i></a>
|
||||
<span class="movie-rating">Rating: {{ movie.rating }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="movie-carousel">
|
||||
{% for movie in trending_movies %}
|
||||
<div class="movie-card">
|
||||
<img src="{{ movie.thumbnail_url }}" class="card-img-top" alt="{{ movie.title }}">
|
||||
<div class="movie-card-body">
|
||||
<h5 class="movie-card-title">{{ movie.title }}</h5>
|
||||
<p class="movie-card-text">Rating: {{ movie.rating }}</p>
|
||||
<a href="#" class="btn btn-sm btn-outline-light">Watch</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="movie-carousel-section">
|
||||
<h2 class="section-title">Top Rated</h2>
|
||||
<div class="movie-carousel-wrapper">
|
||||
<div class="movie-carousel">
|
||||
{% for movie in top_rated_movies %}
|
||||
<div class="movie-card">
|
||||
<img src="{{ movie.thumbnail_url }}" alt="{{ movie.title }}">
|
||||
<div class="movie-card-overlay">
|
||||
<h5 class="movie-card-title">{{ movie.title }}</h5>
|
||||
<div class="movie-card-actions">
|
||||
<a href="#" class="btn btn-sm btn-play-icon"><i class="bi bi-play-circle-fill"></i></a>
|
||||
<span class="movie-rating">Rating: {{ movie.rating }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="movie-carousel">
|
||||
{% for movie in top_rated_movies %}
|
||||
<div class="movie-card">
|
||||
<img src="{{ movie.thumbnail_url }}" class="card-img-top" alt="{{ movie.title }}">
|
||||
<div class="movie-card-body">
|
||||
<h5 class="movie-card-title">{{ movie.title }}</h5>
|
||||
<p class="movie-card-text">Rating: {{ movie.rating }}</p>
|
||||
<a href="#" class="btn btn-sm btn-outline-light">Watch</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="main-footer mt-5 py-4 text-center">
|
||||
<p class="mb-0">AmaFlix © 2025. All Rights Reserved.</p>
|
||||
<footer class="main-footer mt-5 py-4 text-center text-muted">
|
||||
<p class="mb-0">AmaFlix © 2025</p>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@ -1,109 +1,136 @@
|
||||
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');
|
||||
|
||||
:root {
|
||||
--netflix-black: #141414;
|
||||
--netflix-red: #E50914;
|
||||
--primary-text: #FFFFFF;
|
||||
--secondary-text: #A9A9A9;
|
||||
--card-hover-border: #fff;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #141414;
|
||||
color: #fff;
|
||||
background-color: var(--netflix-black);
|
||||
color: var(--primary-text);
|
||||
font-family: 'Roboto', sans-serif;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: 'Bebas Neue', sans-serif;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.page-wrapper {
|
||||
background-color: #141414;
|
||||
background-color: var(--netflix-black);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* --- Navigation --- */
|
||||
.navbar {
|
||||
background-color: rgba(20, 20, 20, 0.8);
|
||||
backdrop-filter: blur(10px);
|
||||
transition: background-color 0.3s ease;
|
||||
#main-nav {
|
||||
background-color: transparent;
|
||||
transition: background-color 0.4s ease-out;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.navbar.scrolled {
|
||||
background-color: #141414;
|
||||
#main-nav.navbar-scrolled {
|
||||
background-color: #0c0c0c;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-family: 'Bebas Neue', sans-serif;
|
||||
color: #E50914 !important;
|
||||
color: var(--netflix-red) !important;
|
||||
font-size: 2.5rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
color: #a9a9a9 !important;
|
||||
color: var(--secondary-text) !important;
|
||||
font-weight: 500;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.nav-link:hover, .nav-link.active {
|
||||
color: #fff !important;
|
||||
color: var(--primary-text) !important;
|
||||
}
|
||||
|
||||
/* --- Hero Section --- */
|
||||
.hero-section {
|
||||
position: relative;
|
||||
height: 90vh;
|
||||
background-size: cover;
|
||||
background-position: center top;
|
||||
height: 95vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 4%;
|
||||
}
|
||||
|
||||
.hero-section::after {
|
||||
.hero-backdrop {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-size: cover;
|
||||
background-position: center 20%;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.hero-section::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(to top, #141414 15%, rgba(20, 20, 20, 0) 50%), linear-gradient(to right, rgba(20, 20, 20, 0.5) 0%, rgba(20, 20, 20, 0) 30%);
|
||||
background: linear-gradient(to right, rgba(20, 20, 20, 0.8) 0%, rgba(20, 20, 20, 0) 50%);
|
||||
}
|
||||
|
||||
.hero-content-wrapper {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 0 5%;
|
||||
.hero-fade {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 15vh;
|
||||
background: linear-gradient(to top, var(--netflix-black) 20%, transparent 100%);
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
max-width: 550px;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
max-width: 40vw;
|
||||
}
|
||||
|
||||
.hero-title {
|
||||
font-size: 5rem;
|
||||
font-family: 'Bebas Neue', sans-serif;
|
||||
font-size: clamp(3rem, 6vw, 6rem);
|
||||
font-weight: bold;
|
||||
text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
|
||||
text-shadow: 0 0 30px rgba(0,0,0,0.8);
|
||||
}
|
||||
|
||||
.hero-description {
|
||||
font-size: 1.2rem;
|
||||
line-height: 1.5;
|
||||
margin: 1rem 0 2rem;
|
||||
text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
|
||||
font-size: clamp(1rem, 1.5vw, 1.2rem);
|
||||
line-height: 1.6;
|
||||
margin: 1.5rem 0 2.5rem;
|
||||
text-shadow: 0 0 20px rgba(0,0,0,0.8);
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.hero-buttons .btn {
|
||||
margin-right: 1rem;
|
||||
font-weight: bold;
|
||||
padding: 0.75rem 2rem;
|
||||
padding: 0.8rem 2.2rem;
|
||||
border-radius: 5px;
|
||||
font-size: 1.1rem;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
gap: 0.7rem;
|
||||
border: none;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.hero-buttons .btn:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.btn-play {
|
||||
background-color: #fff;
|
||||
background-color: var(--primary-text);
|
||||
color: #000;
|
||||
border: none;
|
||||
}
|
||||
.btn-play:hover {
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
@ -111,8 +138,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
.btn-more-info {
|
||||
background-color: rgba(109, 109, 110, 0.7);
|
||||
color: #fff;
|
||||
border: none;
|
||||
color: var(--primary-text);
|
||||
}
|
||||
.btn-more-info:hover {
|
||||
background-color: rgba(109, 109, 110, 0.5);
|
||||
@ -120,27 +146,25 @@ h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
/* --- Movie Carousels --- */
|
||||
.movie-sections {
|
||||
margin-top: -10vh; /* Pulls the carousels up into the hero gradient */
|
||||
margin-top: -10vh; /* Overlap with hero section */
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
z-index: 10;
|
||||
padding: 0 4%;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 1.8rem;
|
||||
font-family: 'Bebas Neue', sans-serif;
|
||||
font-size: 2rem;
|
||||
font-weight: 500;
|
||||
margin-bottom: 1rem;
|
||||
padding: 0 5%;
|
||||
}
|
||||
|
||||
.movie-carousel-wrapper {
|
||||
position: relative;
|
||||
margin-bottom: 1.2rem;
|
||||
}
|
||||
|
||||
.movie-carousel {
|
||||
display: flex;
|
||||
overflow-x: scroll;
|
||||
gap: 10px;
|
||||
padding-bottom: 2rem;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
padding: 0 5% 20px;
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
|
||||
@ -149,44 +173,45 @@ h1, h2, h3, h4, h5, h6 {
|
||||
}
|
||||
|
||||
.movie-card {
|
||||
flex: 0 0 auto;
|
||||
width: 16vw; /* Responsive width */
|
||||
flex: 0 0 18%;
|
||||
max-width: 280px;
|
||||
min-width: 180px;
|
||||
margin-right: 10px;
|
||||
min-width: 200px;
|
||||
background-color: #181818;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
cursor: pointer;
|
||||
background-color: #181818;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
.movie-card img {
|
||||
.movie-card .card-img-top {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: auto;
|
||||
aspect-ratio: 16/9;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.movie-card-overlay {
|
||||
.movie-card-body {
|
||||
padding: 1rem;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
|
||||
padding: 2rem 1rem 1rem;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.movie-card:hover .movie-card-overlay {
|
||||
opacity: 1;
|
||||
background: linear-gradient(to top, #181818 50%, transparent);
|
||||
transition: opacity 0.4s ease;
|
||||
}
|
||||
|
||||
.movie-card:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
|
||||
transform: scale(1.15) translateY(-10px);
|
||||
z-index: 20;
|
||||
border-color: var(--card-hover-border);
|
||||
box-shadow: 0 15px 25px rgba(0,0,0,0.7);
|
||||
}
|
||||
|
||||
.movie-card:hover .movie-card-body {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.movie-card-title {
|
||||
@ -196,28 +221,38 @@ h1, h2, h3, h4, h5, h6 {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.movie-card-actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn-play-icon {
|
||||
color: #fff;
|
||||
font-size: 2rem;
|
||||
}
|
||||
.btn-play-icon:hover {
|
||||
color: #E50914;
|
||||
}
|
||||
|
||||
.movie-rating {
|
||||
.movie-card-text {
|
||||
font-size: 0.8rem;
|
||||
color: #a9a9a9;
|
||||
color: var(--secondary-text);
|
||||
}
|
||||
|
||||
/* --- Footer --- */
|
||||
.main-footer {
|
||||
background-color: #181818;
|
||||
color: #a9a9a9;
|
||||
border-top: 1px solid #222;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 992px) {
|
||||
.hero-content {
|
||||
max-width: 60vw;
|
||||
}
|
||||
.movie-card {
|
||||
flex-basis: 22%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.hero-content {
|
||||
max-width: 80vw;
|
||||
}
|
||||
.hero-description {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
.movie-card {
|
||||
flex-basis: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user