create-berna-stencil 2.6.3 → 2.6.4
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 +3 -0
- package/package.json +4 -27
- package/.eleventy.js +0 -94
- package/.eleventyignore +0 -4
- package/LICENSE +0 -170
- package/NOTICE +0 -5
- package/README.md +0 -53
- package/_tools/assistant.js +0 -150
- package/_tools/buildJs.js +0 -28
- package/_tools/cleanOutput.js +0 -20
- package/_tools/modules/constants.js +0 -23
- package/_tools/modules/pageComponents.js +0 -77
- package/_tools/modules/updateData.js +0 -84
- package/_tools/modules/updateOutputPath.js +0 -112
- package/_tools/modules/updatePage.js +0 -162
- package/_tools/modules/utils.js +0 -27
- package/_tools/modules/validation.js +0 -20
- package/_tools/res/templates/template.js +0 -5
- package/_tools/res/templates/template.njk +0 -9
- package/_tools/res/templates/template.scss +0 -23
- package/_tools/res/templates/template.ts +0 -5
- package/bin/create.js +0 -429
- package/docs/Assistant CLI.md +0 -61
- package/docs/Backend.md +0 -148
- package/docs/Components.md +0 -96
- package/docs/Creating pages.md +0 -65
- package/docs/Deploy.md +0 -55
- package/docs/Head and SEO.md +0 -94
- package/docs/Javascript.md +0 -53
- package/docs/Styling with SCSS.md +0 -140
- package/nginx.conf +0 -69
- package/src/backend/.htaccess +0 -7
- package/src/backend/_core/composer.json +0 -5
- package/src/backend/_core/composer.lock +0 -492
- package/src/backend/_core/index.php +0 -148
- package/src/backend/_core/init.php +0 -34
- package/src/backend/_core/modules/RateLimiter.php +0 -31
- package/src/backend/_core/modules/Response.php +0 -49
- package/src/backend/api/protected/example-protected.php +0 -17
- package/src/backend/api/public/example-public.php +0 -17
- package/src/backend/database/Database.php +0 -24
- package/src/backend/database/migrations/create_example_db.sql +0 -1
- package/src/backend/web.config +0 -17
- package/src/frontend/.htaccess +0 -16
- package/src/frontend/404.njk +0 -17
- package/src/frontend/assets/brand/favicon.svg +0 -37
- package/src/frontend/assets/brand/logo.svg +0 -37
- package/src/frontend/components/global/footer.njk +0 -27
- package/src/frontend/components/global/header.njk +0 -11
- package/src/frontend/components/welcome.njk +0 -251
- package/src/frontend/data/site.json +0 -44
- package/src/frontend/index.njk +0 -9
- package/src/frontend/js/modules/exampleModule.js +0 -3
- package/src/frontend/js/pages/404.js +0 -7
- package/src/frontend/js/pages/homepage.js +0 -7
- package/src/frontend/layouts/base.njk +0 -137
- package/src/frontend/layouts/pageComponents.njk +0 -14
- package/src/frontend/llms.njk +0 -18
- package/src/frontend/robots.njk +0 -8
- package/src/frontend/scss/modules/_animations.scss +0 -25
- package/src/frontend/scss/modules/_buttons.scss +0 -24
- package/src/frontend/scss/modules/_footer.scss +0 -32
- package/src/frontend/scss/modules/_global.scss +0 -46
- package/src/frontend/scss/modules/_header.scss +0 -33
- package/src/frontend/scss/modules/_mobile.scss +0 -30
- package/src/frontend/scss/modules/_notification.scss +0 -56
- package/src/frontend/scss/modules/_root.scss +0 -35
- package/src/frontend/scss/modules/_typography.scss +0 -15
- package/src/frontend/scss/modules/frameworks/_bootstrap.scss +0 -110
- package/src/frontend/scss/modules/frameworks/_bulma.scss +0 -109
- package/src/frontend/scss/modules/frameworks/_foundation.scss +0 -139
- package/src/frontend/scss/modules/frameworks/_uikit.scss +0 -110
- package/src/frontend/scss/pages/404.scss +0 -28
- package/src/frontend/scss/pages/homepage.scss +0 -23
- package/src/frontend/sitemap.njk +0 -17
- package/src/frontend/ts/modules/exampleModule.ts +0 -3
- package/src/frontend/ts/pages/404.ts +0 -7
- package/src/frontend/ts/pages/homepage.ts +0 -7
- package/src/frontend/web.config +0 -27
- package/tsconfig.json +0 -25
|
@@ -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,49 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
declare(strict_types=1);
|
|
4
|
-
|
|
5
|
-
if (!defined('CORE_ACCESS')) {
|
|
6
|
-
$errorPage = $_SERVER['DOCUMENT_ROOT'] . '/404.html';
|
|
7
|
-
http_response_code(404);
|
|
8
|
-
if (file_exists($errorPage)) {
|
|
9
|
-
header('Content-Type: text/html; charset=UTF-8');
|
|
10
|
-
echo file_get_contents($errorPage);
|
|
11
|
-
} else {
|
|
12
|
-
echo "404 Not Found";
|
|
13
|
-
}
|
|
14
|
-
exit;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
class Response
|
|
18
|
-
{
|
|
19
|
-
public static function success(mixed $data = null, int $code = 200): never
|
|
20
|
-
{
|
|
21
|
-
http_response_code($code);
|
|
22
|
-
echo json_encode([
|
|
23
|
-
'status' => 'success',
|
|
24
|
-
'data' => $data,
|
|
25
|
-
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
|
26
|
-
exit;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public static function error(string $message, int $code = 400, mixed $details = null): never
|
|
30
|
-
{
|
|
31
|
-
http_response_code($code);
|
|
32
|
-
$body = [
|
|
33
|
-
'status' => 'error',
|
|
34
|
-
'message' => $message,
|
|
35
|
-
'code' => $code,
|
|
36
|
-
];
|
|
37
|
-
if ($details !== null) {
|
|
38
|
-
$body['details'] = $details;
|
|
39
|
-
}
|
|
40
|
-
echo json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
|
41
|
-
exit;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public static function noContent(): never
|
|
45
|
-
{
|
|
46
|
-
http_response_code(204);
|
|
47
|
-
exit;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -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,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,24 +0,0 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
declare(strict_types=1);
|
|
3
|
-
|
|
4
|
-
class Database {
|
|
5
|
-
private static ?PDO $instance = null;
|
|
6
|
-
|
|
7
|
-
private function __construct() {}
|
|
8
|
-
|
|
9
|
-
public static function getInstance(): PDO {
|
|
10
|
-
if (self::$instance === null) {
|
|
11
|
-
$config = require __DIR__ . '/../config.php';
|
|
12
|
-
|
|
13
|
-
$dsn = "mysql:host={$config['DB_HOST']};dbname={$config['DB_NAME']};charset=utf8mb4";
|
|
14
|
-
$options = [
|
|
15
|
-
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
|
16
|
-
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
|
17
|
-
PDO::ATTR_EMULATE_PREPARES => false,
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
self::$instance = new PDO($dsn, $config['DB_USER'], $config['DB_PASS'], $options);
|
|
21
|
-
}
|
|
22
|
-
return self::$instance;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
CREATE DATABASE example_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
package/src/backend/web.config
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<configuration>
|
|
3
|
-
<system.webServer>
|
|
4
|
-
<rewrite>
|
|
5
|
-
<rules>
|
|
6
|
-
<rule name="PassThroughCoreIndex" stopProcessing="true">
|
|
7
|
-
<match url="^_core/index\.php$" ignoreCase="true" />
|
|
8
|
-
<action type="None" />
|
|
9
|
-
</rule>
|
|
10
|
-
<rule name="RewriteToFrontController" stopProcessing="true">
|
|
11
|
-
<match url="^(.*)$" ignoreCase="true" />
|
|
12
|
-
<action type="Rewrite" url="_core/index.php" appendQueryString="true" />
|
|
13
|
-
</rule>
|
|
14
|
-
</rules>
|
|
15
|
-
</rewrite>
|
|
16
|
-
</system.webServer>
|
|
17
|
-
</configuration>
|
package/src/frontend/.htaccess
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
Options -Indexes
|
|
2
|
-
ErrorDocument 404 /404.html
|
|
3
|
-
ErrorDocument 403 /404.html
|
|
4
|
-
|
|
5
|
-
<IfModule mod_rewrite.c>
|
|
6
|
-
RewriteEngine On
|
|
7
|
-
RewriteBase /
|
|
8
|
-
|
|
9
|
-
RewriteRule ^(web\.config|llms\.txt|robots\.txt|sitemap\.xml|\..*)$ /404.html [L,NC]
|
|
10
|
-
|
|
11
|
-
RewriteRule ^api/(.*)$ backend/_core/index.php [QSA,L]
|
|
12
|
-
|
|
13
|
-
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
|
14
|
-
RewriteCond %{REQUEST_FILENAME} -d
|
|
15
|
-
RewriteRule ^ - [L]
|
|
16
|
-
</IfModule>
|
package/src/frontend/404.njk
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "404"
|
|
3
|
-
permalink: 404.html
|
|
4
|
-
layout: base.njk
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<!-- !IMPORTANT -->
|
|
8
|
-
<!-- This is the only page that you need to modify statically -->
|
|
9
|
-
|
|
10
|
-
<div class="fade-in not-found">
|
|
11
|
-
<h1>Oops! Page not found</h1>
|
|
12
|
-
<a href="/">Return to homepage</a>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{# You can also add the includes you need here below
|
|
17
|
-
{% include "component.njk" %} #}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
-
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
-
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
-
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
|
6
|
-
preserveAspectRatio="xMidYMid meet">
|
|
7
|
-
|
|
8
|
-
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
|
|
9
|
-
fill="#000000" stroke="none">
|
|
10
|
-
<path d="M4115 4094 c-89 -20 -232 -88 -312 -148 -181 -137 -273 -342 -273
|
|
11
|
-
-604 0 -219 128 -459 353 -664 263 -240 347 -334 403 -451 109 -228 39 -489
|
|
12
|
-
-159 -585 -79 -38 -146 -52 -256 -52 -97 0 -138 10 -192 49 -84 59 -111 136
|
|
13
|
-
-111 311 1 105 6 145 32 250 33 131 47 249 36 295 -16 63 -169 74 -276 20
|
|
14
|
-
-134 -68 -289 -290 -347 -495 -27 -99 -25 -318 6 -425 25 -89 86 -210 133
|
|
15
|
-
-264 94 -107 240 -195 380 -231 421 -105 942 41 1226 345 148 158 218 306 242
|
|
16
|
-
512 25 217 -30 446 -151 624 -54 80 -191 222 -303 314 -47 39 -85 73 -86 78 0
|
|
17
|
-
4 8 7 18 7 9 0 54 13 99 29 174 60 304 196 349 366 31 113 9 324 -44 435 -58
|
|
18
|
-
120 -206 234 -360 276 -84 23 -318 28 -407 8z m348 -407 c82 -41 102 -74 101
|
|
19
|
-
-167 -1 -126 -55 -253 -163 -384 -30 -36 -58 -66 -62 -66 -10 0 -150 149 -200
|
|
20
|
-
215 -51 67 -102 161 -131 245 l-19 55 51 47 c71 66 143 89 270 85 81 -2 104
|
|
21
|
-
-7 153 -30z"/>
|
|
22
|
-
<path d="M1272 4089 c-123 -17 -291 -64 -406 -115 -240 -105 -461 -289 -527
|
|
23
|
-
-439 -24 -53 -18 -82 17 -91 52 -13 121 8 279 82 280 134 441 180 664 191 275
|
|
24
|
-
13 500 -56 597 -184 63 -82 78 -142 78 -293 0 -173 -27 -273 -98 -357 -25 -30
|
|
25
|
-
-27 -30 -78 -21 -73 14 -281 4 -347 -17 -136 -42 -183 -165 -100 -259 17 -20
|
|
26
|
-
54 -45 87 -58 52 -21 74 -23 236 -24 l179 0 29 -35 c16 -19 47 -70 68 -114 50
|
|
27
|
-
-101 71 -217 71 -390 1 -197 -28 -282 -133 -392 -72 -74 -205 -146 -313 -168
|
|
28
|
-
-113 -24 -286 -19 -434 11 -69 14 -130 29 -135 34 -10 10 17 511 35 655 6 44
|
|
29
|
-
35 192 65 329 116 528 158 835 136 981 -13 79 -24 95 -66 95 -73 0 -183 -92
|
|
30
|
-
-268 -224 -194 -302 -402 -1027 -423 -1473 -3 -65 -8 -136 -11 -159 l-5 -40
|
|
31
|
-
-102 23 c-127 29 -207 30 -230 5 -23 -25 -21 -87 4 -139 39 -80 189 -197 352
|
|
32
|
-
-273 158 -74 446 -163 629 -194 386 -67 797 -21 1081 120 163 81 273 175 363
|
|
33
|
-
311 103 155 135 295 116 518 -13 158 -40 248 -104 355 -52 87 -182 216 -290
|
|
34
|
-
286 l-78 51 63 41 c292 190 399 490 296 829 -84 276 -354 466 -751 528 -124
|
|
35
|
-
20 -444 28 -546 14z"/>
|
|
36
|
-
</g>
|
|
37
|
-
</svg>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
3
|
-
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
4
|
-
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
5
|
-
width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
|
|
6
|
-
preserveAspectRatio="xMidYMid meet">
|
|
7
|
-
|
|
8
|
-
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
|
|
9
|
-
fill="#000000" stroke="none">
|
|
10
|
-
<path d="M4115 4094 c-89 -20 -232 -88 -312 -148 -181 -137 -273 -342 -273
|
|
11
|
-
-604 0 -219 128 -459 353 -664 263 -240 347 -334 403 -451 109 -228 39 -489
|
|
12
|
-
-159 -585 -79 -38 -146 -52 -256 -52 -97 0 -138 10 -192 49 -84 59 -111 136
|
|
13
|
-
-111 311 1 105 6 145 32 250 33 131 47 249 36 295 -16 63 -169 74 -276 20
|
|
14
|
-
-134 -68 -289 -290 -347 -495 -27 -99 -25 -318 6 -425 25 -89 86 -210 133
|
|
15
|
-
-264 94 -107 240 -195 380 -231 421 -105 942 41 1226 345 148 158 218 306 242
|
|
16
|
-
512 25 217 -30 446 -151 624 -54 80 -191 222 -303 314 -47 39 -85 73 -86 78 0
|
|
17
|
-
4 8 7 18 7 9 0 54 13 99 29 174 60 304 196 349 366 31 113 9 324 -44 435 -58
|
|
18
|
-
120 -206 234 -360 276 -84 23 -318 28 -407 8z m348 -407 c82 -41 102 -74 101
|
|
19
|
-
-167 -1 -126 -55 -253 -163 -384 -30 -36 -58 -66 -62 -66 -10 0 -150 149 -200
|
|
20
|
-
215 -51 67 -102 161 -131 245 l-19 55 51 47 c71 66 143 89 270 85 81 -2 104
|
|
21
|
-
-7 153 -30z"/>
|
|
22
|
-
<path d="M1272 4089 c-123 -17 -291 -64 -406 -115 -240 -105 -461 -289 -527
|
|
23
|
-
-439 -24 -53 -18 -82 17 -91 52 -13 121 8 279 82 280 134 441 180 664 191 275
|
|
24
|
-
13 500 -56 597 -184 63 -82 78 -142 78 -293 0 -173 -27 -273 -98 -357 -25 -30
|
|
25
|
-
-27 -30 -78 -21 -73 14 -281 4 -347 -17 -136 -42 -183 -165 -100 -259 17 -20
|
|
26
|
-
54 -45 87 -58 52 -21 74 -23 236 -24 l179 0 29 -35 c16 -19 47 -70 68 -114 50
|
|
27
|
-
-101 71 -217 71 -390 1 -197 -28 -282 -133 -392 -72 -74 -205 -146 -313 -168
|
|
28
|
-
-113 -24 -286 -19 -434 11 -69 14 -130 29 -135 34 -10 10 17 511 35 655 6 44
|
|
29
|
-
35 192 65 329 116 528 158 835 136 981 -13 79 -24 95 -66 95 -73 0 -183 -92
|
|
30
|
-
-268 -224 -194 -302 -402 -1027 -423 -1473 -3 -65 -8 -136 -11 -159 l-5 -40
|
|
31
|
-
-102 23 c-127 29 -207 30 -230 5 -23 -25 -21 -87 4 -139 39 -80 189 -197 352
|
|
32
|
-
-273 158 -74 446 -163 629 -194 386 -67 797 -21 1081 120 163 81 273 175 363
|
|
33
|
-
311 103 155 135 295 116 518 -13 158 -40 248 -104 355 -52 87 -182 216 -290
|
|
34
|
-
286 l-78 51 63 41 c292 190 399 490 296 829 -84 276 -354 466 -751 528 -124
|
|
35
|
-
20 -444 28 -546 14z"/>
|
|
36
|
-
</g>
|
|
37
|
-
</svg>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<footer>
|
|
2
|
-
<div>
|
|
3
|
-
<h6>{{ site.title }}</h6>
|
|
4
|
-
<p>{{ site.description }}</p>
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<div>
|
|
8
|
-
<h6>Sitemap</h6>
|
|
9
|
-
<ul>
|
|
10
|
-
<li><a href="/">Homepage</a></li>
|
|
11
|
-
</ul>
|
|
12
|
-
</div>
|
|
13
|
-
<div>
|
|
14
|
-
© {{ site.copyright.year }} {{ site.name }} {{ site.copyright.text }}
|
|
15
|
-
</div>
|
|
16
|
-
<div>
|
|
17
|
-
<h6>Legal</h6>
|
|
18
|
-
<small>
|
|
19
|
-
<ul>
|
|
20
|
-
<li><a href="{{ site.legal.privacy }}">Privacy Policy</a></li>
|
|
21
|
-
<li><a href="{{ site.legal.cookie }}">Cookie Policy</a></li>
|
|
22
|
-
<li><a href="{{ site.legal.terms }}">Terms and conditions</a></li>
|
|
23
|
-
</ul>
|
|
24
|
-
</small>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</footer>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<header>
|
|
2
|
-
<nav>
|
|
3
|
-
<a class="logo" href="/">
|
|
4
|
-
<img src="{{ site.logo }}" alt="{{ site.title }}" height="40">
|
|
5
|
-
</a>
|
|
6
|
-
<div class="nav-links">
|
|
7
|
-
<a class="btn" href="/">Homepage</a>
|
|
8
|
-
<a class="btn" href="/example-page">Example page</a>
|
|
9
|
-
</div>
|
|
10
|
-
</nav>
|
|
11
|
-
</header>
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
<div class="layout-container layout-my-3">
|
|
2
|
-
<h1>Welcome to <span class="berna-stencil">Berna-Stencil</span></h1>
|
|
3
|
-
<div class="slogan">The boilerplate you need, simplified</div>
|
|
4
|
-
|
|
5
|
-
<div class="guide-filter">
|
|
6
|
-
<label>
|
|
7
|
-
<input type="radio" name="guide-filter" value="welcome" checked />
|
|
8
|
-
<span class="filter-pill">Welcome</span>
|
|
9
|
-
</label>
|
|
10
|
-
<label>
|
|
11
|
-
<input type="radio" name="guide-filter" value="assistant" />
|
|
12
|
-
<span class="filter-pill">Assistant</span>
|
|
13
|
-
</label>
|
|
14
|
-
<label>
|
|
15
|
-
<input type="radio" name="guide-filter" value="styling" />
|
|
16
|
-
<span class="filter-pill">Styling</span>
|
|
17
|
-
</label>
|
|
18
|
-
<label>
|
|
19
|
-
<input type="radio" name="guide-filter" value="javascript" />
|
|
20
|
-
<span class="filter-pill">Javascript</span>
|
|
21
|
-
</label>
|
|
22
|
-
<label>
|
|
23
|
-
<input type="radio" name="guide-filter" value="creating-pages" />
|
|
24
|
-
<span class="filter-pill">Creating Pages</span>
|
|
25
|
-
</label>
|
|
26
|
-
<label>
|
|
27
|
-
<input type="radio" name="guide-filter" value="components" />
|
|
28
|
-
<span class="filter-pill">Components</span>
|
|
29
|
-
</label>
|
|
30
|
-
<label>
|
|
31
|
-
<input type="radio" name="guide-filter" value="head-seo" />
|
|
32
|
-
<span class="filter-pill">Head & SEO</span>
|
|
33
|
-
</label>
|
|
34
|
-
<label>
|
|
35
|
-
<input type="radio" name="guide-filter" value="backend" />
|
|
36
|
-
<span class="filter-pill">Backend</span>
|
|
37
|
-
</label>
|
|
38
|
-
<label>
|
|
39
|
-
<input type="radio" name="guide-filter" value="deploy" />
|
|
40
|
-
<span class="filter-pill">Deploy</span>
|
|
41
|
-
</label>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<div class="tabs-container">
|
|
45
|
-
|
|
46
|
-
<div id="content-welcome" class="tab-content active">
|
|
47
|
-
<div class="grid" style="display: flex; gap: 1rem; flex-wrap: wrap;">
|
|
48
|
-
<a href="https://github.com/rhaastrake/berna-stencil" class="card" target="_blank" rel="noopener noreferrer" style="flex: 1; min-width: 250px;">
|
|
49
|
-
<svg class="card-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
50
|
-
<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>
|
|
51
|
-
</svg>
|
|
52
|
-
<h3>GitHub repository</h3>
|
|
53
|
-
<p>Community-driven. Contributions, issues and PRs are welcome.</p>
|
|
54
|
-
<span class="card-link">Open the repository
|
|
55
|
-
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" style="margin-left:4px;">
|
|
56
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M14 5l7 7m0 0l-7 7m7-7H3"></path>
|
|
57
|
-
</svg>
|
|
58
|
-
</span>
|
|
59
|
-
</a>
|
|
60
|
-
<a href="https://github.com/Rhaastrake/Berna-Stencil/tree/main/docs" class="card" target="_blank" rel="noopener noreferrer" style="flex: 1; min-width: 250px;">
|
|
61
|
-
<svg class="card-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
62
|
-
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path>
|
|
63
|
-
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path>
|
|
64
|
-
</svg>
|
|
65
|
-
<h3>Documentation</h3>
|
|
66
|
-
<p>Everything you need to get started, from setup to advanced topics and customizations</p>
|
|
67
|
-
<span class="card-link">Go to documentation
|
|
68
|
-
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" style="margin-left:4px;">
|
|
69
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M14 5l7 7m0 0l-7 7m7-7H3"></path>
|
|
70
|
-
</svg>
|
|
71
|
-
</span>
|
|
72
|
-
</a>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<div id="content-assistant" class="tab-content markdown-body">
|
|
77
|
-
{% mdFile "docs/assistant cli.md" %}
|
|
78
|
-
</div>
|
|
79
|
-
<div id="content-styling" class="tab-content markdown-body">
|
|
80
|
-
{% mdFile "docs/styling with scss.md" %}
|
|
81
|
-
</div>
|
|
82
|
-
<div id="content-javascript" class="tab-content markdown-body">
|
|
83
|
-
{% mdFile "docs/javascript.md" %}
|
|
84
|
-
</div>
|
|
85
|
-
<div id="content-creating-pages" class="tab-content markdown-body">
|
|
86
|
-
{% mdFile "docs/creating pages.md" %}
|
|
87
|
-
</div>
|
|
88
|
-
<div id="content-components" class="tab-content markdown-body">
|
|
89
|
-
{% mdFile "docs/components.md" %}
|
|
90
|
-
</div>
|
|
91
|
-
<div id="content-head-seo" class="tab-content markdown-body">
|
|
92
|
-
{% mdFile "docs/head and seo.md" %}
|
|
93
|
-
</div>
|
|
94
|
-
<div id="content-backend" class="tab-content markdown-body">
|
|
95
|
-
{% mdFile "docs/backend.md" %}
|
|
96
|
-
</div>
|
|
97
|
-
<div id="content-deploy" class="tab-content markdown-body">
|
|
98
|
-
{% mdFile "docs/deploy.md" %}
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<style>
|
|
105
|
-
.layout-container {
|
|
106
|
-
width: 100%;
|
|
107
|
-
max-width: 1140px;
|
|
108
|
-
margin-right: auto;
|
|
109
|
-
margin-left: auto;
|
|
110
|
-
padding-right: 15px;
|
|
111
|
-
padding-left: 15px;
|
|
112
|
-
}
|
|
113
|
-
.layout-my-3 {
|
|
114
|
-
margin-top: 1rem;
|
|
115
|
-
margin-bottom: 1rem;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
h1 {
|
|
119
|
-
text-align: center;
|
|
120
|
-
font-weight: 400;
|
|
121
|
-
}
|
|
122
|
-
h1 .berna-stencil {
|
|
123
|
-
color: #42b883;
|
|
124
|
-
font-weight: 600;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.markdown-body {
|
|
128
|
-
background-color: transparent !important;
|
|
129
|
-
|
|
130
|
-
h1 {
|
|
131
|
-
text-align: unset;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.slogan {
|
|
136
|
-
text-align: center;
|
|
137
|
-
color: #4b71a0;
|
|
138
|
-
font-size: 1.5rem;
|
|
139
|
-
margin-bottom: 1rem;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.tab-content {
|
|
143
|
-
display: none;
|
|
144
|
-
animation: fadeIn 0.3s ease-in-out;
|
|
145
|
-
}
|
|
146
|
-
.tab-content.active {
|
|
147
|
-
display: block;
|
|
148
|
-
}
|
|
149
|
-
@keyframes fadeIn {
|
|
150
|
-
from { opacity: 0; transform: translateY(5px); }
|
|
151
|
-
to { opacity: 1; transform: translateY(0); }
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.card {
|
|
155
|
-
background: #0d1526;
|
|
156
|
-
border: 0.8px solid #1e2d4a;
|
|
157
|
-
border-radius: 10px;
|
|
158
|
-
padding: 18px;
|
|
159
|
-
display: flex;
|
|
160
|
-
flex-direction: column;
|
|
161
|
-
gap: 0.75rem;
|
|
162
|
-
margin-top: 1rem;
|
|
163
|
-
margin-bottom: 1rem;
|
|
164
|
-
transition: border-color 0.2s, transform 0.15s;
|
|
165
|
-
text-decoration: none;
|
|
166
|
-
}
|
|
167
|
-
.card:hover {
|
|
168
|
-
border-color: #42b883;
|
|
169
|
-
transform: translateY(-2px);
|
|
170
|
-
}
|
|
171
|
-
.card-icon {
|
|
172
|
-
width: 2rem;
|
|
173
|
-
height: 2rem;
|
|
174
|
-
color: #42b883;
|
|
175
|
-
}
|
|
176
|
-
.card h3 {
|
|
177
|
-
font-size: 1.5rem;
|
|
178
|
-
font-weight: 600;
|
|
179
|
-
color: #cbd5e1;
|
|
180
|
-
letter-spacing: 0.01em;
|
|
181
|
-
margin: 0;
|
|
182
|
-
}
|
|
183
|
-
.card p {
|
|
184
|
-
font-size: 1rem;
|
|
185
|
-
color: #38649b;
|
|
186
|
-
line-height: 1.6;
|
|
187
|
-
margin: 0;
|
|
188
|
-
}
|
|
189
|
-
.card-link {
|
|
190
|
-
display: flex;
|
|
191
|
-
align-items: center;
|
|
192
|
-
gap: 4px;
|
|
193
|
-
font-size: 1rem;
|
|
194
|
-
color: #42b883;
|
|
195
|
-
opacity: 0.8;
|
|
196
|
-
transition: opacity 0.15s;
|
|
197
|
-
margin-top: auto;
|
|
198
|
-
}
|
|
199
|
-
.card:hover .card-link {
|
|
200
|
-
opacity: 1;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.guide-filter {
|
|
204
|
-
display: flex;
|
|
205
|
-
gap: 0.5rem;
|
|
206
|
-
flex-wrap: wrap;
|
|
207
|
-
justify-content: center;
|
|
208
|
-
margin-bottom: 2rem;
|
|
209
|
-
}
|
|
210
|
-
.guide-filter label {
|
|
211
|
-
cursor: pointer;
|
|
212
|
-
}
|
|
213
|
-
.guide-filter label input[type="radio"] {
|
|
214
|
-
display: none;
|
|
215
|
-
}
|
|
216
|
-
.filter-pill {
|
|
217
|
-
display: inline-block;
|
|
218
|
-
padding: 5px 16px;
|
|
219
|
-
border-radius: 20px;
|
|
220
|
-
border: 0.8px solid #1e2d4a;
|
|
221
|
-
background: #0d1526;
|
|
222
|
-
color: #38649b;
|
|
223
|
-
font-size: 0.9rem;
|
|
224
|
-
transition: border-color 0.2s, color 0.2s, background 0.2s;
|
|
225
|
-
user-select: none;
|
|
226
|
-
}
|
|
227
|
-
.guide-filter input[type="radio"]:checked + .filter-pill {
|
|
228
|
-
border-color: #42b883;
|
|
229
|
-
color: #42b883;
|
|
230
|
-
background: rgba(66, 184, 131, 0.08);
|
|
231
|
-
}
|
|
232
|
-
.guide-filter label:hover .filter-pill {
|
|
233
|
-
border-color: #42b883;
|
|
234
|
-
color: #42b883;
|
|
235
|
-
}
|
|
236
|
-
</style>
|
|
237
|
-
|
|
238
|
-
<script>
|
|
239
|
-
document.querySelectorAll('input[name="guide-filter"]').forEach((radio) => {
|
|
240
|
-
radio.addEventListener("change", (e) => {
|
|
241
|
-
document.querySelectorAll(".tab-content").forEach((content) => {
|
|
242
|
-
content.classList.remove("active");
|
|
243
|
-
});
|
|
244
|
-
const targetId = `content-${e.target.value}`;
|
|
245
|
-
const targetContent = document.getElementById(targetId);
|
|
246
|
-
if (targetContent) {
|
|
247
|
-
targetContent.classList.add("active");
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
</script>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"site_name": "Site name",
|
|
3
|
-
"title": "Site title",
|
|
4
|
-
"description": "Site description",
|
|
5
|
-
"keywords": "keyword1, keyword2, keyword3",
|
|
6
|
-
"domain": "yoursite.com",
|
|
7
|
-
"url": "https://yoursite.com",
|
|
8
|
-
"lang": "en",
|
|
9
|
-
"author": "Name and surname",
|
|
10
|
-
"data_bs_theme": "dark",
|
|
11
|
-
"favicon": "/assets/brand/favicon.svg",
|
|
12
|
-
"logo": "/assets/brand/logo.svg",
|
|
13
|
-
"copyright": {
|
|
14
|
-
"year": "2026",
|
|
15
|
-
"text": "Copyright text"
|
|
16
|
-
},
|
|
17
|
-
"legal": {
|
|
18
|
-
"privacy": "",
|
|
19
|
-
"cookie": "",
|
|
20
|
-
"cookieControls": "",
|
|
21
|
-
"terms": ""
|
|
22
|
-
},
|
|
23
|
-
"pages": {
|
|
24
|
-
"404": {
|
|
25
|
-
"seo": {
|
|
26
|
-
"title": "404 - Not found"
|
|
27
|
-
},
|
|
28
|
-
"cdn": {
|
|
29
|
-
"css": [],
|
|
30
|
-
"js": []
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"homepage": {
|
|
34
|
-
"seo": {
|
|
35
|
-
"title": "Homepage",
|
|
36
|
-
"description": "Description"
|
|
37
|
-
},
|
|
38
|
-
"cdn": {
|
|
39
|
-
"css": [],
|
|
40
|
-
"js": []
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
package/src/frontend/index.njk
DELETED