This commit is contained in:
Mark Moser 2018-07-24 18:52:51 -05:00
parent b78029b4ca
commit a2d5a31607
16 changed files with 155 additions and 28 deletions

View File

@ -0,0 +1,62 @@
.global-head {
display: flex;
flex-wrap: wrap;
align-content: center;
align-items: center;
margin: 0 auto $gutter;
width: 83%;
> * { flex: 0 0 auto; }
.social-menu {
order: 1;
width: 100%;
}
.search-form {
order: 2;
width: 100%;
}
.logo-banner {
order: 3;
width: 100%;
}
.header-menu {
order: 4;
width: 100%;
}
}
@media screen and (min-width: #{$screen-tablet}) {
.global-head {
width: $container-tablet;
.social-menu,
.search-form {
flex: 1 1 auto;
width: auto;
}
}
}
@media screen and (min-width: #{$screen-tablet-lg}) {
.global-head {
width: $container-tablet-lg;
}
}
@media screen and (min-width: #{$screen-desktop}) {
.global-head {
width: $container-desktop;
}
}
@media screen and (min-width: #{$screen-desktop-lg}) {
.global-head {
width: $container-desktop-lg;
}
}

View File

@ -0,0 +1,15 @@
.header-menu {
display: flex;
align-content: center;
align-items: center;
justify-content: space-between;
margin: 0;
padding: 0;
list-style: none;
line-height: 1;
li {
margin: 0;
padding: 5px 10px;
}
}

View File

@ -9,8 +9,9 @@
} }
h1 { h1 {
margin: $gutter; margin: 0;
background-color: rgba($black, 0.15); background-color: rgba($black, 0.15);
padding: $gutter;
color: $white; color: $white;
} }
@ -23,7 +24,6 @@
z-index: -1; z-index: -1;
width: 100%; width: 100%;
height: auto; height: auto;
object-fit: cover;
} }
} }

View File

@ -0,0 +1,24 @@
.search-form {
[type="search"],
[type="text"] {
border-radius: 0;
}
}
@media screen and (min-width: #{$screen-tablet}) {
.search-form {
display: flex;
align-content: center;
align-items: center;
justify-content: flex-end;
[type="submit"] {
flex: 0 0 auto;
}
label {
flex: 1 1 auto;
max-width: 250px;
}
}
}

View File

@ -0,0 +1,16 @@
.social-menu {
display: flex;
align-content: center;
align-items: center;
justify-content: flex-start;
margin: 0;
padding: 0;
list-style: none;
line-height: 1;
li {
flex: 0 0 auto;
margin: 0;
padding: 2px 8px;
}
}

View File

@ -0,0 +1 @@
// .global-head { }

View File

@ -42,8 +42,11 @@
// Components // Components
// specific UI components. This is where majority of our work takes place // specific UI components. This is where majority of our work takes place
// and our UI components are often composed of Objects and Components // and our UI components are often composed of Objects and Components
@import 'components/main-nav'; @import 'components/header-menu';
@import 'components/home-loop'; @import 'components/home-loop';
@import 'components/global-head';
@import 'components/search-form';
@import 'components/social-menu';
// Utilities // Utilities
// utilities and helper classes with ability to override anything which // utilities and helper classes with ability to override anything which

View File

@ -11,3 +11,26 @@
} }
} }
} }
@mixin sr-only {
position: absolute;
border: 0;
padding: 0;
width: 1px;
height: 1px;
overflow: hidden;
white-space: nowrap;
clip: rect(0, 0, 0, 0);
&.with-focus {
&:active,
&:focus {
position: static;
width: auto;
height: auto;
overflow: visible;
white-space: normal;
clip: auto;
}
}
}

View File

@ -1,22 +1,4 @@
.screen-reader-text,
.sr-only { .sr-only {
position: absolute; @include sr-only;
border: 0;
padding: 0;
width: 1px;
height: 1px;
overflow: hidden;
white-space: nowrap;
clip: rect(0, 0, 0, 0);
&.with-focus {
&:active,
&:focus {
position: static;
width: auto;
height: auto;
overflow: visible;
white-space: normal;
clip: auto;
}
}
} }

View File

@ -20,6 +20,7 @@ if (function_exists('add_theme_support')) {
'header-text' => true, 'header-text' => true,
); );
add_theme_support( 'custom-header', $customHeaderArgs ); add_theme_support( 'custom-header', $customHeaderArgs );
add_theme_support( 'html5', array( 'search-form' ) );
} }
function ildi_nav($location='header-menu') { function ildi_nav($location='header-menu') {

View File

@ -1,4 +1,4 @@
<header class="container"> <header class="global-head">
<a class="logo-banner" href="<?php echo home_url(); ?>"> <a class="logo-banner" href="<?php echo home_url(); ?>">
<img src="<?php header_image(); ?>" alt="<?php echo get_custom_header()->text; ?>"> <img src="<?php header_image(); ?>" alt="<?php echo get_custom_header()->text; ?>">
</a> </a>

View File

@ -3,7 +3,7 @@
<?php get_header(); ?> <?php get_header(); ?>
<body> <body>
<a class="skip-nav sr-only" href="#main-content">Skip to main</a> <a class="skip-nav sr-only" href="#main-content">Skip to main</a>
<?php get_template_part('globalHead'); ?> <?php get_template_part('global-head'); ?>
<main id="main-content" class="container" role="main"> <main id="main-content" class="container" role="main">
<?php get_template_part('home-loop'); ?> <?php get_template_part('home-loop'); ?>

View File

@ -3,7 +3,7 @@
<?php get_header(); ?> <?php get_header(); ?>
<body> <body>
<a class="skip-nav sr-only" href="#main-content">Skip to main</a> <a class="skip-nav sr-only" href="#main-content">Skip to main</a>
<?php get_template_part('globalHead'); ?> <?php get_template_part('global-head'); ?>
<main id="main-content" class="container" role="main"> <main id="main-content" class="container" role="main">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long