Includes front-page, strain archive/single templates, header/footer, functions.php with custom post types, and base styles.
153 lines
7 KiB
PHP
153 lines
7 KiB
PHP
<?php
|
|
/**
|
|
* Weedops — Front Page Template
|
|
*
|
|
* Full-width hero with photography-style imagery,
|
|
* followed by featured sections.
|
|
*
|
|
* @package Weedops
|
|
*/
|
|
|
|
get_header();
|
|
?>
|
|
|
|
</div><!-- close .wo-container from header -->
|
|
</main><!-- close .wo-main from header — we'll reopen after hero -->
|
|
|
|
<?php // ── Hero Section ──────────────────────────────────────── ?>
|
|
<section class="wo-hero" role="banner" aria-label="<?php esc_attr_e( 'Welcome to Weedops', 'weedops' ); ?>">
|
|
<div class="wo-hero__overlay"></div>
|
|
<div class="wo-hero__content">
|
|
<span class="wo-hero__eyebrow"><?php esc_html_e( 'Cannabis Intelligence Platform', 'weedops' ); ?></span>
|
|
<h1 class="wo-hero__title">
|
|
<?php esc_html_e( 'Smarter Product Management for the Cannabis Industry', 'weedops' ); ?>
|
|
</h1>
|
|
<p class="wo-hero__subtitle">
|
|
<?php esc_html_e( 'Compliance tracking, strain databases, and inventory tools built for dispensaries, growers, and brands.', 'weedops' ); ?>
|
|
</p>
|
|
<div class="wo-hero__actions">
|
|
<a href="<?php echo esc_url( home_url( '/strains' ) ); ?>" class="wo-btn wo-btn--primary wo-btn--lg">
|
|
<?php esc_html_e( 'Browse Strains', 'weedops' ); ?>
|
|
</a>
|
|
<a href="<?php echo esc_url( home_url( '/products' ) ); ?>" class="wo-btn wo-btn--ghost wo-btn--lg">
|
|
<?php esc_html_e( 'View Products', 'weedops' ); ?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<?php // ── Features Grid ─────────────────────────────────────── ?>
|
|
<main class="wo-main" id="main-content" role="main">
|
|
<div class="wo-container">
|
|
|
|
<section class="wo-section wo-mt-3">
|
|
<div class="wo-text-center wo-mb-3">
|
|
<h2><?php esc_html_e( 'Built for Cannabis Professionals', 'weedops' ); ?></h2>
|
|
<p class="wo-text-muted" style="max-width:600px;margin:0.75rem auto 0;">
|
|
<?php esc_html_e( 'Everything you need to manage products, stay compliant, and grow your operation.', 'weedops' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="wo-grid wo-grid--3">
|
|
|
|
<div class="wo-card wo-text-center" style="padding:2rem;">
|
|
<div class="wo-feature-icon" style="font-size:2.4rem;margin-bottom:1rem;">🌿</div>
|
|
<h3 style="font-size:1.15rem;margin-bottom:0.5rem;">
|
|
<?php esc_html_e( 'Strain Database', 'weedops' ); ?>
|
|
</h3>
|
|
<p class="wo-text-muted" style="font-size:0.9rem;">
|
|
<?php esc_html_e( 'Comprehensive profiles with THC/CBD levels, terpenes, effects, and grow data.', 'weedops' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="wo-card wo-text-center" style="padding:2rem;">
|
|
<div class="wo-feature-icon" style="font-size:2.4rem;margin-bottom:1rem;">📋</div>
|
|
<h3 style="font-size:1.15rem;margin-bottom:0.5rem;">
|
|
<?php esc_html_e( 'Compliance Tracking', 'weedops' ); ?>
|
|
</h3>
|
|
<p class="wo-text-muted" style="font-size:0.9rem;">
|
|
<?php esc_html_e( 'Lab results, COA management, and regulatory status for every product in your catalog.', 'weedops' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="wo-card wo-text-center" style="padding:2rem;">
|
|
<div class="wo-feature-icon" style="font-size:2.4rem;margin-bottom:1rem;">📦</div>
|
|
<h3 style="font-size:1.15rem;margin-bottom:0.5rem;">
|
|
<?php esc_html_e( 'Inventory Management', 'weedops' ); ?>
|
|
</h3>
|
|
<p class="wo-text-muted" style="font-size:0.9rem;">
|
|
<?php esc_html_e( 'Real-time stock levels, batch tracking, and automated low-stock alerts.', 'weedops' ); ?>
|
|
</p>
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
|
|
<?php // ── Latest Strains ────────────────────────────────────── ?>
|
|
<?php
|
|
$strains = new WP_Query( [
|
|
'post_type' => 'wo_strain',
|
|
'posts_per_page' => 6,
|
|
'orderby' => 'date',
|
|
'order' => 'DESC',
|
|
] );
|
|
|
|
if ( $strains->have_posts() ) :
|
|
?>
|
|
<section class="wo-section wo-mt-3">
|
|
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap;gap:0.5rem;">
|
|
<h2><?php esc_html_e( 'Latest Strains', 'weedops' ); ?></h2>
|
|
<a href="<?php echo esc_url( home_url( '/strains' ) ); ?>" class="wo-btn wo-btn--outline" style="font-size:0.85rem;">
|
|
<?php esc_html_e( 'View All →', 'weedops' ); ?>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="wo-grid wo-grid--3">
|
|
<?php while ( $strains->have_posts() ) : $strains->the_post(); ?>
|
|
<article <?php post_class( 'wo-card' ); ?>>
|
|
<?php if ( has_post_thumbnail() ) : ?>
|
|
<a href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
|
|
<?php the_post_thumbnail( 'medium', [
|
|
'class' => 'wo-card__img',
|
|
'loading' => 'lazy',
|
|
'style' => 'width:100%;height:180px;object-fit:cover;border-radius:8px;margin-bottom:1rem;',
|
|
] ); ?>
|
|
</a>
|
|
<?php endif; ?>
|
|
|
|
<div class="wo-card__meta" style="margin-bottom:0.5rem;">
|
|
<?php
|
|
$types = get_the_terms( get_the_ID(), 'wo_strain_type' );
|
|
if ( $types && ! is_wp_error( $types ) ) {
|
|
foreach ( $types as $t ) {
|
|
weedops_strain_badge( $t->slug );
|
|
}
|
|
}
|
|
?>
|
|
</div>
|
|
|
|
<h3 style="font-size:1.05rem;margin-bottom:0.4rem;">
|
|
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
|
</h3>
|
|
|
|
<?php $canna = weedops_get_cannabinoid_str( get_the_ID() ); ?>
|
|
<?php if ( $canna ) : ?>
|
|
<p style="font-size:0.82rem;font-weight:600;color:var(--wo-green-mid);margin-bottom:0.5rem;">
|
|
<?php echo esc_html( $canna ); ?>
|
|
</p>
|
|
<?php endif; ?>
|
|
|
|
<a href="<?php the_permalink(); ?>" class="wo-btn wo-btn--outline" style="font-size:0.8rem;padding:0.4rem 0.8rem;">
|
|
<?php esc_html_e( 'View Details', 'weedops' ); ?>
|
|
</a>
|
|
</article>
|
|
<?php endwhile; ?>
|
|
</div>
|
|
</section>
|
|
<?php
|
|
wp_reset_postdata();
|
|
endif;
|
|
?>
|
|
|
|
<?php
|
|
get_footer();
|