@illinois-toolkit/ilw-hero 0.9.1 → 1.0.0-alpha

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.
@@ -1,141 +1,141 @@
1
- import { css } from 'lit';
2
-
3
- export default css`
4
-
5
- .hero {
6
- position: relative;
7
- }
8
-
9
- .hero.fixed {
10
- left:50%;
11
- margin-left:-50vw;
12
- margin-right:-50vw;
13
- padding-left:0;
14
- padding-right:0;
15
- position:relative;
16
- right:50%;
17
- width:100vw;
18
- }
19
-
20
- .background {
21
- position: relative;
22
- width: 100%;
23
- height: var(--ilw-hero--height, 223px);
24
- background-color: var(--ilw-hero--background);
25
- }
26
-
27
- .background.collapse {
28
- display: none;
29
- }
30
-
31
- img {
32
- display: block;
33
- position: relative;
34
- object-fit: cover;
35
- object-position: center;
36
- }
37
-
38
- .content-outer {
39
- background: var(--ilw-hero--background);
40
- position: relative;
41
- z-index: 100;
42
- padding: 0 20px;
43
- }
44
-
45
- .content-inner {
46
- padding: 18px 0 36px 0;
47
- }
48
-
49
- @media (min-width: 576px) {
50
- .content-inner {
51
- padding: 36px 0px 72px;
52
- }
53
- }
54
-
55
- @media (min-width: 767px) {
56
- .background {
57
- position: absolute;
58
- width: 100%;
59
- top: 0;
60
- left: 0;
61
- z-index: 1;
62
- }
63
- .background img {
64
- position: absolute;
65
- width: 100%;
66
- height: 100%;
67
- top: 0;
68
- left: 0;
69
- z-index: 101;
70
- }
71
- .background.collapse {
72
- display: block;
73
- }
74
-
75
-
76
- .content-outer {
77
- background: transparent;
78
- height: var(--ilw-hero--height, 223px);
79
- display: flex;
80
- }
81
-
82
- .content-inner {
83
- width: 60%;
84
- margin: auto;
85
- display: flex;
86
- flex-direction: column;
87
- text-align: center;
88
- align-items: center;
89
- max-width: 1200px;
90
- }
91
-
92
- .content-inner.left {
93
- text-align: left;
94
- align-items: flex-start;
95
- margin-left: 100px;
96
- }
97
-
98
- .content-inner.right {
99
- text-align: right;
100
- align-items: flex-end;
101
- margin-right: 100px;
102
- }
103
-
104
- .content-inner.top {
105
- margin-top: 0;
106
- }
107
-
108
- .content-inner.bottom {
109
- margin-bottom: 0;
110
- }
111
- .content-inner.top-left {
112
- text-align: left;
113
- align-items: flex-start;
114
- margin: 0 auto auto 100px;
115
- }
116
-
117
- .content-inner.top-right {
118
- text-align: left;
119
- align-items: flex-start;
120
- margin: 0 100px auto auto;
121
- }
122
-
123
- .content-inner.bottom-left {
124
- text-align: right;
125
- align-items: flex-end;
126
- margin: auto auto 0 100px;
127
- }
128
-
129
- .content-inner.bottom-right {
130
- text-align: right;
131
- align-items: flex-end;
132
- margin: auto 100px 0 auto;
133
- }
134
- }
135
-
136
- @media (min-width: 992px) {
137
- .content-inner {
138
- width: var(--ilw-hero--text-width);
139
- }
140
- }
1
+ import { css } from 'lit';
2
+
3
+ export default css`
4
+
5
+ .hero {
6
+ position: relative;
7
+ }
8
+
9
+ .hero.fixed {
10
+ left:50%;
11
+ margin-left:-50vw;
12
+ margin-right:-50vw;
13
+ padding-left:0;
14
+ padding-right:0;
15
+ position:relative;
16
+ right:50%;
17
+ width:100vw;
18
+ }
19
+
20
+ .background {
21
+ position: relative;
22
+ width: 100%;
23
+ height: var(--ilw-hero--height, 223px);
24
+ background-color: var(--ilw-hero--background);
25
+ }
26
+
27
+ .background.collapse {
28
+ display: none;
29
+ }
30
+
31
+ img {
32
+ display: block;
33
+ position: relative;
34
+ object-fit: cover;
35
+ object-position: center;
36
+ }
37
+
38
+ .content-outer {
39
+ background: var(--ilw-hero--background);
40
+ position: relative;
41
+ z-index: 100;
42
+ padding: 0 20px;
43
+ }
44
+
45
+ .content-inner {
46
+ padding: 18px 0 36px 0;
47
+ }
48
+
49
+ @media (min-width: 576px) {
50
+ .content-inner {
51
+ padding: 36px 0px 72px;
52
+ }
53
+ }
54
+
55
+ @media (min-width: 767px) {
56
+ .background {
57
+ position: absolute;
58
+ width: 100%;
59
+ top: 0;
60
+ left: 0;
61
+ z-index: 1;
62
+ }
63
+ .background img {
64
+ position: absolute;
65
+ width: 100%;
66
+ height: 100%;
67
+ top: 0;
68
+ left: 0;
69
+ z-index: 101;
70
+ }
71
+ .background.collapse {
72
+ display: block;
73
+ }
74
+
75
+
76
+ .content-outer {
77
+ background: transparent;
78
+ height: var(--ilw-hero--height, 223px);
79
+ display: flex;
80
+ }
81
+
82
+ .content-inner {
83
+ width: 60%;
84
+ margin: auto;
85
+ display: flex;
86
+ flex-direction: column;
87
+ text-align: center;
88
+ align-items: center;
89
+ max-width: 1200px;
90
+ }
91
+
92
+ .content-inner.left {
93
+ text-align: left;
94
+ align-items: flex-start;
95
+ margin-left: 100px;
96
+ }
97
+
98
+ .content-inner.right {
99
+ text-align: right;
100
+ align-items: flex-end;
101
+ margin-right: 100px;
102
+ }
103
+
104
+ .content-inner.top {
105
+ margin-top: 0;
106
+ }
107
+
108
+ .content-inner.bottom {
109
+ margin-bottom: 0;
110
+ }
111
+ .content-inner.top-left {
112
+ text-align: left;
113
+ align-items: flex-start;
114
+ margin: 0 auto auto 100px;
115
+ }
116
+
117
+ .content-inner.top-right {
118
+ text-align: left;
119
+ align-items: flex-start;
120
+ margin: 0 100px auto auto;
121
+ }
122
+
123
+ .content-inner.bottom-left {
124
+ text-align: right;
125
+ align-items: flex-end;
126
+ margin: auto auto 0 100px;
127
+ }
128
+
129
+ .content-inner.bottom-right {
130
+ text-align: right;
131
+ align-items: flex-end;
132
+ margin: auto 100px 0 auto;
133
+ }
134
+ }
135
+
136
+ @media (min-width: 992px) {
137
+ .content-inner {
138
+ width: var(--ilw-hero--text-width);
139
+ }
140
+ }
141
141
  `;
@@ -1,19 +0,0 @@
1
- name: delete_development
2
- on:
3
- workflow_dispatch:
4
- env:
5
- COMPONENT_NAME: 'ilw-hero' # set this to the web component name you are using
6
- jobs:
7
- build:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - name: Configure AWS Credentials
11
- uses: aws-actions/configure-aws-credentials@v1
12
- with:
13
- aws-access-key-id: ${{ vars.TOOLKIT_AWS_ACCESS_KEY }}
14
- aws-secret-access-key: ${{ secrets.TOOLKIT_AWS_ACCESS_SECRET }}
15
- aws-region: us-east-2
16
- - name: Delete S3 bucket
17
- run: aws s3 rm s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME --recursive
18
- - name: Invalidate Cloudfront cache
19
- run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME*"
@@ -1,38 +0,0 @@
1
- name: deploy_development
2
- on:
3
- workflow_dispatch:
4
- inputs:
5
- version:
6
- description: 'Version number'
7
- required: true
8
- default: ''
9
- type: string
10
- env:
11
- MAJORVERSION: ''
12
- COMPONENT_NAME: 'ilw-hero' # set this to the web component name you are using
13
- jobs:
14
- build:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - name: 'Checkout GitHub Action'
18
- uses: actions/checkout@v4
19
- - name: Get version from input
20
- run: echo "VERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV
21
- env:
22
- GITHUB_BRANCH: ${{ github.event.inputs.version }}
23
- - name: Display version install
24
- run: echo "Installing dev version ${VERSION}"
25
-
26
- - run: npm install
27
- - run: npm rebuild
28
- - run: npm run-script build
29
- - name: Configure AWS Credentials
30
- uses: aws-actions/configure-aws-credentials@v1
31
- with:
32
- aws-access-key-id: ${{ vars.TOOLKIT_AWS_ACCESS_KEY }}
33
- aws-secret-access-key: ${{ secrets.TOOLKIT_AWS_ACCESS_SECRET }}
34
- aws-region: us-east-2
35
- - name: Deploy toolbox to S3 bucket
36
- run: aws s3 sync ./dist/ s3://dev.toolkit.illinois.edu/content/$COMPONENT_NAME/$VERSION --delete --acl bucket-owner-full-control
37
- - name: Invalidate Cloudfront cache
38
- run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT_DEV }} --paths "/$COMPONENT_NAME/$VERSION*"
@@ -1,64 +0,0 @@
1
- name: deploy_production
2
- on:
3
- push:
4
- tags: [ '**' ]
5
- env:
6
- MAJORVERSION: ''
7
- MINORVERSION: ''
8
- FULLVERSION: ''
9
- COMPONENT_NAME: 'ilw-hero' # set this to the web component name you are using
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - name: 'Checkout GitHub Action'
15
- uses: actions/checkout@v4
16
- - name: 'Get Version'
17
- id: get_version
18
- uses: battila7/get-version-action@v2
19
-
20
- - name: 'Check for correct naming convention'
21
- if: ${{ !steps.get_version.outputs.is-semver }}
22
- run: exit 1
23
- - name: 'Get major version from tag'
24
- run: echo "MAJORVERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV
25
- env:
26
- GITHUB_BRANCH: ${{ steps.get_version.outputs.major }}
27
- - name: 'Get minor version from tag'
28
- run: echo "MINORVERSION=${GITHUB_BRANCH}.${GITHUB_BRANCH_MINOR}" >> $GITHUB_ENV
29
- env:
30
- GITHUB_BRANCH: ${{ steps.get_version.outputs.major }}
31
- GITHUB_BRANCH_MINOR: ${{ steps.get_version.outputs.minor }}
32
- - name: Get patch (full) version from tag
33
- run: echo "FULLVERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV
34
- env:
35
- GITHUB_BRANCH: ${{ steps.get_version.outputs.version-without-v }}
36
- - name: Display major version install
37
- run: echo "Installing major version ${MAJORVERSION}"
38
- - name: Display minor version install
39
- run: echo "Installing minor version ${MINORVERSION}"
40
- - name: Display patch (full) version install
41
- run: echo "Installing patch (full) version ${FULLVERSION}"
42
-
43
- - run: npm install
44
- - run: npm rebuild
45
- - run: npm run-script build
46
- - name: Configure AWS Credentials
47
- uses: aws-actions/configure-aws-credentials@v1
48
- with:
49
- aws-access-key-id: ${{ vars.TOOLKIT_AWS_ACCESS_KEY }}
50
- aws-secret-access-key: ${{ secrets.TOOLKIT_AWS_ACCESS_SECRET }}
51
- aws-region: us-east-2
52
-
53
- - name: Deploy toolbox to S3 bucket for major version
54
- run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$MAJORVERSION --delete --acl bucket-owner-full-control
55
- - name: Invalidate Cloudfront cache for major version
56
- run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$MAJORVERSION*"
57
- - name: Deploy toolbox to S3 bucket for minor version
58
- run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$MINORVERSION --delete --acl bucket-owner-full-control
59
- - name: Invalidate Cloudfront cache for minor version
60
- run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$MINORVERSION*"
61
- - name: Deploy toolbox to S3 bucket for patch (full) version
62
- run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$FULLVERSION --delete --acl bucket-owner-full-control
63
- - name: Invalidate Cloudfront cache for patch (full) version
64
- run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$FULLVERSION*"
@@ -1,41 +0,0 @@
1
- name: deploy_production_manual
2
- on:
3
- workflow_dispatch:
4
- inputs:
5
- version:
6
- description: 'Version number'
7
- required: true
8
- default: ''
9
- type: string
10
- env:
11
- MAJORVERSION: ''
12
- MINORVERSION: ''
13
- FULLVERSION: ''
14
- COMPONENT_NAME: 'ilw-hero' # set this to the web component name you are using
15
- jobs:
16
- build:
17
- runs-on: ubuntu-latest
18
- steps:
19
- - name: 'Checkout GitHub Action'
20
- uses: actions/checkout@v4
21
- - name: Get version from input
22
- run: echo "VERSION=${GITHUB_BRANCH}" >> $GITHUB_ENV
23
- env:
24
- GITHUB_BRANCH: ${{ github.event.inputs.version }}
25
- - name: Display version install
26
- run: echo "Installing dev version ${VERSION}"
27
-
28
- - run: npm install
29
- - run: npm rebuild
30
- - run: npm run-script build
31
- - name: Configure AWS Credentials
32
- uses: aws-actions/configure-aws-credentials@v1
33
- with:
34
- aws-access-key-id: ${{ vars.TOOLKIT_AWS_ACCESS_KEY }}
35
- aws-secret-access-key: ${{ secrets.TOOLKIT_AWS_ACCESS_SECRET }}
36
- aws-region: us-east-2
37
-
38
- - name: Deploy toolbox to S3 bucket for version
39
- run: aws s3 sync ./dist/ s3://cdn.toolkit.illinois.edu/content/$COMPONENT_NAME/$VERSION --delete --acl bucket-owner-full-control
40
- - name: Invalidate Cloudfront cache for version
41
- run: aws cloudfront create-invalidation --distribution-id ${{ vars.TOOLKIT_AWS_CLOUDFRONT }} --paths "/$COMPONENT_NAME/$VERSION*"
@@ -1,53 +0,0 @@
1
- <!doctype html>
2
- <meta charset="UTF-8" />
3
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
4
- <title>Hero Component</title>
5
- <link rel="stylesheet" href="https://cdn.brand.illinois.edu/illinois.css">
6
- <link rel="stylesheet" href="https://dev.toolkit.illinois.edu/ilw-global/3.0.0-alpha/ilw-global.css">
7
- <script type="module" src="/src/ilw-hero.js"></script>
8
-
9
- <script>
10
- document.addEventListener("DOMContentLoaded", function(event) {
11
- const params = new URLSearchParams(window.location.search);
12
- document.querySelectorAll("ilw-hero").forEach(component => {
13
- if (params.has('theme')) {
14
- component.setAttribute('theme', params.get('theme'));
15
- }
16
- if (params.has('width')) {
17
- component.setAttribute('width', params.get('width'));
18
- }
19
- if (params.has('align')) {
20
- component.setAttribute('align', params.get('align'));
21
- }
22
- if (params.has('focus')) {
23
- component.setAttribute('focus', params.get('focus'));
24
- }
25
- if (params.has('shadow')) {
26
- component.setAttribute('shadow', params.get('shadow'));
27
- }
28
- });
29
- document.querySelectorAll(".ilw-buttons").forEach(buttons => {
30
- if (params.has('buttontheme')) {
31
- buttons.classList.add('ilw-theme-' + params.get('buttontheme'));
32
- }
33
- });
34
- });
35
- </script>
36
-
37
- <body style="margin: 0 auto; padding: 0; max-width: 1200px;">
38
- <ilw-hero>
39
- <img src="https://picsum.photos/1920/1280" alt="" slot="background">
40
- <h1>Innovating solutions every year</h1>
41
- <ul class="ilw-buttons">
42
- <li>
43
- <a href="#">Link 1</a>
44
- </li>
45
- <li>
46
- <a href="#">Link 2</a>
47
- </li>
48
- <li>
49
- <a href="#">Link 3</a>
50
- </li>
51
- </ul>
52
- </ilw-hero>
53
- </body>
@@ -1,52 +0,0 @@
1
- <!doctype html>
2
- <meta charset="UTF-8" />
3
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
4
- <title>Hero Component</title>
5
- <link rel="stylesheet" href="https://cdn.brand.illinois.edu/illinois.css">
6
- <link rel="stylesheet" href="https://dev.toolkit.illinois.edu/ilw-global/3.0.0-alpha/ilw-global.css">
7
- <script type="module" src="/src/ilw-hero.js"></script>
8
-
9
- <script>
10
- document.addEventListener("DOMContentLoaded", function(event) {
11
- const params = new URLSearchParams(window.location.search);
12
- document.querySelectorAll("ilw-hero").forEach(component => {
13
- if (params.has('theme')) {
14
- component.setAttribute('theme', params.get('theme'));
15
- }
16
- if (params.has('width')) {
17
- component.setAttribute('width', params.get('width'));
18
- }
19
- if (params.has('align')) {
20
- component.setAttribute('align', params.get('align'));
21
- }
22
- if (params.has('focus')) {
23
- component.setAttribute('focus', params.get('focus'));
24
- }
25
- if (params.has('shadow')) {
26
- component.setAttribute('shadow', params.get('shadow'));
27
- }
28
- });
29
- document.querySelectorAll(".ilw-buttons").forEach(buttons => {
30
- if (params.has('buttontheme')) {
31
- buttons.classList.add('ilw-theme-' + params.get('buttontheme'));
32
- }
33
- });
34
- });
35
- </script>
36
-
37
- <body style="margin: 0 auto; padding: 0; max-width: 1200px;">
38
- <ilw-hero>
39
- <h2>Innovating solutions every year</h2>
40
- <ul class="ilw-buttons">
41
- <li>
42
- <a href="#">Link 1</a>
43
- </li>
44
- <li>
45
- <a href="#">Link 2</a>
46
- </li>
47
- <li>
48
- <a href="#">Link 3</a>
49
- </li>
50
- </ul>
51
- </ilw-hero>
52
- </body>
@@ -1,42 +0,0 @@
1
- <!doctype html>
2
- <meta charset="UTF-8" />
3
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
4
- <title>Hero Component</title>
5
- <link rel="stylesheet" href="https://cdn.brand.illinois.edu/illinois.css">
6
- <link rel="stylesheet" href="https://dev.toolkit.illinois.edu/ilw-global/3.0.0-alpha/ilw-global.css">
7
- <script type="module" src="/src/ilw-hero.js"></script>
8
-
9
- <script>
10
- document.addEventListener("DOMContentLoaded", function(event) {
11
- const params = new URLSearchParams(window.location.search);
12
- document.querySelectorAll("ilw-hero").forEach(component => {
13
- if (params.has('theme')) {
14
- component.setAttribute('theme', params.get('theme'));
15
- }
16
- if (params.has('width')) {
17
- component.setAttribute('width', params.get('width'));
18
- }
19
- if (params.has('align')) {
20
- component.setAttribute('align', params.get('align'));
21
- }
22
- if (params.has('focus')) {
23
- component.setAttribute('focus', params.get('focus'));
24
- }
25
- if (params.has('shadow')) {
26
- component.setAttribute('shadow', params.get('shadow'));
27
- }
28
- });
29
- document.querySelectorAll(".ilw-button").forEach(buttons => {
30
- if (params.has('buttontheme')) {
31
- buttons.classList.add('ilw-theme-' + params.get('buttontheme'));
32
- }
33
- });
34
- });
35
- </script>
36
-
37
- <body style="margin: 0 auto; padding: 0; max-width: 1200px;">
38
- <ilw-hero>
39
- <h2>Innovating solutions every year</h2>
40
- <p><a href="#" class="ilw-button">Link 1</a></p>
41
- </ilw-hero>
42
- </body>
@@ -1,57 +0,0 @@
1
- <!doctype html>
2
- <meta charset="UTF-8" />
3
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
4
- <title>Hero Component</title>
5
- <link rel="stylesheet" href="https://cdn.brand.illinois.edu/illinois.css">
6
- <link rel="stylesheet" href="https://dev.toolkit.illinois.edu/ilw-global/3.0.0-alpha/ilw-global.css">
7
- <script type="module" src="/src/ilw-hero.js"></script>
8
-
9
- <script>
10
- document.addEventListener("DOMContentLoaded", function(event) {
11
- const params = new URLSearchParams(window.location.search);
12
- document.querySelectorAll("ilw-hero").forEach(component => {
13
- if (params.has('theme')) {
14
- component.setAttribute('theme', params.get('theme'));
15
- }
16
- if (params.has('width')) {
17
- component.setAttribute('width', params.get('width'));
18
- }
19
- if (params.has('align')) {
20
- component.setAttribute('align', params.get('align'));
21
- }
22
- if (params.has('focus')) {
23
- component.setAttribute('focus', params.get('focus'));
24
- }
25
- if (params.has('shadow')) {
26
- component.setAttribute('shadow', params.get('shadow'));
27
- }
28
- });
29
- document.querySelectorAll(".ilw-buttons").forEach(buttons => {
30
- if (params.has('buttontheme')) {
31
- buttons.classList.add('ilw-theme-' + params.get('buttontheme'));
32
- }
33
- });
34
- });
35
- </script>
36
-
37
- <body style="margin: 0 auto; padding: 0; max-width: 1200px;">
38
- <ilw-hero>
39
- <video slot="background" autoplay="" loop="" muted=""
40
- poster="https://cdn-e.education.illinois.edu/video/first_image.png">
41
- <source src="https://cdn-e.education.illinois.edu/video/homepage8.mp4" type="video/mp4">Your browser does not
42
- support the video tag.
43
- </video>
44
- <h2>Innovating solutions every year</h2>
45
- <ul class="ilw-buttons">
46
- <li>
47
- <a href="#">Link 1</a>
48
- </li>
49
- <li>
50
- <a href="#">Link 2</a>
51
- </li>
52
- <li>
53
- <a href="#">Link 3</a>
54
- </li>
55
- </ul>
56
- </ilw-hero>
57
- </body>
@@ -1,25 +0,0 @@
1
- import { defineConfig } from 'vite'
2
-
3
- // https://vitejs.dev/config/
4
- export default defineConfig({
5
- root: 'src',
6
- build: {
7
- outDir: '../dist',
8
- lib: {
9
- name: 'ilw-hero',
10
- entry: 'ilw-hero.js',
11
- fileName: 'ilw-hero',
12
- formats: ['es', 'cjs', 'umd'],
13
- },
14
- rollupOptions: {
15
- output: {
16
- assetFileNames: (chunkInfo) => {
17
- if (chunkInfo.name === 'style.css') return 'ilw-hero.css';
18
- }
19
- }
20
- },
21
- },
22
- server: {
23
- hmr: false
24
- }
25
- })