Commit inicial powerservice
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?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>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/**
|
||||
* Reusable contact section for service pages.
|
||||
*
|
||||
* @var array $args Template arguments supplied through get_template_part().
|
||||
*/
|
||||
|
||||
$service_contact = wp_parse_args(
|
||||
isset( $args ) ? $args : array(),
|
||||
array(
|
||||
'section_id' => 'contacto-servicios',
|
||||
'heading_id' => 'contacto-servicios-title',
|
||||
'background_image_id' => 0,
|
||||
'background_color' => '',
|
||||
'title' => 'Contacta con nosotros',
|
||||
'subtitle' => 'Estamos comprometidos en ofrecerte el mejor servicio y atención',
|
||||
'form_id' => '',
|
||||
'form_title' => '',
|
||||
'form_html_id' => 'formulario-servicios',
|
||||
'form_max_width' => 800,
|
||||
)
|
||||
);
|
||||
|
||||
$section_id = sanitize_html_class( $service_contact['section_id'] );
|
||||
$heading_id = sanitize_html_class( $service_contact['heading_id'] );
|
||||
$form_id = sanitize_key( $service_contact['form_id'] );
|
||||
$form_html_id = sanitize_html_class( $service_contact['form_html_id'] );
|
||||
$form_max_width = max( 280, absint( $service_contact['form_max_width'] ) );
|
||||
$background_color = sanitize_hex_color( $service_contact['background_color'] );
|
||||
$form_shortcode = sprintf(
|
||||
'[contact-form-7 id="%s" title="%s" html_id="%s"]',
|
||||
$form_id,
|
||||
esc_attr( $service_contact['form_title'] ),
|
||||
$form_html_id
|
||||
);
|
||||
?>
|
||||
|
||||
<section id="<?php echo esc_attr( $section_id ); ?>" class="relative isolate scroll-mt-32 overflow-hidden bg-white py-[70px] text-color-5 md:py-[50px]"<?php echo $background_color ? ' style="background-color: ' . esc_attr( $background_color ) . ';"' : ''; ?> aria-labelledby="<?php echo esc_attr( $heading_id ); ?>">
|
||||
<?php if ( $service_contact['background_image_id'] ) : ?>
|
||||
<?php echo wp_get_attachment_image( $service_contact['background_image_id'], 'full', false, array(
|
||||
'class' => 'pointer-events-none absolute inset-0 -z-10 h-full w-full object-cover object-center',
|
||||
'alt' => '',
|
||||
'loading' => 'lazy',
|
||||
'sizes' => '100vw',
|
||||
'aria-hidden' => 'true',
|
||||
) ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="container px-[50px] lg:px-8 md:w-[85%] md:px-0">
|
||||
<div class="text-center" data-scroll-reveal>
|
||||
<h2 id="<?php echo esc_attr( $heading_id ); ?>" class="text-[51px] font-black uppercase leading-[1.2] lg:text-[40px] md:text-[24px]">
|
||||
<?php echo esc_html( $service_contact['title'] ); ?>
|
||||
</h2>
|
||||
<p class="mt-4 text-[19px] font-medium leading-[1.4] md:text-[17px]">
|
||||
<?php echo esc_html( $service_contact['subtitle'] ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="ps-contact-form ps-service-contact-form mx-auto mt-12 w-full md:mt-8" style="max-width: <?php echo esc_attr( $form_max_width ); ?>px;" data-scroll-reveal>
|
||||
<?php if ( shortcode_exists( 'contact-form-7' ) && $form_id ) : ?>
|
||||
<?php echo do_shortcode( $form_shortcode ); ?>
|
||||
<?php else : ?>
|
||||
<p class="text-center">Contáctanos por <a class="text-color-3 underline" href="https://wa.me/5213318079513">WhatsApp</a> para solicitar más información.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user