Initial theme commit

This commit is contained in:
2026-04-12 22:08:32 +02:00
commit 4d0189a7f2
27 changed files with 2503 additions and 0 deletions

28
template-parts/slider.php Executable file
View File

@@ -0,0 +1,28 @@
<?php $slides = function_exists( 'kgv_classic_slider_items' ) ? kgv_classic_slider_items() : array(); if ( empty( $slides ) ) { return; } ?>
<section class="hero-slider" aria-label="Startseiten-Slideshow">
<div class="slider-track">
<?php foreach ( $slides as $index => $slide ) : ?>
<article class="slide<?php echo 0 === $index ? ' is-active' : ''; ?>">
<img src="<?php echo esc_url( $slide['image'] ); ?>" alt="<?php echo esc_attr( $slide['title'] ); ?>">
<div class="slide-overlay">
<div class="container slide-content">
<h2><?php echo esc_html( $slide['title'] ); ?></h2>
<p><?php echo esc_html( $slide['text'] ); ?></p>
<?php if ( ! empty( $slide['button'] ) && ! empty( $slide['label'] ) ) : ?>
<a class="button" href="<?php echo esc_url( $slide['button'] ); ?>">
<?php echo esc_html( $slide['label'] ); ?>
</a>
<?php endif; ?>
</div>
</div>
</article>
<?php endforeach; ?>
</div>
<?php if ( count( $slides ) > 1 ) : ?>
<div class="slider-dots" aria-hidden="true">
<?php foreach ( $slides as $index => $slide ) : ?>
<button class="slider-dot<?php echo 0 === $index ? ' is-active' : ''; ?>" data-slide="<?php echo esc_attr( $index ); ?>"></button>
<?php endforeach; ?>
</div>
<?php endif; ?>
</section>