Skip to content

Commit

Permalink
Merge pull request #2071 from IanDelMar/sidebar-templates-readability
Browse files Browse the repository at this point in the history
Improve readability of sidebar templates
  • Loading branch information
bacoords committed Oct 9, 2023
2 parents 1747a15 + 826f3a8 commit df7dcca
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 44 deletions.
24 changes: 11 additions & 13 deletions sidebar-templates/sidebar-footerfull.php
Expand Up @@ -8,27 +8,25 @@
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

$container = get_theme_mod( 'understrap_container_type' );
if ( ! is_active_sidebar( 'footerfull' ) ) {
return;
}

$container = get_theme_mod( 'understrap_container_type' );
?>

<?php if ( is_active_sidebar( 'footerfull' ) ) : ?>

<!-- ******************* The Footer Full-width Widget Area ******************* -->

<div class="wrapper" id="wrapper-footer-full" role="complementary">
<!-- ******************* The Footer Full-width Widget Area ******************* -->

<div class="<?php echo esc_attr( $container ); ?>" id="footer-full-content" tabindex="-1">
<div class="wrapper" id="wrapper-footer-full" role="complementary">

<div class="row">
<div class="<?php echo esc_attr( $container ); ?>" id="footer-full-content" tabindex="-1">

<?php dynamic_sidebar( 'footerfull' ); ?>
<div class="row">

</div>
<?php dynamic_sidebar( 'footerfull' ); ?>

</div>

</div><!-- #wrapper-footer-full -->
</div>

<?php
endif;
</div><!-- #wrapper-footer-full -->
37 changes: 18 additions & 19 deletions sidebar-templates/sidebar-hero.php
Expand Up @@ -7,37 +7,36 @@

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>

<?php if ( is_active_sidebar( 'hero' ) ) : ?>

<!-- ******************* The Hero Widget Area ******************* -->
if ( ! is_active_sidebar( 'hero' ) ) {
return;
}
?>

<div id="carouselExampleControls" class="carousel slide" data-interval="false" data-bs-ride="false">
<!-- ******************* The Hero Widget Area ******************* -->

<div class="carousel-inner">
<div id="carouselExampleControls" class="carousel slide" data-interval="false" data-bs-ride="false">

<?php dynamic_sidebar( 'hero' ); ?>
<div class="carousel-inner">

</div>
<?php dynamic_sidebar( 'hero' ); ?>

<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev" data-bs-slide="prev">
</div>

<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev" data-bs-slide="prev">

<span class="screen-reader-text"><?php echo esc_html_x( 'Previous', 'carousel control', 'understrap' ); ?></span>
<span class="carousel-control-prev-icon" aria-hidden="true"></span>

</a>
<span class="screen-reader-text"><?php echo esc_html_x( 'Previous', 'carousel control', 'understrap' ); ?></span>

<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next" data-bs-slide="next">
</a>

<span class="carousel-control-next-icon" aria-hidden="true"></span>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next" data-bs-slide="next">

<span class="screen-reader-text"><?php echo esc_html_x( 'Next', 'carousel control', 'understrap' ); ?></span>
<span class="carousel-control-next-icon" aria-hidden="true"></span>

</a>
<span class="screen-reader-text"><?php echo esc_html_x( 'Next', 'carousel control', 'understrap' ); ?></span>

</div><!-- .carousel -->
</a>

<?php
endif;
</div><!-- .carousel -->
23 changes: 11 additions & 12 deletions sidebar-templates/sidebar-statichero.php
Expand Up @@ -8,26 +8,25 @@
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

if ( ! is_active_sidebar( 'statichero' ) ) {
return;
}

$container = get_theme_mod( 'understrap_container_type' );
?>

<?php if ( is_active_sidebar( 'statichero' ) ) : ?>

<!-- ******************* The Hero Widget Area ******************* -->

<div class="wrapper" id="wrapper-static-hero">
<!-- ******************* The Hero Widget Area ******************* -->

<div class="<?php echo esc_attr( $container ); ?>" id="wrapper-static-content" tabindex="-1">
<div class="wrapper" id="wrapper-static-hero">

<div class="row">
<div class="<?php echo esc_attr( $container ); ?>" id="wrapper-static-content" tabindex="-1">

<?php dynamic_sidebar( 'statichero' ); ?>
<div class="row">

</div>
<?php dynamic_sidebar( 'statichero' ); ?>

</div>

</div><!-- #wrapper-static-hero -->
</div>

<?php
endif;
</div><!-- #wrapper-static-hero -->

0 comments on commit df7dcca

Please sign in to comment.