File: //var/www/viitorx.stgviitor.com/wp-content/themes/viitorx/archive-case_study.php
<?php
/**
* The template for displaying case study archives
*
* @package ViitorX
*/
get_header();
?>
<div class="archive-case-study">
<main id="primary" class="site-main">
<section class="hero-inner hero-cs" aria-label="<?php esc_attr_e( 'Case study hero', 'viitorx' ); ?>">
<?php get_template_part( 'template-parts/hero-wordmark' ); ?>
<video class="hero-inner__video" autoplay muted loop playsinline preload="metadata" fetchpriority="high" aria-hidden="true">
<source src="<?php echo esc_url( get_template_directory_uri() . '/assets/videos/inner-page-hero-video.webm' ); ?>" type="video/webm">
</video>
<div class="hero-inner__overlay" aria-hidden="true"></div>
<div class="container hero-inner__content" data-section-reveal>
<nav class="hero-breadcrumb" aria-label="<?php esc_attr_e( 'Breadcrumb', 'viitorx' ); ?>">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Home', 'viitorx' ); ?></a>
<span class="hero-breadcrumb__sep" aria-hidden="true">></span>
<span class="hero-breadcrumb__current"><?php esc_html_e( 'Case studies', 'viitorx' ); ?></span>
</nav>
<h1 class="hero-inner__title"><?php esc_html_e( 'The Experiences Already Built', 'viitorx' ); ?></h1>
<p class="hero-inner__subtitle"><?php esc_html_e( 'We architect environments that dissolve the boundary between sensation and reality.', 'viitorx' ); ?></p>
</div>
</section>
<!-- ═══════════════════════════════════════════
SECTION: THE WORLDS WE'VE BUILT
════════════════════════════════════════════ -->
<section class="worlds" aria-label="<?php esc_attr_e('Case studies', 'viitorx'); ?>" data-section-reveal>
<h2 class="worlds__title"><?php _e("The Worlds We've Built", 'viitorx'); ?></h2>
<div class="cs-grid">
<?php $viitorx_cs_loop_i = 0; if (have_posts()) : while (have_posts()) : the_post(); $viitorx_cs_loop_i++; ?>
<?php
$badge = get_post_meta(get_the_ID(), 'case_study_badge', true);
$viitorx_cs_eager = ( 1 === $viitorx_cs_loop_i || 2 === $viitorx_cs_loop_i );
?>
<a class="cs-card" href="<?php the_permalink(); ?>" aria-label="<?php printf(esc_attr__('View Case Study: %s', 'viitorx'), the_title_attribute('echo=0')); ?>">
<?php if (has_post_thumbnail()) : ?>
<?php echo get_the_post_thumbnail(
null,
'large',
array(
'class' => 'cs-card__img',
'alt' => esc_attr( get_the_title() ),
'loading' => $viitorx_cs_eager ? 'eager' : 'lazy',
'decoding' => 'async',
'fetchpriority' => $viitorx_cs_eager ? 'high' : 'auto',
)
); ?>
<?php else : ?>
<div class="cs-card__img" style="background-color: #333;"></div>
<?php endif; ?>
<?php if ($badge) : ?>
<div class="cs-card__badge"><?php echo esc_html($badge); ?></div>
<?php endif; ?>
<div class="cs-card__info">
<h3 class="cs-card__title"><?php the_title(); ?></h3>
<p class="cs-card__desc"><?php echo get_the_excerpt(); ?></p>
</div>
</a>
<?php endwhile; ?>
<?php else : ?>
<p><?php _e('No case studies found.', 'viitorx'); ?></p>
<?php endif; ?>
</div>
<?php
global $wp_query;
$viitorx_cs_paged = max(1, (int) get_query_var('paged'), (int) get_query_var('page'));
?>
<div class="blog-pagination-shell cs-pagination-shell blog-container" <?php echo (isset($wp_query->max_num_pages) && $wp_query->max_num_pages <= 1) ? ' hidden' : ''; ?>>
<?php if (isset($wp_query->max_num_pages) && $wp_query->max_num_pages > 1) : ?>
<nav class="blog-pagination" aria-label="<?php esc_attr_e('Case studies pagination', 'viitorx'); ?>">
<?php
echo wp_kses_post(
paginate_links(
array(
'total' => $wp_query->max_num_pages,
'current' => $viitorx_cs_paged,
'mid_size' => 2,
'prev_text' => __('« Previous', 'viitorx'),
'next_text' => __('Next »', 'viitorx'),
'type' => 'list',
)
)
);
?>
</nav>
<?php endif; ?>
</div>
</section>
<!-- ═══════════════════════════════════════════
SECTION: QUOTE
════════════════════════════════════════════ -->
<section class="cs-quote" aria-label="<?php esc_attr_e('Belief', 'viitorx'); ?>" data-section-reveal>
<p class="cs-quote__text"><?php _e('Every project on this page started as a conversation. <em class="cs-quote__accent">The brief changed. The ambition did not.</em>, Neither did our commitment to making it real.', 'viitorx'); ?></p>
</section>
<?php get_template_part( 'template-parts/contact-form-section' ); ?>
</main>
</div>
<?php get_footer(); ?>