Skip to content

Commit

Permalink
WDSUS-2 - Add basic styling for header, menum, and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
khleomix committed Sep 4, 2023
1 parent 20d1e86 commit c84435a
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 26 deletions.
24 changes: 2 additions & 22 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,17 @@
* @package wd_s
*/

use function WebDevStudios\wd_s\print_copyright_text;
use function WebDevStudios\wd_s\print_social_network_links;
use function WebDevStudios\wd_s\print_mobile_menu;

?>

<footer class="site-footer">

<nav id="site-footer-navigation" class="footer-navigation navigation-menu" aria-label="<?php esc_attr_e( 'Footer Navigation', 'wd_s' ); ?>">
<?php
wp_nav_menu(
[
'fallback_cb' => false,
'theme_location' => 'footer',
'menu_id' => 'footer-menu',
'menu_class' => 'menu',
'container' => false,
'depth' => 1,
]
);
?>
</nav><!-- #site-navigation-->

<div class="site-info">
<?php print_copyright_text(); ?>
<?php print_social_network_links(); ?>
<?php the_custom_logo(); ?>
<p><?php echo esc_html__( ' Copyright &copy; ', 'wd_s' ) . esc_attr( gmdate( 'Y' ) ); ?></p>
</div><!-- .site-info -->

</footer><!-- .site-footer-->

<?php print_mobile_menu(); ?>
<?php wp_footer(); ?>

</body>
Expand Down
4 changes: 0 additions & 4 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@

</div><!-- .site-branding -->

<?php if ( has_nav_menu( 'primary' ) || has_nav_menu( 'mobile' ) ) : ?>
<button type="button" class="off-canvas-open" aria-expanded="false" aria-label="<?php esc_attr_e( 'Open Menu', 'wd_s' ); ?>"></button>
<?php endif; ?>

</div><!-- .site-header-content -->

<nav id="site-navigation" class="main-navigation navigation-menu" aria-label="<?php esc_attr_e( 'Main Navigation', 'wd_s' ); ?>">
Expand Down
18 changes: 18 additions & 0 deletions src/scss/critical/_footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//--------------------------------------------------------------
// Global Site Footer
//--------------------------------------------------------------
.site-footer {
@apply flex p-10 flex-nowrap justify-center items-center bottom-0;

.site-info {
@apply text-center;

.custom-logo {
@apply max-h-12 w-auto;
}

p {
@apply text-xs;
}
}
}
21 changes: 21 additions & 0 deletions src/scss/critical/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//--------------------------------------------------------------
// Global Site Header
//--------------------------------------------------------------
.site-header {
@apply flex px-10 py-4 flex-nowrap justify-between items-center;

.site-header-content {
@apply m-0;

.site-branding {
@apply flex-auto;
a {
@apply no-underline;

.custom-logo {
@apply w-auto max-h-14;
}
}
}
}
}
19 changes: 19 additions & 0 deletions src/scss/critical/_menus.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//--------------------------------------------------------------
// Menus and Sub-Menus
// Cool.
//--------------------------------------------------------------
.navigation-menu {
.menu {
@apply flex list-none;

> li {
a {
@apply hover:underline;
}

&:not( :last-child ) {
@apply mr-4;
}
}
}
}
4 changes: 4 additions & 0 deletions src/scss/critical/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
// Critical CSS
// Import partials for "above the fold" (barf) styles.
//----------------------------------------

@import 'header';
@import 'menus';
@import 'footer';

0 comments on commit c84435a

Please sign in to comment.