Skip to content

Commit

Permalink
Merge pull request #204 from kernvalley/patch/aegis
Browse files Browse the repository at this point in the history
Updates for `@aegisjsproject` changes
  • Loading branch information
shgysk8zer0 authored Apr 7, 2024
2 parents 89dd2fe + 850d6af commit d219f5b
Show file tree
Hide file tree
Showing 17 changed files with 140 additions and 129 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v2.0.2] - 2024-04-06

### Changed
- Update to use `@aegisjsproject/parsers`
- Remove unused Trusted Types Policies
- Switch to using `@shgysk8zer0/core-css` for most styles

## [v2.0.1] - 2023-07-04

### Changed
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Kern Valley Guide
name: Kern Valley Guide
url: https://guide.kernvalley.us
markdown: kramdown
version: 2.0.1
version: 2.0.2
timezone: America/Los_Angeles
lang: en
dir: ltr
Expand Down
2 changes: 1 addition & 1 deletion _data/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Kern Valley Guide
shortName: KRV Guide
id: KRVGuide
startUrl: /?utm_source=pwa&utm_medium=pwa&utm_campaign=pwa
version: 2.0.1
version: 2.0.2
lang: en
dir: ltr
display: standalone
Expand Down
44 changes: 44 additions & 0 deletions _data/importmap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"nonce": "300d91bb-3bea-47c7-afc9-a0a8c42ba639",
"imports": {
"@shgysk8zer0/kazoo/": "https://unpkg.com/@shgysk8zer0/[email protected]/",
"@shgysk8zer0/konami": "https://unpkg.com/@shgysk8zer0/[email protected]/konami.js",
"@shgysk8zer0/polyfills": "https://unpkg.com/@shgysk8zer0/[email protected]/all.min.js",
"@shgysk8zer0/polyfills/": "https://unpkg.com/@shgysk8zer0/[email protected]/",
"@shgysk8zer0/jswaggersheets": "https://unpkg.com/@shgysk8zer0/[email protected]/swagger.js",
"@shgysk8zer0/jswaggersheets/": "https://unpkg.com/@shgysk8zer0/[email protected]/",
"@shgysk8zer0/jss/": "https://unpkg.com/@shgysk8zer0/[email protected]/",
"@shgysk8zer0/consts/": "https://unpkg.com/@shgysk8zer0/[email protected]/",
"@shgysk8zer0/http/": "https://unpkg.com/@shgysk8zer0/[email protected]/",
"@shgysk8zer0/http-status": "https://unpkg.com/@shgysk8zer0/[email protected]/http-status.js",
"@aegisjsproject/trusted-types": "https://unpkg.com/@aegisjsproject/[email protected]/bundle.min.js",
"@aegisjsproject/trusted-types/": "https://unpkg.com/@aegisjsproject/[email protected]/",
"@aegisjsproject/parsers": "https://unpkg.com/@aegisjsproject/[email protected]/bundle.min.js",
"@aegisjsproject/parsers/": "https://unpkg.com/@aegisjsproject/[email protected]/",
"@aegisjsproject/sanitizer": "https://unpkg.com/@aegisjsproject/[email protected]/sanitizer.js",
"@aegisjsproject/sanitizer/": "https://unpkg.com/@aegisjsproject/[email protected]/",
"@aegisjsproject/core": "https://unpkg.com/@aegisjsproject/[email protected]/core.js",
"@aegisjsproject/core/": "https://unpkg.com/@aegisjsproject/[email protected]/",
"@aegisjsproject/styles": "https://unpkg.com/@aegisjsproject/[email protected]/styles.js",
"@aegisjsproject/styles/": "https://unpkg.com/@aegisjsproject/[email protected]/",
"@aegisjsproject/component": "https://unpkg.com/@aegisjsproject/[email protected]/component.js",
"@aegisjsproject/component/": "https://unpkg.com/@aegisjsproject/[email protected]/",
"@aegisjsproject/markdown": "https://unpkg.com/@aegisjsproject/[email protected]/markdown.js",
"@aegisjsproject/markdown/": "https://unpkg.com/@aegisjsproject/[email protected]/",
"@aegisjsproject/aegis-md": "https://unpkg.com/@aegisjsproject/[email protected]/aegis-md.js",
"@aegisjsproject/aegis-md/": "https://unpkg.com/@aegisjsproject/[email protected]/",
"@shgysk8zer0/components/": "https://unpkg.com/@shgysk8zer0/[email protected]/",
"@kernvalley/components/": "https://unpkg.com/@kernvalley/[email protected]/",
"@webcomponents/custom-elements": "https://unpkg.com/@webcomponents/[email protected]/custom-elements.min.js",
"leaflet": "https://unpkg.com/[email protected]/dist/leaflet-src.esm.js",
"urlpattern-polyfill": "https://unpkg.com/[email protected]/index.js",
"highlight.js": "https://unpkg.com/@highlightjs/[email protected]/es/core.min.js",
"highlight.js/": "https://unpkg.com/@highlightjs/[email protected]/es/",
"@highlightjs/cdn-assets": "https://unpkg.com/@highlightjs/[email protected]/es/core.min.js",
"@highlightjs/cdn-assets/": "https://unpkg.com/@highlightjs/[email protected]/es/",
"marked": "https://unpkg.com/[email protected]/lib/marked.esm.js",
"marked-highlight": "https://unpkg.com/[email protected]/src/index.js",
"firebase/": "https://www.gstatic.com/firebasejs/9.23.0/"
},
"scope": {}
}
22 changes: 0 additions & 22 deletions _data/importmap.yml

