Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Various adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
olefredrik committed Nov 22, 2015
1 parent 64ecf38 commit 698f7ff
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 165 deletions.
9 changes: 4 additions & 5 deletions assets/scss/foundation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
// Sass utilities
@import '../components/foundation-sites/scss/util/util';

// Settings and wp-override styles:
@import "config/wp-overrides"; // Override the default WordPress styling for some elements
@import "config/settings"; // Default settings file. Uncomment each setting you need to change

// Global variables and styles
@import '../components/foundation-sites/scss/global';

Expand Down Expand Up @@ -100,16 +104,11 @@
// Include all foundation components
@include foundation-everything;

// Settings and wp-override styles:
@import "config/settings"; // Default settings file. Uncomment each setting you need to change
@import "config/wp-overrides"; // Override the default WordPress styling for some elements

/*
My custom styles:
Add your scss files below to structure your project styles
*/

@import "site/global";
@import "site/wp-admin";
@import "site/topbar";
@import "site/front";
Expand Down
1 change: 0 additions & 1 deletion assets/scss/site/_front.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
background: url('../images/demo/hero-bg-foundation-6.svg') bottom center;
background-size: cover;
background-position: center;
//background: url("../images/demo/marquee-stars.svg") repeat scroll 0 0 #074E68;
padding: rem-calc(65%) 0;
margin: 0 0 rem-calc(32);
height: auto;
Expand Down
60 changes: 0 additions & 60 deletions assets/scss/site/_global.scss

This file was deleted.

7 changes: 2 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@
/** Register all navigation menus */
require_once( 'library/navigation.php' );

/** Add desktop menu walker */
require_once( 'library/menu-walker.php' );

/** Add off-canvas menu walker */
require_once( 'library/offcanvas-walker.php' );
/** Add menu walkers for top-bar and off-canvas */
require_once( 'library/menu-walkers.php' );

/** Create widget areas in sidebar and footer */
require_once( 'library/widget-areas.php' );
Expand Down
26 changes: 0 additions & 26 deletions library/menu-walker.php

This file was deleted.

35 changes: 35 additions & 0 deletions library/menu-walkers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* Customize the output of menus for Foundation top bar
*
* @package WordPress
* @subpackage FoundationPress
* @since FoundationPress 1.0.0
*/

// Big thanks to Brett Mason (https://github.com/brettsmason) for the awesome walker

if ( ! class_exists( 'Foundationpress_Top_Bar_Walker' ) ) :
class Foundationpress_Top_Bar_Walker extends Walker_Nav_Menu {

function start_lvl(&$output, $depth = 0, $args = Array() ) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<ul class=\"menu\">\n";
}
}


if ( ! class_exists( 'Foundationpress_Offcanvas_Walker' ) ) :

This comment has been minimized.

Copy link
@LC43

LC43 Jul 11, 2016

hi, why did you choose to nest the second if inside the first?

class Foundationpress_Offcanvas_Walker extends Walker_Nav_Menu {
function start_lvl(&$output, $depth = 0, $args = Array() ) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<ul class=\"vertical nested menu\">\n";
}
}
endif;



endif;

?>
20 changes: 0 additions & 20 deletions library/offcanvas-walker.php

This file was deleted.

19 changes: 2 additions & 17 deletions parts/off-canvas-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,9 @@
*/

?>
<!--
<nav class="tab-bar">
<section class="<?php echo apply_filters( 'filter_mobile_nav_position', 'mobile_nav_position' ); ?>-small">
<a class="<?php echo apply_filters( 'filter_mobile_nav_position', 'mobile_nav_position' ); ?>-off-canvas-toggle menu-icon" href="#"><span></span></a>
</section>
<section class="middle tab-bar-section">

<h1 class="title">
<?php bloginfo( 'name' ); ?>
</h1>

</section>
</nav>

<aside id="offCanvasLeft" class="<?php echo apply_filters( 'filter_mobile_nav_position', 'mobile_nav_position' ); ?>-off-canvas-menu" aria-hidden="true" data-offcanvas-content>
<?php foundationpress_mobile_off_canvas( apply_filters('filter_mobile_nav_position', 'mobile_nav_position') ); ?>
</aside>
-->
<div class="off-cancas-content" off-canvas-content>
<ul class="vertical menu off-canvas position-<?php echo apply_filters( 'filter_mobile_nav_position', 'mobile_nav_position' ); ?>" id="offCanvas<?php echo apply_filters( 'filter_mobile_nav_position', 'mobile_nav_position' ); ?>" data-off-canvas data-position="<?php echo apply_filters( 'filter_mobile_nav_position', 'mobile_nav_position' ); ?>" data-accordion-menu>
<?php foundationpress_mobile_off_canvas( apply_filters('filter_mobile_nav_position', 'mobile_nav_position') ); ?>
</ul>
</div>
30 changes: 1 addition & 29 deletions parts/top-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,12 @@

?>

<!-- <div class="top-bar title-bar">

<div class="top-bar-right">
<?php foundationpress_top_bar_r(); ?>
</div>
</div>
-->


<div class="top-bar" id="top-bar-menu">

<!-- Display the off-canvas menu on small breakpoints -->
<div class="top-bar-left show-for-small-only">
<ul class="menu">
<li><button class="menu-icon" type="button" data-open="offCanvas<?php echo apply_filters( 'filter_mobile_nav_position', 'mobile_nav_position' ); ?>"></button></li>
<li><button class="menu-icon" type="button" data-toggle="offCanvas<?php echo apply_filters( 'filter_mobile_nav_position', 'mobile_nav_position' ); ?>"></button></li>
<li class="name"><a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a></li>
</ul>
</div>
Expand All @@ -41,22 +32,3 @@
</div>

</div>



<!--
<div class="top-bar-container contain-to-grid">
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area top-bar-<?php echo apply_filters( 'filter_mobile_nav_position', 'mobile_nav_position' ); ?>">
<li class="name">
<h1><a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>
</ul>
<section class="top-bar-section">
<?php foundationpress_top_bar_l(); ?>
<?php foundationpress_top_bar_r(); ?>
</section>
</nav>
</div>
-->
4 changes: 2 additions & 2 deletions templates/kitchen-sink.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,8 @@
</div>

<!-- On this page - sidebar nav container -->
<nav id="kitchen-sink-nav">
<div class="docs-toc">
<nav id="kitchen-sink-nav" data-sticky-container>
<div class="docs-toc" data-sticky="sidebar">
<ul class="vertical menu docs-sub-menu" data-magellan>
<li class="docs-menu-title">On this page:</li>
<li><a href="#accordion">Accordion</a></li>
Expand Down

0 comments on commit 698f7ff

Please sign in to comment.