Skip to content

Commit

Permalink
custom post type staff without styling, menu walker set up
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan McEldowney authored and Evan McEldowney committed Jun 22, 2017
1 parent 569c23e commit 7e50593
Show file tree
Hide file tree
Showing 11 changed files with 304 additions and 116 deletions.
113 changes: 5 additions & 108 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
# FoundationPress [![Build Status](https://travis-ci.org/olefredrik/FoundationPress.svg?branch=master)](https://travis-ci.org/olefredrik/FoundationPress)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/olefredrik/foundationpress?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

This is a starter-theme for WordPress based on Foundation 6, the most advanced responsive (mobile-first) framework in the world. The purpose of FoundationPress, is to act as a small and handy toolbox that contains the essentials needed to build any design. FoundationPress is meant to be a starting point, not the final product.

Please fork, copy, modify, delete, share or do whatever you like with this.

All contributions are welcome!

## Requirements

**This project requires [Node.js](http://nodejs.org) v4.x.x to v6.9.x to be installed on your machine.** Please be aware that you will most likely encounter problems with the installation if you are using v7.1.0 with all the latest features.

FoundationPress uses [Sass](http://Sass-lang.com/) (CSS with superpowers). In short, Sass is a CSS pre-processor that allows you to write styles more effectively and tidy.

The Sass is compiled using libsass, which requires the GCC to be installed on your machine. Windows users can install it through [MinGW](http://www.mingw.org/), and Mac users can install it through the [Xcode Command-line Tools](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/).

If you have not worked with a Sass-based workflow before, I would recommend reading [FoundationPress for beginners](https://foundationpress.olefredrik.com/posts/tutorials/foundationpress-for-beginners), a short blog post that explains what you need to know.

## Quickstart

### 1. Clone the repository and install with npm
```bash
$ cd my-wordpress-folder/wp-content/themes/
$ git clone https://github.com/olefredrik/FoundationPress.git
$ cd FoundationPress
$ git clone https://github.com/evanmac123/muirwoods
$ cd muirwoods
$ npm install
```

Expand Down Expand Up @@ -67,13 +52,13 @@ Running this command will build and minify the theme's assets and place a `.zip`
* `assets/scss/modules/*.scss`: Topbar, footer etc.
* `assets/scss/templates/*.scss`: Page template spesific styling

Please note that you **must** run `npm run build` or `npm run watch` in your terminal for the styles to be copied and concatenated. See the [Gulpfile.js](https://github.com/olefredrik/FoundationPress/blob/master/gulpfile.js) for details
Please note that you **must** run `npm run build` or `npm run watch` in your terminal for the styles to be copied and concatenated. See the [Gulpfile.js](https://github.com/olefredrik/MuirWoods/blob/master/gulpfile.js) for details

### Scripts

* `assets/javascript/custom`: This is the folder where you put all your custom scripts. Every .js file you put in this directory will be minified and concatenated one single .js file. (This is good for site speed and performance)

Please note that you must run `npm run build` or `npm run watch` in your terminal for the scripts to be copied and concatenated. See [Gulpfile.js](https://github.com/olefredrik/FoundationPress/blob/master/gulpfile.js) for details
Please note that you must run `npm run build` or `npm run watch` in your terminal for the scripts to be copied and concatenated. See [Gulpfile.js](https://github.com/olefredrik/MuirWoods/blob/master/gulpfile.js) for details

### The main styles and scripts generated by the build

Expand Down Expand Up @@ -102,92 +87,4 @@ If there are errors that Code Sniffer can fix automatically, run the following c
$ npm run phpcbf
```

## Demo

* [Clean FoundationPress install](http://foundationpress.olefredrik.com/)
* [FoundationPress Kitchen Sink - see every single element in action](http://foundationpress.olefredrik.com/kitchen-sink/)

## Unit Testing With Travis-CI

FoundationPress is completely ready to be deployed to and tested by Travis-CI for WordPress Coding Standards and best practices. All you need to do to activate the test is sign up and follow the instructions to point Travis-CI towards your repo. Just don't forget to update the status badge to point to your repositories unit test.
[Travis-CI](https://travis-ci.org/)

## UI toolkits for rapid prototyping

* [Foundation UI Kit for Axure RP](https://gumroad.com/l/foundation-ui-kit-axure-rp)
* [FoundationXD - Foundation UI Kit for Adobe XD](https://gumroad.com/l/foundation-ui-kit-xd)
* [FoundationPSD - Foundation UI Kit for Photoshop](https://gumroad.com/l/foundation-ui-kit-psd)

## Tutorials

* [FoundationPress for beginners](https://foundationpress.olefredrik.com/posts/tutorials/foundationpress-for-beginners/)
* [Responsive images in WordPress with Interchange](http://rachievee.com/responsive-images-in-wordpress/)
* [Learn to use the _settings file to change almost every aspect of a Foundation site](http://zurb.com/university/lessons/66)
* [Other lessons from Zurb University](http://zurb.com/university/past-lessons)

## Documentation

* [Zurb Foundation Docs](http://foundation.zurb.com/docs/)
* [WordPress Codex](http://codex.wordpress.org/)

## Showcase

* [Harvard Center for Green Buildings and Cities](http://www.harvardcgbc.org/)
* [INTI International University & Colleges](http://international.newinti.edu.my/)
* [Conservative Leadership Conference](http://civitasclc.com/)
* [The New Tropic](http://thenewtropic.com/)
* [Parent-Child Home Program](http://www.parent-child.org/)
* [Hip and Healthy](http://hipandhealthy.com/)
* [Threadbird blog](http://blog.threadbird.com/)
* [Public House Wines](http://publichousewine.com/)
* [Franchise Career Advisors](http://franchisecareeradvisors.com/)
* [Le saint](http://www.lesaint.ca/)
* [Help blog](http://help.com/blog/)
* [Maren Schmidt](http://marenschmidt.com/)
* [The Rainbow Venues](http://www.therainbowvenues.co.uk/)
* [Ameronix](http://www.ameronix.com/)
* [Finnerodja](http://www.finnerodja.se/)
* [Glossop Cartons](http://www.glossopcartons.co.uk/)
* [Ready4Work](http://www.ready4work.my/)
* [Just Legal](http://www.justlegal.co.jp/en/)
* [Vintage and Stuff](http://vintageandstuff.com/)
* [Software for FM](http://softwareforfm.co.uk/)
* [WP Diamonds](http://www.wpdiamonds.com/)
* [Storm Arts](http://stormarts.fi/)
* [USS Illinois](http://ussillinois.org/)
* [OffGrid Magazine](https://offgridweb.com/)
* [Axe](http://www.axe.be/)
* [ProfitGym](http://profitgym.nl/)
* [Dr Now](http://www.drnow.com/)
* [Agritur Piasina](http://www.agriturpiasina.it/)
* [Atomic Interactive](http://atomicinteractive.com/)
* [Byington Vineyard & Winery](http://byington.com/)
* [Philanthropy House](http://philanthropyhouse.eu/)
* [TVA Group](http://www.groupe-tva.com/en/)
* [Forte Science](https://www.forte-science.co.jp/)
* [Well Made Studio](http://wellmadestudio.com/)
* [Show And Tell](http://www.showandtelluk.com/)
* [Wahl + Case](https://www.wahlandcase.com/)
* [Forefront Dermatology](https://forefrontdermatology.com/)
* [Wirthschaftsjunioren](http://www.wirtschaftsjunioren.org/)


>Credit goes to all the brilliant designers and developers out there. Have **you** made a site that should be on this list? [Please let me know](https://twitter.com/olefredrik)
## Contributing
#### Here are ways to get involved:

1. [Star](https://github.com/olefredrik/FoundationPress/stargazers) the project!
2. Answer questions that come through [GitHub issues](https://github.com/olefredrik/FoundationPress/issues)
3. Report a bug that you find
4. Share a theme you've built on top of FoundationPress
5. [Tweet](https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Ffoundationpress.olefredrik.com%2F&text=Check%20out%20FoundationPress%2C%20the%20ultimate%20%23WordPress%20starter-theme%20built%20on%20%23Foundation%206&tw_p=tweetbutton&url=http%3A%2F%2Ffoundationpress.olefredrik.com&via=olefredrik) and [blog](http://www.justinfriebel.com/my-first-experience-with-foundationpress-a-wordpress-starter-theme-106/) your experience of FoundationPress.

#### Pull Requests

Pull requests are highly appreciated. Please follow these guidelines:

1. Solve a problem. Features are great, but even better is cleaning-up and fixing issues in the code that you discover
2. Make sure that your code is bug-free and does not introduce new bugs
3. Create a [pull request](https://help.github.com/articles/creating-a-pull-request)
4. Verify that all the Travis-CI build checks have passed
#
45 changes: 45 additions & 0 deletions archive-staff.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
/**
* The template for displaying staff pages
*
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package FoundationPress
* @since FoundationPress 1.0.0
*/

get_header(); ?>

<div class="main-wrap" role="main">
<article class="main-content">
<?php if ( have_posts() ) : ?>

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/staff', get_post_format() ); ?>
<?php endwhile; ?>

<?php else : ?>
<?php get_template_part( 'template-parts/staff', 'none' ); ?>

<?php endif; // End have_posts() check. ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php
if ( function_exists( 'foundationpress_pagination' ) ) :
foundationpress_pagination();
elseif ( is_paged() ) :
?>
<nav id="post-nav">
<div class="post-previous"><?php next_posts_link( __( '&larr; Older posts', 'foundationpress' ) ); ?></div>
<div class="post-next"><?php previous_posts_link( __( 'Newer posts &rarr;', 'foundationpress' ) ); ?></div>
</nav>
<?php endif; ?>

</article>
<?php get_sidebar(); ?>

</div>

<?php get_footer();
4 changes: 4 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/** Add menu walkers for top-bar and off-canvas */
require_once( 'library/class-foundationpress-top-bar-walker.php' );
require_once( 'library/class-foundationpress-mobile-walker.php' );
require_once( 'library/class-foundationpress-program-bar-walker.php' );

/** Create widget areas in sidebar and footer */
require_once( 'library/widget-areas.php' );
Expand All @@ -39,6 +40,9 @@
/** Enqueue scripts */
require_once( 'library/enqueue-scripts.php' );

/** Custom Post Type:Staff */
require_once( 'library/custom-post-types.php' );

/** Add theme support */
require_once( 'library/theme-support.php' );

Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var cleanCSS = require('gulp-clean-css');

// Enter URL of your local server here
// Example: 'http://localwebsite.dev'
var URL = '';
var URL = 'http://localhost:8888/wordpress/';

// Check for --production flag
var isProduction = !!(argv.production);
Expand Down
5 changes: 4 additions & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="title-bar-left">
<button class="menu-icon" type="button" data-toggle="<?php foundationpress_mobile_menu_id(); ?>"></button>
<span class="site-mobile-title title-bar-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?> </a>
</span>
</div>
</div>
Expand All @@ -41,12 +41,15 @@
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</div>
</div>

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

<?php if ( ! get_theme_mod( 'wpt_mobile_menu_layout' ) || get_theme_mod( 'wpt_mobile_menu_layout' ) === 'topbar' ) : ?>
<?php get_template_part( 'template-parts/mobile-top-bar' ); ?>
<?php endif; ?>

</div>
</nav>
</header>
Expand Down
20 changes: 20 additions & 0 deletions library/class-foundationpress-program-bar-walker.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Customize the output of menus for Foundation Program bar
*
* @package FoundationPress
* @since FoundationPress 1.0.0
*/

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

if ( ! class_exists( 'Foundationpress_Program_Bar_Walker' ) ) :
class Foundationpress_Program_Bar_Walker extends Walker_Nav_Menu {
function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<ul class=\"dropdown menu vertical\" data-toggle>\n";
}
}
endif;
Loading

0 comments on commit 7e50593

Please sign in to comment.