@illinois-toolkit/ilw-hero 1.2.2 → 1.3.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/src/ilw-hero.css CHANGED
@@ -1,10 +1,12 @@
1
- :root {
1
+ ilw-hero {
2
2
  --ilw-hero--height: 223px;
3
- --ilw-hero--font: 700 2.25rem/2.25rem var(--il-font-sans);
3
+ --ilw-hero--font-style: var(--il-font-sans);
4
+ --ilw-hero--font: 700 2.25rem/2.25rem var(--ilw-hero--font-style);
4
5
  --ilw-hero--background: var(--ilw-color--heading);
5
6
  --ilw-hero--text-color: var(--ilw-color--background);
6
7
  --ilw-hero--text-width: 40%;
7
8
  --ilw-hero--shadow-color: rgba(0, 0, 0, 1);
9
+ --ilw-hero--background-tint: none;
8
10
  }
9
11
 
10
12
  ilw-hero {
@@ -29,6 +31,73 @@ ilw-hero h1, ilw-hero h2, ilw-hero h3, ilw-hero p.title {
29
31
  text-align: inherit;
30
32
  }
31
33
 
34
+ ilw-hero[font="heading"] {
35
+ --ilw-hero--font-style: var(--il-font-heading);
36
+ }
37
+ ilw-hero[shade="full"] {
38
+ --ilw-hero--background-tint: rgba(19, 41, 75, 0.4);
39
+ }
40
+ ilw-hero[shade="full-black"] {
41
+ --ilw-hero--background-tint: rgba(0, 0, 0, 0.4);
42
+ }
43
+ ilw-hero[shade="directional"], ilw-hero[shade="directional"][align="center"] {
44
+ --ilw-hero--background-tint: radial-gradient(rgba(19, 41, 75, .6), rgba(0, 0, 0, 0));
45
+ }
46
+ ilw-hero[shade="directional"][align="left"] {
47
+ --ilw-hero--background-tint: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6));
48
+ }
49
+ ilw-hero[shade="directional"][align="right"] {
50
+ --ilw-hero--background-tint: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6));
51
+ }
52
+ ilw-hero[shade="directional"][align="top"] {
53
+ --ilw-hero--background-tint: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6));
54
+ }
55
+ ilw-hero[shade="directional"][align="bottom"] {
56
+ --ilw-hero--background-tint: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6));
57
+ }
58
+ ilw-hero[shade="directional"][align="top-left"] {
59
+ --ilw-hero--background-tint: linear-gradient(to top left, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6));
60
+ }
61
+ ilw-hero[shade="directional"][align="top-right"] {
62
+ --ilw-hero--background-tint: linear-gradient(to top right, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6));
63
+ }
64
+ ilw-hero[shade="directional"][align="bottom-left"] {
65
+ --ilw-hero--background-tint: linear-gradient(to bottom left, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6));
66
+ }
67
+ ilw-hero[shade="directional"][align="bottom-right"] {
68
+ --ilw-hero--background-tint: linear-gradient(to bottom right, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6));
69
+ }
70
+ ilw-hero[shade="directional-black"], ilw-hero[shade="directional-black"][align="center"] {
71
+ --ilw-hero--background-tint: radial-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, 0));
72
+ }
73
+ ilw-hero[shade="directional-black"][align="left"] {
74
+ --ilw-hero--background-tint: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
75
+ }
76
+ ilw-hero[shade="directional-black"][align="right"] {
77
+ --ilw-hero--background-tint: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
78
+ }
79
+ ilw-hero[shade="directional-black"][align="top"] {
80
+ --ilw-hero--background-tint: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
81
+ }
82
+ ilw-hero[shade="directional-black"][align="bottom"] {
83
+ --ilw-hero--background-tint: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
84
+ }
85
+ ilw-hero[shade="directional-black"][align="top-left"] {
86
+ --ilw-hero--background-tint: linear-gradient(to top left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
87
+ }
88
+ ilw-hero[shade="directional-black"][align="top-right"] {
89
+ --ilw-hero--background-tint: linear-gradient(to top right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
90
+ }
91
+ ilw-hero[shade="directional-black"][align="bottom-left"] {
92
+ --ilw-hero--background-tint: linear-gradient(to bottom left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
93
+ }
94
+ ilw-hero[shade="directional-black"][align="bottom-right"] {
95
+ --ilw-hero--background-tint: linear-gradient(to bottom right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
96
+ }
97
+ ilw-hero[shade][theme="white"] {
98
+ --ilw-hero--background-tint: rgba(255, 255, 255, 0.4);
99
+ }
100
+
32
101
  ilw-hero[theme="orange"] {
33
102
  --ilw-hero--background: var(--ilw-color--orange--background);
34
103
  --ilw-hero--button-background-color: var(--ilw-color--orange--control-accent);
@@ -61,16 +130,16 @@ ilw-hero[focus="right"] img {
61
130
  }
62
131
 
63
132
  @media (min-width: 576px) {
64
- :root {
133
+ ilw-hero {
65
134
  --ilw-hero--height: 315px;
66
- --ilw-hero--font: 700 3rem/3rem var(--il-font-sans);
135
+ --ilw-hero--font: 700 3rem/3rem var(--ilw-hero--font-style);
67
136
  }
68
137
  }
69
138
 
70
139
  @media (min-width: 767px) {
71
- :root {
140
+ ilw-hero {
72
141
  --ilw-hero--height: 557px;
73
- --ilw-hero--font: 700 4rem/4rem var(--il-font-sans);
142
+ --ilw-hero--font: 700 4rem/4rem var(--ilw-hero--font-style);
74
143
  }
75
144
  ilw-hero[shadow] h1, ilw-hero[shadow] h2, ilw-hero[shadow] h3 {
76
145
  background: radial-gradient(rgba(0,0,0,.9),rgba(0,0,0,0.1));
@@ -83,7 +152,7 @@ ilw-hero[focus="right"] img {
83
152
  }
84
153
 
85
154
  @media (min-width: 992px) {
86
- :root {
87
- --ilw-hero--font: 700 4.5rem/4.5rem var(--il-font-sans);
155
+ ilw-hero {
156
+ --ilw-hero--font: 700 4.5rem/4.5rem var(--ilw-hero--font-style);
88
157
  }
89
158
  }
@@ -26,6 +26,14 @@ export default css`
26
26
  background-color: var(--ilw-hero--background);
27
27
  }
28
28
 
29
+ .background::after {
30
+ content: "";
31
+ position: absolute;
32
+ inset: 0;
33
+ background: var(--ilw-hero--background-tint);
34
+ pointer-events: none;
35
+ }
36
+
29
37
  .always-over .background {
30
38
  position: absolute;
31
39
  width: 100%;
@@ -49,7 +57,7 @@ img {
49
57
  background: var(--ilw-hero--background);
50
58
  position: relative;
51
59
  z-index: 100;
52
- padding: 0 20px;
60
+ padding: 0 var(--ilw-margin--side);
53
61
  }
54
62
 
55
63
  .always-over .content-outer {
@@ -108,19 +116,18 @@ img {
108
116
  flex-direction: column;
109
117
  text-align: center;
110
118
  align-items: center;
111
- max-width: 1200px;
112
119
  }
113
120
 
114
121
  .content-inner.left {
115
122
  text-align: left;
116
123
  align-items: flex-start;
117
- margin-left: 100px;
124
+ margin-left: 0;
118
125
  }
119
126
 
120
127
  .content-inner.right {
121
128
  text-align: right;
122
129
  align-items: flex-end;
123
- margin-right: 100px;
130
+ margin-right: 0;
124
131
  }
125
132
 
126
133
  .content-inner.top {
@@ -1,146 +0,0 @@
1
- {
2
- "title": "Hero",
3
- "tag": "ilw-hero",
4
- "github": "https://github.com/web-illinois/ilw-hero/",
5
- "type": "web component",
6
- "element-name": "ilw-hero",
7
- "description": "The Hero Image component adds a large picture at the top of the page. It is used to draw attention to the page and can be used to set the tone for the page.",
8
- "builder-version": "1.1",
9
- "version": "1.1",
10
- "date": "10/23/2025",
11
- "css": "https://cdn.toolkit.illinois.edu/ilw-hero/1.1/ilw-hero.css",
12
- "js": "https://cdn.toolkit.illinois.edu/ilw-hero/1.1/ilw-hero.js",
13
- "production": true,
14
- "notes": "",
15
- "parent-style": "",
16
- "samples": [
17
- {
18
- "name": "default",
19
- "description": "Default information with image",
20
- "text": "<img src='https://picsum.photos/1920/1280' alt='' slot='background'><h1>Innovating solutions every year</h1><ul class='ilw-buttons'><li><a href='#'>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#'>Link 3</a></li></ul>"
21
- },
22
- {
23
- "name": "noimage",
24
- "description": "No image",
25
- "text": "<h1>Innovating solutions every year</h1><ul class='ilw-buttons'><li><a href='#'>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#'>Link 3</a></li></ul>"
26
- },
27
- {
28
- "name": "video",
29
- "description": "Video background",
30
- "text": "<video slot='background' autoplay='' loop='' muted='' poster='https://cdn-e.education.illinois.edu/video/first_image.png'><source src='https://cdn-e.education.illinois.edu/video/homepage8.mp4' type='video/mp4'>Your browser does not support the video tag.</video><h2>Innovating solutions every year</h2><ul class='ilw-buttons'><li><a href='#''>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#''>Link 3</a></li></ul>"
31
- }
32
- ],
33
- "attributes-fixed": [],
34
- "attributes-text": [],
35
- "attributes": [
36
- {
37
- "name": "theme",
38
- "description": "Color theme used",
39
- "depreciated": false,
40
- "values": [
41
- "",
42
- "blue",
43
- "orange",
44
- "white"
45
- ]
46
- },
47
- {
48
- "name": "align",
49
- "description": "Text alignment, defaults to center",
50
- "depreciated": false,
51
- "values": [
52
- "",
53
- "top",
54
- "bottom",
55
- "left",
56
- "right",
57
- "top-left",
58
- "top-right",
59
- "bottom-left",
60
- "bottom-right"
61
- ]
62
- },
63
- {
64
- "name": "focus",
65
- "description": "Focus for the image, defaults to center",
66
- "depreciated": false,
67
- "values": [
68
- "",
69
- "top",
70
- "bottom",
71
- "left",
72
- "right"
73
- ]
74
- },
75
- {
76
- "name": "width",
77
- "description": "Whether or not this follows current borders or is full width",
78
- "depreciated": false,
79
- "values": [
80
- "",
81
- "full"
82
- ]
83
- },
84
- {
85
- "name": "shadow",
86
- "description": "Whether or not to include a shadow",
87
- "depreciated": false,
88
- "values": [
89
- "",
90
- "true"
91
- ]
92
- },
93
- {
94
- "name": "collapse",
95
- "description": "Whether or not to remove the image / background in mobile",
96
- "depreciated": false,
97
- "values": [
98
- "",
99
- "true"
100
- ]
101
- },
102
- {
103
- "name": "alwayson",
104
- "description": "Whether or not to drop the text in mobile",
105
- "depreciated": false,
106
- "values": [
107
- "",
108
- "true"
109
- ]
110
- }
111
- ],
112
- "classes-fixed": [],
113
- "classes": [],
114
- "css-variables": [
115
- {
116
- "name": "--ilw-hero--height",
117
- "depreciated": false,
118
- "description": "Size of the hero image"
119
- },
120
- {
121
- "name": "--ilw-hero--font",
122
- "depreciated": false,
123
- "description": "Font for heading"
124
- },
125
- {
126
- "name": "--ilw-hero--background",
127
- "depreciated": false,
128
- "description": "Hex color for background"
129
- },
130
- {
131
- "name": "--ilw-hero--text-width",
132
- "depreciated": false,
133
- "description": "Text width for heading"
134
- },
135
- {
136
- "name": "--ilw-hero--shadow-color",
137
- "depreciated": false,
138
- "description": "Hex color for shadow in rgba format"
139
- },
140
- {
141
- "name": "--ilw-hero--text-color",
142
- "depreciated": false,
143
- "description": "Hex color for heading"
144
- }
145
- ]
146
- }
@@ -1,146 +0,0 @@
1
- {
2
- "title": "Hero",
3
- "tag": "ilw-hero",
4
- "github": "https://github.com/web-illinois/ilw-hero/",
5
- "type": "web component",
6
- "element-name": "ilw-hero",
7
- "description": "The Hero Image component adds a large picture at the top of the page. It is used to draw attention to the page and can be used to set the tone for the page.",
8
- "builder-version": "latest",
9
- "version": "1.0.1-beta",
10
- "date": "10/08/2024",
11
- "css": "https://dev.toolkit.illinois.edu/ilw-hero/latest/ilw-hero.css",
12
- "js": "https://dev.toolkit.illinois.edu/ilw-hero/latest/ilw-hero.js",
13
- "production": false,
14
- "notes": "",
15
- "parent-style": "",
16
- "samples": [
17
- {
18
- "name": "default",
19
- "description": "Default information with image",
20
- "text": "<img src='https://picsum.photos/1920/1280' alt='' slot='background'><h1>Innovating solutions every year</h1><ul class='ilw-buttons'><li><a href='#'>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#'>Link 3</a></li></ul>"
21
- },
22
- {
23
- "name": "noimage",
24
- "description": "No image",
25
- "text": "<h1>Innovating solutions every year</h1><ul class='ilw-buttons'><li><a href='#'>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#'>Link 3</a></li></ul>"
26
- },
27
- {
28
- "name": "video",
29
- "description": "Video background",
30
- "text": "<video slot='background' autoplay='' loop='' muted='' poster='https://cdn-e.education.illinois.edu/video/first_image.png'><source src='https://cdn-e.education.illinois.edu/video/homepage8.mp4' type='video/mp4'>Your browser does not support the video tag.</video><h2>Innovating solutions every year</h2><ul class='ilw-buttons'><li><a href='#''>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#''>Link 3</a></li></ul>"
31
- }
32
- ],
33
- "attributes-fixed": [],
34
- "attributes-text": [],
35
- "attributes": [
36
- {
37
- "name": "theme",
38
- "description": "Color theme used",
39
- "depreciated": false,
40
- "values": [
41
- "",
42
- "blue",
43
- "orange",
44
- "white"
45
- ]
46
- },
47
- {
48
- "name": "align",
49
- "description": "Text alignment, defaults to center",
50
- "depreciated": false,
51
- "values": [
52
- "",
53
- "top",
54
- "bottom",
55
- "left",
56
- "right",
57
- "top-left",
58
- "top-right",
59
- "bottom-left",
60
- "bottom-right"
61
- ]
62
- },
63
- {
64
- "name": "focus",
65
- "description": "Focus for the image, defaults to center",
66
- "depreciated": false,
67
- "values": [
68
- "",
69
- "top",
70
- "bottom",
71
- "left",
72
- "right"
73
- ]
74
- },
75
- {
76
- "name": "width",
77
- "description": "Whether or not this follows current borders or is full width",
78
- "depreciated": false,
79
- "values": [
80
- "",
81
- "full"
82
- ]
83
- },
84
- {
85
- "name": "shadow",
86
- "description": "Whether or not to include a shadow",
87
- "depreciated": false,
88
- "values": [
89
- "",
90
- "true"
91
- ]
92
- },
93
- {
94
- "name": "collapse",
95
- "description": "Whether or not to remove the image / background in mobile",
96
- "depreciated": false,
97
- "values": [
98
- "",
99
- "true"
100
- ]
101
- },
102
- {
103
- "name": "alwayson",
104
- "description": "Whether or not to drop the text in mobile",
105
- "depreciated": false,
106
- "values": [
107
- "",
108
- "true"
109
- ]
110
- }
111
- ],
112
- "classes-fixed": [],
113
- "classes": [],
114
- "css-variables": [
115
- {
116
- "name": "--ilw-hero--height",
117
- "depreciated": false,
118
- "description": "Size of the hero image"
119
- },
120
- {
121
- "name": "--ilw-hero--font",
122
- "depreciated": false,
123
- "description": "Font for heading"
124
- },
125
- {
126
- "name": "--ilw-hero--background",
127
- "depreciated": false,
128
- "description": "Hex color for background"
129
- },
130
- {
131
- "name": "--ilw-hero--text-width",
132
- "depreciated": false,
133
- "description": "Text width for heading"
134
- },
135
- {
136
- "name": "--ilw-hero--shadow-color",
137
- "depreciated": false,
138
- "description": "Hex color for shadow in rgba format"
139
- },
140
- {
141
- "name": "--ilw-hero--text-color",
142
- "depreciated": false,
143
- "description": "Hex color for heading"
144
- }
145
- ]
146
- }