Skip to content

Commit c756058

Browse files
committed
Tidy up documentation
New README and CHANGELOG files.
1 parent 063d293 commit c756058

File tree

3 files changed

+64
-1
lines changed

3 files changed

+64
-1
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Genesis js / no-js Changelog
2+
3+
## 1.0.1 (2011-06-02)
4+
5+
* Improved plugin so script is hooked in with priority 1 - avoids a theme placing anything before the script (props [Josh Stauffer](http://twitter.com/joshstauffer))
6+
7+
## 1.0.0 (2011-05-24)
8+
9+
* Initial release.

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Genesis js / no-js
2+
3+
Make front-end styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.
4+
5+
## Description
6+
7+
If you look at the source of a WordPress back-end page, you'll see it has a body class of `no-js`. Immediately after the opening `body` tag is a small script which replaces `no-js` with `js` (you can see the amended class with Firebug / Inspector).
8+
9+
WordPress uses this to apply different styles to the same elements, depending on whether JavaScript is present or not.
10+
11+
This plugin recreates the same effect, but for the front-end of <a href="http://genesis-theme-framework.com/">Genesis Framework</a> child themes. It uses the `genesis_before` hook supplied by Genesis, so it won't work for other themes.
12+
13+
The script is fairly small so does not block rendering of other content for any noticeable length of time.
14+
15+
Putting the script at the top also reduces a flash of incorrectly styled content, as the page does not load with `no-js` styles, then switch to `js` once everything has finished loading.
16+
17+
## Installation
18+
19+
Once this plugin is installed and activated, then it will work automatically. There are no options, and nothing to set-up.
20+
21+
### Upload
22+
23+
1. Download the latest tagged archive (choose the "zip" option).
24+
2. Go to the __Plugins -> Add New__ screen and click the __Upload__ tab.
25+
3. Upload the zipped archive directly.
26+
4. Go to the Plugins screen and click __Activate__.
27+
28+
### Manual
29+
30+
1. Download the latest tagged archive (choose the "zip" option).
31+
2. Unzip the archive.
32+
3. Copy the folder to your `/wp-content/plugins/` directory.
33+
4. Go to the Plugins screen and click __Activate__.
34+
35+
Check out the Codex for more information about [installing plugins manually](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
36+
37+
### Git
38+
39+
Using git, browse to your `/wp-content/plugins/` directory and clone this repository:
40+
41+
`git clone git@github.com:GaryJones/genesis-js-no-js.git`
42+
43+
Then go to your Plugins screen and click __Activate__.
44+
45+
## Updates
46+
47+
This plugin supports the [GitHub Updater](https://github.com/afragen/github-updater) plugin, so if you install that, this plugin becomes automatically updateable direct from GitHub.
48+
49+
## Credits
50+
51+
Built by [Gary Jones](https://twitter.com/GaryJ)
52+
Copyright 2011 [Gamajo Tech](http://gamajo.com/)

readme.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ Make front-end styling easier for child themes on the <a href="http://genesis-th
1515
Adds a `no-js` body class to the front-end, and a script on `genesis_before` which immediately changes the class to `js` if JavaScript is enabled.
1616
This is how WP does things on the back-end, to allow different styles for the same elements depending if JavaScript is active or not.
1717

18-
This plugin is only useful if you're using a child theme of the <a href="http://genesis-theme-framework.com/">Genesis Framework</a> since it needs to use the `genesis_before` hook.
18+
This plugin is only useful if you're using a child theme of the Genesis Framework since it uses the `genesis_before` hook.
1919

2020
== Installation ==
2121

2222
1. Unzip and upload `genesis-js-no-js` folder to the `/wp-content/plugins/` directory
2323
1. Activate the plugin through the 'Plugins' menu in WordPress
2424

25+
Once installed and activated, then the plugin will work. There are no options, and nothing to set-up.
26+
2527
== Frequently Asked Questions ==
2628

2729
= What does this plugin actually do? =

0 commit comments

Comments
 (0)