Files
powerservice/wp-content/themes/powerservices/template-parts/page-gutenberg-accordion.php
T
2026-10-19 12:45:45 -06:00

35 lines
1.8 KiB
PHP

<?php
/**
* Displays the current page's Gutenberg content in a visually last accordion.
*
* The template must be called as the first child of a flex-column <main>. Its
* high CSS order keeps it at the bottom of the page without changing DOM order.
*
* @package powerservices
*/
$page_content_id = get_queried_object_id();
$page_content = $page_content_id ? get_post_field( 'post_content', $page_content_id ) : '';
if ( ! trim( wp_strip_all_tags( (string) $page_content ) ) ) {
return;
}
?>
<section id="informacion-servicios-industriales" class="order-[999] bg-white py-8 text-color-5 md:py-5" aria-label="Más información">
<div class="container px-8 xxl:px-6 md:px-5">
<details class="home-content-accordion mx-auto max-w-[1400px] overflow-hidden border border-[#dedede] bg-white">
<summary class="flex min-h-[74px] cursor-pointer list-none items-center gap-4 px-[14px] py-4 text-color-5 transition-colors hover:bg-[#fafafa] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-color-2 md:min-h-[64px] md:gap-3 md:px-3 md:py-3">
<span class="home-content-accordion__icon relative block h-[22px] w-[22px] shrink-0 border border-[#e1e1e1]" aria-hidden="true">
<span class="absolute left-1/2 top-1/2 h-px w-3 -translate-x-1/2 -translate-y-1/2 bg-[#d4d4d4]"></span>
<span class="absolute left-1/2 top-1/2 h-3 w-px -translate-x-1/2 -translate-y-1/2 bg-[#d4d4d4] transition-transform motion-reduce:transition-none"></span>
</span>
<span class="text-[14px] font-normal leading-[1.2]">Más Información</span>
</summary>
<div class="home-gutenberg-content border-t border-[#dedede] px-9 py-10 md:px-5 md:py-7">
<?php echo apply_filters( 'the_content', $page_content ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
</details>
</div>
</section>