91 lines
3.9 KiB
PHP
91 lines
3.9 KiB
PHP
<?php
|
|
/**
|
|
* Template for the site content map.
|
|
*
|
|
* @package powerservices
|
|
*/
|
|
|
|
get_header();
|
|
|
|
$sitemap_groups = array(
|
|
array(
|
|
'id' => 'paginas-publicadas',
|
|
'title' => 'Páginas',
|
|
'query' => new WP_Query(
|
|
array(
|
|
'post_type' => 'page',
|
|
'post_status' => 'publish',
|
|
'posts_per_page' => -1,
|
|
'orderby' => 'title',
|
|
'order' => 'ASC',
|
|
'no_found_rows' => true,
|
|
'ignore_sticky_posts' => true,
|
|
'update_post_term_cache' => false,
|
|
)
|
|
),
|
|
),
|
|
array(
|
|
'id' => 'contenido-seo',
|
|
'title' => 'Contenido SEO',
|
|
'query' => new WP_Query(
|
|
array(
|
|
'post_type' => 'seo',
|
|
'post_status' => 'publish',
|
|
'posts_per_page' => -1,
|
|
'orderby' => 'title',
|
|
'order' => 'ASC',
|
|
'no_found_rows' => true,
|
|
'ignore_sticky_posts' => true,
|
|
'update_post_term_cache' => false,
|
|
)
|
|
),
|
|
),
|
|
);
|
|
?>
|
|
|
|
<main id="main-content" class="flex flex-col">
|
|
|
|
<?php get_template_part( 'template-parts/page-gutenberg-accordion' ); ?>
|
|
<?php get_template_part( 'template-parts/page-rank-math-breadcrumbs' ); ?>
|
|
|
|
<section class="bg-white py-20 text-color-5 lg:py-16 md:py-12" aria-labelledby="seo-sitemap-title">
|
|
<div class="container px-[50px] lg:px-8 md:w-[85%] md:px-0">
|
|
<h1 id="seo-sitemap-title" class="text-center text-[51px] font-black uppercase leading-[1.15] lg:text-[40px] md:text-[30px] sm:text-[27px]">Mapa de sitio</h1>
|
|
|
|
<div class="mt-14 space-y-20 md:mt-10 md:space-y-14">
|
|
<?php foreach ( $sitemap_groups as $group ) : ?>
|
|
<section aria-labelledby="<?php echo esc_attr( $group['id'] ); ?>">
|
|
<h2 id="<?php echo esc_attr( $group['id'] ); ?>" class="mb-10 text-[36px] font-black uppercase leading-[1.2] lg:text-[31px] md:mb-7 md:text-[25px]"><?php echo esc_html( $group['title'] ); ?></h2>
|
|
|
|
<?php if ( $group['query']->have_posts() ) : ?>
|
|
<div class="grid grid-cols-4 gap-x-7 gap-y-12 lg:grid-cols-2 md:grid-cols-1 md:gap-y-8">
|
|
<?php while ( $group['query']->have_posts() ) : ?>
|
|
<?php $group['query']->the_post(); ?>
|
|
<article <?php post_class( 'group min-w-0' ); ?>>
|
|
<a class="block h-full overflow-hidden bg-[#f6f6f6] shadow-[0_6px_22px_rgba(0,0,0,0.08)] transition-transform duration-300 hover:-translate-y-1 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php the_permalink(); ?>" aria-label="<?php echo esc_attr( 'Ver: ' . get_the_title() ); ?>">
|
|
<?php if ( has_post_thumbnail() ) : ?>
|
|
<div class="aspect-[4/3] overflow-hidden bg-color-5">
|
|
<?php the_post_thumbnail( 'large', array( 'class' => 'block h-full w-full object-cover transition-transform duration-500 group-hover:scale-105 motion-reduce:transition-none', 'loading' => 'lazy', 'sizes' => '(max-width: 767px) 85vw, (max-width: 1024px) 50vw, 25vw' ) ); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div class="flex min-h-[118px] items-center justify-between gap-5 px-6 py-5 md:min-h-0">
|
|
<h3 class="text-[20px] font-bold uppercase leading-[1.25] transition-colors group-hover:text-color-1 md:text-[18px]"><?php the_title(); ?></h3>
|
|
<svg class="h-6 w-6 shrink-0 text-color-1 transition-transform duration-300 group-hover:translate-x-1 motion-reduce:transition-none" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg>
|
|
</div>
|
|
</a>
|
|
</article>
|
|
<?php endwhile; ?>
|
|
</div>
|
|
<?php else : ?>
|
|
<p class="text-[18px]">Por el momento no hay contenidos disponibles.</p>
|
|
<?php endif; ?>
|
|
</section>
|
|
<?php wp_reset_postdata(); ?>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<?php get_footer(); ?>
|