73 lines
3.1 KiB
HTML
73 lines
3.1 KiB
HTML
<!-- Reusable Hero Section Component -->
|
|
<section class="hero-section">
|
|
<div class="floating-elements">
|
|
<div class="floating-element"></div>
|
|
<div class="floating-element"></div>
|
|
<div class="floating-element"></div>
|
|
</div>
|
|
<div class="container text-center position-relative">
|
|
<h1 class="display-{{ title_size|default('3') }} fw-bold mb-4">{{ title }}</h1>
|
|
<p class="lead fs-{{ description_size|default('4') }} mb-5">{{ description }}</p>
|
|
{% if buttons %}
|
|
<div class="d-flex justify-content-center gap-3 flex-wrap">
|
|
{% for button in buttons %}
|
|
{% if button.type == 'link' %}
|
|
<a href="{{ button.url }}" class="btn btn-{{ button.style|default('light') }} btn-lg px-5 py-3">
|
|
{% if button.icon %}<i class="{{ button.icon }} me-2"></i>{% endif %}{{ button.text }}
|
|
</a>
|
|
{% elif button.type == 'modal' %}
|
|
<button type="button" class="btn btn-{{ button.style|default('outline-light') }} btn-lg px-5 py-3" data-bs-toggle="modal" data-bs-target="{{ button.target }}">
|
|
{% if button.icon %}<i class="{{ button.icon }} me-2"></i>{% endif %}{{ button.text }}
|
|
</button>
|
|
{% elif button.type == 'button' %}
|
|
<button type="button" class="btn btn-{{ button.style|default('light') }} btn-lg px-5 py-3" onclick="{{ button.onclick }}">
|
|
{% if button.icon %}<i class="{{ button.icon }} me-2"></i>{% endif %}{{ button.text }}
|
|
</button>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</section>
|
|
|
|
<style>
|
|
.hero-section {
|
|
background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
|
|
color: white;
|
|
padding: 120px 0 100px 0;
|
|
position: relative;
|
|
z-index: 1;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.floating-elements {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
pointer-events: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.floating-element {
|
|
position: absolute;
|
|
width: 60px;
|
|
height: 60px;
|
|
background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
|
|
border-radius: 50%;
|
|
opacity: 0.3;
|
|
animation: float-around 8s ease-in-out infinite;
|
|
}
|
|
|
|
.floating-element:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
|
|
.floating-element:nth-child(2) { top: 60%; right: 15%; animation-delay: 2s; }
|
|
.floating-element:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 4s; }
|
|
|
|
@keyframes float-around {
|
|
0%, 100% { transform: translate(0, 0) rotate(0deg); }
|
|
25% { transform: translate(20px, -20px) rotate(90deg); }
|
|
50% { transform: translate(-10px, -40px) rotate(180deg); }
|
|
75% { transform: translate(-30px, -10px) rotate(270deg); }
|
|
}
|
|
</style> |