@qld-gov-au/qgds-bootstrap5 2.0.8 → 2.0.9
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/dist/assets/components/bs5/head/head.hbs +1 -1
- package/dist/assets/components/bs5/image/image.hbs +8 -5
- package/dist/assets/components/bs5/pageLayout/templates/contentPageWithForm.hbs +112 -93
- package/dist/assets/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +57 -53
- package/dist/assets/css/qld.bootstrap.css +1 -1
- package/dist/assets/css/qld.bootstrap.css.map +2 -2
- package/dist/assets/css/qld.bootstrap.legacy.css +1 -1
- package/dist/assets/css/qld.bootstrap.legacy.css.map +2 -2
- package/dist/assets/js/handlebars.init.min.js +185 -158
- package/dist/assets/js/handlebars.init.min.js.map +2 -2
- package/dist/assets/js/handlebars.partials.js +185 -158
- package/dist/assets/js/handlebars.partials.js.map +2 -2
- package/dist/assets/node/handlebars.init.min.js +109 -90
- package/dist/assets/node/handlebars.init.min.js.map +2 -2
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/bs5/image/image.hbs +8 -5
- package/dist/components/bs5/pageLayout/templates/contentPageWithForm.hbs +112 -93
- package/dist/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +57 -53
- package/dist/package.json +1 -1
- package/dist/sample-data/breadcrumbs/breadcrumbs.data.json +1 -1
- package/dist/sample-data/image/image.data.json +4 -2
- package/package.json +1 -1
- package/src/components/bs5/banner/banner.scss +28 -19
- package/src/components/bs5/banner/banner.stories.js +25 -16
- package/src/components/bs5/breadcrumbs/breadcrumbs.data.json +1 -1
- package/src/components/bs5/header/header.scss +4 -0
- package/src/components/bs5/image/image.data.json +4 -2
- package/src/components/bs5/image/image.hbs +8 -5
- package/src/components/bs5/image/image.scss +29 -7
- package/src/components/bs5/image/image.stories.js +77 -57
- package/src/components/bs5/pageLayout/pageLayout.stories.js +11 -45
- package/src/components/bs5/pageLayout/templates/contentPageWithForm.hbs +112 -93
- package/src/components/bs5/pageLayout/templates/contentPageWithSideNavigation.hbs +57 -53
- package/src/components/bs5/searchInput/searchInput.scss +4 -5
|
@@ -98,15 +98,15 @@ export default {
|
|
|
98
98
|
// Provide cards or buttons if callToAction is set to true
|
|
99
99
|
switch (args.callToAction) {
|
|
100
100
|
case "buttons":
|
|
101
|
-
args.buttons = exampleButtonData;
|
|
101
|
+
args.buttons = args.buttons ?? exampleButtonData;
|
|
102
102
|
args.cards = false;
|
|
103
103
|
break;
|
|
104
104
|
case "cards":
|
|
105
|
-
args.cards = exampleCardData;
|
|
105
|
+
args.cards = args.cards ?? exampleCardData;
|
|
106
106
|
args.buttons = false;
|
|
107
107
|
break;
|
|
108
108
|
case "cardsMixed":
|
|
109
|
-
args.cards = exampleMixedCardData;
|
|
109
|
+
args.cards = args.cards ?? exampleMixedCardData;
|
|
110
110
|
args.buttons = false;
|
|
111
111
|
break;
|
|
112
112
|
case "none":
|
|
@@ -172,7 +172,7 @@ export default {
|
|
|
172
172
|
options: ["none", "with-texture", "with-bg-image", "with-hero-image"],
|
|
173
173
|
},
|
|
174
174
|
|
|
175
|
-
"image.classes": {
|
|
175
|
+
["image.classes"]: {
|
|
176
176
|
name: "Image Classes",
|
|
177
177
|
description: `Settable classes for the hero image placement. Background Type must be set to "with-hero-image"`,
|
|
178
178
|
control: {
|
|
@@ -254,7 +254,7 @@ export const NoBanner = {
|
|
|
254
254
|
title: { table: { disable: true } },
|
|
255
255
|
abstract: { table: { disable: true } },
|
|
256
256
|
backgroundType: { table: { disable: true } },
|
|
257
|
-
"image.classes": { table: { disable: true } },
|
|
257
|
+
["image.classes"]: { table: { disable: true } },
|
|
258
258
|
},
|
|
259
259
|
};
|
|
260
260
|
|
|
@@ -279,7 +279,7 @@ export const BannerBasic = {
|
|
|
279
279
|
//Remove default controls that aren't needed here
|
|
280
280
|
callToAction: { table: { disable: true } },
|
|
281
281
|
image: { table: { disable: true } },
|
|
282
|
-
"image.classes": { table: { disable: true } },
|
|
282
|
+
["image.classes"]: { table: { disable: true } },
|
|
283
283
|
backgroundType: {
|
|
284
284
|
//Remove "with-hero-image" option
|
|
285
285
|
options: ["none", "with-texture", "with-bg-image"],
|
|
@@ -327,7 +327,7 @@ export const BannerBasicBackgrounds = {
|
|
|
327
327
|
options: ["none", "with-texture", "with-bg-image"],
|
|
328
328
|
},
|
|
329
329
|
image: { table: { disable: true } },
|
|
330
|
-
"image.classes": { table: { disable: true } },
|
|
330
|
+
["image.classes"]: { table: { disable: true } },
|
|
331
331
|
},
|
|
332
332
|
};
|
|
333
333
|
|
|
@@ -344,7 +344,7 @@ export const BannerAdvancedButtons = {
|
|
|
344
344
|
subtitle: "",
|
|
345
345
|
titleClasses: [],
|
|
346
346
|
backgroundType: "with-hero-image",
|
|
347
|
-
"image.classes": "align-grid",
|
|
347
|
+
["image.classes"]: "align-grid",
|
|
348
348
|
abstract:
|
|
349
349
|
"Renew your licence at a customer service centre, government office or police station.",
|
|
350
350
|
callToAction: "buttons",
|
|
@@ -416,7 +416,7 @@ export const BannerAdvancedHeroImage = {
|
|
|
416
416
|
backgroundType: "with-hero-image",
|
|
417
417
|
abstract:
|
|
418
418
|
"Renew your licence at a customer service centre, government office or police station.",
|
|
419
|
-
"image.classes": ["align-right", "with-gradient"],
|
|
419
|
+
["image.classes"]: ["align-right", "with-gradient"],
|
|
420
420
|
},
|
|
421
421
|
|
|
422
422
|
argTypes: {
|
|
@@ -445,16 +445,25 @@ export const BannerAdvancedBlockTitle = {
|
|
|
445
445
|
...defaultdata,
|
|
446
446
|
variantClass: "dark",
|
|
447
447
|
bannerType: "banner-advanced",
|
|
448
|
-
title: "
|
|
449
|
-
subtitle: "
|
|
448
|
+
title: "Disaster recovery",
|
|
449
|
+
subtitle: "and support",
|
|
450
|
+
abstract:
|
|
451
|
+
"Financial help and support services to help you recover if you're affected by a disaster.",
|
|
450
452
|
titleClasses: ["as-block"],
|
|
451
453
|
backgroundType: "with-texture",
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
callToAction: "buttons",
|
|
455
|
+
breadcrumbs: {
|
|
456
|
+
breadcrumbs: [
|
|
457
|
+
{ link: "#", linktext: "Home" },
|
|
458
|
+
{ link: "#", linktext: "Community support" },
|
|
459
|
+
{ link: "#", linktext: "Disaster support and recovery" },
|
|
460
|
+
{ link: "#", linktext: "Example page title 1" },
|
|
461
|
+
{ link: "#", linktext: "Example page title 2" },
|
|
462
|
+
{ link: "#", linktext: "Current page" },
|
|
463
|
+
],
|
|
464
|
+
},
|
|
465
|
+
["image.classes"]: "align-grid",
|
|
456
466
|
},
|
|
457
|
-
|
|
458
467
|
argTypes: {
|
|
459
468
|
backgroundType: {
|
|
460
469
|
name: "Background Type",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"height": "",
|
|
10
10
|
"heightUnit": "",
|
|
11
11
|
"src": "assets/img/image-example-health-workers-md.jpg",
|
|
12
|
-
"alt": "Two
|
|
12
|
+
"alt": "Two healthcare workers sitting on a park bench reviewing information on a tablet device",
|
|
13
|
+
"caption": "Queensland Health staff using mobile technology to improve patient care and access medical records in the field",
|
|
14
|
+
"credit": "Photo by Queensland Government",
|
|
13
15
|
"tabindex": "",
|
|
14
16
|
"role": ""
|
|
15
|
-
}
|
|
17
|
+
}
|
|
@@ -13,12 +13,15 @@
|
|
|
13
13
|
{{/inline}}
|
|
14
14
|
|
|
15
15
|
{{#if src}}
|
|
16
|
-
{{#
|
|
16
|
+
{{#ifAny caption credit }}
|
|
17
17
|
<figure class="{{ figureClass }}" {{#if width}}style="width:{{ width }}{{ widthUnit }}"{{/if}}>
|
|
18
18
|
{{> imageTag}}
|
|
19
|
-
<figcaption>
|
|
19
|
+
<figcaption>
|
|
20
|
+
{{caption}}
|
|
21
|
+
{{#if credit}}<span class="figure-credit">{{ credit }}</span>{{/if}}
|
|
22
|
+
</figcaption>
|
|
20
23
|
</figure>
|
|
21
24
|
{{else}}
|
|
22
|
-
{{>
|
|
23
|
-
{{/
|
|
24
|
-
{{/if}}
|
|
25
|
+
{{>imageTag}}
|
|
26
|
+
{{/ifAny}}
|
|
27
|
+
{{/if}}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
// CSS utilities for fixed-ratio specific QGDS images
|
|
2
|
+
//
|
|
3
|
+
// Accessibility Notes:
|
|
4
|
+
// - Static images don't require keyboard focus (not interactive)
|
|
5
|
+
// - Use semantic <figure> and <figcaption> elements for proper screen reader support
|
|
6
|
+
// - Alt text describes visual content; caption/description provides context
|
|
7
|
+
// - Both are read by screen readers, so they should complement each other
|
|
8
|
+
// - Caption text is keyboard accessible as standard HTML text (no special handling needed)
|
|
2
9
|
|
|
3
10
|
/* prettier-ignore-start */
|
|
4
11
|
.image-ratio-1x1 { --image-ratio: calc(1 / 1); }
|
|
@@ -20,28 +27,33 @@ img[class*="image-ratio-"] {
|
|
|
20
27
|
|
|
21
28
|
figure {
|
|
22
29
|
--figure-bg: var(--qld-neutral-lightest);
|
|
23
|
-
--figure-color: var(--qld-light-text-
|
|
30
|
+
--figure-caption-color: var(--qld-light-text-text);
|
|
31
|
+
--figure-credit-color: var(--qld-light-text-lighter);
|
|
24
32
|
|
|
25
33
|
display: table;
|
|
26
34
|
|
|
27
35
|
&.light {
|
|
28
36
|
--figure-bg: var(--qld-light-background-shade);
|
|
29
|
-
--figure-color: var(--qld-light-text-
|
|
37
|
+
--figure-caption-color: var(--qld-light-text-text);
|
|
38
|
+
--figure-credit-color: var(--qld-light-text-lighter);
|
|
30
39
|
}
|
|
31
40
|
|
|
32
41
|
&.light-alt {
|
|
33
42
|
--figure-bg: var(--qld-light-alt-background-shade);
|
|
34
|
-
--figure-color: var(--qld-light-text-
|
|
43
|
+
--figure-caption-color: var(--qld-light-text-text);
|
|
44
|
+
--figure-credit-color: var(--qld-light-text-lighter);
|
|
35
45
|
}
|
|
36
46
|
|
|
37
47
|
&.dark {
|
|
38
48
|
--figure-bg: var(--qld-dark-background-shade);
|
|
39
|
-
--figure-color: var(--qld-dark-text-text);
|
|
49
|
+
--figure-caption-color: var(--qld-dark-text-text);
|
|
50
|
+
--figure-credit-color: var(--qld-dark-text-lighter);
|
|
40
51
|
}
|
|
41
52
|
|
|
42
53
|
&.dark-alt {
|
|
43
54
|
--figure-bg: var(--qld-dark-alt-background-shade);
|
|
44
|
-
--figure-color: var(--qld-dark-text-text);
|
|
55
|
+
--figure-caption-color: var(--qld-dark-text-text);
|
|
56
|
+
--figure-credit-color: var(--qld-dark-text-lighter);
|
|
45
57
|
}
|
|
46
58
|
|
|
47
59
|
> img {
|
|
@@ -50,11 +62,21 @@ figure {
|
|
|
50
62
|
|
|
51
63
|
> figcaption {
|
|
52
64
|
background: var(--figure-bg);
|
|
53
|
-
color: var(--figure-color);
|
|
65
|
+
color: var(--figure-caption-color);
|
|
66
|
+
font-size: 1rem;
|
|
67
|
+
line-height: 24px;
|
|
54
68
|
|
|
55
69
|
display: table-caption;
|
|
56
70
|
caption-side: bottom;
|
|
57
|
-
padding:
|
|
71
|
+
padding: 1rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.figure-credit {
|
|
75
|
+
display: block;
|
|
76
|
+
font-size: 0.875rem;
|
|
77
|
+
line-height: 20px;
|
|
78
|
+
color: var(--figure-credit-color);
|
|
79
|
+
margin-top: 0.5rem;
|
|
58
80
|
}
|
|
59
81
|
|
|
60
82
|
//Reset bootstrap's figure margin
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
* Image utilities to create responsive, fixed-ratio images.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import Handlebars from "handlebars";
|
|
7
|
-
|
|
8
6
|
import imagedata from "./image.data.json";
|
|
9
|
-
import
|
|
7
|
+
import { ImageComponent } from "./Image";
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
10
|
*
|
|
@@ -39,11 +37,11 @@ export default {
|
|
|
39
37
|
title: "3. Components/Image",
|
|
40
38
|
|
|
41
39
|
render: (args) => {
|
|
42
|
-
return
|
|
40
|
+
return new ImageComponent(args).html;
|
|
43
41
|
},
|
|
44
42
|
|
|
45
43
|
argTypes: {
|
|
46
|
-
|
|
44
|
+
ratioClass: {
|
|
47
45
|
name: "Fixed image ratio",
|
|
48
46
|
description: "Set the ratio class for the image component.",
|
|
49
47
|
control: {
|
|
@@ -67,21 +65,21 @@ export default {
|
|
|
67
65
|
],
|
|
68
66
|
},
|
|
69
67
|
|
|
70
|
-
|
|
68
|
+
otherClass: {
|
|
71
69
|
name: "Other Classes",
|
|
72
70
|
description:
|
|
73
71
|
"Optional. Any additional classes to apply to the image element for custom styling.",
|
|
74
72
|
control: "text",
|
|
75
73
|
},
|
|
76
74
|
|
|
77
|
-
|
|
75
|
+
figureClass: {
|
|
78
76
|
name: "Figure Class",
|
|
79
77
|
description:
|
|
80
78
|
"Optional. Any custom class to pass to the figure element for additional styling.",
|
|
81
79
|
control: "text",
|
|
82
80
|
},
|
|
83
81
|
|
|
84
|
-
|
|
82
|
+
positionX: {
|
|
85
83
|
name: "Position X",
|
|
86
84
|
description:
|
|
87
85
|
"Optional. Adjust the horizontal image placement within the aspect ratio crop.",
|
|
@@ -96,7 +94,7 @@ export default {
|
|
|
96
94
|
options: ["position-x-left", "position-x-center", "position-x-right"],
|
|
97
95
|
},
|
|
98
96
|
|
|
99
|
-
|
|
97
|
+
positionY: {
|
|
100
98
|
name: "Position Y",
|
|
101
99
|
description:
|
|
102
100
|
"Optional. Adjust the vertical image placement within the aspect ratio crop.",
|
|
@@ -111,14 +109,14 @@ export default {
|
|
|
111
109
|
options: ["position-y-top", "position-y-center", "position-y-bottom"],
|
|
112
110
|
},
|
|
113
111
|
|
|
114
|
-
|
|
112
|
+
width: {
|
|
115
113
|
name: "Width",
|
|
116
114
|
description:
|
|
117
115
|
"Optional. Set the width of the image (e.g., '350', '100'). Use the unit fields to specify px or %.",
|
|
118
116
|
control: "text",
|
|
119
117
|
},
|
|
120
118
|
|
|
121
|
-
|
|
119
|
+
widthUnit: {
|
|
122
120
|
name: "Width Unit",
|
|
123
121
|
description:
|
|
124
122
|
"Select the unit for the width of the image. Choose 'px' for pixels or '%' for percentage.",
|
|
@@ -126,14 +124,14 @@ export default {
|
|
|
126
124
|
options: ["px", "%"],
|
|
127
125
|
},
|
|
128
126
|
|
|
129
|
-
|
|
127
|
+
height: {
|
|
130
128
|
name: "Height",
|
|
131
129
|
description:
|
|
132
130
|
"Optional. Set the height of the image (optional - note responsive images will scale their height). Use the unit field to specify px or %.",
|
|
133
131
|
control: "text",
|
|
134
132
|
},
|
|
135
133
|
|
|
136
|
-
|
|
134
|
+
heightUnit: {
|
|
137
135
|
name: "Height Unit",
|
|
138
136
|
description:
|
|
139
137
|
"Optional. Select the unit for the height of the image. Choose 'px' for pixels or '%' for percentage.",
|
|
@@ -141,17 +139,31 @@ export default {
|
|
|
141
139
|
options: ["px", "%"],
|
|
142
140
|
},
|
|
143
141
|
|
|
142
|
+
caption: {
|
|
143
|
+
name: "Caption",
|
|
144
|
+
description:
|
|
145
|
+
"Optional. Main caption text for the image (16px, line-height 24px). Provides context or additional information about the image. For accessibility: caption should complement (not duplicate) the alt text. Alt text describes what's in the image; caption provides context or additional information. Both are read by screen readers.",
|
|
146
|
+
control: "text",
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
credit: {
|
|
150
|
+
name: "Credit",
|
|
151
|
+
description:
|
|
152
|
+
"Optional. Credit/attribution text for the image (14px, line-height 20px, lighter color). Displays below the caption text.",
|
|
153
|
+
control: "text",
|
|
154
|
+
},
|
|
155
|
+
|
|
144
156
|
// Disabled controls, not needed in Storybook UI
|
|
145
157
|
// "tabindex", "role", "storycolumn"
|
|
146
|
-
|
|
158
|
+
tabindex: {
|
|
147
159
|
table: { disable: true },
|
|
148
160
|
},
|
|
149
161
|
|
|
150
|
-
|
|
162
|
+
role: {
|
|
151
163
|
table: { disable: true },
|
|
152
164
|
},
|
|
153
165
|
|
|
154
|
-
|
|
166
|
+
storycolumn: {
|
|
155
167
|
table: { disable: true },
|
|
156
168
|
},
|
|
157
169
|
},
|
|
@@ -187,54 +199,59 @@ export const DefaultImage = {
|
|
|
187
199
|
*/
|
|
188
200
|
export const UtilityClasses = {
|
|
189
201
|
// Render several images, each with different ratios
|
|
190
|
-
args:
|
|
191
|
-
image1x1: Handlebars.compile(template)({
|
|
192
|
-
...imagedata,
|
|
193
|
-
ratioClass: "image-ratio-1x1",
|
|
194
|
-
positionX: "position-x-left",
|
|
195
|
-
positionY: "position-y-30",
|
|
196
|
-
}),
|
|
197
|
-
image3x2: Handlebars.compile(template)({
|
|
198
|
-
...imagedata,
|
|
199
|
-
ratioClass: "image-ratio-3x2",
|
|
200
|
-
}),
|
|
201
|
-
image2x3: Handlebars.compile(template)({
|
|
202
|
-
...imagedata,
|
|
203
|
-
ratioClass: "image-ratio-2x3",
|
|
204
|
-
}),
|
|
205
|
-
image4x3: Handlebars.compile(template)({
|
|
206
|
-
...imagedata,
|
|
207
|
-
ratioClass: "image-ratio-4x3",
|
|
208
|
-
}),
|
|
209
|
-
image3x4: Handlebars.compile(template)({
|
|
210
|
-
...imagedata,
|
|
211
|
-
ratioClass: "image-ratio-3x4",
|
|
212
|
-
positionX: "position-x-40",
|
|
213
|
-
positionY: "position-y-top",
|
|
214
|
-
}),
|
|
215
|
-
image16x9: Handlebars.compile(template)({
|
|
216
|
-
...imagedata,
|
|
217
|
-
ratioClass: "image-ratio-16x9",
|
|
218
|
-
}),
|
|
219
|
-
},
|
|
202
|
+
args: imagedata,
|
|
220
203
|
|
|
221
204
|
render: (args) => {
|
|
222
205
|
return `
|
|
223
206
|
<h2>Fixed Ratio Images with utility classes</h2>
|
|
224
207
|
<div class="row">
|
|
225
208
|
<strong>Default</strong><br><br>
|
|
226
|
-
<div class="col-12 col-md-6 mb-4">${
|
|
209
|
+
<div class="col-12 col-md-6 mb-4">${
|
|
210
|
+
new ImageComponent({
|
|
211
|
+
...args,
|
|
212
|
+
ratioClass: "image-ratio-3x2",
|
|
213
|
+
}).html
|
|
214
|
+
} <br><small>.image-ratio-3x2 (Default)</small></div>
|
|
227
215
|
</div>
|
|
228
216
|
<div class="row">
|
|
229
217
|
<strong>Horizontal</strong><br><br>
|
|
230
|
-
<div class="col-12 col-md-4 mb-4">${
|
|
231
|
-
|
|
232
|
-
|
|
218
|
+
<div class="col-12 col-md-4 mb-4">${
|
|
219
|
+
new ImageComponent({
|
|
220
|
+
...imagedata,
|
|
221
|
+
ratioClass: "image-ratio-1x1",
|
|
222
|
+
positionX: "position-x-left",
|
|
223
|
+
positionY: "position-y-30",
|
|
224
|
+
}).html
|
|
225
|
+
} <br><small>.image-ratio-1x1<br>.position-x-left<br>.position-y-30</small></div>
|
|
226
|
+
<div class="col-12 col-md-4 mb-4">${
|
|
227
|
+
new ImageComponent({
|
|
228
|
+
...imagedata,
|
|
229
|
+
ratioClass: "image-ratio-4x3",
|
|
230
|
+
}).html
|
|
231
|
+
}<br><small>.image-ratio-4x3</small></div>
|
|
232
|
+
<div class="col-12 col-md-4 mb-4">${
|
|
233
|
+
new ImageComponent({
|
|
234
|
+
...imagedata,
|
|
235
|
+
ratioClass: "image-ratio-16x9",
|
|
236
|
+
}).html
|
|
237
|
+
} <br><small>.image-ratio-16x9</small></div>
|
|
233
238
|
</div>
|
|
234
239
|
<div class="row">
|
|
235
240
|
<strong>Vertical</strong><br><br>
|
|
236
|
-
<div class="col-12 col-md-4 mb-4">${
|
|
237
|
-
|
|
241
|
+
<div class="col-12 col-md-4 mb-4">${
|
|
242
|
+
new ImageComponent({
|
|
243
|
+
...imagedata,
|
|
244
|
+
ratioClass: "image-ratio-3x2",
|
|
245
|
+
}).html
|
|
246
|
+
} <br><small>.image-ratio-2x3</small></div>
|
|
247
|
+
<div class="col-12 col-md-4 mb-4">${
|
|
248
|
+
new ImageComponent({
|
|
249
|
+
...imagedata,
|
|
250
|
+
ratioClass: "image-ratio-3x4",
|
|
251
|
+
positionX: "position-x-40",
|
|
252
|
+
positionY: "position-y-top",
|
|
253
|
+
}).html
|
|
254
|
+
} <br><small>.image-ratio-3x4<br>.position-x-40<br>.position-y-top</small></div>
|
|
238
255
|
</div>
|
|
239
256
|
`;
|
|
240
257
|
},
|
|
@@ -242,12 +259,16 @@ export const UtilityClasses = {
|
|
|
242
259
|
|
|
243
260
|
/**
|
|
244
261
|
* Figure with Image and caption
|
|
262
|
+
*
|
|
263
|
+
* This example demonstrates the structured caption with caption and credit fields.
|
|
264
|
+
* The caption uses 16px font with 24px line-height, while the credit uses 14px font with 20px line-height and lighter color.
|
|
245
265
|
*/
|
|
246
266
|
export const FigureWithImageCaption = {
|
|
247
267
|
args: {
|
|
248
268
|
...imagedata,
|
|
249
269
|
caption:
|
|
250
270
|
"This is a caption for the image. It can be long or short. Longer captions, like this one, should wrap to the next line.",
|
|
271
|
+
credit: "Photo by Queensland Government",
|
|
251
272
|
},
|
|
252
273
|
};
|
|
253
274
|
|
|
@@ -267,11 +288,10 @@ export const FloatedImage = {
|
|
|
267
288
|
},
|
|
268
289
|
|
|
269
290
|
render: (args) => {
|
|
270
|
-
|
|
271
291
|
args.src = "assets/img/image-example-couple-beach-md.jpg";
|
|
272
292
|
|
|
273
|
-
let imageTag =
|
|
274
|
-
let imageTagWithCaption =
|
|
293
|
+
let imageTag = new ImageComponent({ ...args, caption: null }).html;
|
|
294
|
+
let imageTagWithCaption = new ImageComponent(args).html;
|
|
275
295
|
|
|
276
296
|
let customTemplate = `
|
|
277
297
|
<h2>Example image with caption, right aligned</h2>
|
|
@@ -282,13 +302,13 @@ export const FloatedImage = {
|
|
|
282
302
|
</div>
|
|
283
303
|
|
|
284
304
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
285
|
-
|
|
305
|
+
|
|
286
306
|
<p>Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.</p>
|
|
287
307
|
|
|
288
308
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt.</p>
|
|
289
309
|
|
|
290
310
|
<h2>Example image without caption, left aligned</h2>
|
|
291
|
-
|
|
311
|
+
|
|
292
312
|
<!-- Bootstrap classes control layout -->
|
|
293
313
|
<div class="mb-32 float-md-start me-md-32">
|
|
294
314
|
${imageTag}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HomePage } from "./HomePage.js";
|
|
2
2
|
import { ContentPageWithSideNavigation } from "./ContentPageWithSideNavigation.js";
|
|
3
3
|
import { ContentPageWithForm } from "./ContentPageWithForm.js";
|
|
4
|
+
|
|
4
5
|
//Data
|
|
5
6
|
import masterbrand_variant from "../header/header.variant.masterBrand.data.json";
|
|
6
7
|
import menu_state from "../navbar/navbar.data.json";
|
|
@@ -32,23 +33,23 @@ const sideNavData = {
|
|
|
32
33
|
navtitlelink: "#optionallink",
|
|
33
34
|
navlist: [
|
|
34
35
|
{
|
|
35
|
-
link: "#
|
|
36
|
-
label: "
|
|
36
|
+
link: "#",
|
|
37
|
+
label: "Page link",
|
|
37
38
|
class: "",
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
41
|
link: "#",
|
|
41
|
-
label: "
|
|
42
|
+
label: "Page link",
|
|
42
43
|
class: "",
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
46
|
link: "#",
|
|
46
|
-
label: "
|
|
47
|
-
class: "",
|
|
47
|
+
label: "Active Page",
|
|
48
|
+
class: "active",
|
|
48
49
|
},
|
|
49
50
|
{
|
|
50
51
|
link: "#",
|
|
51
|
-
label: "Page
|
|
52
|
+
label: "Page link",
|
|
52
53
|
class: "",
|
|
53
54
|
},
|
|
54
55
|
],
|
|
@@ -70,8 +71,6 @@ const defaultData = {
|
|
|
70
71
|
},
|
|
71
72
|
contentFooter: contentFooterData,
|
|
72
73
|
sidenav: sideNavData,
|
|
73
|
-
// Mapping some @root header fields to this pageLayout root object, so template partials can resolve values
|
|
74
|
-
// assets: masterbrand_variant.assets,
|
|
75
74
|
};
|
|
76
75
|
|
|
77
76
|
export default {
|
|
@@ -118,18 +117,7 @@ export const Default = {
|
|
|
118
117
|
bannerType: "no-banner",
|
|
119
118
|
breadcrumbs: breadcrumbsData.default,
|
|
120
119
|
},
|
|
121
|
-
sidenav:
|
|
122
|
-
...sideNavData,
|
|
123
|
-
navlist: [
|
|
124
|
-
sideNavData.navlist[0],
|
|
125
|
-
{
|
|
126
|
-
...sideNavData.navlist[1],
|
|
127
|
-
class: "active",
|
|
128
|
-
},
|
|
129
|
-
sideNavData.navlist[2],
|
|
130
|
-
sideNavData.navlist[3],
|
|
131
|
-
],
|
|
132
|
-
},
|
|
120
|
+
sidenav: sideNavData,
|
|
133
121
|
},
|
|
134
122
|
};
|
|
135
123
|
|
|
@@ -149,7 +137,7 @@ export const Home = {
|
|
|
149
137
|
abstract: "Your gateway to government services and information.",
|
|
150
138
|
bannerType: "banner-advanced",
|
|
151
139
|
backgroundType: "with-hero-image",
|
|
152
|
-
"image.classes": "align-grid",
|
|
140
|
+
["image.classes"]: "align-grid",
|
|
153
141
|
callToAction: "buttons",
|
|
154
142
|
buttons: [
|
|
155
143
|
{
|
|
@@ -244,18 +232,7 @@ export const ContentPageBasicBanner = {
|
|
|
244
232
|
"Everything you need to know about registering your vehicle in Queensland.",
|
|
245
233
|
breadcrumbs: breadcrumbsData.default,
|
|
246
234
|
},
|
|
247
|
-
sidenav:
|
|
248
|
-
...sideNavData,
|
|
249
|
-
navlist: [
|
|
250
|
-
sideNavData.navlist[0],
|
|
251
|
-
sideNavData.navlist[1],
|
|
252
|
-
{
|
|
253
|
-
...sideNavData.navlist[2],
|
|
254
|
-
class: "active",
|
|
255
|
-
},
|
|
256
|
-
sideNavData.navlist[3],
|
|
257
|
-
],
|
|
258
|
-
},
|
|
235
|
+
sidenav: sideNavData,
|
|
259
236
|
},
|
|
260
237
|
};
|
|
261
238
|
|
|
@@ -281,18 +258,7 @@ export const ContentPageWithSingleForm = {
|
|
|
281
258
|
abstract: "Get in touch with us using the form below.",
|
|
282
259
|
breadcrumbs: breadcrumbsData.default,
|
|
283
260
|
},
|
|
284
|
-
sidenav:
|
|
285
|
-
...sideNavData,
|
|
286
|
-
navlist: [
|
|
287
|
-
sideNavData.navlist[0],
|
|
288
|
-
sideNavData.navlist[1],
|
|
289
|
-
sideNavData.navlist[2],
|
|
290
|
-
{
|
|
291
|
-
...sideNavData.navlist[3],
|
|
292
|
-
class: "active",
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
},
|
|
261
|
+
sidenav: sideNavData,
|
|
296
262
|
content: `
|
|
297
263
|
<h1>Contact Form</h1>
|
|
298
264
|
<p>Please fill out the form below and we'll get back to you as soon as possible.</p>
|