Skip to content

Commit dc95887

Browse files
committed
Merge branch 'release/4.0.0'
2 parents 59694da + a9ebdcf commit dc95887

24 files changed

+10515
-256
lines changed

.eslintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "standard"
3+
}

.jshintrc

-82
This file was deleted.

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
documentation/

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [4.0.0] - In-Progress
6+
# Updates
7+
- Clean up of global scss from #104
8+
- Remove vistited link style from #105
9+
- Remove extra css from social menu - close #106
10+
- Update nav menu registration - close #112
11+
12+
# Additions
13+
- Add browser detection via Bowser - closes #107
14+
- Add ESlint - close #110
15+
- Add Merge Media Queries - closes #108
16+
- Add prelude-init npm script to autopopulate `style.css` and parts of `gulpfile.js` - closes #99
17+
18+
# Removes
19+
- Remove JSHint - close #110
20+
- Removes `featuredBG` php function from `inc/thumbnails.php`
21+
522
## [3.5.1] - 2017-06-02
623
# Fixes
724
- Missing git commit in gulp version tasks

README.md

+5-94
Original file line numberDiff line numberDiff line change
@@ -12,105 +12,16 @@ Prelude uses Gulp to:
1212

1313
### WordPress Functions
1414
Prelude has some nifty features built into `functions.php` to make developing a custom WordPress theme a little easier.
15-
- Defer jQuery Parsing using the HTML5 defer property
16-
- Customized Read More Links
17-
- [Get Featured image as URL](https://github.com/factor1/prelude-wp/wiki/Get-Featured-Image-As-URL)
18-
- Other various improvements to default WordPress functions that are too long and/or small to list here, check 'em out!
1915

2016
## Getting Started
2117
Prelude requires that you have Node and npm installed on your machine. If you need help with that, please visit the [npm documentation](https://docs.npmjs.com/getting-started/installing-node).
2218

23-
1. Install Prelude into your project using `npm install prelude-wp --save` and copy all theme files to your root directory. **NOTE: As of `3.3.9` Prelude no longer automatically moves theme files into your root directory.**
24-
2. Using the `theme` variable found in `gulpfile.js` name your theme. This is only used for packaging purposes and is not critical (Don't forget to also fill out the theme information found in `style.css` in the root)
25-
3. Run the default Gulp task while editing files using `gulp` or `gulp default`
19+
**Via npm:**
20+
`npm install prelude-wp --save`
2621

27-
28-
## File Structure
29-
You can modify the file structure however you like as long as it is also updated in `gulpfile.js`. Of course your project files may vary. By default it is as follows:
30-
31-
```
32-
.
33-
├── .editorconfig
34-
├── .gitignore
35-
├── .jshintrc
36-
├── 404.php
37-
├── CHANGELOG.md
38-
├── README.md
39-
├── archive.php
40-
├── /assets
41-
| ├── /js
42-
| | └── theme.js
43-
| └── /scss
44-
| ├── /components
45-
| | ├── _footer.scss
46-
| | ├── _header.scss
47-
| | └── _social-menu.scss
48-
| ├── /globals
49-
| | ├── _global.scss
50-
| | ├── _typography.scss
51-
| | └── _wordpress.scss
52-
| ├── /mixins
53-
| | └── _sugar.scss
54-
| ├── /plugins
55-
| | └── _overrides.scss
56-
| ├── /settings
57-
| | └── _variables.scss
58-
| └── theme.scss
59-
├── footer.php
60-
├── functions.php
61-
├── gulpfile.js
62-
├── header.php
63-
├── /inc
64-
| ├── custom-post-types.php
65-
| ├── enqueues.php
66-
| ├── menus.php
67-
| ├── shortcodes.php
68-
| ├── thumbnails.php
69-
| ├── tweaks.php
70-
| └── widgets.php
71-
├── index.php
72-
├── package.json
73-
├── page.php
74-
├── /parts
75-
| ├── meta.php
76-
| └── post-nav.php
77-
├── screenshot.png
78-
├── search.php
79-
├── sidebar.php
80-
├── single.php
81-
└── style.css
82-
```
83-
84-
## Setting your default compile paths in Gulp
85-
We have created variables to hold an array of your desired paths. This makes it so that you only need to update paths in one location. These variables are then passed into the Gulp tasks for processing.
86-
87-
The variables are:
88-
- `phpFiles` - accepts an array of .php files
89-
- `htmlFiles` - accepts an array of .html files
90-
- `cssFiles` - accepts an array of .css file
91-
- `sassFiles` - accepts an array of .scss/.sass files
92-
- `styleFiles` - uses both `cssFiles` & `sassFiles` paths for watching purposes (avoids loop issues)
93-
- `jsFiles` - accepts an array of .js files
94-
- `imageFiles` - accepts an array of image files (.jpg, .png, .gif, etc)
95-
- `concatFiles` - accepts an array of .js files. These are used to concatenate your .js files into one file, and as such the files must be listed in the order you desire
96-
- `copyFiles` - accepts an array of files
97-
- `url` - accepts a string to use as the BrowserSync proxy
98-
99-
## List Of Gulp Tasks
100-
Below are a list of the default gulp tasks.
101-
- `gulp serve` - creates a local development server with live reloading and CSS injection via [BrowserSync](https://www.browsersync.io/docs/)
102-
- `gulp sass` - compiles Sass/SCSS files into CSS, adds vendor prefixes, and creates a sourcemap
103-
- `gulp minify-css` - ensures all Sass/SCSS is compiled to CSS and minifies them
104-
- `gulp styles` - runs the `sass` and `minify-css` tasks, in that order
105-
- `gulp lint` - a JavaScript helper to find and catch errors, and creates a sourcemap
106-
- `gulp scripts` - concatenates and minifies JS files (in the order you declare)
107-
- `gulp images` - compresses images
108-
- `gulp watch` - watches files for changes and runs tasks based on what was updated
109-
- `gulp version` - updates WordPress theme version by passing one of three flags, `--major, --minor, --patch`. Alternatively you can also check version by passing no flags to the task.
110-
- `gulp package` - creates a production ready `.zip` file based on your production theme folder
111-
- `gulp build` - runs all tasks except `serve` and `watch`
112-
113-
Running `gulp` or `gulp default` will run all tasks except `package`.
22+
## Documentation
23+
Our new documentation site is coming soon, until then please view the markdown
24+
files in `/documentation/`
11425

11526
## Bugs, Contributions & Questions
11627
We are always looking for ways to improve. If you find a bug, have a question, or wish to add a contribution please open an issue.

assets/js/theme.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,12 @@ jQuery( document ).ready(function( $ ) {
88
if( isTouchDevice ) {
99
$('body').removeClass('no-touch');
1010
}
11-
11+
12+
// Browser detection via Bowser (https://github.com/lancedikson/bowser) - add detection as needed
13+
if( bowser.msie && bower.version === 11 ) {
14+
$('body').addClass('ie-11');
15+
} else if ( bowser.safari ) {
16+
$('body').addClass('safari');
17+
}
18+
1219
});

assets/scss/components/_social-menu.scss

+3-13
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@
44
----------------------------------------------------------------------------*/
55
.menu-social {
66
ul {
7+
margin: 0;
8+
padding: 0;
79
text-align: inherit;
810
list-style: none;
9-
padding: 0;
1011
li{
11-
position: relative;
1212
display: inline-block;
13+
position: relative;
1314
padding: 0 .625rem;
1415
a{
1516
display: inline-block;
16-
width: 22px;
17-
height: 22px;
18-
border-radius: 10px;
1917
text-align: center;
2018
&:before{
2119
padding-bottom: .25rem;
@@ -24,7 +22,6 @@
2422
font-family: 'FontAwesome';
2523
font-size: .7rem;
2624
color: red;
27-
-webkit-font-smoothing: antialiased;
2825
}
2926
&:hover {
3027
font-style: normal;
@@ -94,10 +91,3 @@
9491
.screen-reader-text {
9592
display: none;
9693
}
97-
98-
@media only screen and (max-width: 640px) {
99-
.menu-social {
100-
float: none;
101-
text-align: center;
102-
}
103-
}

assets/scss/globals/_global.scss

+10-13
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,22 @@
1010

1111
html,
1212
body {
13-
border : 0;
14-
margin : 0;
15-
padding : 0;
16-
width : 100%;
17-
min-height : 100%;
13+
margin: 0;
14+
padding: 0;
15+
width: 100%;
16+
min-height: 100%;
17+
border: 0;
1818
}
1919

2020
html,
2121
html a {
22-
-webkit-font-smoothing : antialiased !important;
23-
text-shadow : 1px 1px 1px rgba(0, 0, 0, 0.004);
22+
-webkit-font-smoothing: antialiased !important;
23+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
2424
}
2525

2626
body {
27-
font : 100%/1.25 arial, helvetica, sans-serif;
28-
min-height : 100%;
29-
overflow-y : scroll;
30-
/* has to be scroll, not auto */
31-
-webkit-overflow-scrolling : touch;
27+
font: 100%/1.25 arial, helvetica, sans-serif;
28+
min-height: 100%;
3229
}
3330

3431
// Hide empty paragraphs
@@ -38,7 +35,7 @@ p:empty{
3835

3936
// Tables
4037
table {
41-
margin : 0 0 18px;
38+
margin: 0 0 18px;
4239
}
4340

4441
/* keep images from spilling out of columns */

assets/scss/globals/_typography.scss

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
------------------------------------------------------------------------------*/
44

55
// Links
6-
a,
7-
a:visited {
8-
text-decoration : none;
6+
a {
7+
text-decoration: none;
98
}

documentation/getting-started.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Getting Started
2+
Prelude requires that you have Node.js/npm and Gulp installed on your machine.
3+
Visit their respective documentation pages for information on these dependencies.
4+
5+
## Installation
6+
7+
**1.** Create a new `package.json` for your project by running `npm init`
8+
9+
**2.** Install prelude-wp, `npm install prelude-wp --save`
10+
11+
Prelude will then show a prompt if you want to move theme files into your project
12+
directory. Selecting "Y" will attempt to move theme files.
13+
14+
> **Note:** This feature may not be supported on all Operating Systems, if it fails
15+
you may need to manually move files into your theme directory.
16+
17+
**3.** Update theme name in `gulpfile.js` and `style.css` to reflect your project's
18+
information as well as updating the `url` variable in `gulpfile.js` to reflect
19+
your development URL.
20+
21+
After these three steps, you are ready to start developing your theme.

documentation/gulp-tasks.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Gulp Tasks
2+
Prelude gives you most of the gulp tasks you'll need to successfully develop and
3+
deploy a WordPress theme.
4+
5+
## List of Gulp Tasks
6+
Below are a list of the default gulp tasks.
7+
- `gulp serve` - creates a local development server with live reloading and CSS injection via [Browsersync](https://www.browsersync.io/docs/)
8+
- `gulp sass` - compiles Sass/SCSS files into CSS, adds vendor prefixes, and creates a sourcemap
9+
- `gulp minify-css` - ensures all Sass/SCSS is compiled to CSS (runs `gulp sass` before running itself) and minifies them
10+
- `gulp styles` - runs the `sass` and `minify-css` tasks, in that order
11+
- `gulp lint` - a JavaScript helper to find and catch errors with [ESLint](https://eslint.org/)
12+
- `gulp scripts` - concatenates and minifies JS files (in the order you declare via the [`concatFiles` array](gulpfile-customization.md))
13+
- `gulp images` - compresses images in as defined in the [`imageFiles` array](gulpfile-customization.md)
14+
- `gulp watch` - watches files for changes and runs tasks based on what file changes
15+
- `gulp version` - updates WordPress theme version by passing one of three flags, `--major, --minor, --patch`. Alternatively you can also check version by passing no flags to the task.
16+
- `gulp package` - creates a production ready `.zip` file based on your production theme folder
17+
- `gulp build` - runs all tasks except `serve` and `watch`
18+
19+
Running `gulp` or `gulp default` will run all tasks except `package`.

0 commit comments

Comments
 (0)