@qld-gov-au/qgds-bootstrap5 1.0.20 → 1.0.21
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/css/qld.bootstrap.css +1 -1
- package/dist/assets/css/qld.bootstrap.css.map +2 -2
- package/dist/assets/js/handlebars.helpers.bundle.js +1 -1
- package/dist/assets/js/handlebars.helpers.bundle.js.map +3 -3
- package/dist/assets/js/handlebars.helpers.js +17 -5
- package/dist/assets/js/handlebars.init.min.js +127 -63
- package/dist/assets/js/handlebars.init.min.js.map +3 -3
- package/dist/components/bs5/footer/footer.hbs +88 -24
- package/dist/components/bs5/head/head.hbs +1 -1
- package/dist/components/handlebars.helpers.js +17 -5
- package/dist/components/handlebars.init.min.js +127 -63
- package/dist/components/handlebars.init.min.js.map +3 -3
- package/dist/sample-data/footer/footer-usingDefaults.data.json +3 -0
- package/dist/sample-data/footer/footer.data.json +29 -72
- package/package.json +14 -14
- package/src/components/bs5/breadcrumbs/breadcrumbs.scss +101 -98
- package/src/components/bs5/contentFooter/contentFooter.stories.js +6 -15
- package/src/components/bs5/footer/footer-usingDefaults.data.json +3 -0
- package/src/components/bs5/footer/footer.data.json +29 -72
- package/src/components/bs5/footer/footer.hbs +88 -24
- package/src/components/bs5/footer/footer.stories.js +104 -3
- package/src/js/handlebars.helpers.js +17 -5
|
@@ -14,50 +14,79 @@
|
|
|
14
14
|
<div class="footer-column footer-contact {{#if contact.hasBorderColumn}}border-column{{/if}}">
|
|
15
15
|
<div class="row">
|
|
16
16
|
<div class="col-xs-12 col-md-6 col-lg-12">
|
|
17
|
-
<h3 class="footer-heading">{{ contact.title }}</h3>
|
|
17
|
+
<h3 class="footer-heading">{{#if contact.title}}{{ contact.title }}{{else}}Contact us{{/if}}</h3>
|
|
18
18
|
<div class="footer-content">
|
|
19
|
-
{{{ contact.content }}}
|
|
20
|
-
{{#
|
|
19
|
+
{{#if contact.content}}{{{ contact.content }}}{{else}}<p>Get in touch for enquiries, feedback, complaints and compliments.</p>{{/if}}
|
|
20
|
+
{{#unless contactHasContactListDisabled}}
|
|
21
|
+
{{#if contact.list }}
|
|
21
22
|
{{#each contact.list }}
|
|
22
|
-
<div class="footer-contact-item">
|
|
23
|
-
<span class="qld-icon {{icon}}" aria-hidden="true"></span> {{{ label }}}
|
|
23
|
+
<div class="footer-contact-item footer-contact-{{@key}}">
|
|
24
|
+
<span class="qld-icon {{this.icon}}" aria-hidden="true"></span> {{{ this.label }}}
|
|
24
25
|
</div>
|
|
25
26
|
{{/each}}
|
|
27
|
+
{{else}}
|
|
28
|
+
{{!default contact list }}
|
|
29
|
+
<div class="footer-contact-item footer-contact-phone">
|
|
30
|
+
<span class="qld-icon icon-phone" aria-hidden="true"></span> <b>Phone:</b> 13 QGOV (13 74 68)
|
|
31
|
+
</div>
|
|
32
|
+
<div class="footer-contact-item footer-contact-email">
|
|
33
|
+
<span class="qld-icon icon-email" aria-hidden="true"></span> <b>Email:</b> <span class="user-select-all">email@qld.gov.au</span>
|
|
34
|
+
</div>
|
|
26
35
|
{{/if}}
|
|
36
|
+
{{/unless}}
|
|
27
37
|
</div>
|
|
28
38
|
</div>
|
|
29
39
|
<div class="col-xs-12 col-md-6 col-lg-12">
|
|
30
|
-
<a href="{{ contact.buttonLink }}" class="btn btn-outline-secondary">{{ contact.buttonLabel }}</a>
|
|
40
|
+
<a href="{{#if contact.buttonLink}}{{ contact.buttonLink }}{{else}}https://www.qld.gov.au/contact-us{{/if}}" class="btn btn-outline-secondary">{{#if contact.buttonLabel}}{{ contact.buttonLabel }}{{else}}Contact us{{/if}}</a>
|
|
31
41
|
</div>
|
|
32
42
|
</div>
|
|
33
43
|
</div>
|
|
34
44
|
</div>
|
|
35
45
|
|
|
36
46
|
<div class="col-xs-12 col-md-12 col-lg-3" aria-label="footer-navigation">
|
|
47
|
+
{{#if footerlinks}}
|
|
37
48
|
<div class="footer-column {{#if footerlinks.hasBorderColumn}}border-column{{/if}}">
|
|
38
49
|
<nav class="nav footer-link-list flex-column">
|
|
39
50
|
{{#each footerlinks.list }}
|
|
40
|
-
<a class="nav-link" href="{{ link }}" target="{{
|
|
51
|
+
<a class="nav-link" href="{{ this.link }}" {{#if this.new_window }} target="_blank" {{/if}}>{{{ @key }}}</a>
|
|
41
52
|
{{/each }}
|
|
42
53
|
</nav>
|
|
43
54
|
</div>
|
|
55
|
+
{{else}}
|
|
56
|
+
{{!default list }}
|
|
57
|
+
<div class="footer-column ">
|
|
58
|
+
<nav class="nav footer-link-list flex-column">
|
|
59
|
+
<a class="nav-link" href="https://www.qld.gov.au/help">Help</a>
|
|
60
|
+
<a class="nav-link" href="https://www.qld.gov.au/legal/copyright">Copyright</a>
|
|
61
|
+
<a class="nav-link" href="https://www.qld.gov.au/legal/disclaimer">Disclaimer</a>
|
|
62
|
+
<a class="nav-link" href="https://www.qld.gov.au/legal/privacy">Privacy</a>
|
|
63
|
+
<a class="nav-link" href="https://www.qld.gov.au/about/rights-accountability/right-to-information">Right to information</a>
|
|
64
|
+
<a class="nav-link" href="https://www.qld.gov.au/help/accessibility">Accessibility</a>
|
|
65
|
+
<a class="nav-link" href="https://smartjobs.qld.gov.au" target="_blank">Jobs in Queensland Government</a>
|
|
66
|
+
<a class="nav-link" href="https://www.qld.gov.au/help/languages">Other languages</a>
|
|
67
|
+
</nav>
|
|
68
|
+
</div>
|
|
69
|
+
{{/if}}
|
|
44
70
|
</div>
|
|
45
71
|
|
|
46
|
-
{{#
|
|
72
|
+
{{#unless feedbackFormDisabled}}
|
|
47
73
|
<div class="col-xs-12 col-md-12 col-lg-3">
|
|
48
|
-
<div class="footer-column {{#
|
|
74
|
+
<div class="footer-column {{#unless feedbackForm.hasBorderColumnDisabled}}border-column{{/unless}}">
|
|
49
75
|
<div class="row">
|
|
50
76
|
<div class="col-xs-12 col-md-6 col-lg-12">
|
|
51
|
-
<h3 class="footer-heading">{{feedbackForm.title}}</h3>
|
|
52
|
-
<p>{{feedbackForm.content}}</p>
|
|
77
|
+
<h3 class="footer-heading">{{#if feedbackForm.title}}{{feedbackForm.title}}{{else}}Website feedback{{/if}}</h3>
|
|
78
|
+
<p>{{#if feedbackForm.content}}{{feedbackForm.content}}{{else}}Help us improve the content on our website or tell us what is working well.{{/if}}</p>
|
|
53
79
|
</div>
|
|
54
80
|
<div class="col-xs-12 col-md-6 col-lg-12">
|
|
55
81
|
<div id="qg-feedback-toggle" class="qg-footer-feedback-wrap">
|
|
56
82
|
<a id="btn-footer-feedback" class="btn btn-global-secondary qg-feedback-toggle collapsed" data-bs-toggle="collapse" href="#qg-footer-feedback" role="button" aria-expanded="false" aria-controls="qg-footer-feedback" data-analytics-link-group="qg-feedback">
|
|
57
|
-
{{feedbackForm.btnTitle}}
|
|
83
|
+
{{#if feedbackForm.btnTitle}}{{feedbackForm.btnTitle}}{{else}}Leave your feedback{{/if}}
|
|
58
84
|
</a>
|
|
59
85
|
<div id="qg-footer-feedback" class="qg-footer-feedback__v2 collapse">
|
|
60
|
-
<div id="feedbackFormIO" {{#each feedbackForm.formAttr}}{{#if
|
|
86
|
+
{{#if feedbackForm.formAttr }}<div id="feedbackFormIO" {{#each feedbackForm.formAttr}}{{#if this}}{{@key}}="{{this}}"{{else}}{{@key}}{{/if}} {{/each}}>
|
|
87
|
+
{{else}}
|
|
88
|
+
{{!default if not set }}<div id="feedbackFormIO" data-formio data-formio-project-name="oldkihhcwbdtwye" data-formio-form-name="footerfeedbackcontactus" data-formio-env-url="api.forms.platforms.qld.gov.au" data-formio-createform-options="formioCreateFormOptions" data-formio-createform-controller="formioCreateFormController">
|
|
89
|
+
{{/if}}
|
|
61
90
|
<div class="qg-spinner" role="status">
|
|
62
91
|
<div class="spinner-border"></div>
|
|
63
92
|
<div class="qg-spinner-label">Loading...</div>
|
|
@@ -72,10 +101,11 @@
|
|
|
72
101
|
</div>
|
|
73
102
|
</div>
|
|
74
103
|
</div>
|
|
75
|
-
{{/
|
|
104
|
+
{{/unless}}
|
|
76
105
|
|
|
77
|
-
{{#
|
|
106
|
+
{{#unless followlinksDisabled}}
|
|
78
107
|
<div class="col-xs-12 col-md-12 col-lg-3">
|
|
108
|
+
{{#if followlinks }}
|
|
79
109
|
<div class="footer-column {{#if followlinks.hasBorderColumn}}border-column{{/if}}">
|
|
80
110
|
{{#if followlinks.title}}<h3 class="footer-heading">{{followlinks.title}}</h3>{{/if}}
|
|
81
111
|
<nav class="nav footer-link-list footer-link-list--social flex-column">
|
|
@@ -89,12 +119,37 @@
|
|
|
89
119
|
{{/each }}
|
|
90
120
|
</nav>
|
|
91
121
|
</div>
|
|
122
|
+
{{else}}
|
|
123
|
+
{{! default follow Links }}
|
|
124
|
+
<nav class="nav footer-link-list footer-link-list--social flex-column">
|
|
125
|
+
<a class="nav-link" href="#" target="_blank">
|
|
126
|
+
<svg aria-hidden="true" focusable="false" viewBox="0 0 12 21" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M3.85156 20.5H7.52344V11.5547H10.375L10.8438 8H7.52344V5.53906C7.52344 4.99219 7.60156 4.5625 7.83594 4.28906C8.07031 3.97656 8.57812 3.82031 9.28125 3.82031H11.1562V0.65625C10.4531 0.578125 9.51562 0.5 8.42188 0.5C7.01562 0.5 5.92188 0.929688 5.10156 1.75C4.24219 2.57031 3.85156 3.70312 3.85156 5.1875V8H0.84375V11.5547H3.85156V20.5Z"></path></svg>
|
|
127
|
+
<span class="nav-link-label">Facebook</span>
|
|
128
|
+
</a>
|
|
129
|
+
<a class="nav-link" href="#">
|
|
130
|
+
<svg aria-hidden="true" focusable="false" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M4.15625 18.25V6.57031H0.523438V18.25H4.15625ZM2.35938 4.96875C2.90625 4.96875 3.41406 4.77344 3.84375 4.34375C4.23438 3.95312 4.46875 3.44531 4.46875 2.85938C4.46875 2.3125 4.23438 1.80469 3.84375 1.375C3.41406 0.984375 2.90625 0.75 2.35938 0.75C1.77344 0.75 1.26562 0.984375 0.875 1.375C0.445312 1.80469 0.25 2.3125 0.25 2.85938C0.25 3.44531 0.445312 3.95312 0.875 4.34375C1.26562 4.77344 1.77344 4.96875 2.35938 4.96875ZM17.75 18.25V11.8438C17.75 10.0469 17.4766 8.71875 16.9688 7.85938C16.2656 6.80469 15.0938 6.25781 13.4141 6.25781C12.5547 6.25781 11.8516 6.49219 11.2266 6.88281C10.6406 7.23438 10.2109 7.66406 9.97656 8.17188H9.9375V6.57031H6.46094V18.25H10.0547V12.4688C10.0547 11.5703 10.1719 10.8672 10.4453 10.3984C10.7578 9.77344 11.3438 9.46094 12.2031 9.46094C13.0234 9.46094 13.5703 9.8125 13.8828 10.5156C14.0391 10.9453 14.1172 11.6094 14.1172 12.5469V18.25H17.75Z"></path></svg>
|
|
131
|
+
<span class="nav-link-label">LinkedIn</span>
|
|
132
|
+
</a>
|
|
133
|
+
<a class="nav-link" href="#">
|
|
134
|
+
<svg aria-hidden="true" focusable="false" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M12.1562 0.5H14.3438L9.53125 6.03125L15.2188 13.5H10.7812L7.28125 8.96875L3.3125 13.5H1.09375L6.25 7.625L0.8125 0.5H5.375L8.5 4.65625L12.1562 0.5ZM11.375 12.1875H12.5938L4.71875 1.75H3.40625L11.375 12.1875Z"></path></svg>
|
|
135
|
+
<span class="nav-link-label">X (Twitter)</span>
|
|
136
|
+
</a>
|
|
137
|
+
<a class="nav-link" href="#">
|
|
138
|
+
<svg aria-hidden="true" focusable="false" viewBox="0 0 22 15" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M21.2344 2.34375C21.3906 3.04688 21.5469 4.14062 21.625 5.54688L21.6641 7.5L21.625 9.45312C21.5469 10.9375 21.3906 11.9922 21.2344 12.6953C21.0781 13.1641 20.8438 13.5547 20.5312 13.8672C20.1797 14.2188 19.7891 14.4531 19.3203 14.5703C18.6172 14.7656 17.0547 14.8828 14.5547 14.9609L11 15L7.44531 14.9609C4.94531 14.8828 3.34375 14.7656 2.67969 14.5703C2.21094 14.4531 1.78125 14.2188 1.46875 13.8672C1.11719 13.5547 0.882812 13.1641 0.765625 12.6953C0.570312 11.9922 0.453125 10.9375 0.375 9.45312L0.335938 7.5C0.335938 6.95312 0.335938 6.28906 0.375 5.54688C0.453125 4.14062 0.570312 3.04688 0.765625 2.34375C0.882812 1.875 1.11719 1.48438 1.46875 1.13281C1.78125 0.820312 2.21094 0.585938 2.67969 0.429688C3.34375 0.273438 4.94531 0.117188 7.44531 0.0390625L11 0L14.5547 0.0390625C17.0547 0.117188 18.6172 0.273438 19.3203 0.429688C19.7891 0.585938 20.1797 0.820312 20.5312 1.13281C20.8438 1.48438 21.0781 1.875 21.2344 2.34375ZM8.8125 10.7031L14.3984 7.5L8.8125 4.33594V10.7031Z"></path></svg>
|
|
139
|
+
<span class="nav-link-label">Youtube</span>
|
|
140
|
+
</a>
|
|
141
|
+
<a class="nav-link" href="#">
|
|
142
|
+
<svg aria-hidden="true" focusable="false" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M9 5.00781C9.78125 5.00781 10.5234 5.24219 11.2266 5.63281C11.9297 6.02344 12.4766 6.57031 12.8672 7.27344C13.2578 7.97656 13.4922 8.71875 13.4922 9.5C13.4922 10.3203 13.2578 11.0625 12.8672 11.7656C12.4766 12.4688 11.9297 13.0156 11.2266 13.4062C10.5234 13.7969 9.78125 13.9922 9 13.9922C8.17969 13.9922 7.4375 13.7969 6.73438 13.4062C6.03125 13.0156 5.48438 12.4688 5.09375 11.7656C4.70312 11.0625 4.50781 10.3203 4.50781 9.5C4.50781 8.71875 4.70312 7.97656 5.09375 7.27344C5.48438 6.57031 6.03125 6.02344 6.73438 5.63281C7.4375 5.24219 8.17969 5.00781 9 5.00781ZM9 12.4297C9.78125 12.4297 10.4844 12.1562 11.0703 11.5703C11.6172 11.0234 11.9297 10.3203 11.9297 9.5C11.9297 8.71875 11.6172 8.01562 11.0703 7.42969C10.4844 6.88281 9.78125 6.57031 9 6.57031C8.17969 6.57031 7.47656 6.88281 6.92969 7.42969C6.34375 8.01562 6.07031 8.71875 6.07031 9.5C6.07031 10.3203 6.34375 11.0234 6.92969 11.5703C7.47656 12.1562 8.17969 12.4297 9 12.4297ZM14.7422 4.8125C14.7422 4.53906 14.625 4.30469 14.4297 4.07031C14.1953 3.875 13.9609 3.75781 13.6875 3.75781C13.375 3.75781 13.1406 3.875 12.9453 4.07031C12.7109 4.30469 12.6328 4.53906 12.6328 4.8125C12.6328 5.125 12.7109 5.35938 12.9453 5.55469C13.1406 5.78906 13.375 5.86719 13.6875 5.86719C13.9609 5.86719 14.1953 5.78906 14.3906 5.55469C14.5859 5.35938 14.7031 5.125 14.7422 4.8125ZM17.7109 5.86719C17.7109 6.60938 17.75 7.82031 17.75 9.5C17.75 11.2188 17.7109 12.4297 17.6719 13.1719C17.6328 13.9141 17.5156 14.5391 17.3594 15.0859C17.125 15.75 16.7344 16.3359 16.2656 16.8047C15.7969 17.2734 15.2109 17.625 14.5859 17.8594C14.0391 18.0547 13.375 18.1719 12.6328 18.2109C11.8906 18.25 10.6797 18.25 9 18.25C7.28125 18.25 6.07031 18.25 5.32812 18.2109C4.58594 18.1719 3.96094 18.0547 3.41406 17.8203C2.75 17.625 2.16406 17.2734 1.69531 16.8047C1.22656 16.3359 0.875 15.75 0.640625 15.0859C0.445312 14.5391 0.328125 13.9141 0.289062 13.1719C0.25 12.4297 0.25 11.2188 0.25 9.5C0.25 7.82031 0.25 6.60938 0.289062 5.86719C0.328125 5.125 0.445312 4.46094 0.640625 3.91406C0.875 3.28906 1.22656 2.70312 1.69531 2.23438C2.16406 1.76562 2.75 1.375 3.41406 1.14062C3.96094 0.984375 4.58594 0.867188 5.32812 0.828125C6.07031 0.789062 7.28125 0.75 9 0.75C10.6797 0.75 11.8906 0.789062 12.6328 0.828125C13.375 0.867188 14.0391 0.984375 14.5859 1.14062C15.2109 1.375 15.7969 1.76562 16.2656 2.23438C16.7344 2.70312 17.125 3.28906 17.3594 3.91406C17.5156 4.46094 17.6328 5.125 17.7109 5.86719ZM15.8359 14.6562C15.9922 14.2266 16.0703 13.5234 16.1484 12.5469C16.1484 12 16.1875 11.1797 16.1875 10.125V8.875C16.1875 7.82031 16.1484 7 16.1484 6.45312C16.0703 5.47656 15.9922 4.77344 15.8359 4.34375C15.5234 3.5625 14.9375 2.97656 14.1562 2.66406C13.7266 2.50781 13.0234 2.42969 12.0469 2.35156C11.4609 2.35156 10.6406 2.3125 9.625 2.3125H8.375C7.32031 2.3125 6.5 2.35156 5.95312 2.35156C4.97656 2.42969 4.27344 2.50781 3.84375 2.66406C3.02344 2.97656 2.47656 3.5625 2.16406 4.34375C2.00781 4.77344 1.89062 5.47656 1.85156 6.45312C1.8125 7.03906 1.8125 7.85938 1.8125 8.875V10.125C1.8125 11.1797 1.8125 12 1.85156 12.5469C1.89062 13.5234 2.00781 14.2266 2.16406 14.6562C2.47656 15.4766 3.0625 16.0234 3.84375 16.3359C4.27344 16.4922 4.97656 16.6094 5.95312 16.6484C6.5 16.6875 7.32031 16.6875 8.375 16.6875H9.625C10.6797 16.6875 11.5 16.6875 12.0469 16.6484C13.0234 16.6094 13.7266 16.4922 14.1562 16.3359C14.9375 16.0234 15.5234 15.4375 15.8359 14.6562Z"></path></svg>
|
|
143
|
+
<span class="nav-link-label">Instagram</span>
|
|
144
|
+
</a>
|
|
145
|
+
</nav>
|
|
146
|
+
{{/if}}
|
|
92
147
|
</div>
|
|
93
|
-
{{/
|
|
148
|
+
{{/unless}}
|
|
94
149
|
|
|
95
150
|
<div class="col-xs-12 col-md-12 col-lg-3 crest">
|
|
96
|
-
<div class="footer-column {{#
|
|
97
|
-
{{#
|
|
151
|
+
<div class="footer-column {{#unless copyright.hasBorderColumnDisabled}}border-column{{/unless}}">
|
|
152
|
+
{{#unless footerHasCrestDisabled}}
|
|
98
153
|
<div class="footer-crest">
|
|
99
154
|
<svg width="252" height="44" viewBox="0 0 252 44" fill="none"
|
|
100
155
|
xmlns="http://www.w3.org/2000/svg">
|
|
@@ -262,21 +317,30 @@
|
|
|
262
317
|
fill="white" />
|
|
263
318
|
</svg>
|
|
264
319
|
</div>
|
|
265
|
-
{{/
|
|
320
|
+
{{/unless}}
|
|
266
321
|
|
|
267
322
|
<div class="footer-content">
|
|
268
|
-
<div class="footer-acknowledgements">
|
|
323
|
+
<div class="footer-acknowledgements">
|
|
324
|
+
{{#if acknowledgements }}
|
|
269
325
|
{{#each acknowledgements}}
|
|
270
326
|
{{#if title}}
|
|
271
327
|
<h3 class="footer-heading">{{title}}</h3>
|
|
272
328
|
{{/if}}
|
|
273
|
-
{{
|
|
329
|
+
{{#if content}}
|
|
330
|
+
{{! extra { so it does not html escape }}
|
|
331
|
+
{{{ content }}}
|
|
332
|
+
{{/if}}
|
|
274
333
|
{{/each}}
|
|
334
|
+
{{else}}
|
|
335
|
+
<p>We pay our respects to the Aboriginal and Torres Strait Islander ancestors of this land, their spirits and their legacy. The foundations laid by these ancestors—our First Nations peoples—give strength, inspiration and courage to current and future generations towards creating a better Queensland.</p>
|
|
336
|
+
{{/if}}
|
|
275
337
|
</div>
|
|
276
|
-
<p class="copyright">{{{copyright.content}}} {{#if copyrightOrganisationName}}({{copyrightOrganisationName}}) {{/if}}{{#if copyrightHasYearFrom}}{{copyright.yearFrom}} - {{/if}} {{copyright.currentYear}}</p>
|
|
277
|
-
{{
|
|
278
|
-
<p><a class="fw-semibold" href="{{lookup.link.URL }}" rel="external">{{lookup.link.text}}</a></p>
|
|
338
|
+
{{#if copyright }}<p class="copyright">{{{copyright.content}}} {{#if copyrightOrganisationName}}({{copyrightOrganisationName}}) {{/if}}{{#if copyrightHasYearFrom}}{{copyright.yearFrom}} - {{/if}} {{copyright.currentYear}}</p>
|
|
339
|
+
{{else}}{{!default }}<p class="copyright">© The State of Queensland {{formatDateOrToday "" "YYYY" }}</p>
|
|
279
340
|
{{/if}}
|
|
341
|
+
{{#unless footerHasStateOfQldDisabled}}
|
|
342
|
+
<p><a class="fw-semibold" href="{{#if lookup.link.URL}}{{lookup.link.URL }}{{else}}https://www.qld.gov.au{{/if}}" rel="external">{{#if lookup.link.text}}{{lookup.link.text}}{{else}}Queensland Government{{/if}}</a></p>
|
|
343
|
+
{{/unless}}
|
|
280
344
|
</div>
|
|
281
345
|
|
|
282
346
|
</div>
|
|
@@ -3,10 +3,107 @@ import { Footer, FooterForgov } from "./Footer.js";
|
|
|
3
3
|
|
|
4
4
|
import defaultdata from "./footer.data.json";
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
export default {
|
|
7
8
|
tags: ["autodocs"],
|
|
8
9
|
title: "!Core/Footer",
|
|
9
10
|
render: (args) => new Footer(args).html,
|
|
11
|
+
// parameters: {
|
|
12
|
+
// controls: {include: []},
|
|
13
|
+
// },
|
|
14
|
+
argTypes: {
|
|
15
|
+
"feedbackForm.formAttr.data-formio-project-name": { //data-formio-project-name
|
|
16
|
+
name: "Form.io Project, edit feedbackForm to change",
|
|
17
|
+
description: `Footer Feedback project's for reference edit feedbackForm formAttr.data-formio-project-name to update`,
|
|
18
|
+
control: {
|
|
19
|
+
type: 'radio',
|
|
20
|
+
labels: {
|
|
21
|
+
"dev-oldkihhcwbdtwye" : "TEST (dev-oldkihhcwbdtwye)",
|
|
22
|
+
"staging-oldkihhcwbdtwye" : "STAGING (staging-oldkihhcwbdtwye)",
|
|
23
|
+
"uat-oldkihhcwbdtwye" : "UAT (uat-oldkihhcwbdtwye)",
|
|
24
|
+
"oldkihhcwbdtwye": "PROD (oldkihhcwbdtwye)",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
options: [
|
|
28
|
+
"dev-oldkihhcwbdtwye",
|
|
29
|
+
"uat-oldkihhcwbdtwye",
|
|
30
|
+
"staging-oldkihhcwbdtwye",
|
|
31
|
+
"oldkihhcwbdtwye",
|
|
32
|
+
],
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
sitename: {
|
|
36
|
+
name: "Site Name",
|
|
37
|
+
description: "Name of the site",
|
|
38
|
+
control: {type: 'text'},
|
|
39
|
+
},
|
|
40
|
+
contactHasContactList: {
|
|
41
|
+
name: "Contact Has Contact List",
|
|
42
|
+
description: "Whether the contact list is enabled",
|
|
43
|
+
control: {type: 'boolean'},
|
|
44
|
+
},
|
|
45
|
+
footerHasCrestDisabled: {
|
|
46
|
+
name: "Footer Has Crest",
|
|
47
|
+
description: "Whether the footer has a crest",
|
|
48
|
+
control: {type: 'boolean'},
|
|
49
|
+
},
|
|
50
|
+
footerHasStateOfQldDisabled: {
|
|
51
|
+
name: "Footer Has State of Qld",
|
|
52
|
+
description: "Whether the footer shows State of Qld",
|
|
53
|
+
control: {type: 'boolean'},
|
|
54
|
+
},
|
|
55
|
+
feedbackFormDisabled: {
|
|
56
|
+
name: "Feedback Form Disabled",
|
|
57
|
+
description: "Whether the feedback form is visible",
|
|
58
|
+
control: {type: 'boolean'},
|
|
59
|
+
},
|
|
60
|
+
followlinksEnabled: {
|
|
61
|
+
name: "Follow Links Enabled",
|
|
62
|
+
description: "Whether the follow links are enabled",
|
|
63
|
+
control: {type: 'boolean'},
|
|
64
|
+
},
|
|
65
|
+
copyrightHasYearFrom: {
|
|
66
|
+
name: "Copyright Has Year From",
|
|
67
|
+
description: "Whether the copyright section has a year from",
|
|
68
|
+
control: {type: 'boolean'},
|
|
69
|
+
},
|
|
70
|
+
copyrightOrganisationName: {
|
|
71
|
+
name: "Copyright Organisation Name",
|
|
72
|
+
description: "Name of the copyright organisation",
|
|
73
|
+
control: {type: 'text'},
|
|
74
|
+
},
|
|
75
|
+
contact: {
|
|
76
|
+
name: "Contact",
|
|
77
|
+
description: "Contact section details",
|
|
78
|
+
control: {type: 'object'},
|
|
79
|
+
},
|
|
80
|
+
lookup: {
|
|
81
|
+
name: "Lookup",
|
|
82
|
+
description: "Lookup section details",
|
|
83
|
+
control: {type: 'object'},
|
|
84
|
+
},
|
|
85
|
+
acknowledgements: {
|
|
86
|
+
name: "Acknowledgements",
|
|
87
|
+
description: "Acknowledgements section details",
|
|
88
|
+
control: {type: 'array'},
|
|
89
|
+
},
|
|
90
|
+
copyright: {
|
|
91
|
+
name: "Copyright",
|
|
92
|
+
description: "Copyright section details",
|
|
93
|
+
control: {type: 'object'},
|
|
94
|
+
},
|
|
95
|
+
footerlinks: {
|
|
96
|
+
name: "Footer Links",
|
|
97
|
+
description: "Footer links section details",
|
|
98
|
+
control: {type: 'object'},
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
followlinks: {
|
|
102
|
+
name: "Follow Links",
|
|
103
|
+
description: "Follow links section details",
|
|
104
|
+
control: {type: 'object'},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
10
107
|
};
|
|
11
108
|
|
|
12
109
|
/**
|
|
@@ -14,9 +111,13 @@ export default {
|
|
|
14
111
|
*/
|
|
15
112
|
export const Default = {
|
|
16
113
|
args: defaultdata,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Example footer doing handlebars defaults
|
|
118
|
+
*/
|
|
119
|
+
export const DefaultBlank = {
|
|
120
|
+
args: {},
|
|
20
121
|
};
|
|
21
122
|
|
|
22
123
|
/**
|
|
@@ -60,8 +60,12 @@ export default function handlebarsHelpers(handlebars) {
|
|
|
60
60
|
const options = args.pop(); // The last argument is the options object
|
|
61
61
|
return args.some(arg => !!arg) ? options.fn(this) : options.inverse(this);
|
|
62
62
|
});
|
|
63
|
+
// now - return current timestamp i.e {{now}}
|
|
64
|
+
handlebars.registerHelper('now', function() {
|
|
65
|
+
return new Date().toISOString();
|
|
66
|
+
});
|
|
63
67
|
// formatDate - Format Date, for footer meta data i.e {{formatDate '2023-06-23'}}
|
|
64
|
-
handlebars.registerHelper('formatDate', function(dateString, defaultDate) {
|
|
68
|
+
handlebars.registerHelper('formatDate', function(dateString, defaultDate, format) {
|
|
65
69
|
// Use the dateString if provided, otherwise use the defaultDate, otherwise error
|
|
66
70
|
let date;
|
|
67
71
|
if (dateString) {
|
|
@@ -80,18 +84,26 @@ export default function handlebarsHelpers(handlebars) {
|
|
|
80
84
|
var day = date.getDate();
|
|
81
85
|
var month = monthNames[date.getMonth()];
|
|
82
86
|
var year = date.getFullYear();
|
|
83
|
-
|
|
87
|
+
// Format date based on the format string
|
|
88
|
+
switch (format) {
|
|
89
|
+
case 'YYYY':
|
|
90
|
+
return `${year}`;
|
|
91
|
+
case 'MMMM YYYY':
|
|
92
|
+
return `${month} ${year}`;
|
|
93
|
+
default:
|
|
94
|
+
return `${day} ${month} ${year}`;
|
|
95
|
+
}
|
|
84
96
|
});
|
|
85
97
|
|
|
86
98
|
// formatDateOrToday - Format Date if passed or today i.e. {{formatDateOrToday '2023-06-23'}} or {{formatDateOrToday}} <!-- This will use the current date -->
|
|
87
|
-
handlebars.registerHelper('formatDateOrToday', function(dateString) {
|
|
99
|
+
handlebars.registerHelper('formatDateOrToday', function(dateString, format) {
|
|
88
100
|
// Use the current date if dateString is missing or invalid
|
|
89
101
|
const dateToFormat = dateString || new Date().toISOString();
|
|
90
102
|
// Call the formatDate helper with the determined date and format
|
|
91
|
-
return handlebars.helpers.formatDate(dateToFormat);
|
|
103
|
+
return handlebars.helpers.formatDate(dateString, dateToFormat, format);
|
|
92
104
|
});
|
|
93
105
|
}
|
|
94
106
|
|
|
95
107
|
if(typeof(Handlebars) !== 'undefined') {
|
|
96
108
|
handlebarsHelpers(Handlebars);
|
|
97
|
-
}
|
|
109
|
+
}
|