Skip to content

Commit 8402e5a

Browse files
committedAug 22, 2018
Awesome stuff. 🤩 💌
1 parent d574bcf commit 8402e5a

19 files changed

+1264
-314
lines changed
 

‎assets/scss/elements/_footer.scss

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
footer {
2+
background-color: #fff;
3+
}
4+
5+
.nv-footer-content, .nv-footer-widgets {
6+
padding: $spacing-normal 0;
7+
}
8+
9+
.nv-footer-widgets + .nv-footer-content {
10+
padding-top: 0;
11+
}
12+
13+
.nv-footer-content .footer-menu {
14+
display: flex;
15+
flex-wrap: wrap;
16+
li {
17+
margin-right: $spacing-small;
18+
}
19+
}

‎assets/scss/elements/_navigation.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.navbar {
2+
background-color: #fff;
3+
}

‎assets/scss/elements/_page.scss

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.wrapper {
2+
display: flex;
3+
min-height: 100vh;
4+
flex-direction: column;
5+
}
6+
7+
.neve-main {
8+
flex: 1;
9+
}

‎assets/scss/main/_typography.scss

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
html {
2+
font-size: 14px;
3+
}
4+
5+
body {
6+
font-family: "Op­tima", sans-serif;
7+
font-size: $font-size-base;
8+
}
9+
10+
h1, h2, h3, h4, h5, h6 {
11+
font-family: "Gill Sans", sans-serif;
12+
}
13+
14+
h1 {
15+
font-size: $h1-font-size;
16+
}
17+
h2 {
18+
font-size: $h2-font-size;
19+
}
20+
h3 {
21+
font-size: $h3-font-size;
22+
}
23+
h4 {
24+
font-size: $h4-font-size;
25+
}
26+
h5 {
27+
font-size: $h5-font-size;
28+
}
29+
h6 {
30+
font-size: $h6-font-size;
31+
}
32+
33+
a {
34+
color: $link_color;
35+
text-decoration: none;
36+
&:hover {
37+
color: $link_hover_color;
38+
}
39+
}

