This is a starter-theme for WordPress based on Foundation 6, the most advanced responsive (mobile-first) framework in the world. The purpose of Allonsy, is to act as a small and handy toolbox that contains the essentials needed to build any design. Allonsy 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!
This project requires Node.js 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.
Allonsy uses Sass (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, and Mac users can install it through the Xcode Command-line Tools.
If you have not worked with a Sass-based workflow before, I would recommend reading FoundationPress for beginners, a short blog post that explains what you need to know.
$ cd my-wordpress-folder/wp-content/themes/
$ git clone https://github.com/uptownstudios/allonsy2.git
$ cd allonsy2
$ npm install (on Plesk its /opt/plesk/node/6/bin/npm install)
Allonsy 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.
If you want to take advantage of Browsersync (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.
$ npm start (on Plesk its /opt/plesk/node/6/bin/npm start)
When building for production, the CSS and JS will be minified. To minify the assets in your /dist
folder, run
$ npm run build (on Plesk its /opt/plesk/node/6/bin/npm run build)
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.
-
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
.
All JavaScript files in the src/assets/js
folder, along ith Foundation and its dependencies, are bundled into one file called app.js
. The files are imported using module dependency with webpack as the module bundler.
If you're unfamiliar with modules and module bundling, check out this resource for node style require/exports and this resource to understand ES6 modules.
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.
We recommend using one of the following setups for local WordPress development:
- MAMP (macOS)
- WAMP (Windows)
- LAMP (Linux)
- Local (macOS/Windows)
- VVV (Varying Vagrant Vagrants) (Vagrant Box)
- Trellis
- Foundation UI Kit for Adobe XD
- Foundation UI Kit for Axure RP
- Foundation UI Kit for Photoshop
- Foundation 6 Shortcodes for Visual Composer
- FoundationPress for beginners
- Responsive images in WordPress with Interchange
- Learn to use the _settings file to change almost every aspect of a Foundation site
- Other lessons from Zurb University
- Betty Yee for State Controller
- Chalk It Up!
- CommuniCare
- Corner Drug Co.
- The Almonte Center
- Highlands Community Charter Schools
- Mickies Miracles
- OnTarget Consulting
- Peach Tree Health
- RIL Sacramento
- Santa Clara County Dental Society
- Sutter Park Neighborhood
- Turning Point Community Programs
- Tri-City Health
- ZEE Medical
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
- Star the project!
- Answer questions that come through GitHub issues
- Report a bug that you find
- Share a theme you've built on top of Allonsy
Pull requests are highly appreciated. Please follow these guidelines:
- Solve a problem. Features are great, but even better is cleaning-up and fixing issues in the code that you discover
- Make sure that your code is bug-free and does not introduce new bugs
- Create a pull request
- Verify that all the Travis-CI build checks have passed