Skip to content

Commit df2aebc

Browse files
committed
feat (FastAccess) : add fast access navigation
1 parent 4f8c045 commit df2aebc

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

header.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,16 @@
1919
<?php wp_head(); ?>
2020
</head>
2121
<body <?php body_class(); ?>>
22+
<ul class="fast-access fast-access--hidden" aria-label="<?php echo esc_attr( 'Fast access navigation' ); ?>">
23+
<li>
24+
<a href="#searchform"><?php echo esc_html( 'Searchform' ); ?></a>
25+
</li>
26+
<li>
27+
<a href="#content"><?php echo esc_html( 'Main content' ); ?></a>
28+
</li>
29+
<li>
30+
<a href="#footer"><?php echo esc_html( 'Footer' ); ?></a>
31+
</li>
32+
</ul>
2233
<?php
2334
wp_body_open();
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.fast-access {
2+
position: absolute;
3+
top: 0;
4+
left: 0;
5+
z-index: 10;
6+
display: flex;
7+
padding: .5rem 1rem;
8+
color: $secondary-color;
9+
background-color: $primary-color;
10+
transition: transform .3s ease-in-out;
11+
transform: translate3d(0, -100%, 0);
12+
13+
&:focus-within {
14+
transform: translate3d(0, 0, 0);
15+
}
16+
17+
li:not(:last-of-type) {
18+
margin-right: 1rem;
19+
}
20+
}

src/scss/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ $entry-file-name: "style";
3333
@import "patterns/menu";
3434
@import "patterns/hero";
3535
@import "patterns/searchform";
36+
@import "patterns/fast-access";
3637

3738
// Wordpress
3839

0 commit comments

Comments
 (0)