‎assets/scss/main/_variables.scss

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`
1+
$font-size-base: 1rem !default;
22

3-
$h1-font-size: $font-size-base * 2.5 !default;
4-
$h2-font-size: $font-size-base * 2 !default;
5-
$h3-font-size: $font-size-base * 1.75 !default;
6-
$h4-font-size: $font-size-base * 1.5 !default;
7-
$h5-font-size: $font-size-base * 1.25 !default;
8-
$h6-font-size: $font-size-base !default;
3+
$h1-font-size: $font-size-base * 2.5 !default;
4+
$h2-font-size: $font-size-base * 2 !default;
5+
$h3-font-size: $font-size-base * 1.75 !default;
6+
$h4-font-size: $font-size-base * 1.5 !default;
7+
$h5-font-size: $font-size-base * 1.25 !default;
8+
$h6-font-size: $font-size-base !default;
99

10-
$paragraph-margin-bottom: 1rem !default;
10+
$paragraph-margin-bottom: 1rem !default;
1111

12+
$spacing-small: 16px;
13+
$spacing-normal: $spacing-small * 2;
14+
$spacing-large: $spacing-small * 3;
15+
16+
$link_color: #51bcda;
17+
$link_hover_color: #2ba9cd;

‎assets/scss/style.scss

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@ Use it to make something cool, have fun, and share what you've learned with othe
1818

1919
@import "main/variables";
2020
@import "main/reset";
21-
@import "main/grid";
21+
@import "main/grid";
22+
@import "main/typography";
23+
24+
@import "elements/navigation";
25+
@import "elements/footer";
26+
@import "elements/page";

‎footer.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
?>
1111

1212

13-
</div><!--/.wrapper-->
1413

1514
<?php do_action( 'neve_do_footer' ); ?>
16-
15+
</div><!--/.wrapper-->
1716
<?php wp_footer(); ?>
1817

1918
</body>

‎globals/hooks.php

-16
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414
function neve_before_header_trigger() {
1515
do_action( 'neve_before_header_hook' );
1616
}
17-
/**
18-
* Hook just before the header ( navigation ) content
19-
*
20-
* HTML context: before `header nav div.container`
21-
*/
22-
function neve_before_header_content_trigger() {
23-
do_action( 'neve_before_header_content_hook' );
24-
}
2517

2618
/**
2719
* Hook just before the responsive navbar-toggle.
@@ -40,14 +32,6 @@ function neve_after_navbar_toggle_trigger() {
4032
do_action( 'neve_after_navbar_toggle_hook' );
4133
}
4234

43-
/**
44-
* Hook just after the header ( navigation ) content
45-
*
46-
* HTML context: after `header nav div.container`
47-
*/
48-
function neve_after_header_content_trigger() {
49-
do_action( 'neve_after_header_content_hook' );
50-
}
5135
/**
5236
* Hook just after the header ( navigation ) area
5337
*

‎globals/sanitize-functions.php

+4
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ function neve_sanitize_big_title_type( $input ) {
133133
if ( in_array( $input, $options ) ) {
134134
return $input;
135135
}
136+
136137
return 'image';
137138
}
138139

@@ -280,6 +281,8 @@ function neve_sanitize_range_value( $input ) {
280281
* Dimension sanitization callback
281282
*
282283
* @param string $val Input value.
284+
*
285+
* @return int
283286
*/
284287
function neve_sanitize_dimension( $val ) {
285288
$decoded_array = json_decode( $val );
@@ -297,5 +300,6 @@ function neve_sanitize_dimension( $val ) {
297300
}
298301
}
299302
}
303+
300304
return $val;
301305
}

‎grunt/watch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = {
1616
},
1717
sass: {
1818
files: [ 'assets/scss/**/*.scss' ],
19-
tasks: [ 'sass:style', 'cssmiin' ]
19+
tasks: [ 'sass:style', 'cssmin' ]
2020
},
2121
customizerSass: {
2222
files: [

‎inc/core/Main.php

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ private function define_modules() {
4242
$this->features = apply_filters(
4343
'neve_filter_main_modules', array(
4444
'Customizer\Loader',
45+
'Views\Typography',
4546
'Views\Header',
4647
'Views\Footer'
4748
)

‎inc/customizer/Loader.php

+9
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class Loader {
2323
*/
2424
private $customizer_modules = array();
2525

26+
/**
27+
* Loader constructor.
28+
*/
2629
public function __construct() {
2730
add_action( 'customize_preview_init', array( $this, 'enqueue_customizer_preview' ) );
2831
add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_customizer_controls' ) );
@@ -59,6 +62,9 @@ private function define_modules() {
5962
) );
6063
}
6164

65+
/**
66+
* Enqueue customizer controls script.
67+
*/
6268
public function enqueue_customizer_controls() {
6369
wp_enqueue_style( 'neve-customizer-style', NEVE_ASSETS_URL . '/css/customizer-style' . ( ( NEVE_DEBUG ) ? '' : '.min' ) . '.css', array(), NEVE_VERSION );
6470
wp_enqueue_script(
@@ -70,6 +76,9 @@ public function enqueue_customizer_controls() {
7076
);
7177
}
7278

79+
/**
80+
* Enqueue customizer preview script.
81+
*/
7382
public function enqueue_customizer_preview() {
7483
wp_enqueue_script(
7584
'neve-customizer-preview', NEVE_ASSETS_URL . '/js/customizer-preview' . ( ( NEVE_DEBUG ) ? '' : '.min' ) . '.js', array(), NEVE_VERSION, true );

‎inc/customizer/options/Layout_Footer.php

+25-18
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Neve\Customizer\Base_Customizer;
1313
use Neve\Customizer\Types\Control;
1414
use Neve\Customizer\Types\Section;
15+
use Neve\Views\Footer;
1516

1617
/**
1718
* Class Layout_Footer
@@ -74,7 +75,7 @@ private function tabs() {
7475
'neve_footer_content_type' => array(
7576
'text' => array( 'neve_footer_text' ),
7677
'none' => array(),
77-
'footer_menu' => array()
78+
'footer_menu' => array(),
7879
),
7980
),
8081
'footer_widgets' => array(
@@ -122,6 +123,7 @@ private function control_footer_content_type() {
122123
new Control(
123124
'neve_footer_content_type',
124125
array(
126+
'transport' => $this->selective_refresh,
125127
'sanitize_callback' => array( $this, 'sanitize_footer_content_type' ),
126128
'default' => 'text',
127129
),
@@ -138,23 +140,42 @@ private function control_footer_content_type() {
138140
'none' => array(),
139141
'footer_menu' => array(),
140142
'text' => array(
141-
142143
'neve_footer_text',
143144
),
144145
),
145146
),
146-
'Neve\Customizer\Controls\Reactive_Control'
147+
'Neve\Customizer\Controls\Reactive_Control',
148+
array(
149+
'selector' => '.nv-footer-content',
150+
'settings' => array( 'neve_footer_content_type', 'neve_footer_text' ),
151+
'render_callback' => array( $this, 'footer_content_callback' ),
152+
'container_inclusive' => true,
153+
)
147154
)
148155
);
149156
}
150157

158+
/**
159+
* Footer content render callback.
160+
*/
161+
public function footer_content_callback() {
162+
$footer = new Footer();
163+
$footer->render_footer_content();
164+
}
165+
151166
private function control_footer_text() {
152167
$this->add_control(
153168
new Control(
154169
'neve_footer_text',
155170
array(
171+
'transport' => $this->selective_refresh,
156172
'sanitize_callback' => 'wp_kses_post',
157-
'default' => $this->get_footer_copyright(),
173+
'default' => sprintf(
174+
/* translators: %1$s is Theme Name (Neve), %2$s is WordPress */
175+
esc_html__( '%1$s | Powered by %2$s', 'neve' ),
176+
wp_kses_post( '<a href="https://themeisle.com/themes/neve/" target="_blank" rel="nofollow">Neve</a>' ),
177+
wp_kses_post( '<a href="http://wordpress.org" rel="nofollow">WordPress</a>' )
178+
),
158179
),
159180
array(
160181
'priority' => 35,
@@ -181,18 +202,4 @@ public function sanitize_footer_content_type( $value ) {
181202

182203
return esc_html( $value );
183204
}
184-
185-
/**
186-
* Default for the footer text content.
187-
*
188-
* @return string
189-
*/
190-
private function get_footer_copyright() {
191-
return sprintf(
192-
/* translators: %1$s is Theme Name (Neve), %2$s is WordPress */
193-
esc_html__( '%1$s | Powered by %2$s', 'neve' ),
194-
wp_kses_post( '<a href="https://themeisle.com/themes/neve/" target="_blank" rel="nofollow">Neve</a>' ),
195-
wp_kses_post( '<a href="http://wordpress.org" rel="nofollow">WordPress</a>' )
196-
);
197-
}
198205
}

‎inc/views/Base_View.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ abstract class Base_View {
1717
*
1818
* @return void
1919
*/
20-
abstract protected function init();
20+
abstract public function init();
2121
}

‎inc/views/Footer.php

+45-154
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,16 @@ public function render_footer() { ?>
2323
<footer>
2424
<div class="container">
2525
<?php echo $this->render_footer_sidebars(); ?>
26+
<?php echo $this->render_footer_content(); ?>
2627
</div>
2728
</footer>
2829
<?php }
2930

30-
/**
31-
* Get an array of footer sidebars slugs.
32-
*
33-
* @return array
34-
*/
35-
private function get_footer_sidebars() {
36-
$sidebars = array(
37-
'footer-one-widgets',
38-
'footer-two-widgets',
39-
'footer-three-widgets',
40-
'footer-four-widgets',
41-
);
42-
$number_of_sidebars = $this->footer_sidebars_number();
43-
$sidebars = array_slice( $sidebars, 0, $number_of_sidebars );
44-
45-
return $sidebars;
46-
}
47-
48-
private function footer_sidebars_number() {
49-
return get_theme_mod( 'neve_footer_widget_columns', '3' );
50-
}
51-
5231
/**
5332
* Render the footer sidebars.
5433
*/
5534
private function render_footer_sidebars() {
5635
$sidebars = $this->get_footer_sidebars();
57-
if ( empty( $sidebars ) ) {
58-
return '';
59-
}
6036

6137
echo '<div class="row nv-footer-widgets">';
6238
foreach ( $sidebars as $sidebar ) {
@@ -68,78 +44,43 @@ private function render_footer_sidebars() {
6844
}
6945

7046
/**
71-
* Function to display footer content.
72-
*
73-
* @since 1.1.24
74-
* @access public
47+
* Render the footer content.
7548
*/
76-
public function the_footer_content() {
77-
hestia_before_footer_trigger();
78-
79-
?>
80-
<footer class="footer <?php echo esc_attr( $this->the_footer_class() ); ?> footer-big">
81-
<?php hestia_before_footer_content_trigger(); ?>
82-
<div class="container">
83-
<?php hestia_before_footer_widgets_trigger(); ?>
84-
<?php $this->render_footer_sidebars(); ?>
85-
<?php hestia_after_footer_widgets_trigger(); ?>
86-
<?php $this->wrapped_bottom_footer_content(); ?>
87-
</div>
88-
<?php hestia_after_footer_content_trigger(); ?>
89-
</footer>
90-
<?php
91-
hestia_after_footer_trigger();
92-
}
93-
94-
/**
95-
* Filter footer menu classes to account for alignment.
96-
*
97-
* @param string $classes the footer classes.
98-
*
99-
* @return mixed
100-
*/
101-
public function modify_footer_menu_classes( $classes ) {
102-
if ( 'footer' !== $classes['theme_location'] ) {
103-
return $classes;
49+
public function render_footer_content() {
50+
$content_type = get_theme_mod( 'neve_footer_content_type', 'text' );
51+
if ( $content_type === 'none' ) {
52+
return;
10453
}
105-
$classes['menu_class'] .= ' ' . $this->add_footer_menu_alignment_class();
10654

107-
return $classes;
108-
}
55+
echo '<div class="row nv-footer-content">';
56+
echo '<div class="col-12">';
57+
58+
switch ( $content_type ) {
59+
case 'text':
60+
$this->render_content_text();
61+
break;
62+
case 'footer_menu':
63+
$this->render_content_menu();
64+
break;
65+
default:
66+
}
10967

110-
/**
111-
* Function to display footer copyright and footer menu.
112-
*/
113-
private function wrapped_bottom_footer_content() {
114-
echo '<div class="hestia-bottom-footer-content">';
115-
do_action( 'hestia_do_bottom_footer_content' );
68+
echo '</div>';
11669
echo '</div>';
11770
}
11871

119-
/**
120-
* Function to display footer copyright and footer menu.
121-
* Also used as callback for selective refresh.
122-
*/
123-
public function bottom_footer_content() {
124-
$hestia_general_credits = get_theme_mod(
125-
'hestia_general_credits',
126-
sprintf(
127-
/* translators: %1$s is Theme Name, %2$s is WordPress */
128-
esc_html__( '%1$s | Powered by %2$s', 'hestia-pro' ),
129-
sprintf(
130-
/* translators: %s is Theme name */
131-
'<a href="https://themeisle.com/themes/hestia/" target="_blank" rel="nofollow">%s</a>',
132-
esc_html__( 'Hestia', 'hestia-pro' )
133-
),
134-
/* translators: %1$s is URL, %2$s is WordPress */
135-
sprintf(
136-
'<a href="%1$s" rel="nofollow">%2$s</a>',
137-
esc_url( __( 'http://wordpress.org', 'hestia-pro' ) ),
138-
esc_html__( 'WordPress', 'hestia-pro' )
139-
)
140-
)
141-
);
72+
private function render_content_text() {
73+
$content = get_theme_mod( 'neve_footer_text', sprintf(
74+
/* translators: %1$s is Theme Name (Neve), %2$s is WordPress */
75+
esc_html__( '%1$s | Powered by %2$s', 'neve' ),
76+
wp_kses_post( '<a href="https://themeisle.com/themes/neve/" target="_blank" rel="nofollow">Neve</a>' ),
77+
wp_kses_post( '<a href="http://wordpress.org" rel="nofollow">WordPress</a>' )
78+
) );
14279

80+
echo wp_kses_post( $content );
81+
}
82+
83+
private function render_content_menu() {
14384
wp_nav_menu(
14485
array(
14586
'theme_location' => 'footer',
@@ -148,61 +89,33 @@ public function bottom_footer_content() {
14889
'menu_class' => 'footer-menu',
14990
)
15091
);
151-
?>
152-
<?php if ( ! empty( $hestia_general_credits ) || is_customize_preview() ) : ?>
153-
<div class="copyright <?php echo esc_attr( $this->add_footer_copyright_alignment_class() ); ?>">
154-
<?php echo wp_kses_post( $hestia_general_credits ); ?>
155-
</div>
156-
<?php
157-
endif;
15892
}
15993

16094
/**
161-
* Add the footer copyright alignment class.
95+
* Get an array of footer sidebars slugs.
16296
*
163-
* @return string
97+
* @return array
16498
*/
165-
private function add_footer_copyright_alignment_class() {
166-
$hestia_copyright_alignment = get_theme_mod( 'hestia_copyright_alignment', 'right' );
167-
if ( $hestia_copyright_alignment === 'left' ) {
168-
return 'pull-left';
169-
}
170-
if ( $hestia_copyright_alignment === 'center' ) {
171-
return 'hestia-center';
172-
}
99+
private function get_footer_sidebars() {
100+
$sidebars = array(
101+
'footer-one-widgets',
102+
'footer-two-widgets',
103+
'footer-three-widgets',
104+
'footer-four-widgets',
105+
);
106+
$number_of_sidebars = $this->footer_sidebars_number();
107+
$sidebars = array_slice( $sidebars, 0, $number_of_sidebars );
173108

174-
return 'pull-right';
109+
return $sidebars;
175110
}
176111

177112
/**
178-
* Add the footer menu alignment class.
113+
* Get number of footer sidebars.
179114
*
180115
* @return string
181116
*/
182-
private function add_footer_menu_alignment_class() {
183-
$hestia_copyright_alignment = get_theme_mod( 'hestia_copyright_alignment', 'right' );
184-
if ( $hestia_copyright_alignment === 'left' ) {
185-
return 'pull-right';
186-
}
187-
if ( $hestia_copyright_alignment === 'center' ) {
188-
return 'hestia-center';
189-
}
190-
191-
return 'pull-left';
192-
}
193-
194-
/**
195-
* Utility to get the footer class for color changes.
196-
*/
197-
private function the_footer_class() {
198-
$footer_style = get_theme_mod( 'hestia_alternative_footer_style', 'black_footer' );
199-
$class = 'footer-black';
200-
201-
if ( $footer_style === 'white_footer' ) {
202-
$class = '';
203-
}
204-
205-
return $class;
117+
private function footer_sidebars_number() {
118+
return get_theme_mod( 'neve_footer_widget_columns', '3' );
206119
}
207120

208121
/**
@@ -222,26 +135,4 @@ private function the_sidebar_class() {
222135

223136
return $class;
224137
}
225-
226-
/**
227-
* Utility to check if any of the footer sidebars have widgets.
228-
*
229-
* @return bool
230-
*/
231-
private function footer_has_widgets() {
232-
$sidebars = $this->get_footer_sidebars();
233-
if ( empty( $sidebars ) ) {
234-
return false;
235-
}
236-
237-
foreach ( $sidebars as $footer_sidebar ) {
238-
$has_widgets = is_active_sidebar( $footer_sidebar );
239-
if ( $has_widgets ) {
240-
return true;
241-
}
242-
}
243-
244-
return false;
245-
}
246-
247138
}

‎inc/views/Header.php

+16-113
Original file line numberDiff line numberDiff line change
@@ -21,65 +21,29 @@ public function init() {
2121
/**
2222
* Render navigation
2323
*/
24-
public function navigation() {
25-
$nav_classes = $this->header_classes(); ?>
26-
<nav class="navbar <?php echo esc_attr( $nav_classes ); ?>">
27-
<?php neve_before_header_content_trigger(); ?>
24+
public function navigation() { ?>
25+
<nav class="navbar">
2826
<div class="container">
29-
<?php
30-
if ( ! $this->is_full_screen_menu() ) {
31-
$this->navbar_sidebar();
32-
}
33-
if ( apply_filters( 'neve_header_show_primary_menu', true ) ) {
34-
$this->navbar_header();
27+
<div class="row">
28+
<?php
29+
$this->render_navbar_header();
3530
$this->render_primary_menu();
36-
}
37-
?>
31+
$this->render_navbar_toggle();
32+
?>
33+
</div>
3834
</div>
39-
<!-- --><?php neve_after_header_content_trigger(); ?>
4035
</nav>
4136
<?php
4237
}
4338

44-
/**
45-
* Get the header class.
46-
*
47-
* @return string
48-
*/
49-
private function header_classes() {
50-
$class = '';
51-
$class .= $this->get_nav_alignment_class();
52-
$class .= $this->get_full_screen_menu_class();
53-
$class .= $this->get_top_bar_enabled_class();
54-
if ( ! is_front_page() ) {
55-
$class .= ' navbar-not-transparent';
56-
}
57-
58-
return $class;
59-
}
60-
61-
/**
62-
* Get the header alignment class.
63-
*
64-
* @return string
65-
*/
66-
private function get_nav_alignment_class() {
67-
$header_alignment = get_theme_mod( 'neve_header_alignment', 'left' );
68-
if ( ! empty( $header_alignment ) ) {
69-
return ' neve_' . $header_alignment;
70-
}
71-
72-
return '';
73-
}
74-
7539
/**
7640
* Render primary menu markup.
7741
*/
7842
private function render_primary_menu() {
7943
wp_nav_menu(
8044
array(
8145
'theme_location' => 'primary',
82-
'menu_id' => 'primary-menu',
46+
'menu_id' => 'neve-primary-navigation',
8347
'container' => 'ul',
8448
)
8549
);
@@ -136,53 +100,6 @@ private function navbar_sidebar() {
136100
}
137101
}
138102

139-
/**
140-
* Get class if navbar should be transparent.
141-
*
142-
* @return string
143-
*/
144-
private function get_transparent_nav_class() {
145-
$class = ' navbar-color-on-scroll navbar-transparent';
146-
147-
if ( ! get_option( 'show_on_front' ) === 'page' ) {
148-
$class = '';
149-
}
150-
if ( ! is_front_page() ) {
151-
$class = '';
152-
}
153-
if ( is_front_page() && is_home() ) {
154-
return '';
155-
}
156-
if ( is_page_template() ) {
157-
$class = '';
158-
}
159-
160-
$is_nav_transparent = get_theme_mod( 'neve_navbar_transparent', true );
161-
if ( ! $is_nav_transparent ) {
162-
$class = '';
163-
}
164-
165-
$neve_navbar_transparent = get_theme_mod( 'neve_big_title_hide', false );
166-
if ( $neve_navbar_transparent ) {
167-
$class = ' no-slider';
168-
}
169-
170-
return $class;
171-
}
172-
173-
/**
174-
* Get the full screen menu class.
175-
*
176-
* @return string
177-
*/
178-
private function get_full_screen_menu_class() {
179-
if ( $this->is_full_screen_menu() ) {
180-
return ' full-screen-menu';
181-
}
182-
183-
return '';
184-
}
185-
186103
/**
187104
* Utility to check if is full screen menu.
188105
*
@@ -197,29 +114,15 @@ protected function is_full_screen_menu() {
197114
return false;
198115
}
199116

200-
/**
201-
* Get the header class if top bar is enabled.
202-
*
203-
* @return string
204-
*/
205-
private function get_top_bar_enabled_class() {
206-
$is_top_bar_hidden = get_theme_mod( 'neve_top_bar_hide', true );
207-
if ( (bool) $is_top_bar_hidden === false ) {
208-
return ' has-top-bar';
209-
}
210-
211-
return '';
212-
}
213-
214117
/**
215118
* Do the navbar header.
216119
*/
217-
private function navbar_header() {
120+
private function render_navbar_header() {
218121
?>
219122
<div class="nav-header">
220-
<a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>"
221-
title="<?php bloginfo( 'name' ); ?>">
222-
<?php echo $this->logo(); ?></a>
123+
<a class="brand" href="<?php echo esc_url( home_url( '/' ) ); ?>"
124+
title="<?php bloginfo( 'name' ); ?>">
125+
<?php echo $this->get_logo(); ?></a>
223126
<?php $this->render_navbar_toggle(); ?>
224127
</div>
225128
<?php
@@ -230,7 +133,7 @@ private function navbar_header() {
230133
*
231134
* @since Hestia 1.0
232135
*/
233-
private function logo() {
136+
private function get_logo() {
234137
if ( get_theme_mod( 'custom_logo' ) ) {
235138
$logo = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' );
236139
$alt_attribute = get_post_meta( get_theme_mod( 'custom_logo' ), '_wp_attachment_image_alt', true );
@@ -268,7 +171,7 @@ public function modify_primary_menu( $markup ) {
268171
* @return string
269172
*/
270173
private function display_filtered_navigation() {
271-
$nav = '<ul id="%1$s" class="%2$s">';
174+
$nav = '<ul id="%1$s" class="%2$s">';
272175
$nav .= '%3$s';
273176
$nav .= apply_filters( 'neve_after_primary_navigation_addons', $this->search_in_menu() );
274177
$nav .= '</ul>';
@@ -300,7 +203,7 @@ private function search_in_menu() {
300203
* @return string
301204
*/
302205
public function filter_search_form( $form ) {
303-
$output = '';
206+
$output = '';
304207
$output .= '<li class="neve-search-in-menu">';
305208
$output .= '<div class="neve-nav-search">';
306209
$output .= $form;

‎inc/views/Typography.php

+976
Large diffs are not rendered by default.

‎sidebar.php

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* The Sidebar containing the main widget areas.
4+
*
5+
* @package Neve
6+
*/
7+
8+
if ( ! is_active_sidebar( 'blog-sidebar' ) ) {
9+
return;
10+
} ?>
11+
12+
<div class="nv-blog-sidebar">
13+
<aside id="secondary" class="blog-sidebar" role="complementary">
14+
<?php dynamic_sidebar( 'blog-sidebar' ); ?>
15+
</aside>
16+
</div>

‎style.css

+79
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.