Skip to content

Commit

Permalink
Merge pull request #43 from INN/13-site-header-and-main-menu
Browse files Browse the repository at this point in the history
Site header and main menu
  • Loading branch information
Josh Darby authored Jan 9, 2020
2 parents 9eb6ff1 + f16cc2c commit e524bd0
Show file tree
Hide file tree
Showing 12 changed files with 901 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wp-content/themes/largo
Submodule largo updated from da020f to c41d85
21 changes: 21 additions & 0 deletions wp-content/themes/sfpublicpress/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SFPP child theme

Navigation modifications:

- [x] disable global nav via the constant `SHOW_GLOBAL_NAV`
- [x] new main nav partial
- [x] dequeue Largo nav js
- [x] dequeue Largo sticky nav partial
- [ ] custom nav js borrowing from Largo that collapses the overflow behind a "Menu" button that reveals all
- [x] stickyNavEl
- [x] stickyNavWrapper
- NOPE not gonna put the close button in .nav-right
- [ ] Remove show/hide logic while scrolling
- isMobile is predicated on the visibiliy of the button
- [ ] remove caretwidth
- [ ] remove rightwidth
- [ ] remove creation of overflow menu item
- [ ] add class "overflowed" to parent
- [ ] add class "overflow" to menu item
- [ ] .overflowed .overflow { display: none }
- [ ] .overflowed.open .overflow { display: block }
2 changes: 1 addition & 1 deletion wp-content/themes/sfpublicpress/css/child-style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wp-content/themes/sfpublicpress/functions.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php
define( 'SHOW_STICKY_NAV', false );
define( 'SHOW_CATEGORY_RELATED_TOPICS', false );
/**
* Include theme files
Expand All @@ -19,6 +18,7 @@ function largo_child_require_files() {
$includes = array(
'/inc/enqueue.php',
'/inc/block-color-palette.php',
'/inc/navigation.php',
);
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( is_plugin_active( 'gravityforms/gravityforms.php' ) ) {
Expand Down
1 change: 1 addition & 0 deletions wp-content/themes/sfpublicpress/inc/enqueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ function sfpublicpress_enqueue_styles(){
array( 'largo-stylesheet', 'typekit' ),
filemtime( get_stylesheet_directory() . '/css/child-style.css' )
);
wp_enqueue_style( 'dashicons' );
}
add_action( 'wp_enqueue_scripts', 'sfpublicpress_enqueue_styles' );
21 changes: 21 additions & 0 deletions wp-content/themes/sfpublicpress/inc/navigation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Functions related to modifications of the navigation
*
* @since Largo 0.6.4 Last Largo version where this was tested and checked
* @see partials/nav-*
*/
/**
* Dequeue Largo's various nav-related functions
*/
function sfpublicpress_nav_enqueues() {
wp_dequeue_script( 'largo-navigation' );
wp_register_script(
'sfpublicpress-navigation',
get_stylesheet_directory_uri() . '/js/navigation.js',
array( 'jquery' ),
filemtime( get_stylesheet_directory() . '/js/navigation.js' ),
);
wp_enqueue_script( 'sfpublicpress-navigation' );
}
add_action( 'wp_enqueue_scripts', 'sfpublicpress_nav_enqueues', 20 ); // largo is at 10
Loading

0 comments on commit e524bd0

Please sign in to comment.