@uqds/hero 0.1.0-alpha.0 → 1.0.0-alpha.1
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/css/main.css +1 -1
- package/package.json +2 -2
- package/src/scss/_custom-properties.scss +29 -0
- package/src/scss/_hero-basic.scss +69 -0
- package/src/scss/_hero.scss +153 -0
- package/src/scss/main.scss +3 -1
- package/src/scss/_component.scss +0 -144
package/dist/css/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:root{--hero-font-size-ul: 3rem;--hero-font-size-xxxxl: 2.5rem;--hero-spacing: 4.5rem;--hero-basic-spacing: 5rem;--hero-aspect-ratio: 2.35 / 1;--hero-large-aspect-ratio: 3 / 2;--hero-min-height: 336px;--hero-large-min-height: 500px;--hero-image-max-width: 790px;--hero-title-max-line-length: 518px}@media(max-width: 63.9375rem){:root{--hero-font-size-ul: 30px;--hero-font-size-xxxxl: 30px;--hero-basic-spacing: 2rem}}.uq-hero{background:#4b2271}@media(min-width: 64rem){.uq-hero{position:relative;padding:var(--hero-spacing) 0;min-height:var(--hero-min-height);display:flex;align-items:center}}@media(max-width: 63.9375rem){.uq-hero .uq-container{margin:0;padding:0}}.uq-hero__image{display:flex}@media(min-width: 64rem){.uq-hero__image{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%}}@media(min-width: 64rem){.uq-hero__image::before{content:"";width:calc(50% - 3rem);flex-shrink:1}}.uq-hero__image img,.uq-hero__image picture{object-fit:cover;aspect-ratio:var(--hero-aspect-ratio);width:100%}@media(min-width: 64rem){.uq-hero__image img,.uq-hero__image picture{width:auto;height:100%;flex-shrink:0;max-width:var(--hero-image-max-width)}}.uq-hero__content{position:relative;background:#51247a;box-shadow:0 3px 24px 0 rgba(24,24,24,.1);padding:var(--layout-gap);margin-bottom:8px}@media(min-width: 64rem){.uq-hero__content{z-index:2;width:586px}}.uq-hero__content *{margin:0}.uq-hero__content::after{position:absolute;top:100%;left:0;content:"";height:8px;width:100%;border-radius:0 0 4px 4px;background:#40205d}.uq-hero__title{color:#fff;font-size:var(--hero-font-size-xxxxl)}.uq-hero__description{margin-top:1rem;font-size:1.125rem;color:#fff}.uq-hero__description,.uq-hero__description *{color:#fff;font-size:1.125rem}.uq-hero__button{margin-top:1.5rem}.uq-hero--light{background:unset}.uq-hero--light .uq-hero__content{background:#fff}.uq-hero--light .uq-hero__content::after{background:linear-gradient(90deg, #51247a 0%, 87%, #962a8b 100%)}.uq-hero--light .uq-hero__title{color:#51247a}.uq-hero--light .uq-hero__description,.uq-hero--light .uq-hero__description *{color:unset}@media(min-width: 64rem){.uq-hero--large{min-height:var(--hero-large-min-height)}}.uq-hero--large .uq-hero__image img,.uq-hero--large .uq-hero__image picture{aspect-ratio:var(--hero-large-aspect-ratio)}.uq-hero--large .uq-hero__title{font-size:var(--hero-font-size-ul)}.uq-hero-basic{background:#4b2271;position:relative}.uq-hero-basic__image{position:absolute;opacity:.2;width:100%;height:100%;top:0;left:0;z-index:1}.uq-hero-basic__image img,.uq-hero-basic__image picture{object-fit:cover;height:100%;width:100%;display:block}.uq-hero-basic__content{position:relative;z-index:2;color:#fff;padding:var(--hero-basic-spacing) 0}.uq-hero-basic__content a{color:#fff}.uq-hero-basic__eyebrow{font-weight:500;font-size:1rem;line-height:1.5;font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;text-transform:uppercase;display:block}.uq-hero-basic__title{font-size:var(--hero-font-size-xxxxl);color:#fff;margin:0;max-width:var(--hero-title-max-line-length)}.uq-hero-basic__back{margin-top:.5rem}.uq-hero-basic__back .uq-icon::before{width:16px;height:19px}.uq-hero-basic__tabs{position:relative;z-index:2;padding-top:1rem}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uqds/hero",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
4
|
"description": "Hero component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"uqds",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@uqds/core": "^1.2.0-alpha.0",
|
|
45
45
|
"@uqds/grid": "^0.0.15-alpha.2"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "53a77b5717f2c6808adfe23251e0b05cb93f002a"
|
|
48
48
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--hero-font-size-ul: #{core.$font-size-ul};
|
|
5
|
+
--hero-font-size-xxxxl: #{core.$font-size-xxxxl};
|
|
6
|
+
|
|
7
|
+
--hero-spacing: #{core.$space-uul};
|
|
8
|
+
--hero-basic-spacing: #{core.$space-uuul};
|
|
9
|
+
|
|
10
|
+
--hero-aspect-ratio: 2.35 / 1;
|
|
11
|
+
--hero-large-aspect-ratio: 3 / 2;
|
|
12
|
+
|
|
13
|
+
--hero-min-height: 336px;
|
|
14
|
+
--hero-large-min-height: 500px;
|
|
15
|
+
|
|
16
|
+
--hero-image-max-width: 790px;
|
|
17
|
+
|
|
18
|
+
--hero-title-max-line-length: 518px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Resize custom properties for tablet/mobile.
|
|
22
|
+
@media #{core.$screen-lg-down} {
|
|
23
|
+
:root {
|
|
24
|
+
--hero-font-size-ul: 30px;
|
|
25
|
+
--hero-font-size-xxxxl: 30px;
|
|
26
|
+
|
|
27
|
+
--hero-basic-spacing: #{core.$space-xl};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
@use "@uqds/grid/src/scss/global" as grid;
|
|
3
|
+
|
|
4
|
+
.uq-hero-basic {
|
|
5
|
+
background: core.$purple-600;
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.uq-hero-basic__image {
|
|
10
|
+
position: absolute;
|
|
11
|
+
opacity: 0.2;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
z-index: 1;
|
|
17
|
+
|
|
18
|
+
& img,
|
|
19
|
+
& picture {
|
|
20
|
+
object-fit: cover;
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
display: block;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.uq-hero-basic__content {
|
|
28
|
+
position: relative;
|
|
29
|
+
z-index: 2;
|
|
30
|
+
color: core.$white;
|
|
31
|
+
padding: var(--hero-basic-spacing) 0;
|
|
32
|
+
|
|
33
|
+
& a {
|
|
34
|
+
color: core.$white;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.uq-hero-basic__eyebrow {
|
|
39
|
+
font-weight: core.$font-weight-medium;
|
|
40
|
+
font-size: core.$font-size-m;
|
|
41
|
+
line-height: core.$line-height;
|
|
42
|
+
font-family: core.$font-body;
|
|
43
|
+
text-transform: uppercase;
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.uq-hero-basic__title {
|
|
48
|
+
font-size: var(--hero-font-size-xxxxl);
|
|
49
|
+
color: core.$white;
|
|
50
|
+
margin: 0;
|
|
51
|
+
max-width: var(--hero-title-max-line-length);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.uq-hero-basic__back {
|
|
55
|
+
margin-top: core.$space-s;
|
|
56
|
+
|
|
57
|
+
& .uq-icon::before {
|
|
58
|
+
// Lock icon width to 16px.
|
|
59
|
+
width: 16px;
|
|
60
|
+
// Allow height to match <a> element.
|
|
61
|
+
height: 19px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.uq-hero-basic__tabs {
|
|
66
|
+
position: relative;
|
|
67
|
+
z-index: 2;
|
|
68
|
+
padding-top: core.$space-m;
|
|
69
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
+
@use "@uqds/grid/src/scss/global" as grid;
|
|
3
|
+
|
|
4
|
+
.uq-hero {
|
|
5
|
+
background: core.$purple-600;
|
|
6
|
+
|
|
7
|
+
@media #{core.$screen-lg-up} {
|
|
8
|
+
position: relative;
|
|
9
|
+
// On desktop the we set a min height and top/bottom padding.
|
|
10
|
+
// This will ensure heros expand in height when there is too much text.
|
|
11
|
+
padding: var(--hero-spacing) 0;
|
|
12
|
+
min-height: var(--hero-min-height);
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
& .uq-container {
|
|
18
|
+
// On mobile/tablet .uq-hero__content provides padding and the
|
|
19
|
+
// container gutters are no longer needed.
|
|
20
|
+
@media #{core.$screen-lg-down} {
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.uq-hero__image {
|
|
28
|
+
display: flex;
|
|
29
|
+
|
|
30
|
+
@media #{core.$screen-lg-up} {
|
|
31
|
+
position: absolute;
|
|
32
|
+
z-index: 1;
|
|
33
|
+
left: 0;
|
|
34
|
+
top: 0;
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&::before {
|
|
40
|
+
@media #{core.$screen-lg-up} {
|
|
41
|
+
content: "";
|
|
42
|
+
width: calc(50% - #{core.$space-xxxl});
|
|
43
|
+
flex-shrink: 1;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& img,
|
|
48
|
+
& picture {
|
|
49
|
+
object-fit: cover;
|
|
50
|
+
// The hero image uses this standard aspect ratio so it is always the
|
|
51
|
+
// same size.
|
|
52
|
+
aspect-ratio: var(--hero-aspect-ratio);
|
|
53
|
+
// On tablet/mobile the image size is based off the width of the page.
|
|
54
|
+
width: 100%;
|
|
55
|
+
|
|
56
|
+
@media #{core.$screen-lg-up} {
|
|
57
|
+
// On desktop the image size is based off the height of the hero.
|
|
58
|
+
width: auto;
|
|
59
|
+
height: 100%;
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
// Set a max width which will ensure the image doesn't get too wide for
|
|
62
|
+
// heros that container a large amount of text.
|
|
63
|
+
max-width: var(--hero-image-max-width);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.uq-hero__content {
|
|
69
|
+
position: relative;
|
|
70
|
+
background: core.$purple-500;
|
|
71
|
+
box-shadow: 0 3px 24px 0 rgba(#181818, 0.1);
|
|
72
|
+
padding: var(--layout-gap);
|
|
73
|
+
margin-bottom: 8px;
|
|
74
|
+
|
|
75
|
+
@media #{core.$screen-lg-up} {
|
|
76
|
+
z-index: 2;
|
|
77
|
+
width: 586px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
& * {
|
|
81
|
+
margin: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&::after {
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 100%;
|
|
87
|
+
left: 0;
|
|
88
|
+
content: "";
|
|
89
|
+
height: 8px;
|
|
90
|
+
width: 100%;
|
|
91
|
+
border-radius: 0 0 4px 4px;
|
|
92
|
+
background: core.$purple-650;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.uq-hero__title {
|
|
97
|
+
color: core.$white;
|
|
98
|
+
font-size: var(--hero-font-size-xxxxl);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.uq-hero__description {
|
|
102
|
+
margin-top: core.$space-m;
|
|
103
|
+
font-size: core.$font-size-l;
|
|
104
|
+
color: core.$white;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.uq-hero__description,
|
|
108
|
+
.uq-hero__description * {
|
|
109
|
+
color: core.$white;
|
|
110
|
+
font-size: core.$font-size-l;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.uq-hero__button {
|
|
114
|
+
margin-top: core.$space-l;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.uq-hero--light {
|
|
118
|
+
background: unset;
|
|
119
|
+
|
|
120
|
+
& .uq-hero__content {
|
|
121
|
+
background: core.$white;
|
|
122
|
+
|
|
123
|
+
&::after {
|
|
124
|
+
background: core.$purple-gradient;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
& .uq-hero__title {
|
|
129
|
+
color: core.$purple-500;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
& .uq-hero__description,
|
|
133
|
+
& .uq-hero__description * {
|
|
134
|
+
color: unset;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.uq-hero--large {
|
|
139
|
+
@media #{core.$screen-lg-up} {
|
|
140
|
+
min-height: var(--hero-large-min-height);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
& .uq-hero__image {
|
|
144
|
+
& img,
|
|
145
|
+
& picture {
|
|
146
|
+
aspect-ratio: var(--hero-large-aspect-ratio);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
& .uq-hero__title {
|
|
151
|
+
font-size: var(--hero-font-size-ul);
|
|
152
|
+
}
|
|
153
|
+
}
|
package/src/scss/main.scss
CHANGED
package/src/scss/_component.scss
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
@use "@uqds/core/src/scss/global" as core;
|
|
2
|
-
@use "@uqds/grid/src/scss/global" as grid;
|
|
3
|
-
|
|
4
|
-
// Hero
|
|
5
|
-
|
|
6
|
-
.uq-hero {
|
|
7
|
-
position: relative;
|
|
8
|
-
background-color: core.$purple-500;
|
|
9
|
-
font-family: core.$font-body;
|
|
10
|
-
font-size: core.$font-size-m;
|
|
11
|
-
font-weight: core.$font-weight-medium;
|
|
12
|
-
line-height: core.$line-height;
|
|
13
|
-
|
|
14
|
-
&__content {
|
|
15
|
-
@include grid.layout-containment;
|
|
16
|
-
@include grid.grid-col-padding;
|
|
17
|
-
color: white;
|
|
18
|
-
padding-top: 3rem;
|
|
19
|
-
padding-bottom: 3rem;
|
|
20
|
-
position: relative;
|
|
21
|
-
z-index: 2;
|
|
22
|
-
|
|
23
|
-
@media #{core.$screen-md-up} {
|
|
24
|
-
padding-top: 6.5rem;
|
|
25
|
-
padding-bottom: 6.5rem;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&__text {
|
|
30
|
-
& .uq-hero__title {
|
|
31
|
-
color: inherit;
|
|
32
|
-
font-family: core.$montserrat;
|
|
33
|
-
font-size: core.$font-size-xxxl;
|
|
34
|
-
margin-top: 0;
|
|
35
|
-
margin-bottom: core.$space-s;
|
|
36
|
-
|
|
37
|
-
@media #{core.$screen-md-up} {
|
|
38
|
-
font-size: core.$font-size-xxxxl;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
& *:last-child {
|
|
43
|
-
margin-bottom: 0;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&__subtext {
|
|
48
|
-
margin-bottom: core.$space-l;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&__image {
|
|
52
|
-
position: absolute;
|
|
53
|
-
top: 0;
|
|
54
|
-
left: 0;
|
|
55
|
-
right: 0;
|
|
56
|
-
bottom: 0;
|
|
57
|
-
z-index: 0;
|
|
58
|
-
|
|
59
|
-
& picture,
|
|
60
|
-
& img {
|
|
61
|
-
position: absolute;
|
|
62
|
-
height: 100%;
|
|
63
|
-
width: 100%;
|
|
64
|
-
top: 0;
|
|
65
|
-
left: 0;
|
|
66
|
-
object-fit: cover;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&::before {
|
|
70
|
-
content: "";
|
|
71
|
-
display: block;
|
|
72
|
-
position: absolute;
|
|
73
|
-
top: 0;
|
|
74
|
-
left: 0;
|
|
75
|
-
width: 100%;
|
|
76
|
-
height: 100%;
|
|
77
|
-
background: linear-gradient(
|
|
78
|
-
100deg,
|
|
79
|
-
rgb(81, 36, 122) 36%,
|
|
80
|
-
transparent 70%
|
|
81
|
-
);
|
|
82
|
-
mix-blend-mode: normal;
|
|
83
|
-
opacity: 1;
|
|
84
|
-
z-index: 1;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&--small {
|
|
88
|
-
@media #{core.$screen-md-up} {
|
|
89
|
-
display: none;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
& img {
|
|
93
|
-
position: relative;
|
|
94
|
-
height: auto;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&--large {
|
|
99
|
-
display: none;
|
|
100
|
-
|
|
101
|
-
@media #{core.$screen-md-up} {
|
|
102
|
-
display: block;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
@media #{core.$screen-md-down} {
|
|
107
|
-
position: relative;
|
|
108
|
-
min-height: 6rem;
|
|
109
|
-
|
|
110
|
-
&::before {
|
|
111
|
-
background: linear-gradient(
|
|
112
|
-
360deg,
|
|
113
|
-
rgb(81, 36, 122) 3%,
|
|
114
|
-
transparent 50%
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&--feature-image {
|
|
121
|
-
& .uq-hero__content {
|
|
122
|
-
padding-top: 0;
|
|
123
|
-
|
|
124
|
-
@media #{core.$screen-md-up} {
|
|
125
|
-
padding-top: 6.5rem;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
& .hero__text {
|
|
130
|
-
@media #{core.$screen-md-up} {
|
|
131
|
-
width: 50%;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&--large {
|
|
137
|
-
& .uq-hero__content {
|
|
138
|
-
@media #{core.$screen-md-up} {
|
|
139
|
-
padding-top: core.$space-uuuuul;
|
|
140
|
-
padding-bottom: core.$space-uuuuul;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|