Skip to content

Commit 9ba4a7a

Browse files
authored
Merge pull request #520 from byuweb/feat/privacy
feat/privacy
2 parents 0b2aeb4 + c85f677 commit 9ba4a7a

15 files changed

+7473
-5417
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ on:
1212
- "LICENSE"
1313

1414
env:
15-
node_version: "14.x"
15+
node_version: "18.x"
1616

1717
jobs:
1818
audit:
1919
name: Audit Project
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
2323

2424
- name: Set up Node.js
25-
uses: actions/setup-node@v2.1.4
25+
uses: actions/setup-node@v3
2626
with:
2727
node-version: ${{ env.node_version }}
2828

29-
- uses: actions/cache@v2
29+
- uses: actions/cache@v3
3030
with:
3131
path: ~/.npm
3232
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -40,14 +40,14 @@ jobs:
4040
name: Lint Project
4141
runs-on: ubuntu-latest
4242
steps:
43-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v3
4444

4545
- name: Set up Node.js
46-
uses: actions/setup-node@v2.1.4
46+
uses: actions/setup-node@v3
4747
with:
4848
node-version: ${{ env.node_version }}
4949

50-
- uses: actions/cache@v2
50+
- uses: actions/cache@v3
5151
with:
5252
path: ~/.npm
5353
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -64,14 +64,14 @@ jobs:
6464
name: Bundle Components
6565
runs-on: ubuntu-latest
6666
steps:
67-
- uses: actions/checkout@v2
67+
- uses: actions/checkout@v3
6868

6969
- name: Set up Node.js
70-
uses: actions/setup-node@v2.1.4
70+
uses: actions/setup-node@v3
7171
with:
7272
node-version: ${{ env.node_version }}
7373

74-
- uses: actions/cache@v2
74+
- uses: actions/cache@v3
7575
with:
7676
path: ~/.npm
7777
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -91,14 +91,14 @@ jobs:
9191
name: Compile FOUC Styles
9292
runs-on: ubuntu-latest
9393
steps:
94-
- uses: actions/checkout@v2
94+
- uses: actions/checkout@v3
9595

9696
- name: Set up Node.js
97-
uses: actions/setup-node@v2.1.4
97+
uses: actions/setup-node@v3
9898
with:
9999
node-version: ${{ env.node_version }}
100100

101-
- uses: actions/cache@v2
101+
- uses: actions/cache@v3
102102
with:
103103
path: ~/.npm
104104
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -118,14 +118,14 @@ jobs:
118118
name: Build FOUC Styles
119119
runs-on: ubuntu-latest
120120
steps:
121-
- uses: actions/checkout@v2
121+
- uses: actions/checkout@v3
122122

123123
- name: Set up Node.js
124-
uses: actions/setup-node@v2.1.4
124+
uses: actions/setup-node@v3
125125
with:
126126
node-version: ${{ env.node_version }}
127127

128-
- uses: actions/cache@v2
128+
- uses: actions/cache@v3
129129
with:
130130
path: ~/.npm
131131
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -145,14 +145,14 @@ jobs:
145145
name: Build Documentation
146146
runs-on: ubuntu-latest
147147
steps:
148-
- uses: actions/checkout@v2
148+
- uses: actions/checkout@v3
149149

150150
- name: Set up Node.js
151-
uses: actions/setup-node@v2.1.4
151+
uses: actions/setup-node@v3
152152
with:
153153
node-version: ${{ env.node_version }}
154154

155-
- uses: actions/cache@v2
155+
- uses: actions/cache@v3
156156
with:
157157
path: ~/.npm
158158
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -169,14 +169,14 @@ jobs:
169169
name: Build Components
170170
runs-on: ubuntu-latest
171171
steps:
172-
- uses: actions/checkout@v2
172+
- uses: actions/checkout@v3
173173

174174
- name: Set up Node.js
175-
uses: actions/setup-node@v2.1.4
175+
uses: actions/setup-node@v3
176176
with:
177177
node-version: ${{ env.node_version }}
178178

179-
- uses: actions/cache@v2
179+
- uses: actions/cache@v3
180180
with:
181181
path: ~/.npm
182182
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

README.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
This repository contains the "core" Web Components implementing the BYU theme.
44

55
Specifically, it contains the following components:
6+
67
* byu-header
78
* byu-breadcrumbs
89
* byu-menu
@@ -13,11 +14,11 @@ Specifically, it contains the following components:
1314
* byu-social-media-links
1415
* byu-footer-action-button
1516

