Skip to content

Commit

Permalink
Added main carousel component
Browse files Browse the repository at this point in the history
  • Loading branch information
Fer-Bar committed Feb 15, 2024
1 parent 302bfea commit 25574e1
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pet/static/pet/css/main_carousel.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.carousel {
margin-bottom: 4rem;
}

.carousel-caption {
bottom: 3rem;
z-index: 10;
}

.carousel-item {
height: 32rem;
}

@media (min-width: 40em) {
.carousel-caption p {
margin-bottom: 1.25rem;
font-size: 1.25rem;
line-height: 1.4;
}
}
49 changes: 49 additions & 0 deletions pet/templates/pet/main_carousel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<div id="myCarousel" class="carousel slide mb-6" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#myCarousel" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#myCarousel" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#myCarousel" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="https://images.unsplash.com/photo-1579033461380-adb47c3eb938?fit=crop&w=1964&q=100" class="d-block c-img" alt="Slide 1">
<div class="container">
<div class="carousel-caption text-end">
<h1>Example headline.</h1>
<p class="opacity-75">Some representative placeholder content for the first slide of the carousel.</p>
<p><a class="btn btn-lg btn-primary" href="#">Sign up today</a></p>
</div>
</div>
</div>
<div class="carousel-item">
<img src="https://images.unsplash.com/photo-1579033461380-adb47c3eb938?fit=crop&w=1964&q=100" class="d-block c-img" alt="Slide 2">
<div class="container">
<div class="carousel-caption text-end">
<h1>Example headline.</h1>
<p class="opacity-75">Some representative placeholder content for the first slide of the carousel.</p>
<p><a class="btn btn-lg btn-primary" href="#">Sign up today</a></p>
</div>
</div>
</div>
<div class="carousel-item">
<img src="https://images.unsplash.com/photo-1579033461380-adb47c3eb938?fit=crop&w=1964&q=100" class="d-block c-img" alt="Slide 1">
<div class="container">
<div class="carousel-caption text-end">
<h1>Example headline.</h1>
<p class="opacity-75">Some representative placeholder content for the first slide of the carousel.</p>
<p><a class="btn btn-lg btn-primary" href="#">Sign up today</a></p>
</div>
</div>
</div>


</div>
<button class="carousel-control-prev" type="button" data-bs-target="#myCarousel" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#myCarousel" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>

0 comments on commit 25574e1

Please sign in to comment.