setup new freifunktheme (derived from FoundatioPress). Basic typography/styles
This commit is contained in:
parent
6f104d6e75
commit
d0bfff9ff2
190 changed files with 240 additions and 9 deletions
4
hamburg-freifunk-wp-theme/.babelrc
Normal file
4
hamburg-freifunk-wp-theme/.babelrc
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"presets": ["es2015"],
|
||||
"compact": false
|
||||
}
|
||||
18
hamburg-freifunk-wp-theme/.editorconfig
Normal file
18
hamburg-freifunk-wp-theme/.editorconfig
Normal file
|
|
@ -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
|
||||
11
hamburg-freifunk-wp-theme/.gitignore
vendored
Normal file
11
hamburg-freifunk-wp-theme/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
npm-debug.log
|
||||
dist
|
||||
config.yml
|
||||
*.sass-cache*
|
||||
*.log
|
||||
.idea/
|
||||
*.swp
|
||||
packaged/
|
||||
wpcs/
|
||||
46
hamburg-freifunk-wp-theme/404.php
Normal file
46
hamburg-freifunk-wp-theme/404.php
Normal file
|
|
@ -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();
|
||||
1347
hamburg-freifunk-wp-theme/CHANGELOG.md
Normal file
1347
hamburg-freifunk-wp-theme/CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load diff
18
hamburg-freifunk-wp-theme/MIT-LICENSE.txt
Normal file
18
hamburg-freifunk-wp-theme/MIT-LICENSE.txt
Normal file
|
|
@ -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.
|
||||
203
hamburg-freifunk-wp-theme/README-FoundationPress.md
Normal file
203
hamburg-freifunk-wp-theme/README-FoundationPress.md
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
# FoundationPress
|
||||
|
||||
[](https://gitter.im/olefredrik/foundationpress?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://github.com/olefredrik/FoundationPress/releases)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://ko-fi.com/olefredrik)
|
||||
|
||||
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) v4.x.x to v6.11.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 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/)
|
||||
|
||||
## Resources
|
||||
|
||||
* [Foundation UI Kit for Adobe XD](https://gumroad.com/l/foundation-ui-kit-xd)
|
||||
* [Foundation UI Kit for Axure RP](https://gumroad.com/l/foundation-ui-kit-axure-rp)
|
||||
* [Foundation UI Kit for Photoshop](https://gumroad.com/l/foundation-ui-kit-psd)
|
||||
* [Foundation 6 Shortcodes for Visual Composer](https://www.402websites.com/downloads/foundation-6-shortcodes-visual-composer/?ref=2&campaign=Foundation6ShortcodesforVisualComposer)
|
||||
|
||||
|
||||
## 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/)
|
||||
* [Morgridge Institute for Research](https://morgridge.org)
|
||||
* [Impeach Trump Now](https://impeachdonaldtrumpnow.org/)
|
||||
* [La revanche des sites](https://www.la-revanche-des-sites.fr/)
|
||||
|
||||
|
||||
>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
|
||||
9
hamburg-freifunk-wp-theme/README.md
Normal file
9
hamburg-freifunk-wp-theme/README.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
hamburg-freifunk-wp-theme (2018)
|
||||
|
||||
FoundationPress relies to not-up-to-date dependencies, works with node.js ~6, use n to install older nodes
|
||||
|
||||
$ n 6
|
||||
|
||||
during design/development, render SCSS
|
||||
|
||||
$ npm start
|
||||
53
hamburg-freifunk-wp-theme/archive.php
Normal file
53
hamburg-freifunk-wp-theme/archive.php
Normal file
|
|
@ -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();
|
||||
47
hamburg-freifunk-wp-theme/codesniffer.ruleset.xml
Normal file
47
hamburg-freifunk-wp-theme/codesniffer.ruleset.xml
Normal file
|
|
@ -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>
|
||||
160
hamburg-freifunk-wp-theme/comments.php
Normal file
160
hamburg-freifunk-wp-theme/comments.php
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
<?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() ) :
|
||||
if ( ( is_page() || is_single() ) && ( ! is_home() && ! is_front_page() ) ) :
|
||||
?>
|
||||
<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' ),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
</section>
|
||||
<?php
|
||||
endif;
|
||||
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() ) :
|
||||
if ( ( is_page() || is_single() ) && ( ! is_home() && ! is_front_page() ) ) :
|
||||
?>
|
||||
<section id="respond">
|
||||
<h3>
|
||||
<?php
|
||||
comment_form_title(
|
||||
__( 'Leave a Reply', 'foundationpress' ),
|
||||
/* translators: %s: author of comment being replied to */
|
||||
__( 'Leave a Reply to %s', 'foundationpress' )
|
||||
);
|
||||
?>
|
||||
</h3>
|
||||
<p class="cancel-comment-reply"><?php cancel_comment_reply_link(); ?></p>
|
||||
<?php if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) : ?>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: %s: login url */
|
||||
printf(
|
||||
__( 'You must be <a href="%s">logged in</a> to post a comment.', 'foundationpress' ),
|
||||
wp_login_url( get_permalink() )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<form action="<?php echo get_option( 'siteurl' ); ?>/wp-comments-post.php" method="post" id="commentform">
|
||||
<?php if ( is_user_logged_in() ) : ?>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: %1$s: site url, %2$s: user identity */
|
||||
printf(
|
||||
__( 'Logged in as <a href="%1$s/wp-admin/profile.php">%2$s</a>.', 'foundationpress' ),
|
||||
get_option( 'siteurl' ),
|
||||
$user_identity
|
||||
);
|
||||
?> <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="<?php __( 'Log out of this account', 'foundationpress' ); ?>"><?php _e( 'Log out »', 'foundationpress' ); ?></a>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<p>
|
||||
<label for="author">
|
||||
<?php
|
||||
_e( 'Name', 'foundationpress' );
|
||||
if ( $req ) {
|
||||
_e( ' (required)', 'foundationpress' );
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<input type="text" class="five" name="author" id="author" value="<?php echo esc_attr( $comment_author ); ?>" size="22" tabindex="1" <?php if ( $req ) { echo "aria-required='true'"; } ?>>
|
||||
</p>
|
||||
<p>
|
||||
<label for="email">
|
||||
<?php
|
||||
_e( 'Email (will not be published)', 'foundationpress' );
|
||||
if ( $req ) {
|
||||
_e( ' (required)', 'foundationpress' );
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
<input type="text" class="five" name="email" id="email" value="<?php echo esc_attr( $comment_author_email ); ?>" size="22" tabindex="2" <?php if ( $req ) { echo "aria-required='true'"; } ?>>
|
||||
</p>
|
||||
<p>
|
||||
<label for="url">
|
||||
<?php
|
||||
_e( 'Website', 'foundationpress' );
|
||||
?>
|
||||
</label>
|
||||
<input type="text" class="five" name="url" id="url" value="<?php echo esc_attr( $comment_author_url ); ?>" size="22" tabindex="3">
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<p>
|
||||
<label for="comment">
|
||||
<?php
|
||||
_e( 'Comment', 'foundationpress' );
|
||||
?>
|
||||
</label>
|
||||
<textarea name="comment" id="comment" tabindex="4"></textarea>
|
||||
</p>
|
||||
<p id="allowed_tags" class="small"><strong>XHTML:</strong>
|
||||
<?php
|
||||
_e( 'You can use these tags:', 'foundationpress' );
|
||||
?>
|
||||
<code>
|
||||
<?php echo allowed_tags(); ?>
|
||||
</code>
|
||||
</p>
|
||||
<p><input name="submit" class="button" type="submit" id="submit" tabindex="5" value="<?php esc_attr_e( 'Submit Comment', 'foundationpress' ); ?>"></p>
|
||||
<?php comment_id_fields(); ?>
|
||||
<?php do_action( 'comment_form', $post->ID ); ?>
|
||||
</form>
|
||||
<?php endif; // If registration required and not logged in. ?>
|
||||
</section>
|
||||
<?php
|
||||
endif; // If you delete this the sky will fall on your head.
|
||||
endif; // If you delete this the sky will fall on your head.
|
||||
16
hamburg-freifunk-wp-theme/composer.json
Normal file
16
hamburg-freifunk-wp-theme/composer.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
113
hamburg-freifunk-wp-theme/composer.lock
generated
Normal file
113
hamburg-freifunk-wp-theme/composer.lock
generated
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
{
|
||||
"_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#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "fc1263f1ad59f2bc5b395c9c2d601d16",
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/installers",
|
||||
"version": "dev-master",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/installers.git",
|
||||
"reference": "e420b539e8d7b38b7c6f3f99dccc0386bd3dfe41"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/installers/zipball/e420b539e8d7b38b7c6f3f99dccc0386bd3dfe41",
|
||||
"reference": "e420b539e8d7b38b7c6f3f99dccc0386bd3dfe41",
|
||||
"shasum": ""
|
||||
},
|
||||
"replace": {
|
||||
"roundcube/plugin-installer": "*",
|
||||
"shama/baton": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "1.0.*@dev",
|
||||
"phpunit/phpunit": "4.1.*"
|
||||
},
|
||||
"type": "composer-installer",
|
||||
"extra": {
|
||||
"class": "Composer\\Installers\\Installer",
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Composer\\Installers\\": "src/"
|
||||
}
|
||||
},
|
||||
"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": "http://composer.github.com/installers/",
|
||||
"keywords": [
|
||||
"Craft",
|
||||
"Dolibarr",
|
||||
"Hurad",
|
||||
"MODX Evo",
|
||||
"OXID",
|
||||
"SMF",
|
||||
"Thelia",
|
||||
"WolfCMS",
|
||||
"agl",
|
||||
"aimeos",
|
||||
"annotatecms",
|
||||
"bitrix",
|
||||
"cakephp",
|
||||
"chef",
|
||||
"codeigniter",
|
||||
"concrete5",
|
||||
"croogo",
|
||||
"dokuwiki",
|
||||
"drupal",
|
||||
"elgg",
|
||||
"fuelphp",
|
||||
"grav",
|
||||
"installer",
|
||||
"joomla",
|
||||
"kohana",
|
||||
"laravel",
|
||||
"lithium",
|
||||
"magento",
|
||||
"mako",
|
||||
"mediawiki",
|
||||
"modulework",
|
||||
"moodle",
|
||||
"phpbb",
|
||||
"piwik",
|
||||
"ppi",
|
||||
"puppet",
|
||||
"roundcube",
|
||||
"shopware",
|
||||
"silverstripe",
|
||||
"symfony",
|
||||
"typo3",
|
||||
"wordpress",
|
||||
"zend",
|
||||
"zikula"
|
||||
],
|
||||
"time": "2015-06-13 15:30:38"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
}
|
||||
49
hamburg-freifunk-wp-theme/config-default.yml
Normal file
49
hamburg-freifunk-wp-theme/config-default.yml
Normal file
|
|
@ -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/**"
|
||||
26
hamburg-freifunk-wp-theme/footer.php
Normal file
26
hamburg-freifunk-wp-theme/footer.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?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">
|
||||
<div class="footer-container">
|
||||
<div class="footer-grid">
|
||||
<?php dynamic_sidebar( 'footer-widgets' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<?php if ( get_theme_mod( 'wpt_mobile_menu_layout' ) === 'offcanvas' ) : ?>
|
||||
</div><!-- Close off-canvas content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
||||
55
hamburg-freifunk-wp-theme/functions.php
Normal file
55
hamburg-freifunk-wp-theme/functions.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?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' );
|
||||
|
||||
/** 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' );
|
||||
259
hamburg-freifunk-wp-theme/gulpfile.babel.js
Normal file
259
hamburg-freifunk-wp-theme/gulpfile.babel.js
Normal file
|
|
@ -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')
|
||||
.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));
|
||||
52
hamburg-freifunk-wp-theme/header.php
Normal file
52
hamburg-freifunk-wp-theme/header.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?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" />
|
||||
<link rel='stylesheet' id='fonts-css' href='/wp-content/themes/FoundationPress/dist/assets/fonts/HKGrotesk/stylesheet.css' type='text/css' media='all' />
|
||||
<?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">
|
||||
<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>
|
||||
50
hamburg-freifunk-wp-theme/index.php
Normal file
50
hamburg-freifunk-wp-theme/index.php
Normal file
|
|
@ -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();
|
||||
270
hamburg-freifunk-wp-theme/languages/FoundationPress.pot
Normal file
270
hamburg-freifunk-wp-theme/languages/FoundationPress.pot
Normal file
|
|
@ -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 ""
|
||||
|
||||
#: library/foundation.php:44
|
||||
#, php-format
|
||||
msgid "<a href=\"%s\">Customize</a>"
|
||||
msgstr ""
|
||||
|
||||
#: library/widget-areas.php:6
|
||||
msgid "Sidebar widgets"
|
||||
msgstr ""
|
||||
|
||||
#: library/widget-areas.php:7
|
||||
msgid "Drag widgets to this sidebar container."
|
||||
msgstr ""
|
||||
|
||||
#: library/widget-areas.php:16
|
||||
msgid "Footer widgets"
|
||||
msgstr ""
|
||||
|
||||
#: library/widget-areas.php:17
|
||||
msgid "Drag widgets to this footer container"
|
||||
msgstr ""
|
||||
|
||||
#: node_modules/grunt-pot/test/fixtures/some-file.php:3
|
||||
msgid "I'm a translatable string."
|
||||
msgstr ""
|
||||
|
||||
#: node_modules/grunt-pot/test/fixtures/some-other-file.php:4
|
||||
msgid "Me too"
|
||||
msgstr ""
|
||||
|
||||
#: node_modules/grunt-pot/test/fixtures/some-other-file.php:7
|
||||
#, php-format
|
||||
msgid "I have %d apple"
|
||||
msgid_plural "I have %d apples"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#. / TRANSLATORS: This should be translated as a shorthand for YEAR-MONTH-DAY using 4, 2 and 2 digits.
|
||||
#: node_modules/grunt-pot/test/fixtures/some-other-file.php:16
|
||||
msgid "yyyy-mm-dd"
|
||||
msgstr ""
|
||||
|
||||
#: search.php:7
|
||||
msgid "Search Results for"
|
||||
msgstr ""
|
||||
|
||||
#: searchform.php:6 searchform.php:10
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue