-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 17abf1c
Showing
27 changed files
with
5,235 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:react/jsx-runtime', | ||
'plugin:react-hooks/recommended', | ||
], | ||
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, | ||
settings: { react: { version: '18.2' } }, | ||
plugins: ['react-refresh'], | ||
rules: { | ||
'react-refresh/only-export-components': 'warn', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Error Code Pages | ||
|
||
This package is made for the people who don't feel like creating their own error page. It contains all HTML codes, 100, 200, 300, 400 and 500. | ||
|
||
It is super fast to use and easy for people who need a super simple yet beautiful html code page. | ||
|
||
## Get Started | ||
|
||
Install the package | ||
|
||
```bash | ||
npm install html-code-pages | ||
``` | ||
|
||
Create your first error page | ||
|
||
```js | ||
import { NotFound } from "html-code-pages"; | ||
import React from "react"; | ||
|
||
// EXAMPLE PAGE // | ||
|
||
function App() { | ||
return ( | ||
<> | ||
<NotFound /> | ||
</> | ||
); | ||
} | ||
export default App; | ||
``` | ||
|
||
With custom error description | ||
|
||
```js | ||
import { OK } from "html-code-pages/lib/200"; // Imports only 200 errors | ||
import React from "react"; | ||
|
||
// EXAMPLE PAGE // | ||
|
||
function App() { | ||
return ( | ||
<> | ||
<OK customText="This is a 404 error!" /> | ||
</> | ||
); | ||
} | ||
export default App; | ||
``` | ||
|
||
##### This example is based on a react project! | ||
|
||
## Screenshots | ||
|
||
![App Screenshot](https://cdn.discordapp.com/attachments/863316298129080331/1118954928623341681/image.png) | ||
|
||
## Authors | ||
|
||
- [@ItzOuluhh](https://github.com/ItzOuluhh) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React</title> | ||
|
||
<link rel="stylesheet" href="./src/styles/index.css" /> | ||
<!-- GOOGLE FONTS --> | ||
<style> | ||
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&family=Poppins:wght@100;200;300;400;500;600&family=Roboto:wght@100;300;400;500;700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap"); | ||
</style> | ||
</head> | ||
<body class="ma-2bd"> | ||
<div id="root_2"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
import { | ||
BadRequest, | ||
Unauthorized, | ||
PaymentRequired, | ||
Forbidden, | ||
NotFound, | ||
MethodNotAllowed, | ||
NotAcceptable, | ||
ProxyAuthenticationRequired, | ||
RequestTimeout, | ||
Conflict, | ||
Gone, | ||
LengthRequired, | ||
PreconditionFailed, | ||
PayloadTooLarge, | ||
URITooLong, | ||
UnsupportedMediaType, | ||
RangeNotSatisfiable, | ||
ExpectationFailed, | ||
ImATeapot, | ||
MisdirectedRequest, | ||
UnprocessableEntity, | ||
Locked, | ||
FailedDependency, | ||
TooEarly, | ||
UpgradeRequired, | ||
PreconditionRequired, | ||
TooManyRequests, | ||
RequestHeaderFieldsTooLarge, | ||
UnavailableForLegalReasons, | ||
} from "./src/handlers/clientErrors"; | ||
|
||
import { | ||
Continue, | ||
SwitchingProtocols, | ||
Processing, | ||
EarlyHints, | ||
} from "./src/handlers/informationalHandler"; | ||
|
||
import { | ||
MultipleChoices, | ||
MovedPermanently, | ||
Found, | ||
SeeOther, | ||
NotModified, | ||
UseProxy, | ||
SwitchProxy, | ||
TemporaryRedirect, | ||
PermanentRedirect, | ||
} from "./src/handlers/redirectionHandler"; | ||
|
||
import { | ||
OK, | ||
Created, | ||
Accepted, | ||
NonAuthoritativeInformation, | ||
NoContent, | ||
ResetContent, | ||
PartialContent, | ||
MultiStatus, | ||
AlreadyReported, | ||
IMUsed, | ||
} from "./src/handlers/succesHandler"; | ||
|
||
import { | ||
InternalServerError, | ||
NotImplemented, | ||
BadGateway, | ||
ServiceUnavailable, | ||
GatewayTimeout, | ||
HTTPVersionNotSupported, | ||
VariantAlsoNegotiates, | ||
InsufficientStorage, | ||
LoopDetected, | ||
NotExtended, | ||
NetworkAuthenticationRequired, | ||
} from "./src/handlers/serverErrors"; | ||
|
||
export { | ||
BadRequest, | ||
Unauthorized, | ||
PaymentRequired, | ||
Forbidden, | ||
NotFound, | ||
MethodNotAllowed, | ||
NotAcceptable, | ||
ProxyAuthenticationRequired, | ||
RequestTimeout, | ||
Conflict, | ||
Gone, | ||
LengthRequired, | ||
PreconditionFailed, | ||
PayloadTooLarge, | ||
URITooLong, | ||
UnsupportedMediaType, | ||
RangeNotSatisfiable, | ||
ExpectationFailed, | ||
ImATeapot, | ||
MisdirectedRequest, | ||
UnprocessableEntity, | ||
Locked, | ||
FailedDependency, | ||
TooEarly, | ||
UpgradeRequired, | ||
PreconditionRequired, | ||
TooManyRequests, | ||
RequestHeaderFieldsTooLarge, | ||
UnavailableForLegalReasons, | ||
}; | ||
|
||
export { Continue, SwitchingProtocols, Processing, EarlyHints }; | ||
|
||
export { | ||
MultipleChoices, | ||
MovedPermanently, | ||
Found, | ||
SeeOther, | ||
NotModified, | ||
UseProxy, | ||
SwitchProxy, | ||
TemporaryRedirect, | ||
PermanentRedirect, | ||
}; | ||
|
||
export { | ||
OK, | ||
Created, | ||
Accepted, | ||
NonAuthoritativeInformation, | ||
NoContent, | ||
ResetContent, | ||
PartialContent, | ||
MultiStatus, | ||
AlreadyReported, | ||
IMUsed, | ||
}; | ||
|
||
export { | ||
InternalServerError, | ||
NotImplemented, | ||
BadGateway, | ||
ServiceUnavailable, | ||
GatewayTimeout, | ||
HTTPVersionNotSupported, | ||
VariantAlsoNegotiates, | ||
InsufficientStorage, | ||
LoopDetected, | ||
NotExtended, | ||
NetworkAuthenticationRequired, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { | ||
Continue, | ||
SwitchingProtocols, | ||
Processing, | ||
EarlyHints, | ||
} from "../src/handlers/informationalHandler"; | ||
|
||
export { Continue, SwitchingProtocols, Processing, EarlyHints }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { | ||
OK, | ||
Created, | ||
Accepted, | ||
NonAuthoritativeInformation, | ||
NoContent, | ||
ResetContent, | ||
PartialContent, | ||
MultiStatus, | ||
AlreadyReported, | ||
IMUsed, | ||
} from "../src/handlers/succesHandler"; | ||
|
||
export { | ||
OK, | ||
Created, | ||
Accepted, | ||
NonAuthoritativeInformation, | ||
NoContent, | ||
ResetContent, | ||
PartialContent, | ||
MultiStatus, | ||
AlreadyReported, | ||
IMUsed, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { | ||
MultipleChoices, | ||
MovedPermanently, | ||
Found, | ||
SeeOther, | ||
NotModified, | ||
UseProxy, | ||
SwitchProxy, | ||
TemporaryRedirect, | ||
PermanentRedirect, | ||
} from "../src/handlers/redirectionHandler"; | ||
|
||
export { | ||
MultipleChoices, | ||
MovedPermanently, | ||
Found, | ||
SeeOther, | ||
NotModified, | ||
UseProxy, | ||
SwitchProxy, | ||
TemporaryRedirect, | ||
PermanentRedirect, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { | ||
BadRequest, | ||
Unauthorized, | ||
PaymentRequired, | ||
Forbidden, | ||
NotFound, | ||
MethodNotAllowed, | ||
NotAcceptable, | ||
ProxyAuthenticationRequired, | ||
RequestTimeout, | ||
Conflict, | ||
Gone, | ||
LengthRequired, | ||
PreconditionFailed, | ||
PayloadTooLarge, | ||
URITooLong, | ||
UnsupportedMediaType, | ||
RangeNotSatisfiable, | ||
ExpectationFailed, | ||
ImATeapot, | ||
MisdirectedRequest, | ||
UnprocessableEntity, | ||
Locked, | ||
FailedDependency, | ||
TooEarly, | ||
UpgradeRequired, | ||
PreconditionRequired, | ||
TooManyRequests, | ||
RequestHeaderFieldsTooLarge, | ||
UnavailableForLegalReasons, | ||
} from "../src/handlers/clientErrors"; | ||
|
||
export { | ||
BadRequest, | ||
Unauthorized, | ||
PaymentRequired, | ||
Forbidden, | ||
NotFound, | ||
MethodNotAllowed, | ||
NotAcceptable, | ||
ProxyAuthenticationRequired, | ||
RequestTimeout, | ||
Conflict, | ||
Gone, | ||
LengthRequired, | ||
PreconditionFailed, | ||
PayloadTooLarge, | ||
URITooLong, | ||
UnsupportedMediaType, | ||
RangeNotSatisfiable, | ||
ExpectationFailed, | ||
ImATeapot, | ||
MisdirectedRequest, | ||
UnprocessableEntity, | ||
Locked, | ||
FailedDependency, | ||
TooEarly, | ||
UpgradeRequired, | ||
PreconditionRequired, | ||
TooManyRequests, | ||
RequestHeaderFieldsTooLarge, | ||
UnavailableForLegalReasons, | ||
}; |
Oops, something went wrong.