Last active
May 27, 2022 19:25
-
-
Save anabelle/10725ce14ccd44db196667f3ff9a1cd7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="slider-hexagonos"> | |
<ul class="my-slider"> | |
<?php | |
if ( block_rows( 'hexagonos' ) ): | |
while ( block_rows( 'hexagonos' ) ) : | |
block_row( 'hexagonos' ); | |
$titulo = block_sub_value( 'titulo' ); | |
$link = block_sub_value( 'link' ); | |
$texto = block_sub_value( 'texto' ); | |
$imagen_fija = block_sub_value( 'imagen-fija' ); | |
$animacion_1 = block_sub_value( 'animacion-1' ); | |
$animacion_2 = block_sub_value( 'animacion-2' ); | |
$animacion_3 = block_sub_value( 'animacion-3' ); | |
$animacion_4 = block_sub_value( 'animacion-4' ); | |
$animacion_5 = block_sub_value( 'animacion-5' ); | |
$animacion_6 = block_sub_value( 'animacion-6' ); | |
?> | |
<li class="hexagono"> | |
<?php if( $link ) : ?> | |
<a href="<?php echo $link; ?>"> <!-- link opcional --> | |
<?php endif; ?> | |
<div class="animacion-hexagono" style="background-image: url(<?php block_sub_field('imagen-fija'); ?>), url('<?php block_field('fondo-comun'); ?>')"> <!-- esta lleva el fondo comun --> | |
<!--- incluir imagen fija como contenido --> | |
<?php if( $animacion_1 ) : ?> | |
<div class="layers_container"> | |
<div class="layer layer-1"><img src="<?php block_sub_field('animacion-1'); ?>" /></div> | |
<?php if( $animacion_2 ) : ?> | |
<div class="layer layer-2"><img src="<?php block_sub_field('animacion-2'); ?>" /></div> | |
<?php if( $animacion_3 ) : ?> | |
<div class="layer layer-3"><img src="<?php block_sub_field('animacion-3'); ?>" /></div> | |
<?php if( $animacion_4 ) : ?> | |
<div class="layer layer-4"><img src="<?php block_sub_field('animacion-4'); ?>" /></div> | |
<?php if( $animacion_5 ) : ?> | |
<div class="layer layer-5"><img src="<?php block_sub_field('animacion-5'); ?>" /></div> | |
<?php if( $animacion_6 ) : ?> | |
<div class="layer layer-6"><img src="<?php block_sub_field('animacion-6'); ?>" /></div> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php endif; ?> | |
<?php endif; ?> | |
</div> | |
<?php endif; ?> | |
<?php if( $titulo ) : ?> | |
<h2><?php echo $titulo; ?></h2> | |
<?php endif; ?> | |
</div> | |
<p><?php echo $texto; ?></p> | |
<?php if( $link ) : ?> | |
</a> | |
<?php endif; ?> | |
</li> | |
<?php | |
endwhile; | |
reset_block_rows( 'hexagonos' ); | |
endif; | |
?> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment