You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
-
# Genesis js / no-js
1
+
# Genesis JS / No JS
2
2
3
-
Make front-end styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.
3
+
Make frontend styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.
4
4
5
5
## Description
6
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).
7
+
If you look at the source of a WordPress backend 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
8
9
9
WordPress uses this to apply different styles to the same elements, depending on whether JavaScript is present or not.
10
10
11
-
This plugin recreates the same effect, but for the front-end of <ahref="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.
11
+
This plugin recreates the same effect, but for the frontend of <ahref="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
12
13
13
The script is fairly small so does not block rendering of other content for any noticeable length of time.
14
14
@@ -42,11 +42,17 @@ Using git, browse to your `/wp-content/plugins/` directory and clone this reposi
42
42
43
43
Then go to your Plugins screen and click __Activate__.
44
44
45
+
### Composer
46
+
47
+
~~~sh
48
+
composer require gamajo/genesis-js-no-js
49
+
~~~
50
+
45
51
## Updates
46
52
47
53
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.
Make front-end styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.
9
+
Make frontend styling easier for child themes on the Genesis Framework based on whether JavaScript is enabled or not.
10
10
11
11
== Description ==
12
12
13
-
Make front-end styling easier for child themes on the <a href="http://genesis-theme-framework.com/">Genesis Framework</a> based on whether JavaScript is enabled or not.
13
+
Make frontend styling easier for child themes on the <a href="http://genesis-theme-framework.com/">Genesis Framework</a> based on whether JavaScript is enabled or not.
14
14
15
-
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.
16
-
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.
15
+
Adds a `no-js` body class to the frontend, and a script on `genesis_before` which immediately changes the class to `js` if JavaScript is enabled.
16
+
This is how WP does things on the backend, to allow different styles for the same elements depending if JavaScript is active or not.
17
17
18
18
This plugin is only useful if you're using a child theme of the Genesis Framework since it uses the `genesis_before` hook.
19
19
20
20
== Installation ==
21
21
22
-
1. Unzip and upload `genesis-js-no-js` folder to the `/wp-content/plugins/` directory
23
-
1. Activate the plugin through the 'Plugins' menu in WordPress
22
+
Once this plugin is installed and activated, then it will work automatically. There are no options, and nothing to set-up.
24
23
25
-
Once installed and activated, then the plugin will work. There are no options, and nothing to set-up.
24
+
= Upload =
25
+
26
+
1. Download the latest tagged archive (choose the "zip" option).
27
+
2. Go to the __Plugins -> Add New__ screen and click the __Upload__ tab.
28
+
3. Upload the zipped archive directly.
29
+
4. Go to the Plugins screen and click __Activate__.
30
+
31
+
= Manual =
32
+
33
+
1. Download the latest tagged archive (choose the "zip" option).
34
+
2. Unzip the archive.
35
+
3. Copy the folder to your `/wp-content/plugins/` directory.
36
+
4. Go to the Plugins screen and click __Activate__.
37
+
38
+
Check out the Codex for more information about [installing plugins manually](http://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
39
+
40
+
= Git =
41
+
42
+
Using git, browse to your `/wp-content/plugins/` directory and clone this repository:
Then go to your Plugins screen and click __Activate__.
47
+
48
+
= Composer =
49
+
50
+
`composer require gamajo/genesis-js-no-js`
26
51
27
52
== Frequently Asked Questions ==
28
53
29
54
= What does this plugin actually do? =
30
55
31
-
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).
56
+
If you look at the source of a WordPress backend 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 browser developer tools).
32
57
33
58
WordPress uses this to apply different styles to the same elements, depending on whether JavaScript is present or not.
34
59
35
-
This plugin recreates the same effect, but for the front-end of <a href="http://genesis-theme-framework.com/">Genesis Framework</a> child themes.
60
+
This plugin recreates the same effect, but for the frontend of <a href="http://genesis-theme-framework.com/">Genesis Framework</a> child themes.
36
61
37
62
= Shouldn't the script be at the end of the page? =
38
63
@@ -42,33 +67,9 @@ Doing it immediately also reduces a flash of incorrectly styled content, as the
42
67
43
68
== Changelog ==
44
69
45
-
= 2.1.0 =
46
-
* Load plugin text domain.
47
-
* Add `composer.json`.
48
-
* Better change log format.
49
-
* Tweak documentation.
50
-
51
-
= 2.0.0 =
52
-
* GitHub Updater plugin support
53
-
* Refactor class into a new file. Stops using half-implemented Singleton pattern.
54
-
* Update documentation.
55
-
56
-
= 1.0.1 =
57
-
* 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))
58
-
59
-
= 1.0 =
60
-
* First public version.
70
+
See <a href="https://github.com/GaryJones/genesis-js-no-js/blob/master/CHANGELOG.md">CHANGELOG.md</a> for all of the changes.
61
71
62
72
== Upgrade Notice ==
63
73
64
-
= 2.1.0 =
65
-
Load plugin text domain.
66
-
67
-
= 2.0.0 =
68
-
Update to add GitHub Updater plugin support.
69
-
70
-
= 1.0.1 =
71
-
Minor change to avoid potential problems with themes hooking in elements before the script.
72
-
73
-
= 1.0 =
74
-
Update from nothingness. You will feel better for it.
0 commit comments