16-
In order for a BYU website to be considered compliant with current branding standards it must make use of at least the
17-
byu-header and byu-footer components. Additionally, the byu-menu, byu-search, and byu-user-info should be used for the
18-
site's primary navigation, search, and login display, if any. The byu-footer-column and byu-footer-action-button are
19-
used to add content to the footer if desired. The byu-social-media-links component contains the approved icons for all
20-
the major social media platforms and is strongly recommended. Use of unapproved or modified social media icons may
17+
In order for a BYU website to be considered compliant with current branding standards it must make use of at least the
18+
byu-header and byu-footer components. Additionally, the byu-menu, byu-search, and byu-user-info should be used for the
19+
site's primary navigation, search, and login display, if any. The byu-footer-column and byu-footer-action-button are
20+
used to add content to the footer if desired. The byu-social-media-links component contains the approved icons for all
21+
the major social media platforms and is strongly recommended. Use of unapproved or modified social media icons may
2122
violate those platforms' copyright and is not allowed.
2223

2324
## Important links
@@ -27,42 +28,44 @@ violate those platforms' copyright and is not allowed.
2728

2829
## Getting Started
2930

30-
To begin using the components you can visit [the components demo site](http://webcomponents.byu.edu/) for more
31-
documentation and code samples. If you're using Drupal or Wordpress, the community has created templates that you can
32-
download and install. However, one of the primary goals and benefits of using a web components implementation is that
31+
To begin using the components you can visit [the components demo site](http://webcomponents.byu.edu/) for more
32+
documentation and code samples. If you're using Drupal or Wordpress, the community has created templates that you can
33+
download and install. However, one of the primary goals and benefits of using a web components implementation is that
3334
you don't need to use a specific CMS (or any CMS at all) to utilize the components.
3435

3536
## CDN Integration
3637

37-
This repository is integrated with the BYU Web Content Delivery Network (cdn) at cdn.byu.edu. This means that every
38-
update to the master branch of the repository will be pushed immediately to the cdn, allowing websites across campus to
39-
receive the latest updates immediately. More documentation can be found on the
40-
[CDN Project Page](https://github.com/byuweb/web-cdn).
38+
This repository is integrated with the BYU Web Content Delivery Network (cdn) at cdn.byu.edu. This means that every
39+
update to the master branch of the repository will be pushed immediately to the cdn, allowing websites across campus to
40+
receive the latest updates immediately. More documentation can be found on the
41+
[CDN Project Page](https://github.com/byuweb/web-cdn).
4142

4243
## Ownership and Releases
4344

44-
These web components are open-source and contributions are welcome. Officially, they are maintained by the OIT BYU Apps
45-
Custom team. Work for that team is prioritized by product owners and will be fixed as time becomes available. If it is
46-
urgent, feel free to reach out in the #byu-apps-custom-comms channel in the BYU-OIT Slack workspace. If you do not have
47-
access to that workspace, ask your CSR to send a message for you. The team would also be happy to teach you how to fix
48-
the issue so that you can be a code contributor to this project.
45+
These web components are open-source and contributions are welcome. Officially, they are maintained by the OIT. Work on
46+
it is prioritized by product owners and will be fixed as time becomes available. If it is urgent, feel free to reach out
47+
in the `IT Collaboration` > `OIT AppEng - Developer` channel in Microsoft Teams. If you do not have access to that
48+
workspace, ask your CSR to send a message for you. The team would also be happy to teach you how to fix the issue so
49+
that you can be a code contributor to this project.
4950

50-
Releases will use [semver standards](http://semver.org/). Minor and bug-fix releases will maintain backwards
51-
compatibility, while major releases could potentially include breaking changes. If a major release is proposed and
52-
accepted we will ensure that the BYU web community is given ample time to prepare for any breaking changes and migrate
53-
their code accordingly.
51+
Releases will use [semver standards](http://semver.org/). Minor and bug-fix releases will maintain backwards
52+
compatibility, while major releases could potentially include breaking changes. If a major release is proposed and
53+
accepted we will ensure that the BYU web community is given ample time to prepare for any breaking changes and migrate
54+
their code accordingly.
5455

5556
## How to Contribute
5657

57-
This project is open to the community and we welcome contributions. You can start by
58-
[forking this repo](https://help.github.com/articles/fork-a-repo/) and submitting a pull request, though we strongly
59-
recommend you also join the slack channel at [byu-web.slack.com](http://byu-web.slack.com) so you can be part of the
60-
discussion.
58+
This project is open to the community, and we welcome contributions. You can start by
59+
[forking this repo](https://help.github.com/articles/fork-a-repo/) and submitting a pull request, though we strongly
60+
recommend you also join
61+
the [teams channel](https://teams.microsoft.com/l/team/19%3aWBpiyNpEmTgVau8DYp1-lBjsdi-gdlx11g4u4O08duU1%40thread.tacv2/conversations?groupId=8c8885de-11cc-4bd8-a06a-e64804d1725c&tenantId=c6fc6e9b-51fb-48a8-b779-9ee564b40413),
62+
so you can be part of the discussion.
6163

6264
### Our Coding Standards
63-
Our goal is to implement flexible, well-structured web components according to the latest brand guidelines. Every pull
64-
request must be peer-reviewed by one of the project administrators before it can be merged with the master branch. As
65-
of this writing we require that any components work properly in at least the 2 latest versions of the following
65+
66+
Our goal is to implement flexible, well-structured web components according to the latest brand guidelines. Every pull
67+
request must be peer-reviewed by one of the project administrators before it can be merged with the master branch. As
68+
of this writing we require that any components work properly in at least the 2 latest versions of the following
6669
browsers:
6770

6871
* Chrome
@@ -74,6 +77,6 @@ In addition, every component must be responsive, providing a first-class experie
7477

7578
## Favicon
7679

77-
All BYU Websites are encouraged to use the official favicon. This is likely to be located on brand.byu.edu in the
78-
future, but it is available now in github:
80+
All BYU Websites are encouraged to use the official favicon. This is likely to be located on brand.byu.edu in the
81+
future, but it is available now in github:
7982
[https://github.com/byuweb/byu-assets/blob/master/favicon.png](https://github.com/byuweb/byu-assets/blob/master/favicon.png).

components/byu-footer/byu-footer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export class BYUFooter extends LitElement {
4848
<span class="info-text">${date.getFullYear()} &copy;<span id="currentYear"></span> All rights reserved.</span>
4949
</div>
5050
<div class="privacy-notice">
51-
<span class="info-text"><a href="http://www.byu.edu/privacy" target="_blank">Privacy Notice</a></span>
51+
<span class="info-text"><a href="https://privacy.byu.edu/" target="_blank">Privacy Notice</a></span>
52+
<span class="info-text"><a href="https://www.byu.edu/cookie-preferences" target="_blank">Cookie Preferences</a></span>
5253
</div>
5354
</div>
5455
</div>
@@ -60,7 +61,8 @@ export class BYUFooter extends LitElement {
6061
<span class="info-text">${date.getFullYear()} &copy;<span id="currentYear"></span> All Rights Reserved</span>
6162
</div>
6263
<div class="privacy-notice">
63-
<span class="info-text"><a href="http://www.byu.edu/privacy" target="_blank">Privacy Notice</a></span>
64+
<span class="info-text"><a href="https://privacy.byu.edu/" target="_blank">Privacy Notice</a></span>
65+
<span class="info-text"><a href="https://www.byu.edu/cookie-preferences" target="_blank">Cookie Preferences</a></span>
6466
</div>
6567
</div>
6668
</div>

components/byu-footer/byu-footer.sass

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ $tabletBreak: 1024px // Put exact px to match Brightspot and so info doesn't wor
116116
justify-content: center
117117
grid-area: 2/2/3/3
118118
119+
> :not(:first-of-type)
120+
margin-top: 0
121+
122+
&::before
123+
display: inline-block
124+
color: $white !important
125+
content: '|'
126+
text-align: center
127+
width: 1em
128+
119129
@media (min-width: $breakXl)
120130
.university-footer
121131
padding: $spacing4

components/byu-privacy.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*** BYU MeruData Cookie Consent Banner and Cookie AutoBlocking ***/
2+
;(function () {
3+
const byuMerudataID = "c5d6912a-d8fc-4138-8d1d-6daeb3056f57"
4+
const merudataUrl = "https://ccm.merudata.app/assets/"
5+
const host = window.location.hostname
6+
7+
if (!host.includes("localhost") && !host.includes("-dev")) {
8+
// Load the config file
9+
let scriptConfig = document.createElement("script")
10+
scriptConfig.src = merudataUrl + byuMerudataID + "/ccmconfig.js"
11+
scriptConfig.onload = function () {
12+
// Load the script file
13+
let script = document.createElement("script")
14+
script.src = merudataUrl + byuMerudataID + "/d_ccm.min.js"
15+
document.head.appendChild(script)
16+
17+
// Load the stylesheet file
18+
let stylesheet = document.createElement("link")
19+
stylesheet.rel = "stylesheet"
20+
stylesheet.href = merudataUrl + byuMerudataID + "/ccm.min.css"
21+
stylesheet.media = "print"
22+
stylesheet.onload = function() {
23+
this.media = 'all'
24+
}
25+
document.head.appendChild(stylesheet)
26+
}
27+
document.head.appendChild(scriptConfig);
28+
}
29+
})()

0 commit comments

Comments
 (0)