nibula 2.4.7 → 3.0.0
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/.eleventy.js +0 -7
- package/CHANGELOG.md +48 -2
- package/bin/create.js +43 -45
- package/bin/nibula.js +0 -6
- package/nginx.conf +1 -1
- package/package.json +3 -7
- package/src/backend/.htaccess +2 -2
- package/src/backend/core/index.js +329 -0
- package/src/backend/core/index.php +207 -0
- package/src/backend/core/init.js +37 -0
- package/src/backend/core/init.php +54 -0
- package/src/backend/core/modules/RateLimiter.js +55 -0
- package/src/backend/core/modules/RateLimiter.php +39 -0
- package/src/backend/{_core → core}/modules/Response.js +15 -10
- package/src/backend/{_core → core}/modules/Response.php +14 -17
- package/src/backend/core/modules/Validate.js +56 -0
- package/src/backend/core/modules/Validate.php +52 -0
- package/src/backend/endpoints/protected/example-protected.js +39 -0
- package/src/backend/endpoints/protected/example-protected.php +47 -0
- package/src/backend/endpoints/public/example-public.js +39 -0
- package/src/backend/endpoints/public/example-public.php +47 -0
- package/src/backend/example.config.js +7 -6
- package/src/backend/example.config.php +8 -7
- package/src/backend/package.json +3 -3
- package/src/backend/web.config +2 -2
- package/src/frontend/hosting/.htaccess +1 -1
- package/src/frontend/hosting/web.config +1 -1
- package/src/frontend/layouts/base.njk +3 -7
- package/src/frontend/scss/{_global.scss → global.scss} +0 -2
- package/src/frontend/scss/modules/frameworks/_bootstrap.scss +0 -2
- package/src/frontend/scss/modules/frameworks/_bulma.scss +0 -2
- package/src/frontend/scss/pages/404.scss +0 -3
- package/src/frontend/scss/pages/homepage.scss +0 -3
- package/tools/config/settings.json +1 -13
- package/tools/lib/pagesData.js +13 -3
- package/tools/res/templates/template.scss +0 -3
- package/src/backend/_core/index.js +0 -230
- package/src/backend/_core/index.php +0 -118
- package/src/backend/_core/init.js +0 -32
- package/src/backend/_core/init.php +0 -30
- package/src/backend/_core/modules/RateLimiter.js +0 -47
- package/src/backend/_core/modules/RateLimiter.php +0 -31
- package/src/backend/api/protected/example-protected.js +0 -16
- package/src/backend/api/protected/example-protected.php +0 -17
- package/src/backend/api/public/example-public.js +0 -16
- package/src/backend/api/public/example-public.php +0 -17
- package/src/frontend/scss/modules/frameworks/_foundation.scss +0 -138
- package/src/frontend/scss/modules/frameworks/_uikit.scss +0 -110
- package/tools/buildJs.js +0 -39
- /package/src/backend/{_core → core}/composer.json +0 -0
- /package/src/backend/{_core → core}/composer.lock +0 -0
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
define('CORE_ACCESS', true);
|
|
6
|
-
define('CORE_PATH', __DIR__);
|
|
7
|
-
|
|
8
|
-
require_once __DIR__ . '/init.php';
|
|
9
|
-
require_once __DIR__ . '/modules/Response.php';
|
|
10
|
-
|
|
11
|
-
$method = $_SERVER['REQUEST_METHOD'];
|
|
12
|
-
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
|
13
|
-
|
|
14
|
-
$uri = rtrim(preg_replace('#^/api#', '', $uri), '/') ?: '/';
|
|
15
|
-
$parts = array_values(array_filter(explode('/', $uri)));
|
|
16
|
-
|
|
17
|
-
foreach ($parts as $part) {
|
|
18
|
-
if ($part === '..' || $part === '.') {
|
|
19
|
-
Response::error('Bad Request', 400);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
$basePublic = __DIR__ . '/../api/public/';
|
|
24
|
-
$baseProtected = __DIR__ . '/../api/protected/';
|
|
25
|
-
|
|
26
|
-
$endpointFile = null;
|
|
27
|
-
$isProtected = false;
|
|
28
|
-
$requestParams = [];
|
|
29
|
-
$checkParts = $parts;
|
|
30
|
-
$params = [];
|
|
31
|
-
|
|
32
|
-
while (count($checkParts) > 0) {
|
|
33
|
-
$relativePath = implode('/', $checkParts) . '.php';
|
|
34
|
-
|
|
35
|
-
// Check first whether this is a public route
|
|
36
|
-
if (file_exists($basePublic . $relativePath)) {
|
|
37
|
-
$endpointFile = $basePublic . $relativePath;
|
|
38
|
-
$isProtected = false;
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (file_exists($baseProtected . $relativePath)) {
|
|
43
|
-
$endpointFile = $baseProtected . $relativePath;
|
|
44
|
-
$isProtected = true;
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
array_unshift($params, array_pop($checkParts));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (!$endpointFile) {
|
|
52
|
-
http_response_code(404);
|
|
53
|
-
header_remove('WWW-Authenticate');
|
|
54
|
-
|
|
55
|
-
$documentRoot = $_SERVER['DOCUMENT_ROOT'] ?? '';
|
|
56
|
-
$errorPage = $documentRoot . '/404.html';
|
|
57
|
-
|
|
58
|
-
if (!file_exists($errorPage)) {
|
|
59
|
-
$errorPage = __DIR__ . '/../../404.html';
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
header('Content-Type: text/html; charset=UTF-8');
|
|
63
|
-
|
|
64
|
-
if (file_exists($errorPage)) {
|
|
65
|
-
echo file_get_contents($errorPage);
|
|
66
|
-
} else {
|
|
67
|
-
echo "<h1>404 Not Found</h1>";
|
|
68
|
-
echo "The requested URL was not found on this server.";
|
|
69
|
-
}
|
|
70
|
-
exit;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
$base = $isProtected ? $baseProtected : $basePublic;
|
|
74
|
-
$base = str_replace('\\', '/', $base);
|
|
75
|
-
$endpointPath = str_replace('\\', '/', $endpointFile);
|
|
76
|
-
$endpointPath = preg_replace('#\.php$#', '', str_replace($base, '', $endpointPath));
|
|
77
|
-
|
|
78
|
-
header('Content-Type: application/json; charset=UTF-8');
|
|
79
|
-
header_remove('WWW-Authenticate');
|
|
80
|
-
header('X-Content-Type-Options: nosniff');
|
|
81
|
-
header('X-Frame-Options: DENY');
|
|
82
|
-
header('Referrer-Policy: strict-origin-when-cross-origin');
|
|
83
|
-
header('Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS');
|
|
84
|
-
header('Access-Control-Allow-Headers: Content-Type, X-Api-Key');
|
|
85
|
-
|
|
86
|
-
$originsForEndpoint = $config['CUSTOM_ENDPOINT_ORIGINS'][$endpointPath]
|
|
87
|
-
?? $config['GENERAL_ALLOWED_ORIGINS']
|
|
88
|
-
?? [];
|
|
89
|
-
|
|
90
|
-
$origin = $_SERVER['HTTP_ORIGIN'] ?? '';
|
|
91
|
-
|
|
92
|
-
if ($origin !== '' && in_array($origin, $originsForEndpoint, true)) {
|
|
93
|
-
header('Access-Control-Allow-Origin: ' . $origin);
|
|
94
|
-
header('Vary: Origin');
|
|
95
|
-
} elseif (in_array('*', $originsForEndpoint, true)) {
|
|
96
|
-
header('Access-Control-Allow-Origin: *');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if ($method === 'OPTIONS') {
|
|
100
|
-
http_response_code(204);
|
|
101
|
-
exit;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
require_once __DIR__ . '/modules/RateLimiter.php';
|
|
105
|
-
RateLimiter::check($_SERVER['REMOTE_ADDR'] ?? '', 60, 60);
|
|
106
|
-
|
|
107
|
-
if ($isProtected) {
|
|
108
|
-
$validKey = $config['CUSTOM_ENDPOINT_KEYS'][$endpointPath] ?? $config['GENERAL_API_KEY'] ?? '';
|
|
109
|
-
$apiKey = $_SERVER['HTTP_X_API_KEY'] ?? '';
|
|
110
|
-
|
|
111
|
-
if ($validKey === '' || !hash_equals($validKey, $apiKey)) {
|
|
112
|
-
Response::error('Unauthorized. X_API_KEY is incorrect or missing', 403);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
$requestParams = $params;
|
|
117
|
-
|
|
118
|
-
require $endpointFile;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
|
|
6
|
-
function loadConfig() {
|
|
7
|
-
const backendRoot = path.join(__dirname, "..");
|
|
8
|
-
const configPath = path.join(backendRoot, "config.js");
|
|
9
|
-
const examplePath = path.join(backendRoot, "example.config.js");
|
|
10
|
-
|
|
11
|
-
if (fs.existsSync(configPath)) {
|
|
12
|
-
return require(configPath);
|
|
13
|
-
}
|
|
14
|
-
return require(examplePath);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Turn any thrown error into a 500 response, mirroring set_exception_handler.
|
|
19
|
-
* @param {Error} exception
|
|
20
|
-
* @param {object} config
|
|
21
|
-
* @param {object} Response request-bound helper
|
|
22
|
-
*/
|
|
23
|
-
function handleException(exception, config, Response) {
|
|
24
|
-
const isDebug = (config.APP_ENV || "production") !== "production";
|
|
25
|
-
Response.error(
|
|
26
|
-
isDebug ? exception.message : "Internal server error",
|
|
27
|
-
500,
|
|
28
|
-
isDebug ? { stack: exception.stack } : null,
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
module.exports = { loadConfig, handleException };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
require_once __DIR__ . '/vendor/autoload.php';
|
|
6
|
-
require_once __DIR__ . '/modules/Response.php';
|
|
7
|
-
|
|
8
|
-
set_exception_handler(function ($exception) use (&$config) {
|
|
9
|
-
$isDebug = ($config['APP_ENV'] ?? 'production') !== 'production';
|
|
10
|
-
Response::error(
|
|
11
|
-
$isDebug ? $exception->getMessage() : 'Internal server error',
|
|
12
|
-
500,
|
|
13
|
-
$isDebug ? ['file' => $exception->getFile(), 'line' => $exception->getLine()] : null
|
|
14
|
-
);
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
set_error_handler(function ($severity, $message, $file, $line) {
|
|
18
|
-
if (!(error_reporting() & $severity)) return;
|
|
19
|
-
throw new ErrorException($message, 0, $severity, $file, $line);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
$config = require dirname(__DIR__) . '/config.php';
|
|
23
|
-
|
|
24
|
-
if (($config['APP_ENV'] ?? 'production') === 'production') {
|
|
25
|
-
ini_set('display_errors', '0');
|
|
26
|
-
error_reporting(0);
|
|
27
|
-
} else {
|
|
28
|
-
ini_set('display_errors', '1');
|
|
29
|
-
error_reporting(E_ALL);
|
|
30
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
const crypto = require("crypto");
|
|
6
|
-
|
|
7
|
-
class RateLimiter {
|
|
8
|
-
/**
|
|
9
|
-
* @param {string} ip
|
|
10
|
-
* @param {number} maxRequests
|
|
11
|
-
* @param {number} windowSeconds
|
|
12
|
-
* @param {object} Response request-bound helper from createResponse(res)
|
|
13
|
-
* @param {object} res raw http response (to set Retry-After)
|
|
14
|
-
*/
|
|
15
|
-
static check(ip, maxRequests = 60, windowSeconds = 60, Response, res) {
|
|
16
|
-
const cacheDir = path.join(__dirname, "..", "..", "cache");
|
|
17
|
-
|
|
18
|
-
if (!fs.existsSync(cacheDir)) {
|
|
19
|
-
fs.mkdirSync(cacheDir, { recursive: true, mode: 0o755 });
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const hash = crypto.createHash("md5").update(ip).digest("hex");
|
|
23
|
-
const cacheFile = path.join(cacheDir, "rl_" + hash + ".json");
|
|
24
|
-
const now = Math.floor(Date.now() / 1000);
|
|
25
|
-
let data = [];
|
|
26
|
-
|
|
27
|
-
if (fs.existsSync(cacheFile)) {
|
|
28
|
-
try {
|
|
29
|
-
data = JSON.parse(fs.readFileSync(cacheFile, "utf8")) || [];
|
|
30
|
-
} catch (e) {
|
|
31
|
-
data = [];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
data = data.filter((ts) => ts > now - windowSeconds);
|
|
36
|
-
data.push(now);
|
|
37
|
-
|
|
38
|
-
fs.writeFileSync(cacheFile, JSON.stringify(data));
|
|
39
|
-
|
|
40
|
-
if (data.length > maxRequests) {
|
|
41
|
-
res.setHeader("Retry-After", String(windowSeconds));
|
|
42
|
-
Response.error("Too Many Requests", 429);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = RateLimiter;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
class RateLimiter {
|
|
6
|
-
public static function check(string $ip, int $maxRequests = 60, int $windowSeconds = 60): void {
|
|
7
|
-
$cacheDir = __DIR__ . '/../../cache';
|
|
8
|
-
|
|
9
|
-
if (!is_dir($cacheDir)) {
|
|
10
|
-
mkdir($cacheDir, 0755, true);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
$cacheFile = $cacheDir . '/rl_' . md5($ip) . '.json';
|
|
14
|
-
$now = time();
|
|
15
|
-
$data = [];
|
|
16
|
-
|
|
17
|
-
if (file_exists($cacheFile)) {
|
|
18
|
-
$data = json_decode(file_get_contents($cacheFile), true) ?: [];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
$data = array_filter($data, fn($ts) => $ts > ($now - $windowSeconds));
|
|
22
|
-
$data[] = $now;
|
|
23
|
-
|
|
24
|
-
file_put_contents($cacheFile, json_encode(array_values($data)), LOCK_EX);
|
|
25
|
-
|
|
26
|
-
if (count($data) > $maxRequests) {
|
|
27
|
-
header('Retry-After: ' . $windowSeconds);
|
|
28
|
-
Response::error('Too Many Requests', 429);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method, requestParams, Response }) => {
|
|
4
|
-
if (method !== "GET") {
|
|
5
|
-
Response.error("Method not allowed", 405);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
//
|
|
9
|
-
// Your endpoint logic here. You can access route parameters in requestParams
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
Response.success({
|
|
13
|
-
message: "Protected endpoint is working",
|
|
14
|
-
params: requestParams,
|
|
15
|
-
});
|
|
16
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
declare(strict_types=1);
|
|
3
|
-
|
|
4
|
-
require_once CORE_PATH . '/modules/Response.php';
|
|
5
|
-
|
|
6
|
-
if ($method !== 'GET') {
|
|
7
|
-
Response::error('Method not allowed', 405);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
// Your endpoint logic here. You can access route parameters in $requestParams array
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
Response::success([
|
|
15
|
-
'message' => 'Protected endpoint is working',
|
|
16
|
-
'params' => $requestParams,
|
|
17
|
-
]);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
module.exports = ({ method, requestParams, Response }) => {
|
|
4
|
-
if (method !== "GET") {
|
|
5
|
-
Response.error("Method not allowed", 405);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
//
|
|
9
|
-
// Your endpoint logic here. You can access route parameters in requestParams
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
Response.success({
|
|
13
|
-
message: "Public endpoint is working",
|
|
14
|
-
params: requestParams,
|
|
15
|
-
});
|
|
16
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
declare(strict_types=1);
|
|
3
|
-
|
|
4
|
-
require_once CORE_PATH . '/modules/Response.php';
|
|
5
|
-
|
|
6
|
-
if ($method !== 'GET') {
|
|
7
|
-
Response::error('Method not allowed', 405);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
// Your endpoint logic here. You can access route parameters in $requestParams array
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
Response::success([
|
|
15
|
-
'message' => 'Public endpoint is working',
|
|
16
|
-
'params' => $requestParams,
|
|
17
|
-
]);
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
// ╔══════════════════════════════════════════════════════╗
|
|
2
|
-
// ║ FOUNDATION MODULES ║
|
|
3
|
-
// ║ Comment out any module you don't need to improve ║
|
|
4
|
-
// ║ performance. Core section is required by all others ║
|
|
5
|
-
// ╚══════════════════════════════════════════════════════╝
|
|
6
|
-
|
|
7
|
-
// Imports can be filtered by commenting them
|
|
8
|
-
// Example:
|
|
9
|
-
// @import "foundation-sites/scss/example-foundation-module";
|
|
10
|
-
|
|
11
|
-
//==========================
|
|
12
|
-
// 1️⃣ CORE – Utilities and functions
|
|
13
|
-
// ⚠️ Do not comment these out — required by all other modules
|
|
14
|
-
//==========================
|
|
15
|
-
@import "foundation-sites/scss/util/util"; // Utility loader
|
|
16
|
-
@import "foundation-sites/scss/util/breakpoint"; // Breakpoint helpers
|
|
17
|
-
@import "foundation-sites/scss/util/color"; // Color functions
|
|
18
|
-
@import "foundation-sites/scss/util/direction"; // RTL/LTR direction
|
|
19
|
-
@import "foundation-sites/scss/util/flex"; // Flex utilities
|
|
20
|
-
@import "foundation-sites/scss/util/math"; // Math functions
|
|
21
|
-
@import "foundation-sites/scss/util/mixins"; // Reusable SCSS mixins
|
|
22
|
-
@import "foundation-sites/scss/util/selector"; // Selector helpers
|
|
23
|
-
@import "foundation-sites/scss/util/typography"; // Typography utilities
|
|
24
|
-
@import "foundation-sites/scss/util/unit"; // Unit conversion
|
|
25
|
-
@import "foundation-sites/scss/util/value"; // Value helpers
|
|
26
|
-
|
|
27
|
-
//==========================
|
|
28
|
-
// 2️⃣ BASE – Reset and global styles
|
|
29
|
-
//==========================
|
|
30
|
-
@import "foundation-sites/scss/vendor/normalize"; // CSS reset / normalize
|
|
31
|
-
@import "foundation-sites/scss/_global"; // Global base styles
|
|
32
|
-
|
|
33
|
-
//==========================
|
|
34
|
-
// 3️⃣ TYPOGRAPHY
|
|
35
|
-
//==========================
|
|
36
|
-
@import "foundation-sites/scss/typography/typography"; // Typography loader
|
|
37
|
-
@import "foundation-sites/scss/typography/base"; // Base typography styles
|
|
38
|
-
@import "foundation-sites/scss/typography/helpers"; // Typography helpers
|
|
39
|
-
@import "foundation-sites/scss/typography/alignment"; // Text alignment
|
|
40
|
-
@import "foundation-sites/scss/typography/print"; // Print styles
|
|
41
|
-
|
|
42
|
-
//==========================
|
|
43
|
-
// 4️⃣ GRID – Layout systems
|
|
44
|
-
//==========================
|
|
45
|
-
|
|
46
|
-
// Legacy Float Grid
|
|
47
|
-
@import "foundation-sites/scss/grid/grid"; // Grid loader
|
|
48
|
-
@import "foundation-sites/scss/grid/classes"; // Grid classes
|
|
49
|
-
@import "foundation-sites/scss/grid/column"; // Column styles
|
|
50
|
-
@import "foundation-sites/scss/grid/row"; // Row styles
|
|
51
|
-
@import "foundation-sites/scss/grid/flex-grid"; // Flexbox grid
|
|
52
|
-
@import "foundation-sites/scss/grid/gutter"; // Gutters
|
|
53
|
-
@import "foundation-sites/scss/grid/layout"; // Layout helpers
|
|
54
|
-
@import "foundation-sites/scss/grid/position"; // Position helpers
|
|
55
|
-
@import "foundation-sites/scss/grid/size"; // Size helpers
|
|
56
|
-
|
|
57
|
-
// XY Grid (modern, recommended)
|
|
58
|
-
@import "foundation-sites/scss/xy-grid/xy-grid"; // XY Grid loader
|
|
59
|
-
@import "foundation-sites/scss/xy-grid/grid"; // XY Grid core
|
|
60
|
-
@import "foundation-sites/scss/xy-grid/cell"; // XY Grid cells
|
|
61
|
-
@import "foundation-sites/scss/xy-grid/classes"; // XY Grid classes
|
|
62
|
-
@import "foundation-sites/scss/xy-grid/collapse"; // XY Grid collapse
|
|
63
|
-
@import "foundation-sites/scss/xy-grid/frame"; // XY Grid frame
|
|
64
|
-
@import "foundation-sites/scss/xy-grid/gutters"; // XY Grid gutters
|
|
65
|
-
@import "foundation-sites/scss/xy-grid/layout"; // XY Grid layout
|
|
66
|
-
@import "foundation-sites/scss/xy-grid/position"; // XY Grid position
|
|
67
|
-
|
|
68
|
-
//==========================
|
|
69
|
-
// 5️⃣ FORMS
|
|
70
|
-
//==========================
|
|
71
|
-
@import "foundation-sites/scss/forms/forms"; // Forms loader
|
|
72
|
-
@import "foundation-sites/scss/forms/text"; // Text inputs
|
|
73
|
-
@import "foundation-sites/scss/forms/select"; // Select dropdowns
|
|
74
|
-
@import "foundation-sites/scss/forms/checkbox"; // Checkboxes and radios
|
|
75
|
-
@import "foundation-sites/scss/forms/input-group"; // Input groups
|
|
76
|
-
@import "foundation-sites/scss/forms/fieldset"; // Fieldsets
|
|
77
|
-
@import "foundation-sites/scss/forms/label"; // Form labels
|
|
78
|
-
@import "foundation-sites/scss/forms/help-text"; // Help text
|
|
79
|
-
@import "foundation-sites/scss/forms/error"; // Error states
|
|
80
|
-
@import "foundation-sites/scss/forms/range"; // Range sliders
|
|
81
|
-
@import "foundation-sites/scss/forms/meter"; // Meter element
|
|
82
|
-
@import "foundation-sites/scss/forms/progress"; // Progress element
|
|
83
|
-
|
|
84
|
-
//==========================
|
|
85
|
-
// 6️⃣ COMPONENTS
|
|
86
|
-
//==========================
|
|
87
|
-
@import "foundation-sites/scss/components/accordion"; // Accordion
|
|
88
|
-
@import "foundation-sites/scss/components/accordion-menu"; // Accordion menu
|
|
89
|
-
@import "foundation-sites/scss/components/badge"; // Badges
|
|
90
|
-
@import "foundation-sites/scss/components/breadcrumbs"; // Breadcrumbs
|
|
91
|
-
@import "foundation-sites/scss/components/button"; // Buttons
|
|
92
|
-
@import "foundation-sites/scss/components/button-group"; // Button groups
|
|
93
|
-
@import "foundation-sites/scss/components/callout"; // Callout boxes
|
|
94
|
-
@import "foundation-sites/scss/components/card"; // Cards
|
|
95
|
-
@import "foundation-sites/scss/components/close-button"; // Close button
|
|
96
|
-
@import "foundation-sites/scss/components/drilldown"; // Drilldown menu
|
|
97
|
-
@import "foundation-sites/scss/components/dropdown"; // Dropdown
|
|
98
|
-
@import "foundation-sites/scss/components/dropdown-menu"; // Dropdown menu
|
|
99
|
-
@import "foundation-sites/scss/components/flex"; // Flex helpers
|
|
100
|
-
@import "foundation-sites/scss/components/float"; // Float helpers
|
|
101
|
-
@import "foundation-sites/scss/components/label"; // Labels
|
|
102
|
-
@import "foundation-sites/scss/components/media-object"; // Media object
|
|
103
|
-
@import "foundation-sites/scss/components/menu"; // Menu
|
|
104
|
-
@import "foundation-sites/scss/components/menu-icon"; // Menu icon (hamburger)
|
|
105
|
-
@import "foundation-sites/scss/components/off-canvas"; // Off-canvas sidebar
|
|
106
|
-
@import "foundation-sites/scss/components/orbit"; // Orbit carousel
|
|
107
|
-
@import "foundation-sites/scss/components/pagination"; // Pagination
|
|
108
|
-
@import "foundation-sites/scss/components/progress-bar"; // Progress bars
|
|
109
|
-
@import "foundation-sites/scss/components/responsive-embed"; // Responsive embeds
|
|
110
|
-
@import "foundation-sites/scss/components/reveal"; // Reveal modals
|
|
111
|
-
@import "foundation-sites/scss/components/slider"; // Sliders
|
|
112
|
-
@import "foundation-sites/scss/components/sticky"; // Sticky elements
|
|
113
|
-
@import "foundation-sites/scss/components/switch"; // Toggle switches
|
|
114
|
-
@import "foundation-sites/scss/components/table"; // Tables
|
|
115
|
-
@import "foundation-sites/scss/components/tabs"; // Tabs
|
|
116
|
-
@import "foundation-sites/scss/components/thumbnail"; // Thumbnails
|
|
117
|
-
@import "foundation-sites/scss/components/title-bar"; // Title bar
|
|
118
|
-
@import "foundation-sites/scss/components/tooltip"; // Tooltips
|
|
119
|
-
@import "foundation-sites/scss/components/top-bar"; // Top bar navbar
|
|
120
|
-
@import "foundation-sites/scss/components/visibility"; // Visibility helpers
|
|
121
|
-
|
|
122
|
-
//==========================
|
|
123
|
-
// 7️⃣ PROTOTYPE – Utility classes (optional)
|
|
124
|
-
// 💡 Commented by default — uncomment only if you need utility classes
|
|
125
|
-
//==========================
|
|
126
|
-
@import "foundation-sites/scss/prototype/prototype"; // Prototype loader
|
|
127
|
-
@import "foundation-sites/scss/prototype/arrow"; // Arrow utility
|
|
128
|
-
@import "foundation-sites/scss/prototype/border-box"; // Border box
|
|
129
|
-
@import "foundation-sites/scss/prototype/border-none";// Border none
|
|
130
|
-
@import "foundation-sites/scss/prototype/bordered"; // Bordered
|
|
131
|
-
@import "foundation-sites/scss/prototype/box"; // Box
|
|
132
|
-
@import "foundation-sites/scss/prototype/display"; // Display utilities
|
|
133
|
-
@import "foundation-sites/scss/prototype/font-styling";// Font styling
|
|
134
|
-
@import "foundation-sites/scss/prototype/overflow"; // Overflow
|
|
135
|
-
@import "foundation-sites/scss/prototype/position"; // Position
|
|
136
|
-
@import "foundation-sites/scss/prototype/rounded"; // Rounded corners
|
|
137
|
-
@import "foundation-sites/scss/prototype/shadow"; // Box shadows
|
|
138
|
-
@import "foundation-sites/scss/prototype/spacing"; // Spacing utilities
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
// ╔══════════════════════════════════════════════════════╗
|
|
2
|
-
// ║ UIKIT MODULES ║
|
|
3
|
-
// ║ Comment out any module you don't need to improve ║
|
|
4
|
-
// ║ performance. Core section is required by all others ║
|
|
5
|
-
// ╚══════════════════════════════════════════════════════╝
|
|
6
|
-
|
|
7
|
-
// Imports can be filtered by commenting them
|
|
8
|
-
|
|
9
|
-
//==========================
|
|
10
|
-
// 1️⃣ CORE – Variables, mixins and base
|
|
11
|
-
// ⚠️ Do not comment these out — required by all other modules
|
|
12
|
-
//==========================
|
|
13
|
-
@import "uikit/src/scss/variables"; // Core variables
|
|
14
|
-
@import "uikit/src/scss/mixins"; // Reusable SCSS mixins
|
|
15
|
-
@import "uikit/src/scss/components/variables"; // Component variables
|
|
16
|
-
@import "uikit/src/scss/components/mixin"; // Component mixins
|
|
17
|
-
@import "uikit/src/scss/components/base"; // Base styles and reset
|
|
18
|
-
@import "uikit/src/scss/components/print"; // Print styles
|
|
19
|
-
|
|
20
|
-
//==========================
|
|
21
|
-
// 2️⃣ LAYOUT
|
|
22
|
-
//==========================
|
|
23
|
-
@import "uikit/src/scss/components/container"; // Containers
|
|
24
|
-
@import "uikit/src/scss/components/grid"; // Grid system
|
|
25
|
-
@import "uikit/src/scss/components/flex"; // Flexbox utilities
|
|
26
|
-
@import "uikit/src/scss/components/width"; // Width utilities
|
|
27
|
-
@import "uikit/src/scss/components/height"; // Height utilities
|
|
28
|
-
@import "uikit/src/scss/components/column"; // Column layout
|
|
29
|
-
@import "uikit/src/scss/components/section"; // Sections
|
|
30
|
-
@import "uikit/src/scss/components/position"; // Position utilities
|
|
31
|
-
|
|
32
|
-
//==========================
|
|
33
|
-
// 3️⃣ TYPOGRAPHY
|
|
34
|
-
//==========================
|
|
35
|
-
@import "uikit/src/scss/components/heading"; // Headings
|
|
36
|
-
@import "uikit/src/scss/components/text"; // Text utilities
|
|
37
|
-
@import "uikit/src/scss/components/link"; // Link styles
|
|
38
|
-
@import "uikit/src/scss/components/list"; // Lists
|
|
39
|
-
@import "uikit/src/scss/components/description-list"; // Description lists
|
|
40
|
-
@import "uikit/src/scss/components/divider"; // Dividers
|
|
41
|
-
@import "uikit/src/scss/components/leader"; // Leader lines
|
|
42
|
-
@import "uikit/src/scss/components/article"; // Article styles
|
|
43
|
-
|
|
44
|
-
//==========================
|
|
45
|
-
// 4️⃣ FORMS
|
|
46
|
-
//==========================
|
|
47
|
-
@import "uikit/src/scss/components/form"; // Form styles
|
|
48
|
-
@import "uikit/src/scss/components/form-range"; // Range sliders
|
|
49
|
-
|
|
50
|
-
//==========================
|
|
51
|
-
// 5️⃣ COMPONENTS
|
|
52
|
-
//==========================
|
|
53
|
-
@import "uikit/src/scss/components/accordion"; // Accordion
|
|
54
|
-
@import "uikit/src/scss/components/alert"; // Alerts
|
|
55
|
-
@import "uikit/src/scss/components/badge"; // Badges
|
|
56
|
-
@import "uikit/src/scss/components/breadcrumb"; // Breadcrumbs
|
|
57
|
-
@import "uikit/src/scss/components/button"; // Buttons
|
|
58
|
-
@import "uikit/src/scss/components/card"; // Cards
|
|
59
|
-
@import "uikit/src/scss/components/close"; // Close button
|
|
60
|
-
@import "uikit/src/scss/components/comment"; // Comment sections
|
|
61
|
-
@import "uikit/src/scss/components/countdown"; // Countdown timer
|
|
62
|
-
@import "uikit/src/scss/components/cover"; // Cover images
|
|
63
|
-
@import "uikit/src/scss/components/drop"; // Drop component
|
|
64
|
-
@import "uikit/src/scss/components/dropbar"; // Dropbar
|
|
65
|
-
@import "uikit/src/scss/components/dropdown"; // Dropdowns
|
|
66
|
-
@import "uikit/src/scss/components/dropnav"; // Drop navigation
|
|
67
|
-
@import "uikit/src/scss/components/icon"; // Icons
|
|
68
|
-
@import "uikit/src/scss/components/iconnav"; // Icon navigation
|
|
69
|
-
@import "uikit/src/scss/components/label"; // Labels
|
|
70
|
-
@import "uikit/src/scss/components/lightbox"; // Lightbox
|
|
71
|
-
@import "uikit/src/scss/components/marker"; // Markers
|
|
72
|
-
@import "uikit/src/scss/components/modal"; // Modals
|
|
73
|
-
@import "uikit/src/scss/components/nav"; // Navigation
|
|
74
|
-
@import "uikit/src/scss/components/navbar"; // Navbar
|
|
75
|
-
@import "uikit/src/scss/components/notification"; // Notifications
|
|
76
|
-
@import "uikit/src/scss/components/offcanvas"; // Off-canvas
|
|
77
|
-
@import "uikit/src/scss/components/overlay"; // Overlays
|
|
78
|
-
@import "uikit/src/scss/components/pagination"; // Pagination
|
|
79
|
-
@import "uikit/src/scss/components/placeholder"; // Placeholder boxes
|
|
80
|
-
@import "uikit/src/scss/components/progress"; // Progress bars
|
|
81
|
-
@import "uikit/src/scss/components/search"; // Search component
|
|
82
|
-
@import "uikit/src/scss/components/slidenav"; // Slideshow navigation
|
|
83
|
-
@import "uikit/src/scss/components/slider"; // Slider
|
|
84
|
-
@import "uikit/src/scss/components/slideshow"; // Slideshow
|
|
85
|
-
@import "uikit/src/scss/components/sortable"; // Sortable lists
|
|
86
|
-
@import "uikit/src/scss/components/spinner"; // Spinners
|
|
87
|
-
@import "uikit/src/scss/components/sticky"; // Sticky elements
|
|
88
|
-
@import "uikit/src/scss/components/subnav"; // Sub navigation
|
|
89
|
-
@import "uikit/src/scss/components/svg"; // SVG utilities
|
|
90
|
-
@import "uikit/src/scss/components/switcher"; // Switcher component
|
|
91
|
-
@import "uikit/src/scss/components/tab"; // Tabs
|
|
92
|
-
@import "uikit/src/scss/components/table"; // Tables
|
|
93
|
-
@import "uikit/src/scss/components/thumbnav"; // Thumbnail navigation
|
|
94
|
-
@import "uikit/src/scss/components/tile"; // Tiles
|
|
95
|
-
@import "uikit/src/scss/components/tooltip"; // Tooltips
|
|
96
|
-
@import "uikit/src/scss/components/totop"; // To-top button
|
|
97
|
-
|
|
98
|
-
//==========================
|
|
99
|
-
// 6️⃣ UTILITIES
|
|
100
|
-
//==========================
|
|
101
|
-
@import "uikit/src/scss/components/align"; // Alignment utilities
|
|
102
|
-
@import "uikit/src/scss/components/animation"; // Animation utilities
|
|
103
|
-
@import "uikit/src/scss/components/background"; // Background utilities
|
|
104
|
-
@import "uikit/src/scss/components/dotnav"; // Dot navigation
|
|
105
|
-
@import "uikit/src/scss/components/inverse"; // Inverse color mode
|
|
106
|
-
@import "uikit/src/scss/components/margin"; // Margin utilities
|
|
107
|
-
@import "uikit/src/scss/components/padding"; // Padding utilities
|
|
108
|
-
@import "uikit/src/scss/components/transition"; // Transition utilities
|
|
109
|
-
@import "uikit/src/scss/components/utility"; // General utilities
|
|
110
|
-
@import "uikit/src/scss/components/visibility"; // Visibility utilities
|
package/tools/buildJs.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const esbuild = require('esbuild');
|
|
3
|
-
const glob = require('glob');
|
|
4
|
-
const settings = require('./config/settings.json');
|
|
5
|
-
const { PATHS } = require('./lib/paths');
|
|
6
|
-
const { readPackageJson, allScriptEntries } = require('./lib/project');
|
|
7
|
-
|
|
8
|
-
const WATCH_FLAG = '--watch';
|
|
9
|
-
const PATH_SEPARATOR = '/';
|
|
10
|
-
|
|
11
|
-
function toPosix(target) {
|
|
12
|
-
return target.split(path.sep).join(PATH_SEPARATOR);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function collectEntryPoints() {
|
|
16
|
-
return allScriptEntries().flatMap((entries) => glob.sync(toPosix(path.join(PATHS.root, entries))));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const packageJson = readPackageJson();
|
|
20
|
-
const outputDirectory = packageJson[settings.packageJson.outputKey] || settings.project.defaultOutputDirectory;
|
|
21
|
-
const watch = process.argv.includes(WATCH_FLAG);
|
|
22
|
-
const entryPoints = collectEntryPoints();
|
|
23
|
-
|
|
24
|
-
if (entryPoints.length === 0) {
|
|
25
|
-
process.exit(0);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const options = {
|
|
29
|
-
entryPoints,
|
|
30
|
-
bundle: true,
|
|
31
|
-
outdir: path.join(PATHS.root, outputDirectory, ...settings.build.scriptOutput.split(PATH_SEPARATOR)),
|
|
32
|
-
minify: !watch,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
if (watch) {
|
|
36
|
-
esbuild.context(options).then((context) => context.watch()).catch(() => process.exit(1));
|
|
37
|
-
} else {
|
|
38
|
-
esbuild.build(options).catch(() => process.exit(1));
|
|
39
|
-
}
|
|
File without changes
|
|
File without changes
|