create-berna-stencil 1.0.47 → 1.0.48

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.
Files changed (176) hide show
  1. package/bin/create.js +1 -0
  2. package/docs/Assistant CLI.md +36 -0
  3. package/docs/Components.md +63 -0
  4. package/docs/Creating pages.md +46 -0
  5. package/docs/Head and SEO.md +44 -0
  6. package/docs/Javascript.md +53 -0
  7. package/docs/Styling with SCSS.md +114 -0
  8. package/package.json +3 -15
  9. package/src/backend/_core/vendor/composer/autoload_static.php +10 -10
  10. package/src/backend/_core/vendor/composer/installed.json +6 -6
  11. package/src/backend/_core/vendor/composer/installed.php +2 -2
  12. package/src/backend/_core/vendor/graham-campbell/result-type/LICENSE +21 -21
  13. package/src/backend/_core/vendor/graham-campbell/result-type/composer.json +33 -33
  14. package/src/backend/_core/vendor/graham-campbell/result-type/src/Error.php +121 -121
  15. package/src/backend/_core/vendor/graham-campbell/result-type/src/Result.php +69 -69
  16. package/src/backend/_core/vendor/graham-campbell/result-type/src/Success.php +120 -120
  17. package/src/backend/_core/vendor/phpoption/phpoption/LICENSE +200 -200
  18. package/src/backend/_core/vendor/phpoption/phpoption/composer.json +50 -50
  19. package/src/backend/_core/vendor/phpoption/phpoption/src/PhpOption/LazyOption.php +175 -175
  20. package/src/backend/_core/vendor/phpoption/phpoption/src/PhpOption/None.php +136 -136
  21. package/src/backend/_core/vendor/phpoption/phpoption/src/PhpOption/Option.php +434 -434
  22. package/src/backend/_core/vendor/phpoption/phpoption/src/PhpOption/Some.php +169 -169
  23. package/src/backend/_core/vendor/symfony/polyfill-ctype/Ctype.php +232 -232
  24. package/src/backend/_core/vendor/symfony/polyfill-ctype/LICENSE +19 -19
  25. package/src/backend/_core/vendor/symfony/polyfill-ctype/README.md +12 -12
  26. package/src/backend/_core/vendor/symfony/polyfill-ctype/bootstrap.php +50 -50
  27. package/src/backend/_core/vendor/symfony/polyfill-ctype/bootstrap80.php +46 -46
  28. package/src/backend/_core/vendor/symfony/polyfill-ctype/composer.json +38 -38
  29. package/src/backend/_core/vendor/symfony/polyfill-mbstring/LICENSE +19 -19
  30. package/src/backend/_core/vendor/symfony/polyfill-mbstring/Mbstring.php +1077 -1077
  31. package/src/backend/_core/vendor/symfony/polyfill-mbstring/README.md +13 -13
  32. package/src/backend/_core/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php +119 -119
  33. package/src/backend/_core/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +1397 -1397
  34. package/src/backend/_core/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +5 -5
  35. package/src/backend/_core/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php +1489 -1489
  36. package/src/backend/_core/vendor/symfony/polyfill-mbstring/bootstrap.php +171 -171
  37. package/src/backend/_core/vendor/symfony/polyfill-mbstring/bootstrap80.php +167 -167
  38. package/src/backend/_core/vendor/symfony/polyfill-mbstring/composer.json +39 -39
  39. package/src/backend/_core/vendor/symfony/polyfill-php80/LICENSE +19 -19
  40. package/src/backend/_core/vendor/symfony/polyfill-php80/Php80.php +115 -115
  41. package/src/backend/_core/vendor/symfony/polyfill-php80/PhpToken.php +106 -106
  42. package/src/backend/_core/vendor/symfony/polyfill-php80/README.md +25 -25
  43. package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php +31 -31
  44. package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php +16 -16
  45. package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php +20 -20
  46. package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php +16 -16
  47. package/src/backend/_core/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php +16 -16
  48. package/src/backend/_core/vendor/symfony/polyfill-php80/bootstrap.php +42 -42
  49. package/src/backend/_core/vendor/symfony/polyfill-php80/composer.json +37 -37
  50. package/src/backend/_core/vendor/vlucas/phpdotenv/LICENSE +30 -30
  51. package/src/backend/_core/vendor/vlucas/phpdotenv/composer.json +60 -60
  52. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Dotenv.php +267 -267
  53. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/ExceptionInterface.php +12 -12
  54. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/InvalidEncodingException.php +12 -12
  55. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php +12 -12
  56. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php +12 -12
  57. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Exception/ValidationException.php +12 -12
  58. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Loader/Loader.php +48 -48
  59. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Loader/LoaderInterface.php +20 -20
  60. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Loader/Resolver.php +65 -65
  61. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Entry.php +59 -59
  62. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/EntryParser.php +299 -299
  63. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Lexer.php +58 -58
  64. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Lines.php +127 -127
  65. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Parser.php +53 -53
  66. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/ParserInterface.php +19 -19
  67. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Parser/Value.php +88 -88
  68. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php +15 -15
  69. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ApacheAdapter.php +89 -89
  70. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php +80 -80
  71. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php +88 -88
  72. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/GuardedWriter.php +85 -85
  73. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ImmutableWriter.php +110 -110
  74. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiReader.php +48 -48
  75. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiWriter.php +64 -64
  76. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/PutenvAdapter.php +91 -91
  77. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReaderInterface.php +17 -17
  78. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ReplacingWriter.php +104 -104
  79. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/ServerConstAdapter.php +88 -88
  80. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/Adapter/WriterInterface.php +27 -27
  81. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php +107 -107
  82. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/RepositoryBuilder.php +272 -272
  83. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Repository/RepositoryInterface.php +51 -51
  84. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/File/Paths.php +44 -44
  85. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/File/Reader.php +81 -81
  86. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/FileStore.php +72 -72
  87. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/StoreBuilder.php +141 -141
  88. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/StoreInterface.php +17 -17
  89. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Store/StringStore.php +37 -37
  90. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Util/Regex.php +112 -112
  91. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Util/Str.php +108 -108
  92. package/src/backend/_core/vendor/vlucas/phpdotenv/src/Validator.php +207 -207
  93. package/src/frontend/data/site.json +43 -43
  94. package/src/frontend/scss/modules/_root.scss +2 -4
  95. package/src/frontend/scss/modules/frameworks/_bootstrap.scss +0 -1
  96. package/src/frontend/scss/modules/frameworks/_bulma.scss +0 -1
  97. package/src/frontend/scss/modules/frameworks/_foundation.scss +0 -1
  98. package/src/frontend/scss/modules/frameworks/_uikit.scss +0 -1
  99. package/src/backend/_core/vendor/graham-campbell/result-type/.gitattributes +0 -9
  100. package/src/backend/_core/vendor/graham-campbell/result-type/.github/CODE_OF_CONDUCT.md +0 -132
  101. package/src/backend/_core/vendor/graham-campbell/result-type/.github/CONTRIBUTING.md +0 -31
  102. package/src/backend/_core/vendor/graham-campbell/result-type/.github/FUNDING.yml +0 -2
  103. package/src/backend/_core/vendor/graham-campbell/result-type/.github/SECURITY.md +0 -14
  104. package/src/backend/_core/vendor/graham-campbell/result-type/.github/workflows/stale.yml +0 -11
  105. package/src/backend/_core/vendor/graham-campbell/result-type/.github/workflows/tests.yml +0 -40
  106. package/src/backend/_core/vendor/graham-campbell/result-type/CHANGELOG.md +0 -53
  107. package/src/backend/_core/vendor/graham-campbell/result-type/README.md +0 -42
  108. package/src/backend/_core/vendor/graham-campbell/result-type/phpunit.xml.dist +0 -13
  109. package/src/backend/_core/vendor/graham-campbell/result-type/tests/ResultTest.php +0 -95
  110. package/src/backend/_core/vendor/phpoption/phpoption/.gitattributes +0 -13
  111. package/src/backend/_core/vendor/phpoption/phpoption/.github/CODE_OF_CONDUCT.md +0 -132
  112. package/src/backend/_core/vendor/phpoption/phpoption/.github/CONTRIBUTING.md +0 -30
  113. package/src/backend/_core/vendor/phpoption/phpoption/.github/FUNDING.yml +0 -2
  114. package/src/backend/_core/vendor/phpoption/phpoption/.github/SECURITY.md +0 -14
  115. package/src/backend/_core/vendor/phpoption/phpoption/.github/workflows/static.yml +0 -40
  116. package/src/backend/_core/vendor/phpoption/phpoption/.github/workflows/tests.yml +0 -40
  117. package/src/backend/_core/vendor/phpoption/phpoption/Makefile +0 -17
  118. package/src/backend/_core/vendor/phpoption/phpoption/README.md +0 -201
  119. package/src/backend/_core/vendor/phpoption/phpoption/phpstan-baseline.neon +0 -44
  120. package/src/backend/_core/vendor/phpoption/phpoption/phpstan.neon.dist +0 -7
  121. package/src/backend/_core/vendor/phpoption/phpoption/phpunit.xml.dist +0 -13
  122. package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/EnsureTest.php +0 -72
  123. package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/LazyOptionTest.php +0 -357
  124. package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/NoneTest.php +0 -153
  125. package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/OptionTest.php +0 -166
  126. package/src/backend/_core/vendor/phpoption/phpoption/tests/PhpOption/Tests/SomeTest.php +0 -194
  127. package/src/backend/_core/vendor/phpoption/phpoption/tests/bootstrap.php +0 -8
  128. package/src/backend/_core/vendor/phpoption/phpoption/vendor-bin/phpstan/composer.json +0 -8
  129. package/src/backend/_core/vendor/vlucas/phpdotenv/.editorconfig +0 -15
  130. package/src/backend/_core/vendor/vlucas/phpdotenv/.gitattributes +0 -15
  131. package/src/backend/_core/vendor/vlucas/phpdotenv/.github/CODE_OF_CONDUCT.md +0 -132
  132. package/src/backend/_core/vendor/vlucas/phpdotenv/.github/CONTRIBUTING.md +0 -30
  133. package/src/backend/_core/vendor/vlucas/phpdotenv/.github/FUNDING.yml +0 -2
  134. package/src/backend/_core/vendor/vlucas/phpdotenv/.github/SECURITY.md +0 -14
  135. package/src/backend/_core/vendor/vlucas/phpdotenv/.github/workflows/static.yml +0 -40
  136. package/src/backend/_core/vendor/vlucas/phpdotenv/.github/workflows/tests.yml +0 -70
  137. package/src/backend/_core/vendor/vlucas/phpdotenv/Makefile +0 -17
  138. package/src/backend/_core/vendor/vlucas/phpdotenv/README.md +0 -370
  139. package/src/backend/_core/vendor/vlucas/phpdotenv/UPGRADING.md +0 -196
  140. package/src/backend/_core/vendor/vlucas/phpdotenv/phpstan-baseline.neon +0 -157
  141. package/src/backend/_core/vendor/vlucas/phpdotenv/phpstan.neon.dist +0 -7
  142. package/src/backend/_core/vendor/vlucas/phpdotenv/phpunit.xml.dist +0 -13
  143. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/DotenvTest.php +0 -387
  144. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Loader/LoaderTest.php +0 -86
  145. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/EntryParserTest.php +0 -234
  146. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/LexerTest.php +0 -40
  147. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/LinesTest.php +0 -53
  148. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Parser/ParserTest.php +0 -98
  149. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/ArrayAdapterTest.php +0 -57
  150. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/EnvConstAdapterTest.php +0 -75
  151. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/PutenvAdapterTest.php +0 -52
  152. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/Adapter/ServerConstAdapterTest.php +0 -75
  153. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Repository/RepositoryTest.php +0 -305
  154. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/Store/StoreTest.php +0 -141
  155. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/Dotenv/ValidatorTest.php +0 -479
  156. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/.env +0 -5
  157. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/assertions.env +0 -18
  158. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/booleans.env +0 -33
  159. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/commented.env +0 -15
  160. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/empty.env +0 -1
  161. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/example.env +0 -1
  162. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/exported.env +0 -7
  163. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/immutable.env +0 -1
  164. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/integers.env +0 -17
  165. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/large.env +0 -2
  166. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/multibyte.env +0 -3
  167. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/multiline.env +0 -14
  168. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/multiple.env +0 -4
  169. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/mutable.env +0 -1
  170. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/nested.env +0 -15
  171. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/quoted.env +0 -11
  172. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/specialchars.env +0 -8
  173. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/unicodevarnames.env +0 -2
  174. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/utf8-with-bom-encoding.env +0 -3
  175. package/src/backend/_core/vendor/vlucas/phpdotenv/tests/fixtures/env/windows.env +0 -1
  176. package/src/backend/_core/vendor/vlucas/phpdotenv/vendor-bin/phpstan/composer.json +0 -15
