@caweb/template 1.0.9 → 1.0.11
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/README.md +39 -5
- package/components/alert/alert.html +2 -4
- package/package.json +28 -11
- package/patterns/{index.html → default.html} +3 -3
- package/semantics/utility-header.html +2 -2
- package/.distignore +0 -21
- package/.github/workflows/publish.yml +0 -22
- package/CHANGELOG.md +0 -33
package/README.md
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CAWebPublishing Template
|
|
2
|
+
This is the CAWebPublishing Template built with [handlebars](https://handlebarsjs.com/) and used by the CAWebPublishing Servce for static site generation.
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
## Using npm to test the website locally
|
|
5
|
+
|
|
6
|
+
``` npm run install ```
|
|
7
|
+
This command will install all the necessary npm packages to test your markup.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
``` npm run serve ```
|
|
12
|
+
This command will run the website in your [http://localhost:9000](http://localhost:9000) and watch for any changes made.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
``` npm run serve:audit ```
|
|
17
|
+
This command does the same as `npm run serve` and will also generate a WordPress CSS Audit, IBM Accessibility Checker Report, and a JSHint Report page as well.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Changing colorscheme
|
|
22
|
+
Since this template utilizes the [@caweb/framework](https://github.com/CAWebPublishing/framework) and [@caweb/icon-library](https://github.com/CAWebPublishing/icon-library) you can change the scheme by running
|
|
23
|
+
|
|
24
|
+
` npm run serve:scheme:<color> ` - where \<color\> is one of the following:
|
|
25
|
+
- none - *Note: this will disable the [@caweb/framework](https://github.com/CAWebPublishing/framework) and [@caweb/icon-library](https://github.com/CAWebPublishing/icon-library), only do this if providing your own frontend UI
|
|
26
|
+
- delta
|
|
27
|
+
- eureka
|
|
28
|
+
- mono
|
|
29
|
+
- oceanside
|
|
30
|
+
- orangecounty
|
|
31
|
+
- pasorobles
|
|
32
|
+
- sacramento
|
|
33
|
+
- santabarbara
|
|
34
|
+
- santacruz
|
|
35
|
+
- shasta
|
|
36
|
+
- sierra
|
|
37
|
+
- trinity
|
|
38
|
+
|
|
39
|
+
## Output
|
|
40
|
+
All the web content is generated to the `/build/` folder.
|
|
@@ -9,18 +9,16 @@
|
|
|
9
9
|
<div class="alert alert-primary alert-dismissible">
|
|
10
10
|
<div class="container">
|
|
11
11
|
{{#if this.header }}
|
|
12
|
-
<
|
|
12
|
+
<span class="alert-level" >
|
|
13
13
|
{{#if this.icon }}
|
|
14
14
|
<span class="ca-gov-icon-{{ this.icon }}"></span>
|
|
15
15
|
{{/if}}
|
|
16
16
|
{{ this.header }}
|
|
17
|
-
</
|
|
17
|
+
</span>
|
|
18
18
|
{{/if}}
|
|
19
19
|
|
|
20
20
|
{{#if this.msg }}
|
|
21
|
-
<div>
|
|
22
21
|
{{ this.msg }}
|
|
23
|
-
</div>
|
|
24
22
|
{{/if}}
|
|
25
23
|
{{#if this.url }}
|
|
26
24
|
<a href="{{ this.url }}" target="_blank" class="alert-link btn btn-outline-dark btn-sm">{{ this.text }}</a>
|
package/package.json
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caweb/template",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"author": "CAWebPublishing",
|
|
5
5
|
"description": "CAWebPublishing Template",
|
|
6
6
|
"license": "ISC",
|
|
7
|
-
"main": "src/index.html",
|
|
8
7
|
"homepage": "https://github.com/CAWebPublishing/template#readme",
|
|
9
8
|
"repository": {
|
|
10
9
|
"type": "git",
|
|
11
10
|
"url": "git+https://github.com/CAWebPublishing/template.git"
|
|
12
11
|
},
|
|
12
|
+
"files": [
|
|
13
|
+
"components",
|
|
14
|
+
"content",
|
|
15
|
+
"forms",
|
|
16
|
+
"media",
|
|
17
|
+
"patterns",
|
|
18
|
+
"semantics"
|
|
19
|
+
],
|
|
13
20
|
"keywords": [
|
|
14
21
|
"caweb",
|
|
15
22
|
"cagov",
|
|
@@ -24,16 +31,26 @@
|
|
|
24
31
|
"scripts": {
|
|
25
32
|
"webpack": "webpack",
|
|
26
33
|
"test": "echo \"Error: run tests from root\" && exit 0",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"serve:
|
|
30
|
-
"serve": "set NODE_OPTIONS='--template ./patterns/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
34
|
+
"serve": "webpack serve --config ./node_modules/@caweb/webpack/webpack.config.js ./node_modules/@caweb/webpack/tests/webpack.tests.js --merge",
|
|
35
|
+
"serve:blank": "set NODE_OPTIONS='--template ./patterns/blank.html --search-template ./patterns/search.html' && npm run serve",
|
|
36
|
+
"serve:delta": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme delta' && npm run serve",
|
|
37
|
+
"serve:eureka": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme eureka' && npm run serve",
|
|
38
|
+
"serve:mono": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme mono' && npm run serve",
|
|
39
|
+
"serve:oceanside": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme oceanside' && npm run serve",
|
|
40
|
+
"serve:orangecounty": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme orangecounty' && npm run serve",
|
|
41
|
+
"serve:pasorobles": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme pasorobles' && npm run serve",
|
|
42
|
+
"serve:sacramento": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme sacramento' && npm run serve",
|
|
43
|
+
"serve:santabarbara": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme santabarbara' && npm run serve",
|
|
44
|
+
"serve:santacruz": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme santacruz' && npm run serve",
|
|
45
|
+
"serve:shasta": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme shasta' && npm run serve",
|
|
46
|
+
"serve:sierra": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme sierra' && npm run serve",
|
|
47
|
+
"serve:trinity": "set NODE_OPTIONS='--template ./patterns/default.html --search-template ./patterns/search.html --scheme trinity' && npm run serve"
|
|
35
48
|
},
|
|
36
49
|
"devDependencies": {
|
|
37
|
-
"@caweb/
|
|
50
|
+
"@caweb/framework": "^1.9.0",
|
|
51
|
+
"@caweb/icon-library": "^1.1.4"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@caweb/webpack": "^1.6.0"
|
|
38
55
|
}
|
|
39
56
|
}
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
<div id="main-content" class="main-content" tabindex="-1">
|
|
36
36
|
<main class="main-primary">
|
|
37
37
|
|
|
38
|
-
{{#if
|
|
39
|
-
|
|
38
|
+
{{#if partial }}
|
|
39
|
+
{{{ partial }}}
|
|
40
40
|
{{else}}
|
|
41
|
-
|
|
41
|
+
{{> index }}
|
|
42
42
|
{{/if}}
|
|
43
43
|
|
|
44
44
|
</main>
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
<p class="official-tag">Official website of the State of California</p>
|
|
15
15
|
</div>
|
|
16
|
-
{{#if header.utility }}
|
|
16
|
+
{{#if header.utility.links }}
|
|
17
17
|
<div class="settings-links">
|
|
18
|
-
{{#each header.utility }}
|
|
18
|
+
{{#each header.utility.links }}
|
|
19
19
|
{{#if this.url }}{{#if this.label }}
|
|
20
20
|
<a href="{{ this.url }}">{{ this.label }}</a>
|
|
21
21
|
{{/if}}{{/if}}
|
package/.distignore
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# A set of files you probably don't want in your WordPress.org distribution
|
|
2
|
-
.babelrc
|
|
3
|
-
.deployignore
|
|
4
|
-
.distignore
|
|
5
|
-
.editorconfig
|
|
6
|
-
.eslintignore
|
|
7
|
-
.eslintrc
|
|
8
|
-
.git
|
|
9
|
-
.gitignore
|
|
10
|
-
.github
|
|
11
|
-
.gitlab-ci.yml
|
|
12
|
-
.travis.yml
|
|
13
|
-
.DS_Store
|
|
14
|
-
.*~
|
|
15
|
-
private
|
|
16
|
-
tests
|
|
17
|
-
vendor
|
|
18
|
-
node_modules
|
|
19
|
-
*.sql
|
|
20
|
-
*.tar.gz
|
|
21
|
-
*.zip
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Publish Template
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
push:
|
|
9
|
-
branches:
|
|
10
|
-
- main
|
|
11
|
-
jobs:
|
|
12
|
-
publish-npm:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
- uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version: 20
|
|
19
|
-
registry-url: https://registry.npmjs.org/
|
|
20
|
-
- run: npm publish
|
|
21
|
-
env:
|
|
22
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/CHANGELOG.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
v1.0.9
|
|
2
|
-
- Updated npm packages
|
|
3
|
-
|
|
4
|
-
v1.0.8
|
|
5
|
-
- Updated npm packages
|
|
6
|
-
|
|
7
|
-
v1.0.7
|
|
8
|
-
- Updated npm packages
|
|
9
|
-
|
|
10
|
-
v1.0.6
|
|
11
|
-
- Updated npm packages
|
|
12
|
-
|
|
13
|
-
v1.0.5
|
|
14
|
-
- Fixed issue with search.html
|
|
15
|
-
|
|
16
|
-
v1.0.4
|
|
17
|
-
- Updated logo.png so that it uses a .png instead of .webp
|
|
18
|
-
- Updated content/index.html to provide instructions
|
|
19
|
-
|
|
20
|
-
v1.0.3
|
|
21
|
-
- Card component card-title element changed from div to H5
|
|
22
|
-
|
|
23
|
-
v1.0.2
|
|
24
|
-
- Removed divi reference
|
|
25
|
-
|
|
26
|
-
v1.0.1
|
|
27
|
-
- Fixed issue with alerts component
|
|
28
|
-
|
|
29
|
-
v1.0.0
|
|
30
|
-
- Removed templating out of @caweb/html-webpack-plugin and into it's own individual package
|
|
31
|
-
- Updated nav.header and utility.links references
|
|
32
|
-
- Added new navFooter partial
|
|
33
|
-
- Added Card component
|