@awesomeness-js/server 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +101 -101
- package/package.json +36 -36
- package/src/componentDependencies.js +2 -2
- package/ui/components/statusPage/index.css +120 -0
- package/ui/components/statusPage/index.js +39 -0
- package/ui/core/public/app.js +23 -23
- package/example-site/example.awesomenessjs.com/api/readme.md +0 -1
- package/example-site/example.awesomenessjs.com/pages/_md/_info.js +0 -15
- package/example-site/example.awesomenessjs.com/pages/_md/css/example.css +0 -4
- package/example-site/example.awesomenessjs.com/pages/_md/drafts/example.md +0 -32
- package/example-site/example.awesomenessjs.com/pages/_md/getBlogData.js +0 -117
- package/example-site/example.awesomenessjs.com/pages/_md/getData.js +0 -36
- package/example-site/example.awesomenessjs.com/pages/_md/js/callToAction.js +0 -43
- package/example-site/example.awesomenessjs.com/pages/_md/js/init.js +0 -88
- package/example-site/example.awesomenessjs.com/pages/_md/meta.template.md +0 -33
- package/example-site/example.awesomenessjs.com/pages/_md/pages/mission.md +0 -345
- package/example-site/example.awesomenessjs.com/pages/_template/_info.js +0 -9
- package/example-site/example.awesomenessjs.com/pages/_template/css/_.css +0 -4
- package/example-site/example.awesomenessjs.com/pages/_template/getData.js +0 -6
- package/example-site/example.awesomenessjs.com/pages/_template/js/init.js +0 -3
- package/example-site/example.awesomenessjs.com/pages/blog/_info.js +0 -14
- package/example-site/example.awesomenessjs.com/pages/blog/css/topics.css +0 -17
- package/example-site/example.awesomenessjs.com/pages/blog/getData.js +0 -22
- package/example-site/example.awesomenessjs.com/pages/blog/js/colors.js +0 -159
- package/example-site/example.awesomenessjs.com/pages/blog/js/init.js +0 -242
- package/example-site/example.awesomenessjs.com/pages/blog/js/tag.js +0 -111
- package/example-site/example.awesomenessjs.com/pages/examples/_info.js +0 -9
- package/example-site/example.awesomenessjs.com/pages/examples/css/footer.css +0 -6
- package/example-site/example.awesomenessjs.com/pages/examples/css/intro.css +0 -67
- package/example-site/example.awesomenessjs.com/pages/examples/css/nav.css +0 -221
- package/example-site/example.awesomenessjs.com/pages/examples/getData.js +0 -8
- package/example-site/example.awesomenessjs.com/pages/examples/js/init.js +0 -15
- package/example-site/example.awesomenessjs.com/pages/examples/js/updateState.js +0 -14
- package/example-site/example.awesomenessjs.com/pages/start/_info.js +0 -11
- package/example-site/example.awesomenessjs.com/pages/start/css/footer.css +0 -6
- package/example-site/example.awesomenessjs.com/pages/start/css/intro.css +0 -67
- package/example-site/example.awesomenessjs.com/pages/start/css/nav.css +0 -221
- package/example-site/example.awesomenessjs.com/pages/start/getData.js +0 -8
- package/example-site/example.awesomenessjs.com/pages/start/js/init.js +0 -30
- package/example-site/example.awesomenessjs.com/pages/start/js/updateState.js +0 -14
- package/example-site/example.awesomenessjs.com/public/images/awesomeness.webp +0 -0
- package/example-site/example.awesomenessjs.com/public/manifest.webmanifest.json +0 -8
- package/example-site/example.awesomenessjs.com/specialRoutes.js +0 -14
package/index.js
CHANGED
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is auto-generated by the build script.
|
|
3
|
-
* It consolidates API functions for use in the application.
|
|
4
|
-
* Do not edit manually.
|
|
5
|
-
*/
|
|
6
|
-
import _applicationMap from './src/applicationMap.js';
|
|
7
|
-
import _awesomenessNormalizeRequest from './src/awesomenessNormalizeRequest.js';
|
|
8
|
-
import _brotliJsonResponse from './src/brotliJsonResponse.js';
|
|
9
|
-
import _checkAccess from './src/checkAccess.js';
|
|
10
|
-
import _componentDependencies from './src/componentDependencies.js';
|
|
11
|
-
import _config from './src/config.js';
|
|
12
|
-
import _fetchPage from './src/fetchPage.js';
|
|
13
|
-
import _getConfig from './src/getConfig.js';
|
|
14
|
-
import _getMD from './src/getMD.js';
|
|
15
|
-
import _init from './src/init.js';
|
|
16
|
-
import _koa_attachAwesomenessRequest from './src/koa/attachAwesomenessRequest.js';
|
|
17
|
-
import _koa_cors from './src/koa/cors.js';
|
|
18
|
-
import _koa_errorHandler from './src/koa/errorHandler.js';
|
|
19
|
-
import _koa_finalFormat from './src/koa/finalFormat.js';
|
|
20
|
-
import _koa_jsonBodyParser from './src/koa/jsonBodyParser.js';
|
|
21
|
-
import _koa_routeRequest from './src/koa/routeRequest.js';
|
|
22
|
-
import _koa_serverUp from './src/koa/serverUp.js';
|
|
23
|
-
import _koa_staticFiles from './src/koa/staticFiles.js';
|
|
24
|
-
import _koa_timeout from './src/koa/timeout.js';
|
|
25
|
-
import _pageInfo from './src/pageInfo.js';
|
|
26
|
-
import _reRoute from './src/reRoute.js';
|
|
27
|
-
import _resolveRealCasePath from './src/resolveRealCasePath.js';
|
|
28
|
-
import _specialPaths from './src/specialPaths.js';
|
|
29
|
-
import _start from './src/start.js';
|
|
30
|
-
import _validateRequest from './src/validateRequest.js';
|
|
31
|
-
import _ws_handlers from './src/ws/handlers.js';
|
|
32
|
-
import _ws_index from './src/ws/index.js';
|
|
33
|
-
|
|
34
|
-
export { _applicationMap as applicationMap };
|
|
35
|
-
export { _awesomenessNormalizeRequest as awesomenessNormalizeRequest };
|
|
36
|
-
export { _brotliJsonResponse as brotliJsonResponse };
|
|
37
|
-
export { _checkAccess as checkAccess };
|
|
38
|
-
export { _componentDependencies as componentDependencies };
|
|
39
|
-
export { _config as config };
|
|
40
|
-
export { _fetchPage as fetchPage };
|
|
41
|
-
export { _getConfig as getConfig };
|
|
42
|
-
export { _getMD as getMD };
|
|
43
|
-
export { _init as init };
|
|
44
|
-
export { _pageInfo as pageInfo };
|
|
45
|
-
export { _reRoute as reRoute };
|
|
46
|
-
export { _resolveRealCasePath as resolveRealCasePath };
|
|
47
|
-
export { _specialPaths as specialPaths };
|
|
48
|
-
export { _start as start };
|
|
49
|
-
export { _validateRequest as validateRequest };
|
|
50
|
-
|
|
51
|
-
export const koa = {
|
|
52
|
-
attachAwesomenessRequest: _koa_attachAwesomenessRequest,
|
|
53
|
-
cors: _koa_cors,
|
|
54
|
-
errorHandler: _koa_errorHandler,
|
|
55
|
-
finalFormat: _koa_finalFormat,
|
|
56
|
-
jsonBodyParser: _koa_jsonBodyParser,
|
|
57
|
-
routeRequest: _koa_routeRequest,
|
|
58
|
-
serverUp: _koa_serverUp,
|
|
59
|
-
staticFiles: _koa_staticFiles,
|
|
60
|
-
timeout: _koa_timeout
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const ws = {
|
|
64
|
-
handlers: _ws_handlers,
|
|
65
|
-
index: _ws_index
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export default {
|
|
70
|
-
applicationMap: _applicationMap,
|
|
71
|
-
awesomenessNormalizeRequest: _awesomenessNormalizeRequest,
|
|
72
|
-
brotliJsonResponse: _brotliJsonResponse,
|
|
73
|
-
checkAccess: _checkAccess,
|
|
74
|
-
componentDependencies: _componentDependencies,
|
|
75
|
-
config: _config,
|
|
76
|
-
fetchPage: _fetchPage,
|
|
77
|
-
getConfig: _getConfig,
|
|
78
|
-
getMD: _getMD,
|
|
79
|
-
init: _init,
|
|
80
|
-
pageInfo: _pageInfo,
|
|
81
|
-
reRoute: _reRoute,
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto-generated by the build script.
|
|
3
|
+
* It consolidates API functions for use in the application.
|
|
4
|
+
* Do not edit manually.
|
|
5
|
+
*/
|
|
6
|
+
import _applicationMap from './src/applicationMap.js';
|
|
7
|
+
import _awesomenessNormalizeRequest from './src/awesomenessNormalizeRequest.js';
|
|
8
|
+
import _brotliJsonResponse from './src/brotliJsonResponse.js';
|
|
9
|
+
import _checkAccess from './src/checkAccess.js';
|
|
10
|
+
import _componentDependencies from './src/componentDependencies.js';
|
|
11
|
+
import _config from './src/config.js';
|
|
12
|
+
import _fetchPage from './src/fetchPage.js';
|
|
13
|
+
import _getConfig from './src/getConfig.js';
|
|
14
|
+
import _getMD from './src/getMD.js';
|
|
15
|
+
import _init from './src/init.js';
|
|
16
|
+
import _koa_attachAwesomenessRequest from './src/koa/attachAwesomenessRequest.js';
|
|
17
|
+
import _koa_cors from './src/koa/cors.js';
|
|
18
|
+
import _koa_errorHandler from './src/koa/errorHandler.js';
|
|
19
|
+
import _koa_finalFormat from './src/koa/finalFormat.js';
|
|
20
|
+
import _koa_jsonBodyParser from './src/koa/jsonBodyParser.js';
|
|
21
|
+
import _koa_routeRequest from './src/koa/routeRequest.js';
|
|
22
|
+
import _koa_serverUp from './src/koa/serverUp.js';
|
|
23
|
+
import _koa_staticFiles from './src/koa/staticFiles.js';
|
|
24
|
+
import _koa_timeout from './src/koa/timeout.js';
|
|
25
|
+
import _pageInfo from './src/pageInfo.js';
|
|
26
|
+
import _reRoute from './src/reRoute.js';
|
|
27
|
+
import _resolveRealCasePath from './src/resolveRealCasePath.js';
|
|
28
|
+
import _specialPaths from './src/specialPaths.js';
|
|
29
|
+
import _start from './src/start.js';
|
|
30
|
+
import _validateRequest from './src/validateRequest.js';
|
|
31
|
+
import _ws_handlers from './src/ws/handlers.js';
|
|
32
|
+
import _ws_index from './src/ws/index.js';
|
|
33
|
+
|
|
34
|
+
export { _applicationMap as applicationMap };
|
|
35
|
+
export { _awesomenessNormalizeRequest as awesomenessNormalizeRequest };
|
|
36
|
+
export { _brotliJsonResponse as brotliJsonResponse };
|
|
37
|
+
export { _checkAccess as checkAccess };
|
|
38
|
+
export { _componentDependencies as componentDependencies };
|
|
39
|
+
export { _config as config };
|
|
40
|
+
export { _fetchPage as fetchPage };
|
|
41
|
+
export { _getConfig as getConfig };
|
|
42
|
+
export { _getMD as getMD };
|
|
43
|
+
export { _init as init };
|
|
44
|
+
export { _pageInfo as pageInfo };
|
|
45
|
+
export { _reRoute as reRoute };
|
|
46
|
+
export { _resolveRealCasePath as resolveRealCasePath };
|
|
47
|
+
export { _specialPaths as specialPaths };
|
|
48
|
+
export { _start as start };
|
|
49
|
+
export { _validateRequest as validateRequest };
|
|
50
|
+
|
|
51
|
+
export const koa = {
|
|
52
|
+
attachAwesomenessRequest: _koa_attachAwesomenessRequest,
|
|
53
|
+
cors: _koa_cors,
|
|
54
|
+
errorHandler: _koa_errorHandler,
|
|
55
|
+
finalFormat: _koa_finalFormat,
|
|
56
|
+
jsonBodyParser: _koa_jsonBodyParser,
|
|
57
|
+
routeRequest: _koa_routeRequest,
|
|
58
|
+
serverUp: _koa_serverUp,
|
|
59
|
+
staticFiles: _koa_staticFiles,
|
|
60
|
+
timeout: _koa_timeout
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const ws = {
|
|
64
|
+
handlers: _ws_handlers,
|
|
65
|
+
index: _ws_index
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
export default {
|
|
70
|
+
applicationMap: _applicationMap,
|
|
71
|
+
awesomenessNormalizeRequest: _awesomenessNormalizeRequest,
|
|
72
|
+
brotliJsonResponse: _brotliJsonResponse,
|
|
73
|
+
checkAccess: _checkAccess,
|
|
74
|
+
componentDependencies: _componentDependencies,
|
|
75
|
+
config: _config,
|
|
76
|
+
fetchPage: _fetchPage,
|
|
77
|
+
getConfig: _getConfig,
|
|
78
|
+
getMD: _getMD,
|
|
79
|
+
init: _init,
|
|
80
|
+
pageInfo: _pageInfo,
|
|
81
|
+
reRoute: _reRoute,
|
|
82
82
|
/**
|
|
83
83
|
* Case-insensitive real path resolver.
|
|
84
84
|
* Works correctly on Windows, macOS, and Linux/Docker.
|
|
85
|
-
*/
|
|
86
|
-
resolveRealCasePath: _resolveRealCasePath,
|
|
87
|
-
specialPaths: _specialPaths,
|
|
88
|
-
start: _start,
|
|
89
|
-
validateRequest: _validateRequest,
|
|
90
|
-
koa: {
|
|
91
|
-
attachAwesomenessRequest: _koa_attachAwesomenessRequest,
|
|
92
|
-
cors: _koa_cors,
|
|
93
|
-
errorHandler: _koa_errorHandler,
|
|
94
|
-
finalFormat: _koa_finalFormat,
|
|
95
|
-
jsonBodyParser: _koa_jsonBodyParser,
|
|
96
|
-
routeRequest: _koa_routeRequest,
|
|
97
|
-
serverUp: _koa_serverUp,
|
|
98
|
-
staticFiles: _koa_staticFiles,
|
|
99
|
-
timeout: _koa_timeout,
|
|
100
|
-
},
|
|
101
|
-
ws: {
|
|
102
|
-
handlers: _ws_handlers,
|
|
103
|
-
index: _ws_index,
|
|
104
|
-
},
|
|
85
|
+
*/
|
|
86
|
+
resolveRealCasePath: _resolveRealCasePath,
|
|
87
|
+
specialPaths: _specialPaths,
|
|
88
|
+
start: _start,
|
|
89
|
+
validateRequest: _validateRequest,
|
|
90
|
+
koa: {
|
|
91
|
+
attachAwesomenessRequest: _koa_attachAwesomenessRequest,
|
|
92
|
+
cors: _koa_cors,
|
|
93
|
+
errorHandler: _koa_errorHandler,
|
|
94
|
+
finalFormat: _koa_finalFormat,
|
|
95
|
+
jsonBodyParser: _koa_jsonBodyParser,
|
|
96
|
+
routeRequest: _koa_routeRequest,
|
|
97
|
+
serverUp: _koa_serverUp,
|
|
98
|
+
staticFiles: _koa_staticFiles,
|
|
99
|
+
timeout: _koa_timeout,
|
|
100
|
+
},
|
|
101
|
+
ws: {
|
|
102
|
+
handlers: _ws_handlers,
|
|
103
|
+
index: _ws_index,
|
|
104
|
+
},
|
|
105
105
|
};
|
package/package.json
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@awesomeness-js/server",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Awesomeness Multi-Site Server",
|
|
5
|
-
"author": "Scott Forte",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "start.js",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/awesomeness-js/server.git"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"test": "vitest",
|
|
14
|
-
"prebuild": "node ./build/build.js",
|
|
15
|
-
"build": "tsc && npm run postBuild",
|
|
16
|
-
"postBuild": "node ./build/postBuild.js"
|
|
17
|
-
},
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"import": "./index.js"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@awesomeness-js/utils": "latest",
|
|
25
|
-
"busboy": "^1.6.0",
|
|
26
|
-
"koa": "^3.0.1",
|
|
27
|
-
"koa-compress": "^5.1.1",
|
|
28
|
-
"koa-send": "^5.0.1",
|
|
29
|
-
"ws": "^8.18.3",
|
|
30
|
-
"zlib": "^1.0.5"
|
|
31
|
-
},
|
|
32
|
-
"license": "none",
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"eslint": "^9.23.0",
|
|
35
|
-
"vitest": "^3.0.9"
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@awesomeness-js/server",
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"description": "Awesomeness Multi-Site Server",
|
|
5
|
+
"author": "Scott Forte",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "start.js",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/awesomeness-js/server.git"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "vitest",
|
|
14
|
+
"prebuild": "node ./build/build.js",
|
|
15
|
+
"build": "tsc && npm run postBuild",
|
|
16
|
+
"postBuild": "node ./build/postBuild.js"
|
|
17
|
+
},
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@awesomeness-js/utils": "latest",
|
|
25
|
+
"busboy": "^1.6.0",
|
|
26
|
+
"koa": "^3.0.1",
|
|
27
|
+
"koa-compress": "^5.1.1",
|
|
28
|
+
"koa-send": "^5.0.1",
|
|
29
|
+
"ws": "^8.18.3",
|
|
30
|
+
"zlib": "^1.0.5"
|
|
31
|
+
},
|
|
32
|
+
"license": "none",
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"eslint": "^9.23.0",
|
|
35
|
+
"vitest": "^3.0.9"
|
|
36
|
+
}
|
|
37
37
|
}
|
|
@@ -35,7 +35,7 @@ export default function componentDependencies(allComponents, {
|
|
|
35
35
|
componentLocations = [],
|
|
36
36
|
namespace = "ui",
|
|
37
37
|
showDetails = false,
|
|
38
|
-
ignore = [ "*.css.js"
|
|
38
|
+
ignore = [ "*.css.js" ],
|
|
39
39
|
} = {}) {
|
|
40
40
|
|
|
41
41
|
if (!Array.isArray(componentLocations) || componentLocations.length === 0) {
|
|
@@ -144,7 +144,7 @@ export default function componentDependencies(allComponents, {
|
|
|
144
144
|
|
|
145
145
|
try {
|
|
146
146
|
|
|
147
|
-
const fileContent = readFileSync(file, "utf-8");
|
|
147
|
+
const fileContent = readFileSync(path.join(chosenRoot, file), "utf-8");
|
|
148
148
|
const lines = fileContent.split("\n");
|
|
149
149
|
let fileWithImportsStripped = "";
|
|
150
150
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/* All styles scoped to .status-page and only using existing CSS variables (e.g., --sky-500, --violet-500, --slate-950). */
|
|
2
|
+
|
|
3
|
+
.status-page {
|
|
4
|
+
/* layout */
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
gap: 14px;
|
|
10
|
+
min-height: min(70vh, 560px);
|
|
11
|
+
padding: 36px 22px 28px;
|
|
12
|
+
margin: min(12vh, 120px) auto;
|
|
13
|
+
text-align: center;
|
|
14
|
+
width: min(720px, 92vw);
|
|
15
|
+
|
|
16
|
+
/* card look */
|
|
17
|
+
position: relative;
|
|
18
|
+
border-radius: 18px;
|
|
19
|
+
background:
|
|
20
|
+
linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.04)) padding-box;
|
|
21
|
+
border: 1px solid color-mix(in oklab, white 14%, transparent);
|
|
22
|
+
box-shadow: 0 10px 30px rgba(0,0,0,.35);
|
|
23
|
+
backdrop-filter: saturate(160%) blur(10px);
|
|
24
|
+
color: var(--slate-50);
|
|
25
|
+
isolation: isolate;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.status-page::before {
|
|
29
|
+
content: "";
|
|
30
|
+
position: absolute;
|
|
31
|
+
inset: -1px;
|
|
32
|
+
border-radius: inherit;
|
|
33
|
+
z-index: -1;
|
|
34
|
+
background:
|
|
35
|
+
radial-gradient(80% 60% at 20% 0%, color-mix(in oklab, var(--sky-500) 32%, transparent), transparent 65%),
|
|
36
|
+
radial-gradient(70% 50% at 100% 10%, color-mix(in oklab, var(--violet-500) 28%, transparent), transparent 60%),
|
|
37
|
+
var(--slate-950);
|
|
38
|
+
filter: saturate(110%);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Headline */
|
|
42
|
+
.status-page h1 {
|
|
43
|
+
margin: 0;
|
|
44
|
+
line-height: 1;
|
|
45
|
+
letter-spacing: -0.02em;
|
|
46
|
+
font-weight: 800;
|
|
47
|
+
font-size: clamp(48px, 14vw, 120px);
|
|
48
|
+
background:
|
|
49
|
+
conic-gradient(from 220deg, var(--sky-400), var(--violet-400), var(--sky-400)) text;
|
|
50
|
+
-webkit-background-clip: text;
|
|
51
|
+
background-clip: text;
|
|
52
|
+
color: transparent;
|
|
53
|
+
filter: drop-shadow(0 6px 18px color-mix(in oklab, var(--sky-500) 25%, transparent));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Message */
|
|
57
|
+
.status-page p {
|
|
58
|
+
margin: 2px 0 18px;
|
|
59
|
+
color: var(--slate-400);
|
|
60
|
+
font-size: clamp(14px, 1.7vw, 18px);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* CTA */
|
|
64
|
+
.status-page .btn-home {
|
|
65
|
+
display: inline-flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
height: 46px;
|
|
69
|
+
padding: 0 18px;
|
|
70
|
+
gap: .5ch;
|
|
71
|
+
border-radius: 12px;
|
|
72
|
+
text-decoration: none;
|
|
73
|
+
font-weight: 700;
|
|
74
|
+
letter-spacing: .01em;
|
|
75
|
+
|
|
76
|
+
color: var(--slate-50);
|
|
77
|
+
background:
|
|
78
|
+
linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04)),
|
|
79
|
+
linear-gradient(90deg, color-mix(in oklab, var(--sky-500) 32%, transparent), color-mix(in oklab, var(--violet-500) 32%, transparent));
|
|
80
|
+
border: 1px solid color-mix(in oklab, white 14%, transparent);
|
|
81
|
+
box-shadow: 0 4px 18px rgba(0,0,0,.2);
|
|
82
|
+
transition: transform .15s ease, box-shadow .2s ease, filter .15s ease, background .25s ease;
|
|
83
|
+
}
|
|
84
|
+
.status-page .btn-home:hover {
|
|
85
|
+
transform: translateY(-1px);
|
|
86
|
+
box-shadow: 0 10px 26px rgba(0,0,0,.28);
|
|
87
|
+
filter: saturate(120%);
|
|
88
|
+
}
|
|
89
|
+
.status-page .btn-home:active { transform: translateY(0) }
|
|
90
|
+
.status-page .btn-home:focus-visible {
|
|
91
|
+
outline: none;
|
|
92
|
+
box-shadow:
|
|
93
|
+
0 0 0 2px var(--slate-950),
|
|
94
|
+
0 0 0 6px color-mix(in oklab, var(--sky-500) 45%, transparent);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* 404 variant */
|
|
98
|
+
.status-page.status-page-404 p {
|
|
99
|
+
font-size: clamp(15px, 1.9vw, 20px);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Generic variant trims the gradient headline */
|
|
103
|
+
.status-page.status-page-generic h1 {
|
|
104
|
+
background: linear-gradient(180deg, currentColor, currentColor) text;
|
|
105
|
+
-webkit-background-clip: text;
|
|
106
|
+
background-clip: text;
|
|
107
|
+
color: currentColor;
|
|
108
|
+
filter: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Compact on very small screens */
|
|
112
|
+
@media (max-width: 420px){
|
|
113
|
+
.status-page { padding: 26px 16px 20px; border-radius: 16px; }
|
|
114
|
+
.status-page .btn-home { width: 100% }
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Reduced motion */
|
|
118
|
+
@media (prefers-reduced-motion: reduce){
|
|
119
|
+
.status-page .btn-home { transition: none }
|
|
120
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default (code) => {
|
|
2
|
+
|
|
3
|
+
let $statusPage;
|
|
4
|
+
|
|
5
|
+
if(code === 404){
|
|
6
|
+
|
|
7
|
+
$statusPage = $(`
|
|
8
|
+
<div class="status-page status-page-404">
|
|
9
|
+
<h1>404</h1>
|
|
10
|
+
<p>Oops! The page you are looking for does not exist.</p>
|
|
11
|
+
<a href="/" class="btn-home">Go to Home Page</a>
|
|
12
|
+
</div>
|
|
13
|
+
`);
|
|
14
|
+
|
|
15
|
+
} else if(code === 401){
|
|
16
|
+
|
|
17
|
+
$statusPage = $(`
|
|
18
|
+
<div class="status-page status-page-404">
|
|
19
|
+
<h1>Nah...</h1>
|
|
20
|
+
<p>Sorry Bro... Access Denied.</p>
|
|
21
|
+
<a href="/" class="btn-home">Go to Home Page</a>
|
|
22
|
+
</div>
|
|
23
|
+
`);
|
|
24
|
+
|
|
25
|
+
} else {
|
|
26
|
+
|
|
27
|
+
$statusPage = $(`
|
|
28
|
+
<div class="status-page status-page-generic">
|
|
29
|
+
<h1>${code}</h1>
|
|
30
|
+
<p>Something went wrong.</p>
|
|
31
|
+
<a href="/" class="btn-home">Go to Home Page</a>
|
|
32
|
+
</div>
|
|
33
|
+
`);
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return $statusPage;
|
|
38
|
+
|
|
39
|
+
};
|