package/bin/create.js CHANGED
@@ -8,6 +8,7 @@ const templateDir = path.join(__dirname, '..');
8
8
 
9
9
  const COPY_TARGETS = [
10
10
  'src',
11
+ "docs",
11
12
  '_tools',
12
13
  '.eleventy.js',
13
14
  '.eleventyignore',
@@ -0,0 +1,36 @@
1
+ # To be finished...
2
+
3
+ # Assistant CLI
4
+
5
+ `assistant.js` is a CLI tool to manage pages and project configuration without editing files manually.
6
+
7
+ ## Run
8
+ ```bash
9
+ node assistant.js
10
+ ```
11
+
12
+ ## Options
13
+
14
+ ### 1. Create a page
15
+ Enter a page name in kebab-case (e.g. `contact-us`). The CLI generates:
16
+
17
+ | File | Purpose |
18
+ |---|---|
19
+ | `src/pages/contact-us.njk` | Page template |
20
+ | `src/scss/pages/contactUs.scss` | Page styles |
21
+ | `src/js/pages/contactUs.js` | Page scripts |
22
+
23
+ It also registers the page automatically in:
24
+ - `src/layouts/includes.njk` — adds an `elif` block for component routing
25
+ - `src/data/site.json` — adds an SEO entry under `pages`
26
+
27
+ > Protected pages (`homepage`, `404`) cannot be created or removed.
28
+
29
+ ### 2. Remove a page
30
+ Enter the page name to delete all related files and clean up registrations.
31
+
32
+ ### 3. Configure output path
33
+ Change the build output directory. Updates both `.eleventy.js` and `package.json` automatically.
34
+
35
+ ## Naming conventions
36
+ Page names are always kebab-case for URLs and file names (`contact-us`), and camelCase for SCSS and JS (`contactUs`). The CLI handles the conversion automatically.
@@ -0,0 +1,63 @@
1
+ # To be finished...
2
+
3
+ # Components
4
+
5
+ ## Create a component
6
+
7
+ Add a Nunjucks file in `src/components/`:
8
+
9
+ ```
10
+ src/components/myComponent.njk
11
+ ```
12
+
13
+ ## Subfolders
14
+
15
+ Components can be organized into subfolders freely. Some examples:
16
+
17
+ ```
18
+ src/components/
19
+ ├── global/ # Header, footer — included in every page
20
+ ├── pages/ # Page-specific components
21
+ │ ├── homepage.njk
22
+ │ └── contactUs.njk
23
+ └── modals/ # Shared modals (privacy, cookies, etc.)
24
+ └── privacyModal.njk
25
+ ```
26
+
27
+ The include path must reflect the subfolder:
28
+
29
+ ```njk
30
+ {% include "pages/homepage.njk" %}
31
+ {% include "modals/privacyModal.njk" %}
32
+ ```
33
+
34
+ ## Register it for a page
35
+
36
+ In `src/layouts/includes.njk`, find the `elif` block for your page and include the component:
37
+
38
+ ```njk
39
+ {% elif title == "myPage" %}
40
+ {% include "myComponent.njk" %}
41
+ ```
42
+
43
+ Multiple components can be included in the same block:
44
+
45
+ ```njk
46
+ {% elif title == "myPage" %}
47
+ {% include "hero.njk" %}
48
+ {% include "features.njk" %}
49
+ ```
50
+
51
+ ## Global components
52
+
53
+ Header and footer live in `src/components/global/` and are automatically included in every page via `base.njk`. Edit them to change the site-wide layout.
54
+
55
+ ## Site data in components
56
+
57
+ All values from `src/data/site.json` are available as `{{ site.* }}`:
58
+
59
+ ```njk
60
+ <p>{{ site.title }}</p>
61
+ <a href="{{ site.legal.privacy }}">Privacy Policy</a>
62
+ <img src="{{ site.logo }}" alt="{{ site.title }}">
63
+ ```
@@ -0,0 +1,46 @@
1
+ # To be finished...
2
+
3
+ # Creating Pages
4
+
5
+ The recommended way is via the [Assistant CLI](assistant-cli.md).
6
+
7
+ ## What gets created
8
+
9
+ For a page named `my-page`:
10
+
11
+ | File | Purpose |
12
+ |---|---|
13
+ | `src/pages/my-page.njk` | Template with front matter |
14
+ | `src/scss/pages/myPage.scss` | Imports framework + modules |
15
+ | `src/js/pages/myPage.js` | Imports JS modules |
16
+
17
+ ## Adding content
18
+
19
+ 1. Create a component in `src/components/` (e.g. `_myPage.njk`)
20
+ 2. Include it in `src/layouts/includes.njk` inside the generated `elif` block:
21
+
22
+ ```njk
23
+ {% elif title == "myPage" %}
24
+ {% include "_myPage.njk" %}
25
+ ```
26
+
27
+ See [components.md](components.md) for details.
28
+
29
+ ## URL and title
30
+
31
+ The URL is the kebab-case name (`/my-page/`). The `title` in the front matter is camelCase (`myPage`) and is used internally to load the correct CSS and JS files — do not change it.
32
+
33
+ ## SEO
34
+
35
+ The CLI creates a stub entry in `src/data/site.json`. Fill it in:
36
+
37
+ ```json
38
+ "myPage": {
39
+ "seo": {
40
+ "title": "My Page | Site Name",
41
+ "description": "Page description"
42
+ }
43
+ }
44
+ ```
45
+
46
+ See [head-and-seo.md](head-and-seo.md) for all available options.
@@ -0,0 +1,44 @@
1
+ # Head & SEO
2
+
3
+
4
+ `src/frontend/data/site.json` holds global settings used across all pages in `base.njk` and other components:
5
+
6
+ ### site.json
7
+ ```json
8
+ "site_name": "Site name",
9
+ "title": "Site title",
10
+ "description": "Site description",
11
+ "keywords": "keyword1, keyword2, keyword3",
12
+ "domain": "yoursite.com",
13
+ "url": "https://yoursite.com",
14
+ "lang": "en",
15
+ "author": "Name and surname",
16
+ "data_bs_theme": "dark",
17
+ "favicon": "/assets/brand/favicon.svg",
18
+ "logo": "/assets/brand/logo.svg",
19
+ ...
20
+ ```
21
+
22
+ ## Per-page SEO and CDN
23
+
24
+ Each page entry is keyed by its camelCase `title` from the front matter:
25
+
26
+ If you don't want to use a particular cdn inserting it in `base.njk` for all pages, you can add extra specific cdn (css, js) by inserting the link in each page of site.json separating them with a `,` and setting them in ""
27
+
28
+ ### site.json
29
+ ```json
30
+ "pages": {
31
+ ...
32
+ "examplePage": {
33
+ "seo": {
34
+ "title": "Example Page",
35
+ "description": "description"
36
+ },
37
+ "cdn": {
38
+ "css": [],
39
+ "js": []
40
+ }
41
+ }
42
+ ...
43
+ }
44
+ ```
@@ -0,0 +1,53 @@
1
+ # To be finished...
2
+
3
+ # JavaScript
4
+
5
+ ## Page files
6
+
7
+ Each page has a JS entry point in `src/js/pages/`. It is bundled by esbuild and loaded automatically by `base.njk`. Import only what the page needs.
8
+
9
+ ## Module categories
10
+
11
+ **Call inside `DOMContentLoaded`** — these interact with the DOM and require the page to be fully loaded:
12
+
13
+ | Module | Function |
14
+ |---|---|
15
+ | `modules/langSwitcher.js` | `initLangSwitcher()` |
16
+ | `modules/forms/form.js` | `initFormListener()` |
17
+ | `modules/forms/textAreaAutoExpand.js` | `initTextAreaAutoExpand()` |
18
+ | `modules/forms/normalizePhoneNumber.js` | `initNormalizePhoneNumber()` |
19
+
20
+ **Call anywhere** — these create DOM elements dynamically and can be called at any point after the script loads:
21
+
22
+ | Module | Function |
23
+ |---|---|
24
+ | `modules/notification.js` | `showNotification(text, type, duration)` |
25
+
26
+ ## Usage example
27
+
28
+ ```js
29
+ import { initLangSwitcher } from '../modules/langSwitcher.js';
30
+ import { showNotification } from '../modules/notification.js';
31
+
32
+ document.addEventListener("DOMContentLoaded", () => {
33
+ initLangSwitcher();
34
+ });
35
+
36
+ showNotification("Page loaded", "success", 3000);
37
+ ```
38
+
39
+ ## `showNotification` reference
40
+
41
+ | Parameter | Type | Default | Values |
42
+ |---|---|---|---|
43
+ | `text` | string | — | Any string |
44
+ | `type` | string | `"info"` | `"success"`, `"info"`, `"error"` |
45
+ | `duration` | number | `5000` | ms, or `-1` for persistent with spinner |
46
+
47
+ ## Adding a module
48
+
49
+ Create a file in `src/js/modules/`, export your function, and import it in the pages that need it. Use ESM syntax (`import` / `export`) — this code is processed by esbuild.
50
+
51
+ ## `assistant_utils/`
52
+
53
+ These scripts run directly in Node.js without a bundler. Use CommonJS syntax (`require` / `module.exports`) here, not ESM.
@@ -0,0 +1,114 @@
1
+ # Styling with SCSS
2
+
3
+ ## Page CSS
4
+
5
+ Each page has its own SCSS entry point in `src/frontend/scss/pages/`
6
+
7
+ It must contain `_root.scss` + other modules like `_global.scss` or any other one that you need and its own specific css rules
8
+
9
+ `_root.scss` uses `@use` to enable namespaced access (`root.$var`); other modules use `@import` as they don't expose variables.
10
+ ### examplePage.scss <small>(`src/frontend/scss/pages/`)</small>
11
+ ```scss
12
+ //==========================
13
+ // CSS MODULES IMPORTS
14
+ //==========================
15
+
16
+ @use "../modules/root" as root;
17
+
18
+ @import "../modules/global";
19
+
20
+ @import "../modules/notification";
21
+
22
+ //==========================
23
+ // PAGE CUSTOM CSS RULES
24
+ //==========================
25
+
26
+ body {
27
+ background-color: root.$primary;
28
+ }
29
+ ```
30
+
31
+ ## CSS Framework
32
+
33
+ Some of the most popular css frameworks that supports scss with modules are already installed in `node_modules`
34
+
35
+ You can choose one or none of them (more than 1 works, but you may get in various conflicts)
36
+
37
+ To enable/disable them you have to modify 3 files around the project by just commenting them
38
+
39
+
40
+ ### 1. _global.scss <small>(`src/frontend/scss/modules/`)</small>
41
+ ```scss
42
+ @import "../modules/frameworks/bootstrap";
43
+ // @import "../modules/frameworks/bulma";
44
+ // @import "../modules/frameworks/foundation";
45
+ // @import "../modules/frameworks/uikit";
46
+ ```
47
+
48
+ ### 2. base.njk <small>(`src/frontend/components/layouts/`)</small>
49
+
50
+ ```html
51
+ {# Bootstrap JS #}
52
+ <script src="/js/bootstrap.bundle.min.js" defer></script>
53
+
54
+ {# Foundation JS #}
55
+ {# <script src="/js/foundation.min.js" defer></script> #}
56
+
57
+ {# UIkit JS #}
58
+ {# <script src="/js/uikit.min.js" defer></script> #}
59
+ {# <script src="/js/uikit-icons.min.js" defer></script> #}
60
+
61
+ {# Bulma — no JS needed #}
62
+ ```
63
+
64
+ ### 3. `.eleventy.js`
65
+
66
+ ```javascript
67
+ eleventyConfig.addPassthroughCopy({
68
+ // Bootstrap
69
+ "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js": "js/bootstrap.bundle.min.js",
70
+ "node_modules/bootstrap-icons/font/fonts": "css/fonts",
71
+
72
+ // Foundation
73
+ // "node_modules/foundation-sites/dist/js/foundation.min.js": "js/foundation.min.js",
74
+
75
+ // UIkit
76
+ // "node_modules/uikit/dist/js/uikit.min.js": "js/uikit.min.js",
77
+ // "node_modules/uikit/dist/js/uikit-icons.min.js": "js/uikit-icons.min.js",
78
+
79
+ // Bulma — CSS only, no JS passthrough needed
80
+ });
81
+ ```
82
+
83
+ ### Reducing bundle size
84
+ To reduce the bundle size, open the corresponding framework file (`src/frontend/scss/modules/frameworks/`) and comment out any modules you don't need
85
+ ```scss
86
+ @import "../../../../../node_modules/bootstrap/scss/card"; // Cards
87
+ @import "../../../../../node_modules/bootstrap/scss/carousel"; // Carousel
88
+ ```
89
+
90
+ ## Global Variables
91
+
92
+ Instead of using `:root` in your custom modules or pages, the best thing to do is to centralize all your variables in a single file (that will be tree-shaken automatically by Sass)
93
+
94
+ ### _root.scss <small>(`src/frontend/scss/modules/`)</small>
95
+ ```scss
96
+ $header-height: 10vh;
97
+
98
+ // Usage example (in any other file):
99
+ header {
100
+ height: root.$header-height;
101
+ }
102
+ ```
103
+
104
+ ## Pre-existing modules
105
+
106
+ | File | Purpose |
107
+ |---|---|
108
+ | `_root.scss` | Global variables (colors, spacing) |
109
+ | `_global.scss` | Site-wide base rules and frameworks |
110
+ | `_animations.scss` | Keyframe animations (`fade-in`, `spin`) |
111
+ | `_header.scss` | Header styles |
112
+ | `_footer.scss` | Footer styles |
113
+ | `_notification.scss` | Notification component style |
114
+ | `_mobile.scss` | Media query rules |
package/package.json CHANGED
@@ -1,21 +1,8 @@
1
1
  {
2
2
  "name": "create-berna-stencil",
3
- "version": "1.0.47",
3
+ "version": "1.0.48",
4
4
  "description": "Eleventy boilerplate with per-page SCSS/JS pipeline, esbuild bundling, multi-framework CSS support and a built-in page management CLI",
5
- "keywords": [
6
- "eleventy",
7
- "11ty",
8
- "boilerplate",
9
- "starter",
10
- "scss",
11
- "esbuild",
12
- "bootstrap",
13
- "bulma",
14
- "foundation",
15
- "uikit",
16
- "static-site",
17
- "nunjucks"
18
- ],
5
+ "keywords": [],
19
6
  "author": "Michele Garofalo",
20
7
  "license": "MIT",
21
8
  "repository": {
@@ -31,6 +18,7 @@
31
18
  },
32
19
  "files": [
33
20
  "bin/",
21
+ "docs/",
34
22
  "src/",
35
23
  "src/_routes",
36
24
  "src/assets/files",
@@ -13,48 +13,48 @@ class ComposerStaticInit108be68e4e2b97fed51d36a10eed0849
13
13
  );
14
14
 
15
15
  public static $prefixLengthsPsr4 = array (
16
- 'S' =>
16
+ 'S' =>
17
17
  array (
18
18
  'Symfony\\Polyfill\\Php80\\' => 23,
19
19
  'Symfony\\Polyfill\\Mbstring\\' => 26,
20
20
  'Symfony\\Polyfill\\Ctype\\' => 23,
21
21
  ),
22
- 'P' =>
22
+ 'P' =>
23
23
  array (
24
24
  'PhpOption\\' => 10,
25
25
  ),
26
- 'G' =>
26
+ 'G' =>
27
27
  array (
28
28
  'GrahamCampbell\\ResultType\\' => 26,
29
29
  ),
30
- 'D' =>
30
+ 'D' =>
31
31
  array (
32
32
  'Dotenv\\' => 7,
33
33
  ),
34
34
  );
35
35
 
36
36
  public static $prefixDirsPsr4 = array (
37
- 'Symfony\\Polyfill\\Php80\\' =>
37
+ 'Symfony\\Polyfill\\Php80\\' =>
38
38
  array (
39
39
  0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
40
40
  ),
41
- 'Symfony\\Polyfill\\Mbstring\\' =>
41
+ 'Symfony\\Polyfill\\Mbstring\\' =>
42
42
  array (
43
43
  0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
44
44
  ),
45
- 'Symfony\\Polyfill\\Ctype\\' =>
45
+ 'Symfony\\Polyfill\\Ctype\\' =>
46
46
  array (
47
47
  0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
48
48
  ),
49
- 'PhpOption\\' =>
49
+ 'PhpOption\\' =>
50
50
  array (
51
51
  0 => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption',
52
52
  ),
53
- 'GrahamCampbell\\ResultType\\' =>
53
+ 'GrahamCampbell\\ResultType\\' =>
54
54
  array (
55
55
  0 => __DIR__ . '/..' . '/graham-campbell/result-type/src',
56
56
  ),
57
- 'Dotenv\\' =>
57
+ 'Dotenv\\' =>
58
58
  array (
59
59
  0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src',
60
60
  ),
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "time": "2025-12-27T19:43:20+00:00",
26
26
  "type": "library",
27
- "installation-source": "source",
27
+ "installation-source": "dist",
28
28
  "autoload": {
29
29
  "psr-4": {
30
30
  "GrahamCampbell\\ResultType\\": "src/"
@@ -98,7 +98,7 @@
98
98
  "dev-master": "1.9-dev"
99
99
  }
100
100
  },
101
- "installation-source": "source",
101
+ "installation-source": "dist",
102
102
  "autoload": {
103
103
  "psr-4": {
104
104
  "PhpOption\\": "src/PhpOption/"
@@ -175,7 +175,7 @@
175
175
  "name": "symfony/polyfill"
176
176
  }
177
177
  },
178
- "installation-source": "source",
178
+ "installation-source": "dist",
179
179
  "autoload": {
180
180
  "files": [
181
181
  "bootstrap.php"
@@ -262,7 +262,7 @@
262
262
  "name": "symfony/polyfill"
263
263
  }
264
264
  },
265
- "installation-source": "source",
265
+ "installation-source": "dist",
266
266
  "autoload": {
267
267
  "files": [
268
268
  "bootstrap.php"
@@ -343,7 +343,7 @@
343
343
  "name": "symfony/polyfill"
344
344
  }
345
345
  },
346
- "installation-source": "source",
346
+ "installation-source": "dist",
347
347
  "autoload": {
348
348
  "files": [
349
349
  "bootstrap.php"
@@ -447,7 +447,7 @@
447
447
  "dev-master": "5.6-dev"
448
448
  }
449
449
  },
450
- "installation-source": "source",
450
+ "installation-source": "dist",
451
451
  "autoload": {
452
452
  "psr-4": {
453
453
  "Dotenv\\": "src/"
@@ -3,7 +3,7 @@
3
3
  'name' => '__root__',
4
4
  'pretty_version' => 'dev-main',
5
5
  'version' => 'dev-main',
6
- 'reference' => '4da27b8f50bb1a801f88ad46a9e9eafa51c1bb34',
6
+ 'reference' => 'abd41735fb0323798fbaca8b317b15190d4c5da6',
7
7
  'type' => 'library',
8
8
  'install_path' => __DIR__ . '/../../',
9
9
  'aliases' => array(),
@@ -13,7 +13,7 @@
13
13
  '__root__' => array(
14
14
  'pretty_version' => 'dev-main',
15
15
  'version' => 'dev-main',
16
- 'reference' => '4da27b8f50bb1a801f88ad46a9e9eafa51c1bb34',
16
+ 'reference' => 'abd41735fb0323798fbaca8b317b15190d4c5da6',
17
17
  'type' => 'library',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2020-2024 Graham Campbell <hello@gjcampbell.co.uk>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-2024 Graham Campbell <hello@gjcampbell.co.uk>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1,33 +1,33 @@
1
- {
2
- "name": "graham-campbell/result-type",
3
- "description": "An Implementation Of The Result Type",
4
- "keywords": ["result", "result-type", "Result", "Result Type", "Result-Type", "Graham Campbell", "GrahamCampbell"],
5
- "license": "MIT",
6
- "authors": [
7
- {
8
- "name": "Graham Campbell",
9
- "email": "hello@gjcampbell.co.uk",
10
- "homepage": "https://github.com/GrahamCampbell"
11
- }
12
- ],
13
- "require": {
14
- "php": "^7.2.5 || ^8.0",
15
- "phpoption/phpoption": "^1.9.5"
16
- },
17
- "require-dev": {
18
- "phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7"
19
- },
20
- "autoload": {
21
- "psr-4": {
22
- "GrahamCampbell\\ResultType\\": "src/"
23
- }
24
- },
25
- "autoload-dev": {
26
- "psr-4": {
27
- "GrahamCampbell\\Tests\\ResultType\\": "tests/"
28
- }
29
- },
30
- "config": {
31
- "preferred-install": "dist"
32
- }
33
- }
1
+ {
2
+ "name": "graham-campbell/result-type",
3
+ "description": "An Implementation Of The Result Type",
4
+ "keywords": ["result", "result-type", "Result", "Result Type", "Result-Type", "Graham Campbell", "GrahamCampbell"],
5
+ "license": "MIT",
6
+ "authors": [
7
+ {
8
+ "name": "Graham Campbell",
9
+ "email": "hello@gjcampbell.co.uk",
10
+ "homepage": "https://github.com/GrahamCampbell"
11
+ }
12
+ ],
13
+ "require": {
14
+ "php": "^7.2.5 || ^8.0",
15
+ "phpoption/phpoption": "^1.9.5"
16
+ },
17
+ "require-dev": {
18
+ "phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7"
19
+ },
20
+ "autoload": {
21
+ "psr-4": {
22
+ "GrahamCampbell\\ResultType\\": "src/"
23
+ }
24
+ },
25
+ "autoload-dev": {
26
+ "psr-4": {
27
+ "GrahamCampbell\\Tests\\ResultType\\": "tests/"
28
+ }
29
+ },
30
+ "config": {
31
+ "preferred-install": "dist"
32
+ }
33
+ }