@caweb/template 1.0.0-beta.2 → 1.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/CHANGELOG.md CHANGED
@@ -1,6 +1,5 @@
1
- v1.0.1
1
+ v1.0.0
2
+ - Removed templating out of @caweb/html-webpack-plugin and into it's own individual package
2
3
  - Updated nav.header and utility.links references
3
4
  - Added new navFooter partial
4
-
5
- v1.0.0
6
- - Removed templating out of @caweb/html-webpack-plugin and into it's own individual package
5
+ - Added Card component
@@ -31,4 +31,5 @@
31
31
  </button>
32
32
  </div>
33
33
  </div>
34
- </div>
34
+ </div>
35
+ <!-- End of Alert -->
@@ -0,0 +1,28 @@
1
+ {
2
+ "card":{
3
+ "heading": "string",
4
+ "headingColor": "string",
5
+ "headingAlignment": "string",
6
+ "subHeading": "string",
7
+ "subHeadingColor": "string",
8
+ "subHeadingAlignment": "string",
9
+ "content": "string",
10
+ "contentColor": "string",
11
+ "contentAlignment": "string",
12
+ "icon": "string",
13
+ "layout": [
14
+ "none",
15
+ "default",
16
+ "overstated",
17
+ "understated",
18
+ "standout",
19
+ "standout-highlight"
20
+ ],
21
+ "img": "string",
22
+ "imgPlacement": "string",
23
+ "imgAlignment": "string",
24
+ "url": "string",
25
+ "urlText": "string",
26
+ "divi": "string"
27
+ }
28
+ }
@@ -0,0 +1,42 @@
1
+ {{!--
2
+ This is a simple card component that can be used to display information in a structured format.
3
+ It includes a title, an image, and a description.
4
+ The card can be customized with different colors and sizes.
5
+ --}}
6
+ <!-- Card -->
7
+ <div class="card card-
8
+ {{~#if this.layout}}{{ this.layout }}{{else}}default{{/if}}
9
+ {{~#if this.divi}}{{#ifCond 'blurb' '===' this.divi }} {{ this.divi }} bg-transparent{{/ifCond}}{{/if}}">
10
+ {{#if this.img }}
11
+ {{#ifCond (ifCond this.imgPlacement '===' 'top' ) '||' (not this.imgPlacement ) }}
12
+ <img class="{{#if this.imgAlignment }}d-block{{{bsAttr 'spacing' this.imgAlignment }}}{{else}}card-img-top{{/if}}" src="{{ this.img }}" alt="Card image size">
13
+ {{/ifCond}}
14
+ {{/if}}
15
+ {{#if this.heading}}
16
+ <div class="card-header{{bsAttr 'text' this.headingAlignment}}">
17
+ <h4 class="card-title{{bsAttr 'text' this.headerColor }}">
18
+ {{~#if this.icon ~}}
19
+ <span class="ca-gov-icon-{{ this.icon }}"></span>
20
+ {{~/if~}}
21
+ {{~ this.heading ~}}
22
+ </h4>
23
+ {{#if this.url }}
24
+ <div class="options">
25
+ <a href="{{ this.url }}" class="btn btn-light" target="_blank">{{#if this.urlText}}{{ this.urlText }}{{else}}Read More{{/if}}</a>
26
+ </div>
27
+ {{/if}}
28
+ </div>
29
+ {{/if}}
30
+ <div class="card-body{{bsAttr 'text' this.contentColor }}">
31
+ {{#if this.subHeading }}
32
+ <div class="card-title{{bsAttr 'text' this.subHeadingAlignment }}">{{~ this.subHeading ~}}</div>
33
+ {{/if}}
34
+ {{{ this.content }}}
35
+ </div>
36
+ {{#if this.img }}
37
+ {{#ifCond this.imgPlacement '==' 'bottom' }}
38
+ <img class="{{#if this.imgAlignment }}d-block{{{bsAttr 'spacing' this.imgAlignment }}}{{else}}card-img-bottom{{/if}}" src="{{ this.img }}" alt="Card image size">
39
+ {{/ifCond}}
40
+ {{/if}}
41
+ </div>
42
+ <!-- End of Card -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caweb/template",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0",
4
4
  "author": "CAWebPublishing",
5
5
  "description": "CAWebPublishing Template",
6
6
  "license": "ISC",
@@ -30,10 +30,10 @@
30
30
  "serve": "set NODE_OPTIONS='--template ./patterns/index.html --search-template ./patterns/search.html' && webpack serve --config ./node_modules/@caweb/webpack/webpack.config.js --host danny.com --port 8888"
31
31
  },
32
32
  "dependencies": {
33
- "@caweb/framework": "^1.8.0-beta.1",
33
+ "@caweb/framework": "^1.8.0",
34
34
  "@caweb/icon-library": "^1.1.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@caweb/webpack": "^1.4.0-beta.3"
37
+ "@caweb/webpack": "^1.4.2"
38
38
  }
39
39
  }
@@ -11,30 +11,36 @@
11
11
  {{/if}}
12
12
 
13
13
 
14
- {{#if htmlWebpackPlugin.options.meta }}
15
- {{#each htmlWebpackPlugin.options.meta }}
16
- <meta name="{{ @key }}" content="{{ this }}">
14
+ {{#if meta }}
15
+ {{#each meta }}
16
+ <meta name="{{ @key }}" content="{{ this }}" />
17
17
  {{/each}}
18
18
  {{/if}}
19
19
 
20
20
  {{#if assets }}
21
21
  {{#each assets }}
22
22
  {{#if (endsWith this ".css") }}
23
- <link rel="stylesheet" href="{{ this }}" />
23
+ <link rel="stylesheet" href="{{ this }}" />
24
24
  {{/if}}
25
25
  {{/each}}
26
26
  {{/if}}
27
+
27
28
  </head>
29
+
28
30
  <body>
31
+
29
32
  {{> header }}
33
+
30
34
  <div id="page-container" class="page-container">
31
35
  <div id="main-content" class="main-content" tabindex="-1">
32
36
  <main class="main-primary">
37
+
33
38
  {{#if htmlWebpackPlugin.options.templateParameters.bodyHtmlSnippet }}
34
39
  {{{ htmlWebpackPlugin.options.templateParameters.bodyHtmlSnippet }}}
35
40
  {{else}}
36
41
  {{> index }}
37
42
  {{/if}}
43
+
38
44
  </main>
39
45
  </div>
40
46
  </div>
@@ -1,49 +0,0 @@
1
- <div class="container">
2
- <nav aria-label="Breadcrumb" class="breadcrumbs">
3
- <ol>
4
- <li><a href="https://getbootstrap.com/" target="_blank">Bootstrap 5.3.3</a></li>
5
- <li><a href="https://www.npmjs.com/package/bootstrap-forced-colors-css" target="_blank">Bootstrap Forced CSS for Windows High Contrast Mode</a></li>
6
- <li><a href="https://animate.style/" target="_blank">Animate Styles</a></li>
7
- </ol>
8
- </nav>
9
- </div>
10
- <h1 class="page-title">CAWeb Template</h1>
11
- <p class="page-date"><time datetime="Sept 12, 2024">Sept 12, 2024</time></p>
12
- <div class="container">
13
- <p>CAWeb Template is built with Bootstrap 5.3.3</p>
14
- <h2>Key Features</h2>
15
- <ul>
16
- <li><a href="https://getbootstrap.com/" target="_blank">Bootstrap 5.3.3</a></li>
17
- <li><a href="https://www.npmjs.com/package/bootstrap-forced-colors-css" target="_blank">Bootstrap Forced CSS for Windows High Contrast Mode</a></li>
18
- <li><a href="https://animate.style/" target="_blank">Animate Styles</a></li>
19
- </ul>
20
- <h2>Components</h2>
21
- <ul>
22
- <li>
23
- <a href="./components/animations.html" target="_blank">Animations</a>
24
- </li>
25
- <li>
26
- <a href="./components/blockquotes.html" target="_blank">Blockquotes</a>
27
- </li>
28
- <li>
29
- <a href="./components/lists.html" target="_blank">Lists</a>
30
- </li>
31
- <li>
32
- <a href="./components/locations.html" target="_blank">Locations</a>
33
- </li>
34
- <li>
35
- <a href="./components/profile-banners.html" tdarget="_blank">Profile Banners</a>
36
- </li>
37
- <li>
38
- <a href="./components/sections.html" target="_blank">Sections</a>
39
- </li>
40
- <li>
41
- <a href="./components/service-tiles.html" target="_blank">Service Tiles</a>
42
- </li>
43
- <li>
44
- <a href="./components/typography.html" target="_blank">Typography</a>
45
- </li>
46
- </ul>
47
- </div>
48
-
49
- {{> '../src/components/lists.html' }}