@ons/design-system 53.0.0 → 53.0.3
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.
|
@@ -38,8 +38,6 @@
|
|
|
38
38
|
"altTextId": 'poweredby-alt'
|
|
39
39
|
})
|
|
40
40
|
}}
|
|
41
|
-
{% else %}
|
|
42
|
-
{{ onsLogo | safe }}
|
|
43
41
|
{% endif %}
|
|
44
42
|
{% endset %}
|
|
45
43
|
|
|
@@ -177,9 +175,15 @@
|
|
|
177
175
|
</div>
|
|
178
176
|
{% endif %}
|
|
179
177
|
|
|
180
|
-
{% if
|
|
178
|
+
{% if params.poweredBy is defined and params.poweredBy %}
|
|
179
|
+
{% if not params.poweredBy.partnership %}
|
|
180
|
+
<div class="ons-footer__poweredby ons-u-mb-m">
|
|
181
|
+
{{ poweredByLogo | safe }}
|
|
182
|
+
</div>
|
|
183
|
+
{% endif %}
|
|
184
|
+
{% else %}
|
|
181
185
|
<div class="ons-footer__poweredby ons-u-mb-m">
|
|
182
|
-
{{
|
|
186
|
+
{{ onsLogo | safe }}
|
|
183
187
|
</div>
|
|
184
188
|
{% endif %}
|
|
185
189
|
</div>
|
|
@@ -42,9 +42,13 @@
|
|
|
42
42
|
|
|
43
43
|
{% if params.button is defined and params.button %}
|
|
44
44
|
{% from "components/button/_macro.njk" import onsButton %}
|
|
45
|
+
{% set btnClasses = params.button.classes if params.button.classes is defined and params.button.classes else '' %}
|
|
46
|
+
{% if skinName == 'dark' %}
|
|
47
|
+
{% set btnClasses = btnClasses + ' ons-btn--ghost' %}
|
|
48
|
+
{% endif %}
|
|
45
49
|
{{
|
|
46
50
|
onsButton({
|
|
47
|
-
"classes":
|
|
51
|
+
"classes": btnClasses,
|
|
48
52
|
"type": 'button',
|
|
49
53
|
"text": params.button.text,
|
|
50
54
|
"url": params.button.url
|
|
@@ -158,6 +158,15 @@ describe('macro: hero', () => {
|
|
|
158
158
|
expect(buttonSpy.occurrences[0]).toHaveProperty('text', 'Get started');
|
|
159
159
|
expect(buttonSpy.occurrences[0]).toHaveProperty('url', '#0');
|
|
160
160
|
});
|
|
161
|
+
|
|
162
|
+
it('outputs the correct button class with `dark` theme', () => {
|
|
163
|
+
const faker = templateFaker();
|
|
164
|
+
const buttonSpy = faker.spy('button');
|
|
165
|
+
|
|
166
|
+
faker.renderComponent('hero', { ...EXAMPLE_HERO_WITH_BUTTON, variants: 'dark' });
|
|
167
|
+
|
|
168
|
+
expect(buttonSpy.occurrences[0]).toHaveProperty('classes', ' ons-btn--ghost');
|
|
169
|
+
});
|
|
161
170
|
});
|
|
162
171
|
|
|
163
172
|
describe('mode: with pre-title image', () => {
|
package/layout/_template.njk
CHANGED
|
@@ -149,6 +149,7 @@
|
|
|
149
149
|
onsHeader({
|
|
150
150
|
"title": pageConfig.header.title | default(pageConfig.title),
|
|
151
151
|
"classes": pageConfig.header.classes,
|
|
152
|
+
"variants": pageConfig.header.variants,
|
|
152
153
|
"wide": pageConfig.wide,
|
|
153
154
|
"language": pageConfig.language,
|
|
154
155
|
"button": pageConfig.signoutButton,
|
|
@@ -157,14 +158,15 @@
|
|
|
157
158
|
"phase": pageConfig.phase,
|
|
158
159
|
"assetsURL": assetsURL,
|
|
159
160
|
"serviceLinks": pageConfig.serviceLinks,
|
|
161
|
+
"noMasthead": pageConfig.header.noMasthead,
|
|
160
162
|
"orgLogo": pageConfig.header.orgLogo,
|
|
161
163
|
"orgMobileLogo": pageConfig.header.orgMobileLogo,
|
|
162
164
|
"orgLogoAlt": pageConfig.header.orgLogoAlt,
|
|
163
165
|
"orgLogoHref": pageConfig.header.orgLogoHref,
|
|
164
166
|
"titleLogo": pageConfig.header.titleLogo,
|
|
165
167
|
"titleLogoClasses": pageConfig.header.titleLogoClasses,
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
+
"titleLogoMobile": pageConfig.header.titleLogoMobile,
|
|
169
|
+
"titleLogoMobileClasses": pageConfig.header.titleLogoMobileClasses,
|
|
168
170
|
"titleLogoAlt": pageConfig.header.titleLogoAlt,
|
|
169
171
|
"titleLogoHref": pageConfig.header.titleLogoHref,
|
|
170
172
|
"customHeaderLogo": pageConfig.header.customHeaderLogo
|