Skip to content

Commit

Permalink
Merge pull request #520 from byuweb/feat/privacy
Browse files Browse the repository at this point in the history
feat/privacy
  • Loading branch information
stuft2 authored Mar 31, 2023
2 parents 0b2aeb4 + c85f677 commit 9ba4a7a
Show file tree
Hide file tree
Showing 15 changed files with 7,473 additions and 5,417 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ on:
- "LICENSE"

env:
node_version: "14.x"
node_version: "18.x"

jobs:
audit:
name: Audit Project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -40,14 +40,14 @@ jobs:
name: Lint Project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -64,14 +64,14 @@ jobs:
name: Bundle Components
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

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

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

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

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

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -145,14 +145,14 @@ jobs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -169,14 +169,14 @@ jobs:
name: Build Components
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

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

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
63 changes: 33 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This repository contains the "core" Web Components implementing the BYU theme.

Specifically, it contains the following components:

* byu-header
* byu-breadcrumbs
* byu-menu
Expand All @@ -13,11 +14,11 @@ Specifically, it contains the following components:
* byu-social-media-links
* byu-footer-action-button

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

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

## Getting Started

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

## CDN Integration

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

## Ownership and Releases

These web components are open-source and contributions are welcome. Officially, they are maintained by the OIT BYU Apps
Custom team. Work for that team is prioritized by product owners and will be fixed as time becomes available. If it is
urgent, feel free to reach out in the #byu-apps-custom-comms channel in the BYU-OIT Slack workspace. If you do not have
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
the issue so that you can be a code contributor to this project.
These web components are open-source and contributions are welcome. Officially, they are maintained by the OIT. Work on
it is prioritized by product owners and will be fixed as time becomes available. If it is urgent, feel free to reach out
in the `IT Collaboration` > `OIT AppEng - Developer` channel in Microsoft Teams. If you do not have 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 the issue so
that you can be a code contributor to this project.

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

## How to Contribute

This project is open to the community and we welcome contributions. You can start by
[forking this repo](https://help.github.com/articles/fork-a-repo/) and submitting a pull request, though we strongly
recommend you also join the slack channel at [byu-web.slack.com](http://byu-web.slack.com) so you can be part of the
discussion.
This project is open to the community, and we welcome contributions. You can start by
[forking this repo](https://help.github.com/articles/fork-a-repo/) and submitting a pull request, though we strongly
recommend you also join
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),
so you can be part of the discussion.

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

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

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

## Favicon

All BYU Websites are encouraged to use the official favicon. This is likely to be located on brand.byu.edu in the
future, but it is available now in github:
All BYU Websites are encouraged to use the official favicon. This is likely to be located on brand.byu.edu in the
future, but it is available now in github:
[https://github.com/byuweb/byu-assets/blob/master/favicon.png](https://github.com/byuweb/byu-assets/blob/master/favicon.png).
6 changes: 4 additions & 2 deletions components/byu-footer/byu-footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export class BYUFooter extends LitElement {
<span class="info-text">${date.getFullYear()} &copy;<span id="currentYear"></span> All rights reserved.</span>
</div>
<div class="privacy-notice">
<span class="info-text"><a href="http://www.byu.edu/privacy" target="_blank">Privacy Notice</a></span>
<span class="info-text"><a href="https://privacy.byu.edu/" target="_blank">Privacy Notice</a></span>
<span class="info-text"><a href="https://www.byu.edu/cookie-preferences" target="_blank">Cookie Preferences</a></span>
</div>
</div>
</div>
Expand All @@ -60,7 +61,8 @@ export class BYUFooter extends LitElement {
<span class="info-text">${date.getFullYear()} &copy;<span id="currentYear"></span> All Rights Reserved</span>
</div>
<div class="privacy-notice">
<span class="info-text"><a href="http://www.byu.edu/privacy" target="_blank">Privacy Notice</a></span>
<span class="info-text"><a href="https://privacy.byu.edu/" target="_blank">Privacy Notice</a></span>
<span class="info-text"><a href="https://www.byu.edu/cookie-preferences" target="_blank">Cookie Preferences</a></span>
</div>
</div>
</div>
Expand Down
10 changes: 10 additions & 0 deletions components/byu-footer/byu-footer.sass
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ $tabletBreak: 1024px // Put exact px to match Brightspot and so info doesn't wor
justify-content: center
grid-area: 2/2/3/3
> :not(:first-of-type)
margin-top: 0
&::before
display: inline-block
color: $white !important
content: '|'
text-align: center
width: 1em
@media (min-width: $breakXl)
.university-footer
padding: $spacing4
Expand Down
29 changes: 29 additions & 0 deletions components/byu-privacy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*** BYU MeruData Cookie Consent Banner and Cookie AutoBlocking ***/
;(function () {
const byuMerudataID = "c5d6912a-d8fc-4138-8d1d-6daeb3056f57"
const merudataUrl = "https://ccm.merudata.app/assets/"
const host = window.location.hostname

if (!host.includes("localhost") && !host.includes("-dev")) {
// Load the config file
let scriptConfig = document.createElement("script")
scriptConfig.src = merudataUrl + byuMerudataID + "/ccmconfig.js"
scriptConfig.onload = function () {
// Load the script file
let script = document.createElement("script")
script.src = merudataUrl + byuMerudataID + "/d_ccm.min.js"
document.head.appendChild(script)

// Load the stylesheet file
let stylesheet = document.createElement("link")
stylesheet.rel = "stylesheet"
stylesheet.href = merudataUrl + byuMerudataID + "/ccm.min.css"
stylesheet.media = "print"
stylesheet.onload = function() {
this.media = 'all'
}
document.head.appendChild(stylesheet)
}
document.head.appendChild(scriptConfig);
}
})()
Loading

0 comments on commit 9ba4a7a

Please sign in to comment.