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: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,14 @@ Below is a detailed change-log, along with specific tasks completed, for each ve
9
9
- 520.html
10
10
- 521.html
11
11
- 533.html
12
+
- Added `v1.0.0` of the `package.json` file which contains the dependencies for executing the `minify` script. You can run `$ npm install` from the project root folder and you _should_ have all the Node modules to run `$ ./scripts/minify`.
13
+
- Added `postcss.config.js` to load the `cssnano` plugin.
12
14
-[#enhancement](#enhancement)
13
15
- Optimised the `minify` script to now compress the JavaScript contained in the file along with any CSS inputs.
16
+
- Optimised the CSS minification by using `postcss.config.js` to load the `cssnano` plugin which now reduces all CSS to one line of code.
17
+
- New, minified versions for the CSS and HTML files have been created. The HTML templates are now one line of code as is the same with the CSS templates. File size has been reduced as follows:
18
+
- CSS files: from `61 KB` to `44 KB` (`27.87%` file size reduction).
19
+
- HTML files: from `46.3 KB` to `24.1 KB` (`47.95%` file size reduction).
14
20
- Updated `README.md` to include all available HTTP error codes when modifying `httpd.conf`.
15
21
-[#bugfix](#bugfix)
16
22
- Removed the commit of `html-minifier` to the project. This would prevent users from cloning the repo in order to run the minification script.
* [Using Node to install the packages](#using-node-to-install-the-packages)
23
24
* [Installing postcss](#installing-postcss)
25
+
* [Installing uglify-js](#installing-uglify-js)
24
26
* [Running the minify script](#running-the-minify-script)
25
27
*[Contributing](#contributing)
26
28
*[Code of Conduct](#code-of-conduct)
@@ -35,11 +37,13 @@ These Apache Error Pages project is a drop-in replacement of beautifully designe
35
37
36
38
## Features
37
39
38
-
* Fully responsive templates, works across desktop, tablet and mobile phones.
39
-
* Animated text, creating the illusion of an error output on a Terminal console.
40
-
* There are 27 templates, 20 exclusively for Apache with an additional 7 for other web-servers. Enjoy!
41
-
* Each template, as well as all CSS files, have been minified to ensure the smallest file usage possible.
42
-
* Font Awesome icons used in error messages.
40
+
***Completely off-line functionality**. There is no dependence on an Internet connection for these pages to work. Everything is self-contained in the distribution (`/dist/`) folder.
41
+
* A compressed distribution **file size which totals only `78 KB`** (from `111 KB`) and includes Images, CSS, HTML and JavaScript. Total package size is `2.1 MB` with all the _Font Awesome_ and _Web Fonts_ included.
42
+
* Fully responsive templates, **works across desktop, tablet and mobile** phones.
43
+
* Animated text, **creating the experience of a terminal console**, outputting the respective error code to screen.
44
+
* There are **27 templates**, 20 exclusively for Apache with an additional 7 for other web-servers. Enjoy!
45
+
* Each template, as well as all CSS files, have been minified to ensure the **smallest file size possible**.
46
+
***Font Awesome icons** used in error messages.
43
47
44
48
[Installation instructions](#installation) are found below the previews. This shouldn't take you more than **5 minutes** to implement these hand-crafted, custom-designed Apache error pages.
45
49
@@ -280,7 +284,7 @@ There is a `bash` script, found at [/src/scripts/minify][script] which runs the
280
284
281
285
### Dependencies
282
286
283
-
You will need to install both `html-minifier` as well as `postcss` before you can execute the minifaction script.
287
+
You will need to install, `html-minifier`, `postcss` (and plugins) and `uglify-js` before you can execute the minifaction script. You can do this by following the commands below or by using the `package.json` file located at the root folder of the project repo. Either way, you will need to install `html-minifier` before using `Node` to get the required modules.
284
288
285
289
#### Installing html-minifier
286
290
@@ -293,13 +297,30 @@ $ cd html-minifier
293
297
$ npm link .
294
298
```
295
299
300
+
#### Using Node to install the packages
301
+
302
+
As of version `v1.1.0` there is now a `package.json` file contained at the root of this project folder. This file contains all the dependencies required to execute the `./scripts/minify` script. You can run the following commands and it will install `postcss`, along with various plugins, as well as `uglify-js` which is used by `html-minifier`.
303
+
304
+
```bash
305
+
$ npm install
306
+
```
307
+
308
+
You will now have a new `/node_modules/` folder and you should be good to go to execute `./scripts/minify`. You can ignore `Installing postcss` and `Installing uglify-js`, in the steps below, as you will have these installed already.
309
+
296
310
#### Installing postcss
297
311
298
-
Once `html-minifier` is installed you can install `postcss` as follows. Make sure that you are in the `/html-minifier/` folder when running the below commands (i.e. `$ cd html-minifier/`).
312
+
Once `html-minifier` is installed you can install `postcss` as follows.
While the `minify` script doesn't directly use `uglify-js` by way of any direct commands; it is required for the JavaScript compression when executing `html-minifier`. You can install `uglify-js` with the following.
299
321
300
322
```bash
301
-
$ npm install cssnano --save
302
-
$ npm install postcss-cli --global
323
+
$ npm install uglify-js --save-dev
303
324
```
304
325
305
326
### Running the minify script
@@ -311,7 +332,7 @@ $ cd src/
311
332
$ ./scripts/minify
312
333
313
334
# expected output when executing `minify`:
314
-
../dist folder reset
335
+
The ../dist folder has been reset.
315
336
400.html minified
316
337
401.html minified
317
338
403.html minified
@@ -332,11 +353,8 @@ $ ./scripts/minify
332
353
503.html minified
333
354
504.html minified
334
355
505.html minified
335
-
breakpoints.css minified
336
-
fontawesome-all.css minified
337
-
google-fonts.css minified
338
-
main.css minified
339
-
Minification complete!
356
+
All the CSS files have now been minified.
357
+
Minification Complete!
340
358
```
341
359
342
360
There are no options for running this script. Executing this command will:
@@ -401,8 +419,8 @@ Thanks go out to the following for the inspiration, images, icons and, in some c
401
419
402
420
*[Computer SVG][vector] by Kameleon - License [CC BY 3.0][ccby30].
403
421
* Icons by [Font Awesome][fontawesome] - License [CC BY 4.0][ccby40].
404
-
*[html-minifier][html-min] - for compressing the `/src/` html files into the `/dist/` folder. License: [MIT][mit].
405
-
*[PostCSS][postcss] - for compressing the `/src/` css files into the `/dist/` folder. License: [MIT][mit].
422
+
*[html-minifier][html-min] - for compressing the `/src/*.html` files into the `/dist/*.html` folder. License: [MIT][mit].
423
+
*[PostCSS][postcss] - for compressing the `/src/css/` css files into the `/dist/css/` folder. License: [MIT][mit].
406
424
*[@maicong/ErrorPages][maicong] - for the terminal/console output code. License: [MIT][mit].
407
425
*[@trimstray/http-error-pages][trimstray] - for giving me the inspiration to use icons as part of the design. License: [GPLv3][gpl].
408
426
*[@jongha/httperrorpages][jongha] - for the error pages status message descriptions. License: [MIT][mit].
<!DOCTYPE html><metacharset="utf-8"><title>400 - Bad Request</title><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1"><linkrel="stylesheet"href="/ErrorPages/css/fontawesome-all.css"><linkrel="stylesheet"href="/ErrorPages/css/main.css"><linkrel="stylesheet"href="/ErrorPages/css/breakpoints.css"><divid="container"><divid="echoerror"><iclass="fas fa-exclamation-triangle orange"></i></div></div><divid="errormsg">:~$ Error 400!<br>Bad Request<br><br>The server cannot or will not process the request due to an apparent client error.</div><script>varcharIndex=-1;
<!DOCTYPE html><metacharset="utf-8"><title>400 - Bad Request</title><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1"><linkrel="stylesheet"href="/ErrorPages/css/fontawesome-all.css"><linkrel="stylesheet"href="/ErrorPages/css/main.css"><linkrel="stylesheet"href="/ErrorPages/css/breakpoints.css"><divid="container"><divid="echoerror"><iclass="fas fa-exclamation-triangle orange"></i></div></div><divid="errormsg">:~$ Error 400!<br>Bad Request<br><br>The server cannot or will not process the request due to an apparent client error.</div><script>varinputText,charIndex=-1,stringLength=0;functionwriteContent(){inputText=document.getElementById("errormsg").innerHTML,-1===charIndex&&(charIndex=0,stringLength=inputText.length);vare=document.getElementById("echoerror").innerHTML;e=e.replace(/<span.*$/gi,"");varn=inputText.charAt(charIndex);"<br>"===inputText.substr(charIndex,4)&&(n="<br>",charIndex+=3),e=e+n+"<span id='blink'>▌</span>",document.getElementById("echoerror").innerHTML=e,time=35,(charIndex=charIndex/1+1)<=stringLength&&setTimeout("writeContent(false)",time)}writeContent()</script>
<!DOCTYPE html><metacharset="utf-8"><title>401 - Unauthorized</title><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1"><linkrel="stylesheet"href="/ErrorPages/css/fontawesome-all.css"><linkrel="stylesheet"href="/ErrorPages/css/main.css"><linkrel="stylesheet"href="/ErrorPages/css/breakpoints.css"><divid="container"><divid="echoerror"><iclass="fas fa-exclamation-triangle red"></i></div></div><divid="errormsg">:~$ Error 401!<br>Unauthorized<br><br>The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.</div><script>varcharIndex=-1;
<!DOCTYPE html><metacharset="utf-8"><title>401 - Unauthorized</title><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1"><linkrel="stylesheet"href="/ErrorPages/css/fontawesome-all.css"><linkrel="stylesheet"href="/ErrorPages/css/main.css"><linkrel="stylesheet"href="/ErrorPages/css/breakpoints.css"><divid="container"><divid="echoerror"><iclass="fas fa-exclamation-triangle red"></i></div></div><divid="errormsg">:~$ Error 401!<br>Unauthorized<br><br>The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.</div><script>varinputText,charIndex=-1,stringLength=0;functionwriteContent(){inputText=document.getElementById("errormsg").innerHTML,-1===charIndex&&(charIndex=0,stringLength=inputText.length);vare=document.getElementById("echoerror").innerHTML;e=e.replace(/<span.*$/gi,"");varn=inputText.charAt(charIndex);"<br>"===inputText.substr(charIndex,4)&&(n="<br>",charIndex+=3),e=e+n+"<span id='blink'>▌</span>",document.getElementById("echoerror").innerHTML=e,time=35,(charIndex=charIndex/1+1)<=stringLength&&setTimeout("writeContent(false)",time)}writeContent()</script>
<!DOCTYPE html><metacharset="utf-8"><title>403 - Forbidden</title><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1"><linkrel="stylesheet"href="/ErrorPages/css/fontawesome-all.css"><linkrel="stylesheet"href="/ErrorPages/css/main.css"><linkrel="stylesheet"href="/ErrorPages/css/breakpoints.css"><divid="container"><divid="echoerror"><iclass="fas fa-exclamation-triangle red"></i></div></div><divid="errormsg">:~$ Error 403!<br>Forbidden<br><br>The request was valid, but the server is refusing action.<br>The user might not have the necessary permissions for a resource, or may need an account of some sort.</div><script>varcharIndex=-1;
<!DOCTYPE html><metacharset="utf-8"><title>403 - Forbidden</title><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1"><linkrel="stylesheet"href="/ErrorPages/css/fontawesome-all.css"><linkrel="stylesheet"href="/ErrorPages/css/main.css"><linkrel="stylesheet"href="/ErrorPages/css/breakpoints.css"><divid="container"><divid="echoerror"><iclass="fas fa-exclamation-triangle red"></i></div></div><divid="errormsg">:~$ Error 403!<br>Forbidden<br><br>The request was valid, but the server is refusing action.<br>The user might not have the necessary permissions for a resource, or may need an account of some sort.</div><script>varinputText,charIndex=-1,stringLength=0;functionwriteContent(){inputText=document.getElementById("errormsg").innerHTML,-1===charIndex&&(charIndex=0,stringLength=inputText.length);vare=document.getElementById("echoerror").innerHTML;e=e.replace(/<span.*$/gi,"");varn=inputText.charAt(charIndex);"<br>"===inputText.substr(charIndex,4)&&(n="<br>",charIndex+=3),e=e+n+"<span id='blink'>▌</span>",document.getElementById("echoerror").innerHTML=e,time=35,(charIndex=charIndex/1+1)<=stringLength&&setTimeout("writeContent(false)",time)}writeContent()</script>
<!DOCTYPE html><metacharset="utf-8"><title>404 - Resource not found</title><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1"><linkrel="stylesheet"href="/ErrorPages/css/fontawesome-all.css"><linkrel="stylesheet"href="/ErrorPages/css/main.css"><linkrel="stylesheet"href="/ErrorPages/css/breakpoints.css"><divid="container"><divid="echoerror"><iclass="fas fa-times-circle red"></i></div></div><divid="errormsg">:~$ Error 404!<br>Resource not found<br><br>The requested resource could not be found but may be available again in the future.</div><script>varcharIndex=-1;
<!DOCTYPE html><metacharset="utf-8"><title>404 - Resource not found</title><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1"><linkrel="stylesheet"href="/ErrorPages/css/fontawesome-all.css"><linkrel="stylesheet"href="/ErrorPages/css/main.css"><linkrel="stylesheet"href="/ErrorPages/css/breakpoints.css"><divid="container"><divid="echoerror"><iclass="fas fa-times-circle red"></i></div></div><divid="errormsg">:~$ Error 404!<br>Resource not found<br><br>The requested resource could not be found but may be available again in the future.</div><script>varinputText,charIndex=-1,stringLength=0;functionwriteContent(){inputText=document.getElementById("errormsg").innerHTML,-1===charIndex&&(charIndex=0,stringLength=inputText.length);vare=document.getElementById("echoerror").innerHTML;e=e.replace(/<span.*$/gi,"");varn=inputText.charAt(charIndex);"<br>"===inputText.substr(charIndex,4)&&(n="<br>",charIndex+=3),e=e+n+"<span id='blink'>▌</span>",document.getElementById("echoerror").innerHTML=e,time=35,(charIndex=charIndex/1+1)<=stringLength&&setTimeout("writeContent(false)",time)}writeContent()</script>
0 commit comments