This file was deleted.

12 changes: 2 additions & 10 deletions _data/policies.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
trusted:
- default
- empty#html
- empty#script
# - default
- aegis-sanitizer#html
- ga#script-url
- goog#html
- sanitizer-raw#html
- purify-raw#html
- purify#html
- weather-current#html
- krv-events#html
- github-user#html
- share-to-buttons#html
- pwa-install
88 changes: 44 additions & 44 deletions _data/preload.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
- href: https://cdn.kernvalley.us/components/krv/events.html
as: fetch
type: text/html
importance: high
crossOrigin: anonymous
referrerPolicy: no-referrer
- href: https://cdn.kernvalley.us/components/krv/events.css
as: style
type: text/css
importance: high
crossOrigin: anonymous
referrerPolicy: no-referrer
- href: https://cdn.kernvalley.us/components/github/user.html
as: fetch
type: text/html
crossOrigin: anonymous
referrerPolicy: no-referrer
- href: https://cdn.kernvalley.us/components/github/user.css
as: style
type: text/css
crossOrigin: anonymous
referrerPolicy: no-referrer
- href: https://cdn.kernvalley.us/components/install/prompt.html
as: fetch
type: text/html
crossOrigin: anonymous
referrerPolicy: no-referrer
importance: low
- href: https://cdn.kernvalley.us/components/install/prompt.css
as: style
type: text/css
crossOrigin: anonymous
referrerPolicy: no-referrer
importance: low
- href: /img/neon.svg
as: image
type: image/svg+xml
referrerPolicy: no-referrer
importance: high
# - href: https://cdn.kernvalley.us/components/krv/events.html
# as: fetch
# type: text/html
# importance: high
# crossOrigin: anonymous
# referrerPolicy: no-referrer
# - href: https://cdn.kernvalley.us/components/krv/events.css
# as: style
# type: text/css
# importance: high
# crossOrigin: anonymous
# referrerPolicy: no-referrer
# - href: https://cdn.kernvalley.us/components/github/user.html
# as: fetch
# type: text/html
# crossOrigin: anonymous
# referrerPolicy: no-referrer
# - href: https://cdn.kernvalley.us/components/github/user.css
# as: style
# type: text/css
# crossOrigin: anonymous
# referrerPolicy: no-referrer
# - href: https://cdn.kernvalley.us/components/install/prompt.html
# as: fetch
# type: text/html
# crossOrigin: anonymous
# referrerPolicy: no-referrer
# importance: low
# - href: https://cdn.kernvalley.us/components/install/prompt.css
# as: style
# type: text/css
# crossOrigin: anonymous
# referrerPolicy: no-referrer
# importance: low
# - href: /img/neon.svg
# as: image
# type: image/svg+xml
# referrerPolicy: no-referrer
# importance: high
- href: https://cdn.kernvalley.us/fonts/roboto.woff2
as: font
type: font/woff2
crossOrigin: anonymous
referrerPolicy: no-referrer
importance: high
- href: https://cdn.kernvalley.us/components/window-controls.css
as: style
type: text/css
crossOrigin: anonymous
referrerPolicy: no-referrer
# - href: https://cdn.kernvalley.us/components/window-controls.css
# as: style
# type: text/css
# crossOrigin: anonymous
# referrerPolicy: no-referrer
14 changes: 7 additions & 7 deletions _data/scripts/development.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
- src: https://unpkg.com/@shgysk8zer0/polyfills@0.2.0/all.min.js
- src: https://unpkg.com/@shgysk8zer0/polyfills@0.3.9/all.min.js
crossOrigin: anonymous
referrerPolicy: no-referrer
integrity: sha384-8s5Tj7IrKDs3va2EJ3QsRxxApN9vT+thnbA8imc6bwYJA2JaAddVR5b8q5wDkrdv
defer: true
- src: https://unpkg.com/@shgysk8zer0/[email protected]/harden.js
crossOrigin: anonymous
referrerPolicy: no-referrer
integrity: sha384-55L/wO9o0uIVTeubRIDQB4bewfNqyxrj4OXuxlW24NMEk+ioZwMHVw/tFV78mM+k
integrity: sha384-CjIJ66gyWso3qhYfO5C5XoJ8xGecllSUxI0IrVqzJnDZNT7+IN7fh3xfKnnwgORo
defer: true
# - src: https://unpkg.com/@shgysk8zer0/[email protected]/harden.js
# crossOrigin: anonymous
# referrerPolicy: no-referrer
# integrity: sha384-55L/wO9o0uIVTeubRIDQB4bewfNqyxrj4OXuxlW24NMEk+ioZwMHVw/tFV78mM+k
# defer: true
- src: /js/index.js
type: module
referrerPolicy: no-referrer
14 changes: 7 additions & 7 deletions _data/scripts/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
noModule: true
defer: true
integrity: sha384-xyhN4T4+9VPh8uXl6uWjGzsqwNXN9C2tla8b6zSrSqYlMFUoeCdoxiEJU0js+GNE
- src: https://unpkg.com/@shgysk8zer0/polyfills@0.2.0/all.min.js
- src: https://unpkg.com/@shgysk8zer0/polyfills@0.3.9/all.min.js
crossOrigin: anonymous
referrerPolicy: no-referrer
integrity: sha384-8s5Tj7IrKDs3va2EJ3QsRxxApN9vT+thnbA8imc6bwYJA2JaAddVR5b8q5wDkrdv
defer: true
- src: https://unpkg.com/@shgysk8zer0/[email protected]/harden.js
crossOrigin: anonymous
referrerPolicy: no-referrer
integrity: sha384-55L/wO9o0uIVTeubRIDQB4bewfNqyxrj4OXuxlW24NMEk+ioZwMHVw/tFV78mM+k
integrity: sha384-CjIJ66gyWso3qhYfO5C5XoJ8xGecllSUxI0IrVqzJnDZNT7+IN7fh3xfKnnwgORo
defer: true
# - src: https://unpkg.com/@shgysk8zer0/[email protected]/harden.js
# crossOrigin: anonymous
# referrerPolicy: no-referrer
# integrity: sha384-55L/wO9o0uIVTeubRIDQB4bewfNqyxrj4OXuxlW24NMEk+ioZwMHVw/tFV78mM+k
# defer: true
- src: /js/index.min.js
referrerPolicy: no-referrer
defer: true
Expand Down
11 changes: 5 additions & 6 deletions _headers
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,23 @@
X-XSS-Protection: 1; mode=block
Referrer-Policy: no-referrer
Permissions-Policy: geolocation=();
Link: <https://unpkg.com/@shgysk8zer0/[email protected]/all.min.js>; rel=preload; as=script; crossorigin=anonymous; referrerpolicy=no-referrer;
Link: <https://unpkg.com/@shgysk8zer0/[email protected]/harden.js>; rel=preload; as=script; crossorigin=anonymous; referrerpolicy=no-referrer;
Link: <https://unpkg.com/@shgysk8zer0/[email protected]/all.min.js>; rel=preload; as=script; crossorigin=anonymous; referrerpolicy=no-referrer;
Link: </js/index.min.js>; rel=preload; as=script; referrerpolicy=no-referrer;
Link: </css/index.min.css>; rel=preload; as=style; referrerpolicy=no-referrer;
Link: </img/icons.svg>; rel=preload; as=image; referrerpolicy=no-referrer;
Content-Security-Policy: default-src 'self'; base-uri 'self'; img-src *; script-src 'self' unpkg.com/ www.google-analytics.com www.googletagmanager.com 'nonce-300d91bb-3bea-47c7-afc9-a0a8c42ba639'; style-src 'self' cdn.kernvalley.us unpkg.com/ blob:; connect-src 'self' unpkg.com/@shgysk8zer0/ unpkg.com/@kernvalley/ events.kernvalley.us/events.json api.kernvalley.us apps.kernvalley.us/apps.json contact.kernvalley.us/api/ api.github.com/users/ api.openweathermap.org/data/2.5/ www.google-analytics.com/ www.googletagmanager.com/gtag/ ads.kernvalley.us/api/; font-src cdn.kernvalley.us; media-src *; frame-src www.youtube-nocookie.com; form-action 'self'; frame-ancestors 'none'; manifest-src 'self'; worker-src 'self' *.netlify.live/service-worker.js cdn.kernvalley.us/service-worker.js; trusted-types default empty#html empty#script ga#script-url goog#html sanitizer-raw#html purify-raw#html purify#html weather-current#html krv-events#html github-user#html share-to-buttons#html pwa-install; require-trusted-types-for 'script'; reflected-xss block; upgrade-insecure-requests; block-all-mixed-content; disown-opener;
Content-Security-Policy: default-src 'self'; base-uri 'self'; img-src *; script-src 'self' https://unpkg.com/@shgysk8zer0/ https://unpkg.com/@kernvalley/ https://unpkg.com/@aegisjsproject/ www.google-analytics.com www.googletagmanager.com 'nonce-300d91bb-3bea-47c7-afc9-a0a8c42ba639'; style-src 'self' cdn.kernvalley.us unpkg.com/ blob:; connect-src 'self' unpkg.com/@shgysk8zer0/ unpkg.com/@kernvalley/ events.kernvalley.us/events.json api.kernvalley.us apps.kernvalley.us/apps.json contact.kernvalley.us/api/ api.github.com/users/ api.openweathermap.org/data/2.5/ www.google-analytics.com/ www.googletagmanager.com/gtag/ ads.kernvalley.us/api/; font-src cdn.kernvalley.us; media-src *; frame-src www.youtube-nocookie.com; form-action 'self'; frame-ancestors 'none'; manifest-src 'self'; worker-src 'self' *.netlify.live/service-worker.js cdn.kernvalley.us/service-worker.js; trusted-types default aegis-sanitizer#html ga#script-url goog#html pwa-install; require-trusted-types-for 'script'; reflected-xss block; upgrade-insecure-requests; block-all-mixed-content; disown-opener;

