Initial theme commit
This commit is contained in:
1
template-parts/content-none.php
Executable file
1
template-parts/content-none.php
Executable file
@@ -0,0 +1 @@
|
||||
<article class="post-card"><div class="single-post"><h2>Kein Inhalt gefunden</h2><p>Hier ist gerade nichts vorhanden.</p></div></article>
|
||||
8
template-parts/content.php
Executable file
8
template-parts/content.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( 'post-card' ); ?>>
|
||||
<?php if ( has_post_thumbnail() ) : ?><a class="card-thumb" href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'large' ); ?></a><?php endif; ?>
|
||||
<div class="card-body">
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
<div class="entry-meta"><span><?php echo esc_html( get_the_date() ); ?></span><span>·</span><span><?php the_author(); ?></span></div>
|
||||
<div class="entry-excerpt"><?php the_excerpt(); ?></div>
|
||||
</div>
|
||||
</article>
|
||||
28
template-parts/slider.php
Executable file
28
template-parts/slider.php
Executable 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>
|
||||
Reference in New Issue
Block a user