Skip to content

Commit 04c9da9

Browse files
author
Max Harris
authored
Merge pull request #154 from wpcomvip/AC-1593
Policy page secondary menu
2 parents b0ce0c8 + 1978c01 commit 04c9da9

File tree

4 files changed

+96
-27
lines changed

4 files changed

+96
-27
lines changed

themes/jolteon/css/app.css

Lines changed: 19 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/jolteon/css/app.min.css

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

themes/jolteon/css/scss/06-components/_components.page-menu.scss

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,11 @@
1616
}
1717

1818
a {
19-
font-size: 16px;
19+
font-size: $font-size-base;
2020

21-
@include mq($from: tablet) {
22-
font-size: 15px;
23-
}
24-
25-
@include mq($from: desktop) {
26-
font-size: 16px;
27-
}
28-
29-
@include mq($from: wide) {
30-
font-size: 18px;
31-
}
21+
@include mq($from: wide) {
22+
font-size: $font-size-large;
23+
}
3224
}
3325

3426
&.current-menu-item {
@@ -42,4 +34,54 @@
4234
}
4335
}
4436
}
37+
38+
#policies-menu {
39+
width: 100%;
40+
41+
@include mq($from: wide) {
42+
width: 1170px;
43+
}
44+
45+
.c-sticky-menu__list {
46+
@include mq($from: tablet) {
47+
flex-wrap: wrap;
48+
}
49+
50+
.menu-item {
51+
&.current-menu-item {
52+
a {
53+
box-shadow: none;
54+
55+
@include mq($from: desktop) {
56+
box-shadow: inset 0 -4px 0 0 $sp-orange;
57+
}
58+
}
59+
}
60+
61+
@include mq($from: tablet) {
62+
margin-right: 0;
63+
text-align: center;
64+
width: 20%;
65+
}
66+
67+
@include mq($from: desktop) {
68+
width: auto;
69+
}
70+
71+
a {
72+
@include mq($from: smartphone) {
73+
font-size: $font-size-small;
74+
line-height: 1.2em;
75+
}
76+
77+
@include mq($from: tablet) {
78+
align-items: center;
79+
display: flex;
80+
font-size: $font-size-base;
81+
justify-content: center;
82+
}
83+
}
84+
}
85+
}
86+
}
4587
}
Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
<?php
2+
global $post;
3+
$post_data = get_post($post->post_parent);
4+
$parent_slug = $post_data->post_name;
5+
?>
6+
17
<nav id="page-menu" class="c-sticky-menu">
2-
<div class="container">
8+
<div class="container" id="<?php echo esc_attr($parent_slug) . '-menu'; ?>">
39
<ul class="c-sticky-menu__list">
410
<?php
5-
wp_nav_menu(array(
6-
'container' => '',
7-
'menu' => $navigation,
8-
'items_wrap' => '%3$s',
9-
));
10-
?>
11+
wp_nav_menu(array(
12+
'container' => '',
13+
'menu' => $navigation,
14+
'items_wrap' => '%3$s',
15+
));
16+
?>
1117
</ul>
1218
</div>
1319
</nav>

0 commit comments

Comments
 (0)