/:placeholder
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Referrer-Policy: no-referrer
Permissions-Policy: geolocation=(self https://maps.kernvalley.us/embed);
Link: <https://unpkg.com/@shgysk8zer0/[email protected]/all.min.js>; rel=preload; as=script; crossorigin=anonymous; referrerpolicy=no-referrer;
Link: <https://unpkg.com/@shgysk8zer0/[email protected]/harden.js>; rel=preload; as=script; crossorigin=anonymous; referrerpolicy=no-referrer;
Link: <https://unpkg.com/@shgysk8zer0/[email protected]/all.min.js>; rel=preload; as=script; crossorigin=anonymous; referrerpolicy=no-referrer;
Link: </js/index.min.js>; rel=preload; as=script; referrerpolicy=no-referrer;
Link: </css/index.min.css>; rel=preload; as=style; referrerpolicy=no-referrer;
Link: </img/icons.svg>; rel=preload; as=image; referrerpolicy=no-referrer;
Content-Security-Policy: default-src 'self'; base-uri 'self'; img-src *; script-src 'self' unpkg.com/ www.google-analytics.com www.googletagmanager.com 'nonce-300d91bb-3bea-47c7-afc9-a0a8c42ba639'; style-src 'self' cdn.kernvalley.us unpkg.com/ blob:; connect-src 'self' unpkg.com/@shgysk8zer0/ unpkg.com/@kernvalley/ events.kernvalley.us/events.json apps.kernvalley.us/apps.json api.kernvalley.us api.github.com/users/ contact.kernvalley.us/api/ api.openweathermap.org/data/2.5/ www.google-analytics.com/ www.googletagmanager.com/gtag/; font-src cdn.kernvalley.us; media-src *; frame-src www.youtube-nocookie.com; form-action 'self'; frame-ancestors 'none'; manifest-src 'self'; worker-src 'self'; reflected-xss block; trusted-types default empty#html empty#script ga#script-url goog#html sanitizer-raw#html purify-raw#html purify#html weather-current#html krv-events#html github-user#html share-to-buttons#html pwa-install; require-trusted-types-for 'script'; upgrade-insecure-requests; block-all-mixed-content; disown-opener;
Content-Security-Policy: default-src 'self'; base-uri 'self'; img-src *; script-src 'self' https://unpkg.com/@shgysk8zer0/ https://unpkg.com/@kernvalley/ https://unpkg.com/@aegisjsproject/ www.google-analytics.com www.googletagmanager.com 'nonce-300d91bb-3bea-47c7-afc9-a0a8c42ba639'; style-src 'self' cdn.kernvalley.us unpkg.com/ blob:; connect-src 'self' unpkg.com/@shgysk8zer0/ unpkg.com/@kernvalley/ events.kernvalley.us/events.json apps.kernvalley.us/apps.json api.kernvalley.us api.github.com/users/ contact.kernvalley.us/api/ api.openweathermap.org/data/2.5/ www.google-analytics.com/ www.googletagmanager.com/gtag/; font-src cdn.kernvalley.us; media-src *; frame-src www.youtube-nocookie.com; form-action 'self'; frame-ancestors 'none'; manifest-src 'self'; worker-src 'self'; reflected-xss block; trusted-types aegis-sanitizer#html pwa-install; require-trusted-types-for 'script'; upgrade-insecure-requests; block-all-mixed-content; disown-opener;

/webapp.webmanifest
Content-Type: application/manifest+json
Expand All @@ -47,3 +45,4 @@

/*
X-Content-Type-Options: nosniff

20 changes: 11 additions & 9 deletions css/index.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
@charset "UTF-8";
@import url("./vars.css");
@import url("https://cdn.kernvalley.us/css/normalize/normalize.css");
@import url("https://cdn.kernvalley.us/css/core-css/viewport.css");
@import url("https://cdn.kernvalley.us/css/core-css/element.css");
@import url("https://cdn.kernvalley.us/css/core-css/class-rules.css");
@import url("https://cdn.kernvalley.us/css/core-css/cdn-fonts.css");
@import url("https://cdn.kernvalley.us/css/core-css/animations.css");
@import url("https://cdn.kernvalley.us/css/core-css/scrollbar.css");
@import url("https://cdn.kernvalley.us/css/core-css/accordion.css");
@import url("https://cdn.kernvalley.us/css/core-css/forms.css");
@import url("https://unpkg.com/normalize[email protected]/normalize.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/viewport.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/element.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/class-rules.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/cdn-fonts.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/animations.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/scrollbar.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/accordion.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/forms.css");
@import url("./layout.css");
@import url("./window.css");

/* @import url("https://unpkg.com/@shgysk8zer0/normalize/normalize.css"); */

:root {
font-size: 18px;
}
Expand Down
4 changes: 2 additions & 2 deletions css/vars.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import url("https://cdn.kernvalley.us/css/core-css/theme/default/index.css");
@import url("https://cdn.kernvalley.us/css/core-css/theme/properties.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/theme/default/index.css");
@import url("https://unpkg.com/@shgysk8zer0/core-css@2.5.4/theme/properties.css");

:root {
--accent-color-light: #008000;
Expand Down
4 changes: 3 additions & 1 deletion css/window.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
window-controls {
background-color: var(--accent-color);
height: 0;
height: env(titelbar-area-height, 0);
z-index: 5;
}

Expand All @@ -10,7 +12,7 @@ window-controls::part(container) {

window-controls form {
display: inline-flex;
height: env(titelbar-area-height, 33px);
height: env(titelbar-area-height, 0);
width: 100%;
padding-left: 8px;
contain: strict;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "krv-guide",
"version": "2.0.1",
"version": "2.0.2",
"private": true,
"type": "module",
"description": "Your virtual guide to exploring the Kern River Valley. Get the knowledge of locals at your fingertips!",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { rollupImport, rollupImportMeta } from '@shgysk8zer0/rollup-import';

export default getConfig('./js/index.js', {
plugins: [
rollupImport('_data/importmap.yml'),
rollupImport('_data/importmap.json'),
rollupImportMeta({ baseURL: 'https://guide.kernvalley.us/' }),
],
format: 'iife',
Expand Down
Loading

0 comments on commit d219f5b

Please sign in to comment.