first commit with foundationpress template
This commit is contained in:
parent
cc38b75128
commit
5b728241b8
|
@ -0,0 +1,18 @@
|
|||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{*.php,*.html}]
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
|
||||
[{*.txt,wp-config-sample.php,wp-config.php}]
|
||||
end_of_line = crlf
|
|
@ -1,8 +1,13 @@
|
|||
FoundationPress/
|
||||
.DS_Store
|
||||
node_modules
|
||||
npm-debug.log
|
||||
bower_components
|
||||
dist
|
||||
config.yml
|
||||
*.sass-cache*
|
||||
*.log
|
||||
.idea/
|
||||
*.swp
|
||||
.cache
|
||||
.idea
|
||||
packaged/
|
||||
wpcs/
|
||||
vendor/
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
language: php
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- name: "PHP 5.6 Compatibility Test"
|
||||
php: "5.6"
|
||||
env: TEST_VERSION=5.6
|
||||
- name: "PHP7.0 Compatibility Test"
|
||||
php: "7.0"
|
||||
env: TEST_VERSION=7.0
|
||||
- name: "PHP 7.1 Compatibility Test"
|
||||
php: "7.1"
|
||||
env: TEST_VERSION=7.1
|
||||
- name: "PHP 7.2 Compatibility Test"
|
||||
php: "7.2"
|
||||
env: TEST_VERSION=7.2
|
||||
- name: "PHP 7.3 Compatibility Test"
|
||||
php: "7.3"
|
||||
env: TEST_VERSION=7.3
|
||||
allow_failures:
|
||||
- name: "PHP 5.3 Compatibility Test"
|
||||
php: "5.3"
|
||||
env: TEST_VERSION=5.3
|
||||
- name: "PHP 5.4 Compatibility Test"
|
||||
php: "5.4"
|
||||
env: TEST_VERSION=5.4
|
||||
- name: "PHP 5.5 Compatibility Test"
|
||||
php: "5.5"
|
||||
env: TEST_VERSION=5.5
|
||||
|
||||
before_script:
|
||||
- composer install --dev
|
||||
script:
|
||||
- vendor/bin/phpcs -p src/ --standard=PHPCompatibility --runtime-set testVersion $TEST_VERSION
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying 404 pages (not found)
|
||||
*
|
||||
* @package FoundationPress
|
||||
* @since FoundationPress 1.0.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div class="main-container">
|
||||
<div class="main-grid">
|
||||
<main class="main-content">
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title"><?php _e( 'File Not Found', 'foundationpress' ); ?></h1>
|
||||
</header>
|
||||
<div class="entry-content">
|
||||
<div class="error">
|
||||
<p class="bottom"><?php _e( 'The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.', 'foundationpress' ); ?></p>
|
||||
</div>
|
||||
<p><?php _e( 'Please try the following:', 'foundationpress' ); ?></p>
|
||||
<ul>
|
||||
<li>
|
||||
<?php _e( 'Check your spelling', 'foundationpress' ); ?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
/* translators: %s: home page url */
|
||||
printf(
|
||||
__( 'Return to the <a href="%s">home page</a>', 'foundationpress' ),
|
||||
home_url()
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php _e( 'Click the <a href="javascript:history.back()">Back</a> button', 'foundationpress' ); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
<?php get_sidebar(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php get_footer();
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,18 @@
|
|||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,6 @@
|
|||
# arcHIVE-wordpress-theme
|
||||
|
||||
will be build on top of [Foundation](https://get.foundation) and using the clean theme starter [FoundationPress]https://github.com/olefredrik/FoundationPress)
|
||||
|
||||
starting with html template first
|
||||
|
181
README.md
181
README.md
|
@ -1,6 +1,181 @@
|
|||
# arcHIVE-wordpress-theme
|
||||
# DEPRECATED
|
||||
This project will no longer be maintained. As Zurb Foundation is [no longer in active development ](https://github.com/foundation/foundation-sites/issues/11767), I would recommend that you base your front-end code on another framework, such as [Semantic UI](https://semantic-ui.com) or [Bootstrap](https://getbootstrap.com).
|
||||
|
||||
will be build on top of [Foundation](https://get.foundation) and using the clean theme starter [JointsWP]https://jointswp.com/)
|
||||
To all of you who have contributed to FoundationPress over the years:
|
||||
**Thank you!**
|
||||
|
||||
starting with html template first
|
||||
– Ole Fredrik
|
||||
|
||||
|
||||
# FoundationPress
|
||||
|
||||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/olefredrik/foundationpress?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[![GitHub version](https://badge.fury.io/gh/olefredrik%2Ffoundationpress.svg)](https://github.com/olefredrik/FoundationPress/releases)
|
||||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
|
||||
|
||||
This is a starter-theme for WordPress based on Zurb's [Foundation for Sites 6](https://foundation.zurb.com/sites.html), 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) v6.x.x 11.6.x to be installed on your machine.** Please be aware that you might encounter problems with the installation if you are using the most current Node version (bleeding edge) 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
|
||||
$ npm install
|
||||
```
|
||||
|
||||
### 2. Configuration
|
||||
|
||||
#### YAML config file
|
||||
FoundationPress includes a `config-default.yml` file. To make changes to the configuration, make a copy of `config-default.yml` and name it `config.yml` and make changes to that file. The `config.yml` file is ignored by git so that each environment can use a different configuration with the same git repo.
|
||||
|
||||
At the start of the build process a check is done to see if a `config.yml` file exists. If `config.yml` exists, the configuration will be loaded from `config.yml`. If `config.yml` does not exist, `config-default.yml` will be used as a fallback.
|
||||
|
||||
#### Browsersync setup
|
||||
If you want to take advantage of [Browsersync](https://www.browsersync.io/) (automatic browser refresh when a file is saved), simply open your `config.yml` file after creating it in the previous step, and put your local dev-server address and port (e.g http://localhost:8888) in the `url` property under the `BROWSERSYNC` object.
|
||||
|
||||
#### Static asset hashing / cache breaker
|
||||
If you want to make sure your users see the latest changes after re-deploying your theme, you can enable static asset hashing. In your `config.yml`, set ``REVISIONING: true;``. Hashing will work on the ``npm run build`` and ``npm run dev`` commands. It will not be applied on the start command with browsersync. This is by design. Hashing will only change if there are actual changes in the files.
|
||||
|
||||
### 3. Get started
|
||||
|
||||
```bash
|
||||
$ npm start
|
||||
```
|
||||
|
||||
### 4. Compile assets for production
|
||||
|
||||
When building for production, the CSS and JS will be minified. To minify the assets in your `/dist` folder, run
|
||||
|
||||
```bash
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
#### To create a .zip file of your theme, run:
|
||||
|
||||
```
|
||||
$ npm run package
|
||||
```
|
||||
|
||||
Running this command will build and minify the theme's assets and place a .zip archive of the theme in the `packaged` directory. This excludes the developer files/directories from your theme like `/node_modules`, `/src`, etc. to keep the theme lightweight for transferring the theme to a staging or production server.
|
||||
|
||||
### Project structure
|
||||
|
||||
In the `/src` folder you will find the working files for all your assets. Every time you make a change to a file that is watched by Gulp, the output will be saved to the `/dist` folder. The contents of this folder is the compiled code that you should not touch (unless you have a good reason for it).
|
||||
|
||||
The `/page-templates` folder contains templates that can be selected in the Pages section of the WordPress admin panel. To create a new page-template, simply create a new file in this folder and make sure to give it a template name.
|
||||
|
||||
I guess the rest is quite self explanatory. Feel free to ask if you feel stuck.
|
||||
|
||||
### Styles and Sass Compilation
|
||||
|
||||
* `style.css`: Do not worry about this file. (For some reason) it's required by WordPress. All styling are handled in the Sass files described below
|
||||
|
||||
* `src/assets/scss/app.scss`: Make imports for all your styles here
|
||||
* `src/assets/scss/global/*.scss`: Global settings
|
||||
* `src/assets/scss/components/*.scss`: Buttons etc.
|
||||
* `src/assets/scss/modules/*.scss`: Topbar, footer etc.
|
||||
* `src/assets/scss/templates/*.scss`: Page template styling
|
||||
|
||||
* `dist/assets/css/app.css`: This file is loaded in the `<head>` section of your document, and contains the compiled styles for your project.
|
||||
|
||||
If you're new to Sass, please note that you need to have Gulp running in the background (``npm start``), for any changes in your scss files to be compiled to `app.css`.
|
||||
|
||||
### JavaScript Compilation
|
||||
|
||||
All JavaScript files, including Foundation's modules, are imported through the `src/assets/js/app.js` file. The files are imported using module dependency with [webpack](https://webpack.js.org/) as the module bundler.
|
||||
|
||||
If you're unfamiliar with modules and module bundling, check out [this resource for node style require/exports](http://openmymind.net/2012/2/3/Node-Require-and-Exports/) and [this resource to understand ES6 modules](http://exploringjs.com/es6/ch_modules.html).
|
||||
|
||||
Foundation modules are loaded in the `src/assets/js/app.js` file. By default all components are loaded. You can also pick and choose which modules to include. Just follow the instructions in the file.
|
||||
|
||||
If you need to output additional JavaScript files separate from `app.js`, do the following:
|
||||
* Create new `custom.js` file in `src/assets/js/`. If you will be using jQuery, add `import $ from 'jquery';` at the top of the file.
|
||||
* In `config.yml`, add `src/assets/js/custom.js` to `PATHS.entries`.
|
||||
* Build (`npm start`)
|
||||
* You will now have a `custom.js` file outputted to the `dist/assets/js/` directory.
|
||||
|
||||
## Demo
|
||||
|
||||
* [Clean FoundationPress install](http://foundationpress.olefredrik.com/)
|
||||
* [FoundationPress Kitchen Sink - see every single element in action](http://foundationpress.olefredrik.com/kitchen-sink/)
|
||||
|
||||
## Local Development
|
||||
We recommend using one of the following setups for local WordPress development:
|
||||
|
||||
* [MAMP](https://www.mamp.info/en/) (macOS)
|
||||
* [WAMP](http://www.wampserver.com/en/download-wampserver-64bits/) (Windows)
|
||||
* [LAMP](https://www.linux.com/learn/easy-lamp-server-installation) (Linux)
|
||||
* [Local](https://local.getflywheel.com/) (macOS/Windows)
|
||||
* [VVV (Varying Vagrant Vagrants)](https://github.com/Varying-Vagrant-Vagrants/VVV) (Vagrant Box)
|
||||
* [Trellis](https://roots.io/trellis/)
|
||||
|
||||
|
||||
## 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/)
|
||||
* [The New Tropic](http://thenewtropic.com/)
|
||||
* [Parent-Child Home Program](http://www.parent-child.org/)
|
||||
* [Hip and Healthy](http://hipandhealthy.com/)
|
||||
* [Franchise Career Advisors](http://franchisecareeradvisors.com/)
|
||||
* [Maren Schmidt](http://marenschmidt.com/)
|
||||
* [Finnerodja](http://www.finnerodja.se/)
|
||||
* [WP Diamonds](http://www.wpdiamonds.com/)
|
||||
* [Storm Arts](http://stormarts.fi/)
|
||||
* [ProfitGym](http://profitgym.nl/)
|
||||
* [Agritur Piasina](http://www.agriturpiasina.it/)
|
||||
* [Byington Vineyard & Winery](https://byington.com/)
|
||||
* [Show And Tell](http://www.showandtelluk.com/)
|
||||
* [Wahl + Case](https://www.wahlandcase.com/)
|
||||
* [Morgridge Institute for Research](https://morgridge.org)
|
||||
* [Impeach Trump Now](https://impeachdonaldtrumpnow.org/)
|
||||
* [La revanche des sites](https://www.la-revanche-des-sites.fr/)
|
||||
* [Dyami Wilson](https://dyamiwilson.com)
|
||||
* [Madico Solutions](https://madico.com)
|
||||
|
||||
>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
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying archive pages
|
||||
*
|
||||
* Used to display archive-type pages if nothing more specific matches a query.
|
||||
* For example, puts together date-based pages if no date.php file exists.
|
||||
*
|
||||
* If you'd like to further customize these archive views, you may create a
|
||||
* new template file for each one. For example, tag.php (Tag archives),
|
||||
* category.php (Category archives), author.php (Author archives), etc.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package FoundationPress
|
||||
* @since FoundationPress 1.0.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div class="main-container">
|
||||
<div class="main-grid">
|
||||
<main class="main-content">
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php get_template_part( 'template-parts/content', '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( __( '← Older posts', 'foundationpress' ) ); ?></div>
|
||||
<div class="post-next"><?php previous_posts_link( __( 'Newer posts →', 'foundationpress' ) ); ?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
</main>
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php get_footer();
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="WordPress Theme Coding Standards">
|
||||
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
|
||||
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
|
||||
|
||||
<!-- Set a description for this ruleset. -->
|
||||
<description>A custom set of code standard rules to check for WordPress themes.</description>
|
||||
|
||||
<!-- Include the WordPress ruleset, with exclusions. -->
|
||||
<rule ref="WordPress">
|
||||
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
|
||||
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
||||
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
|
||||
<exclude name="Generic.Files.EndFileNewline.NotFound" />
|
||||
<exclude name="Generic.Strings.UnnecessaryStringConcat.Found" />
|
||||
<exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine" />
|
||||
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace" />
|
||||
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
|
||||
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
|
||||
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket" />
|
||||
|
||||
<exclude name="Squiz.Commenting.FileComment.WrongStyle" />
|
||||
<exclude name="Squiz.Commenting.BlockComment.NoEmptyLineBefore" />
|
||||
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
|
||||
<exclude name="Squiz.Commenting.InlineComment.NotCapital" />
|
||||
<exclude name="Squiz.Commenting.InlineComment.SpacingAfter" />
|
||||
<exclude name="Squiz.Commenting.VariableComment.WrongStyle" />
|
||||
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
|
||||
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle" />
|
||||
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
|
||||
<exclude name="Squiz.Commenting.ClassComment.Missing" />
|
||||
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" />
|
||||
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpenHint" />
|
||||
|
||||
<exclude name="WordPress.XSS.EscapeOutput.UnsafePrintingFunction" />
|
||||
<exclude name="WordPress.XSS.EscapeOutput.OutputNotEscaped" />
|
||||
<exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceAfterOpenParenthesis" />
|
||||
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener" />
|
||||
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser" />
|
||||
|
||||
<exclude name="WordPress.Variables.GlobalVariables" />
|
||||
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis" />
|
||||
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis)" />
|
||||
|
||||
<exclude name="WordPress.VIP.RestrictedFunctions" />
|
||||
</rule>
|
||||
</ruleset>
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying comments
|
||||
*
|
||||
* The area of the page that contains both current comments
|
||||
* and the comment form.
|
||||
*
|
||||
* @package FoundationPress
|
||||
* @since FoundationPress 1.0.0
|
||||
*/
|
||||
|
||||
if ( have_comments() ) :
|
||||
?>
|
||||
<section id="comments">
|
||||
<?php
|
||||
|
||||
wp_list_comments(
|
||||
array(
|
||||
'walker' => new Foundationpress_Comments(),
|
||||
'max_depth' => '',
|
||||
'style' => 'ol',
|
||||
'callback' => null,
|
||||
'end-callback' => null,
|
||||
'type' => 'all',
|
||||
'reply_text' => __( 'Reply', 'foundationpress' ),
|
||||
'page' => '',
|
||||
'per_page' => '',
|
||||
'avatar_size' => 48,
|
||||
'reverse_top_level' => null,
|
||||
'reverse_children' => '',
|
||||
'format' => 'html5',
|
||||
'short_ping' => false,
|
||||
'echo' => true,
|
||||
'moderation' => __( 'Your comment is awaiting moderation.', 'foundationpress' ),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
<?php
|
||||
foundationpress_the_comments_pagination();
|
||||
?>
|
||||
</section>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
/*
|
||||
Do not delete these lines.
|
||||
Prevent access to this file directly
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || die( __( 'Please do not load this page directly. Thanks!', 'foundationpress' ) );
|
||||
|
||||
if ( post_password_required() ) { ?>
|
||||
<section id="comments">
|
||||
<div class="notice">
|
||||
<p class="bottom"><?php _e( 'This post is password protected. Enter the password to view comments.', 'foundationpress' ); ?></p>
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( comments_open() ) :
|
||||
?>
|
||||
<section id="respond">
|
||||
<?php
|
||||
comment_form(
|
||||
array(
|
||||
'class_submit' => 'button'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</section>
|
||||
<?php
|
||||
endif; // If you delete this the sky will fall on your head.
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "olefredrik/foundationpress",
|
||||
"description": "FoundationPress is a WordPress starter theme based on Foundation 6 by Zurb",
|
||||
"type": "wordpress-theme",
|
||||
"minimum-stability" : "dev",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ole Fredrik Lie",
|
||||
"email": "mail@olefredrik.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"composer/installers": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"squizlabs/php_codesniffer": "*",
|
||||
"wimg/php-compatibility": "*",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,317 @@
|
|||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "ebb80c6b0e6f29e301b37472dcc8d524",
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/installers",
|
||||
"version": "v1.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/installers.git",
|
||||
"reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
|
||||
"reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^1.0"
|
||||
},
|
||||
"replace": {
|
||||
"roundcube/plugin-installer": "*",
|
||||
"shama/baton": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "1.0.*@dev",
|
||||
"phpunit/phpunit": "^4.8.36"
|
||||
},
|
||||
"type": "composer-plugin",
|
||||
"extra": {
|
||||
"class": "Composer\\Installers\\Plugin",
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\Installers\\": "src/Composer/Installers"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kyle Robinson Young",
|
||||
"email": "kyle@dontkry.com",
|
||||
"homepage": "https://github.com/shama"
|
||||
}
|
||||
],
|
||||
"description": "A multi-framework Composer library installer",
|
||||
"homepage": "https://composer.github.io/installers/",
|
||||
"keywords": [
|
||||
"Craft",
|
||||
"Dolibarr",
|
||||
"Eliasis",
|
||||
"Hurad",
|
||||
"ImageCMS",
|
||||
"Kanboard",
|
||||
"Lan Management System",
|
||||
"MODX Evo",
|
||||
"Mautic",
|
||||
"Maya",
|
||||
"OXID",
|
||||
"Plentymarkets",
|
||||
"Porto",
|
||||
"RadPHP",
|
||||
"SMF",
|
||||
"Thelia",
|
||||
"WolfCMS",
|
||||
"agl",
|
||||
"aimeos",
|
||||
"annotatecms",
|
||||
"attogram",
|
||||
"bitrix",
|
||||
"cakephp",
|
||||
"chef",
|
||||
"cockpit",
|
||||
"codeigniter",
|
||||
"concrete5",
|
||||
"croogo",
|
||||
"dokuwiki",
|
||||
"drupal",
|
||||
"eZ Platform",
|
||||
"elgg",
|
||||
"expressionengine",
|
||||
"fuelphp",
|
||||
"grav",
|
||||
"installer",
|
||||
"itop",
|
||||
"joomla",
|
||||
"kohana",
|
||||
"laravel",
|
||||
"lavalite",
|
||||
"lithium",
|
||||
"magento",
|
||||
"majima",
|
||||
"mako",
|
||||
"mediawiki",
|
||||
"modulework",
|
||||
"modx",
|
||||
"moodle",
|
||||
"osclass",
|
||||
"phpbb",
|
||||
"piwik",
|
||||
"ppi",
|
||||
"puppet",
|
||||
"pxcms",
|
||||
"reindex",
|
||||
"roundcube",
|
||||
"shopware",
|
||||
"silverstripe",
|
||||
"sydes",
|
||||
"symfony",
|
||||
"typo3",
|
||||
"wordpress",
|
||||
"yawik",
|
||||
"zend",
|
||||
"zikula"
|
||||
],
|
||||
"time": "2018-08-27T06:10:37+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
||||
"version": "v0.4.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
|
||||
"reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/2e41850d5f7797cbb1af7b030d245b3b24e63a08",
|
||||
"reference": "2e41850d5f7797cbb1af7b030d245b3b24e63a08",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^1.0",
|
||||
"php": "^5.3|^7",
|
||||
"squizlabs/php_codesniffer": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "*",
|
||||
"wimg/php-compatibility": "^8.0"
|
||||
},
|
||||
"suggest": {
|
||||
"dealerdirect/qa-tools": "All the PHP QA tools you'll need"
|
||||
},
|
||||
"type": "composer-plugin",
|
||||
"extra": {
|
||||
"class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Franck Nijhof",
|
||||
"email": "f.nijhof@dealerdirect.nl",
|
||||
"homepage": "http://workingatdealerdirect.eu",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
|
||||
"homepage": "http://workingatdealerdirect.eu",
|
||||
"keywords": [
|
||||
"PHPCodeSniffer",
|
||||
"PHP_CodeSniffer",
|
||||
"code quality",
|
||||
"codesniffer",
|
||||
"composer",
|
||||
"installer",
|
||||
"phpcs",
|
||||
"plugin",
|
||||
"qa",
|
||||
"quality",
|
||||
"standard",
|
||||
"standards",
|
||||
"style guide",
|
||||
"stylecheck",
|
||||
"tests"
|
||||
],
|
||||
"time": "2017-12-06T16:27:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||
"reference": "d86ad3c3d8a6cb40f45a377695d8f35b592ca821"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d86ad3c3d8a6cb40f45a377695d8f35b592ca821",
|
||||
"reference": "d86ad3c3d8a6cb40f45a377695d8f35b592ca821",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-simplexml": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/phpcs",
|
||||
"bin/phpcbf"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Greg Sherwood",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
||||
"homepage": "http://www.squizlabs.com/php-codesniffer",
|
||||
"keywords": [
|
||||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-01-14T05:30:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "wimg/php-compatibility",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
|
||||
"reference": "cac8ef629aa14a8d5148b1b56d09b657904604bb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/cac8ef629aa14a8d5148b1b56d09b657904604bb",
|
||||
"reference": "cac8ef629aa14a8d5148b1b56d09b657904604bb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3",
|
||||
"squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
|
||||
},
|
||||
"conflict": {
|
||||
"squizlabs/php_codesniffer": "2.6.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
|
||||
},
|
||||
"suggest": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
|
||||
"roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
|
||||
},
|
||||
"type": "phpcodesniffer-standard",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
|
||||
},
|
||||
{
|
||||
"name": "Wim Godden",
|
||||
"homepage": "https://github.com/wimg",
|
||||
"role": "lead"
|
||||
},
|
||||
{
|
||||
"name": "Juliette Reinders Folmer",
|
||||
"homepage": "https://github.com/jrfnl",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
|
||||
"homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"abandoned": "phpcompatibility/php-compatibility",
|
||||
"time": "2019-01-13T22:26:44+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
# Browsersync config
|
||||
BROWSERSYNC:
|
||||
# URL of local development server goes here (ex. http://localsite.dev)
|
||||
url: ""
|
||||
|
||||
# Autoprefixer will make sure your CSS works with these browsers
|
||||
COMPATIBILITY:
|
||||
- "last 2 versions"
|
||||
- "ie >= 9"
|
||||
- "ios >= 7"
|
||||
|
||||
# Set to true if you want static asset revisioning, helpful for cache busting
|
||||
REVISIONING: false
|
||||
|
||||
# Gulp will reference these paths when it copies files
|
||||
PATHS:
|
||||
# Path to dist folder
|
||||
dist: "dist"
|
||||
# Paths to static assets that aren't images, CSS, or JavaScript
|
||||
assets:
|
||||
- "src/assets/**/*"
|
||||
- "!src/assets/{images,images/**/*,js,js/**/*,scss,scss/**/*}"
|
||||
# Paths to Sass libraries, which can then be loaded with @import
|
||||
sass:
|
||||
- "node_modules/foundation-sites/scss"
|
||||
- "node_modules/motion-ui/src"
|
||||
# Paths to JavaScript entry points for webpack to bundle modules
|
||||
entries:
|
||||
- "src/assets/js/app.js"
|
||||
# Paths for the package task to include/exclude in .zip archive
|
||||
package:
|
||||
- "**/*"
|
||||
- "!**/node_modules/**"
|
||||
- "!**/packaged/**"
|
||||
- "!**/src/**"
|
||||
- "!**/codesniffer.ruleset.xml"
|
||||
- "!**/composer.json"
|
||||
- "!**/composer.lock"
|
||||
- "!**/config.yml"
|
||||
- "!**/config.default.yml"
|
||||
- "!**/gulpfile.babel.js"
|
||||
- "!**/package.json"
|
||||
- "!**/package-lock.json"
|
||||
- "!**/webpack.config.js"
|
||||
# Paths for PHP CodeSniffer
|
||||
phpcs:
|
||||
- "**/*.php"
|
||||
- "!wpcs"
|
||||
- "!wpcs/**"
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying the footer
|
||||
*
|
||||
* Contains the closing of the "off-canvas-wrap" div and all content after.
|
||||
*
|
||||
* @package FoundationPress
|
||||
* @since FoundationPress 1.0.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<footer class="footer-container">
|
||||
<div class="footer-grid">
|
||||
<?php dynamic_sidebar( 'footer-widgets' ); ?>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<?php if ( get_theme_mod( 'wpt_mobile_menu_layout' ) === 'offcanvas' ) : ?>
|
||||
</div><!-- Close off-canvas content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
/**
|
||||
* Author: Ole Fredrik Lie
|
||||
* URL: http://olefredrik.com
|
||||
*
|
||||
* FoundationPress functions and definitions
|
||||
*
|
||||
* Set up the theme and provides some helper functions, which are used in the
|
||||
* theme as custom template tags. Others are attached to action and filter
|
||||
* hooks in WordPress to change core functionality.
|
||||
*
|
||||
* @link https://codex.wordpress.org/Theme_Development
|
||||
* @package FoundationPress
|
||||
* @since FoundationPress 1.0.0
|
||||
*/
|
||||
|
||||
/** Various clean up functions */
|
||||
require_once( 'library/cleanup.php' );
|
||||
|
||||
/** Required for Foundation to work properly */
|
||||
require_once( 'library/foundation.php' );
|
||||
|
||||
/** Format comments */
|
||||
require_once( 'library/class-foundationpress-comments.php' );
|
||||
|
||||
/** Register all navigation menus */
|
||||
require_once( 'library/navigation.php' );
|
||||
|
||||
/** 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' );
|
||||
|
||||
/** Create widget areas in sidebar and footer */
|
||||
require_once( 'library/widget-areas.php' );
|
||||
|
||||
/** Return entry meta information for posts */
|
||||
require_once( 'library/entry-meta.php' );
|
||||
|
||||
/** Enqueue scripts */
|
||||
require_once( 'library/enqueue-scripts.php' );
|
||||
|
||||
/** Add theme support */
|
||||
require_once( 'library/theme-support.php' );
|
||||
|
||||
/** Add Nav Options to Customer */
|
||||
require_once( 'library/custom-nav.php' );
|
||||
|
||||
/** Change WP's sticky post class */
|
||||
require_once( 'library/sticky-posts.php' );
|
||||
|
||||
/** Configure responsive image sizes */
|
||||
require_once( 'library/responsive-images.php' );
|
||||
|
||||
/** Gutenberg editor support */
|
||||
require_once( 'library/gutenberg.php' );
|
||||
|
||||
/** If your site requires protocol relative url's for theme assets, uncomment the line below */
|
||||
// require_once( 'library/class-foundationpress-protocol-relative-theme-assets.php' );
|
|
@ -0,0 +1,259 @@
|
|||
'use strict';
|
||||
|
||||
import plugins from 'gulp-load-plugins';
|
||||
import yargs from 'yargs';
|
||||
import browser from 'browser-sync';
|
||||
import gulp from 'gulp';
|
||||
import rimraf from 'rimraf';
|
||||
import yaml from 'js-yaml';
|
||||
import fs from 'fs';
|
||||
import dateFormat from 'dateformat';
|
||||
import webpackStream from 'webpack-stream';
|
||||
import webpack2 from 'webpack';
|
||||
import named from 'vinyl-named';
|
||||
import log from 'fancy-log';
|
||||
import colors from 'ansi-colors';
|
||||
|
||||
// Load all Gulp plugins into one variable
|
||||
const $ = plugins();
|
||||
|
||||
// Check for --production flag
|
||||
const PRODUCTION = !!(yargs.argv.production);
|
||||
|
||||
// Check for --development flag unminified with sourcemaps
|
||||
const DEV = !!(yargs.argv.dev);
|
||||
|
||||
// Load settings from settings.yml
|
||||
const { BROWSERSYNC, COMPATIBILITY, REVISIONING, PATHS } = loadConfig();
|
||||
|
||||
// Check if file exists synchronously
|
||||
function checkFileExists(filepath) {
|
||||
let flag = true;
|
||||
try {
|
||||
fs.accessSync(filepath, fs.F_OK);
|
||||
} catch(e) {
|
||||
flag = false;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Load default or custom YML config file
|
||||
function loadConfig() {
|
||||
log('Loading config file...');
|
||||
|
||||
if (checkFileExists('config.yml')) {
|
||||
// config.yml exists, load it
|
||||
log(colors.bold(colors.cyan('config.yml')), 'exists, loading', colors.bold(colors.cyan('config.yml')));
|
||||
let ymlFile = fs.readFileSync('config.yml', 'utf8');
|
||||
return yaml.load(ymlFile);
|
||||
|
||||
} else if(checkFileExists('config-default.yml')) {
|
||||
// config-default.yml exists, load it
|
||||
log(colors.bold(colors.cyan('config.yml')), 'does not exist, loading', colors.bold(colors.cyan('config-default.yml')));
|
||||
let ymlFile = fs.readFileSync('config-default.yml', 'utf8');
|
||||
return yaml.load(ymlFile);
|
||||
|
||||
} else {
|
||||
// Exit if config.yml & config-default.yml do not exist
|
||||
log('Exiting process, no config file exists.');
|
||||
log('Error Code:', err.code);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the "dist" folder
|
||||
// This happens every time a build starts
|
||||
function clean(done) {
|
||||
rimraf(PATHS.dist, done);
|
||||
}
|
||||
|
||||
// Copy files out of the assets folder
|
||||
// This task skips over the "images", "js", and "scss" folders, which are parsed separately
|
||||
function copy() {
|
||||
return gulp.src(PATHS.assets)
|
||||
.pipe(gulp.dest(PATHS.dist + '/assets'));
|
||||
}
|
||||
|
||||
// Compile Sass into CSS
|
||||
// In production, the CSS is compressed
|
||||
function sass() {
|
||||
return gulp.src(['src/assets/scss/app.scss','src/assets/scss/editor.scss'])
|
||||
.pipe($.sourcemaps.init())
|
||||
.pipe($.sass({
|
||||
includePaths: PATHS.sass
|
||||
})
|
||||
.on('error', $.sass.logError))
|
||||
.pipe($.autoprefixer({
|
||||
browsers: COMPATIBILITY
|
||||
}))
|
||||
|
||||
.pipe($.if(PRODUCTION, $.cleanCss({ compatibility: 'ie9' })))
|
||||
.pipe($.if(!PRODUCTION, $.sourcemaps.write()))
|
||||
.pipe($.if(REVISIONING && PRODUCTION || REVISIONING && DEV, $.rev()))
|
||||
.pipe(gulp.dest(PATHS.dist + '/assets/css'))
|
||||
.pipe($.if(REVISIONING && PRODUCTION || REVISIONING && DEV, $.rev.manifest()))
|
||||
.pipe(gulp.dest(PATHS.dist + '/assets/css'))
|
||||
.pipe(browser.reload({ stream: true }));
|
||||
}
|
||||
|
||||
// Combine JavaScript into one file
|
||||
// In production, the file is minified
|
||||
const webpack = {
|
||||
config: {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /.js$/,
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules(?![\\\/]foundation-sites)/,
|
||||
},
|
||||
],
|
||||
},
|
||||
externals: {
|
||||
jquery: 'jQuery',
|
||||
},
|
||||
},
|
||||
|
||||
changeHandler(err, stats) {
|
||||
log('[webpack]', stats.toString({
|
||||
colors: true,
|
||||
}));
|
||||
|
||||
browser.reload();
|
||||
},
|
||||
|
||||
build() {
|
||||
return gulp.src(PATHS.entries)
|
||||
.pipe(named())
|
||||
.pipe(webpackStream(webpack.config, webpack2))
|
||||
.pipe($.if(PRODUCTION, $.uglify()
|
||||
.on('error', e => { console.log(e); }),
|
||||
))
|
||||
.pipe($.if(REVISIONING && PRODUCTION || REVISIONING && DEV, $.rev()))
|
||||
.pipe(gulp.dest(PATHS.dist + '/assets/js'))
|
||||
.pipe($.if(REVISIONING && PRODUCTION || REVISIONING && DEV, $.rev.manifest()))
|
||||
.pipe(gulp.dest(PATHS.dist + '/assets/js'));
|
||||
},
|
||||
|
||||
watch() {
|
||||
const watchConfig = Object.assign(webpack.config, {
|
||||
watch: true,
|
||||
devtool: 'inline-source-map',
|
||||
});
|
||||
|
||||
return gulp.src(PATHS.entries)
|
||||
.pipe(named())
|
||||
.pipe(webpackStream(watchConfig, webpack2, webpack.changeHandler)
|
||||
.on('error', (err) => {
|
||||
log('[webpack:error]', err.toString({
|
||||
colors: true,
|
||||
}));
|
||||
}),
|
||||
)
|
||||
.pipe(gulp.dest(PATHS.dist + '/assets/js'));
|
||||
},
|
||||
};
|
||||
|
||||
gulp.task('webpack:build', webpack.build);
|
||||
gulp.task('webpack:watch', webpack.watch);
|
||||
|
||||
// Copy images to the "dist" folder
|
||||
// In production, the images are compressed
|
||||
function images() {
|
||||
return gulp.src('src/assets/images/**/*')
|
||||
.pipe($.if(PRODUCTION, $.imagemin([
|
||||
$.imagemin.jpegtran({
|
||||
progressive: true,
|
||||
}),
|
||||
$.imagemin.optipng({
|
||||
optimizationLevel: 5,
|
||||
}),
|
||||
$.imagemin.gifsicle({
|
||||
interlaced: true,
|
||||
}),
|
||||
$.imagemin.svgo({
|
||||
plugins: [
|
||||
{cleanupAttrs: true},
|
||||
{removeComments: true},
|
||||
]
|
||||
})
|
||||
])))
|
||||
.pipe(gulp.dest(PATHS.dist + '/assets/images'));
|
||||
}
|
||||
|
||||
// Create a .zip archive of the theme
|
||||
function archive() {
|
||||
var time = dateFormat(new Date(), "yyyy-mm-dd_HH-MM");
|
||||
var pkg = JSON.parse(fs.readFileSync('./package.json'));
|
||||
var title = pkg.name + '_' + time + '.zip';
|
||||
|
||||
return gulp.src(PATHS.package)
|
||||
.pipe($.zip(title))
|
||||
.pipe(gulp.dest('packaged'));
|
||||
}
|
||||
|
||||
// PHP Code Sniffer task
|
||||
gulp.task('phpcs', function() {
|
||||
return gulp.src(PATHS.phpcs)
|
||||
.pipe($.phpcs({
|
||||
bin: 'wpcs/vendor/bin/phpcs',
|
||||
standard: './codesniffer.ruleset.xml',
|
||||
showSniffCode: true,
|
||||
}))
|
||||
.pipe($.phpcs.reporter('log'));
|
||||
});
|
||||
|
||||
// PHP Code Beautifier task
|
||||
gulp.task('phpcbf', function () {
|
||||
return gulp.src(PATHS.phpcs)
|
||||
.pipe($.phpcbf({
|
||||
bin: 'wpcs/vendor/bin/phpcbf',
|
||||
standard: './codesniffer.ruleset.xml',
|
||||
warningSeverity: 0
|
||||
}))
|
||||
.on('error', log)
|
||||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
// Start BrowserSync to preview the site in
|
||||
function server(done) {
|
||||
browser.init({
|
||||
proxy: BROWSERSYNC.url,
|
||||
|
||||
ui: {
|
||||
port: 8080
|
||||
},
|
||||
|
||||
});
|
||||
done();
|
||||
}
|
||||
|
||||
// Reload the browser with BrowserSync
|
||||
function reload(done) {
|
||||
browser.reload();
|
||||
done();
|
||||
}
|
||||
|
||||
// Watch for changes to static assets, pages, Sass, and JavaScript
|
||||
function watch() {
|
||||
gulp.watch(PATHS.assets, copy);
|
||||
gulp.watch('src/assets/scss/**/*.scss', sass)
|
||||
.on('change', path => log('File ' + colors.bold(colors.magenta(path)) + ' changed.'))
|
||||
.on('unlink', path => log('File ' + colors.bold(colors.magenta(path)) + ' was removed.'));
|
||||
gulp.watch('**/*.php', reload)
|
||||
.on('change', path => log('File ' + colors.bold(colors.magenta(path)) + ' changed.'))
|
||||
.on('unlink', path => log('File ' + colors.bold(colors.magenta(path)) + ' was removed.'));
|
||||
gulp.watch('src/assets/images/**/*', gulp.series(images, reload));
|
||||
}
|
||||
|
||||
// Build the "dist" folder by running all of the below tasks
|
||||
gulp.task('build',
|
||||
gulp.series(clean, gulp.parallel(sass, 'webpack:build', images, copy)));
|
||||
|
||||
// Build the site, run the server, and watch for file changes
|
||||
gulp.task('default',
|
||||
gulp.series('build', server, gulp.parallel('webpack:watch', watch)));
|
||||
|
||||
// Package task
|
||||
gulp.task('package',
|
||||
gulp.series('build', archive));
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
/**
|
||||
* The template for displaying the header
|
||||
*
|
||||
* Displays all of the head element and everything up until the "container" div.
|
||||
*
|
||||
* @package FoundationPress
|
||||
* @since FoundationPress 1.0.0
|
||||
*/
|
||||
|
||||
?>
|
||||
<!doctype html>
|
||||
<html class="no-js" <?php language_attributes(); ?> >
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<?php if ( get_theme_mod( 'wpt_mobile_menu_layout' ) === 'offcanvas' ) : ?>
|
||||
<?php get_template_part( 'template-parts/mobile-off-canvas' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<header class="site-header" role="banner">
|
||||
<div class="site-title-bar title-bar" <?php foundationpress_title_bar_responsive_toggle(); ?>>
|
||||
<div class="title-bar-left">
|
||||
<button aria-label="<?php _e( 'Main Menu', 'foundationpress' ); ?>" 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>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="site-navigation top-bar" role="navigation" id="<?php foundationpress_mobile_menu_id(); ?>">
|
||||
<div class="top-bar-left">
|
||||
<div class="site-desktop-title top-bar-title">
|
||||
<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 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>
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
/**
|
||||
* The main template file
|
||||
*
|
||||
* This is the most generic template file in a WordPress theme
|
||||
* and one of the two required files for a theme (the other being style.css).
|
||||
* It is used to display a page when nothing more specific matches a query.
|
||||
* e.g., it puts together the home page when no home.php file exists.
|
||||
*
|
||||
* Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
|
||||
*
|
||||
* @package FoundationPress
|
||||
* @since FoundationPress 1.0.0
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div class="main-container">
|
||||
<div class="main-grid">
|
||||
<main class="main-content">
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<?php /* Start the Loop */ ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<?php get_template_part( 'template-parts/content', get_post_format() ); ?>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php get_template_part( 'template-parts/content', '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( __( '← Older posts', 'foundationpress' ) ); ?></div>
|
||||
<div class="post-next"><?php previous_posts_link( __( 'Newer posts →', 'foundationpress' ) ); ?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
</main>
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php get_footer();
|
|
@ -0,0 +1,270 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: foundationpress-libsass-template 5.4.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-09-13 17:56+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
#: 404.php:8
|
||||
msgid "File Not Found"
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:12
|
||||
msgid ""
|
||||
"The page you are looking for might have been removed, had its name changed, "
|
||||
"or is temporarily unavailable."
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:14
|
||||
msgid "Please try the following:"
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:16
|
||||
msgid "Check your spelling"
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:17
|
||||
#, php-format
|
||||
msgid "Return to the <a href=\"%s\">home page</a>"
|
||||
msgstr ""
|
||||
|
||||
#: 404.php:18
|
||||
msgid "Click the <a href=\"javascript:history.back()\">Back</a> button"
|
||||
msgstr ""
|
||||
|
||||
#. /previous pages when applicable
|
||||
#: archive.php:21 index.php:24 search.php:25
|
||||
msgid "← Older posts"
|
||||
msgstr ""
|
||||
|
||||
#: archive.php:22 index.php:25 search.php:26
|
||||
msgid "Newer posts →"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:8
|
||||
#, php-format
|
||||
msgid "<cite class=\"fn\">%s</cite>"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:9
|
||||
#, php-format
|
||||
msgid "%1$s"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:10
|
||||
msgid "(Edit)"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:16
|
||||
msgid "Your comment is awaiting moderation."
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:31
|
||||
msgid "Please do not load this page directly. Thanks!"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:36
|
||||
msgid "This post is password protected. Enter the password to view comments."
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:46
|
||||
msgid "No Responses to"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:46
|
||||
msgid "One Response to"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:46
|
||||
msgid "% Responses to"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:53
|
||||
msgid "← Older comments"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:54
|
||||
msgid "Newer comments →"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:61
|
||||
msgid "Leave a Reply"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:61
|
||||
#, php-format
|
||||
msgid "Leave a Reply to %s"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:64
|
||||
#, php-format
|
||||
msgid "You must be <a href=\"%s\">logged in</a> to post a comment."
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:68
|
||||
#, php-format
|
||||
msgid "Logged in as <a href=\"%s/wp-admin/profile.php\">%s</a>."
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:68
|
||||
msgid "Log out of this account"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:68
|
||||
msgid "Log out »"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:71
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:71 comments.php:75
|
||||
msgid " (required)"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:75
|
||||
msgid "Email (will not be published)"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:79
|
||||
msgid "Website"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:84
|
||||
msgid "Comment"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:87
|
||||
msgid "You can use these tags:"
|
||||
msgstr ""
|
||||
|
||||
#: comments.php:88
|
||||
msgid "Submit Comment"
|
||||
msgstr ""
|
||||
|
||||
#: content-none.php:11
|
||||
msgid "Nothing Found"
|
||||
msgstr ""
|
||||
|
||||
#: content-none.php:17
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
|
||||
msgstr ""
|
||||
|
||||
#: content-none.php:21
|
||||
msgid ""
|
||||
"Sorry, but nothing matched your search terms. Please try again with some "
|
||||
"different keywords."
|
||||
msgstr ""
|
||||
|
||||
#: content-none.php:26
|
||||
msgid ""
|
||||
"It seems we can’t find what you’re looking for. Perhaps "
|
||||
"searching can help."
|
||||
msgstr ""
|
||||
|
||||
#. /archive/search.
|
||||
#. *
|
||||
#. * @subpackage FoundationPress
|
||||
#. * @since FoundationPress 1.0.0
|
||||
#.
|
||||
#: content.php:16
|
||||
msgid "Continue reading..."
|
||||
msgstr ""
|
||||
|
||||
#: hero.php:40 kitchen-sink.php:739 page-full.php:19 page-sidebar-left.php:21
|
||||
#: page.php:18 single.php:27 woocommerce.php:18
|
||||
msgid "Pages:"
|
||||
msgstr ""
|
||||
|
||||
#: library/entry-meta.php:4
|
||||
#, php-format
|
||||
msgid "Posted on %1$s at %2$s."
|
||||
msgstr ""
|
||||
|
||||
#: library/entry-meta.php:5
|
||||
msgid "Written by"
|
||||
msgstr ""
|
||||
|
||||
#: library/foundation.php:16
|
||||
msgid "«"
|
||||
msgstr ""
|
||||
|
||||
#: library/foundation.php:17
|
||||
msgid "»"
|
||||
msgstr ""
|
||||
|
||||
#: library/foundation.php:40
|
||||
#, php-format
|
||||
msgid ""
|
||||
"Please assign a menu to the primary menu location under %1$s or %2$s the "
|
||||
"design."
|
||||
msgstr ""
|
||||
|
||||
#: library/foundation.php:41
|
||||
#, php-format
|
||||
msgid "<a href=\"%s\">Menus</a>"
|
||||
msgstr ""
|
||||
|
||||
#: |