-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
13,710 additions
and
5,548 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ss/sdss_profile/themes/minimally_branded_subtheme/dist/css/minimally_branded_subtheme.css
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
docroot/profiles/sdss/sdss_profile/themes/minimally_branded_subtheme/dist/js/scripts.js.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
docroot/profiles/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.env.local |
1 change: 1 addition & 0 deletions
1
docroot/profiles/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/.nvmrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
6 changes: 6 additions & 0 deletions
6
docroot/profiles/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/.prettierrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"semi": false, | ||
"endOfLine": "auto" | ||
} |
70 changes: 70 additions & 0 deletions
70
docroot/profiles/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/FileSizePlugin.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* Gets size stats for built islands. | ||
*/ | ||
const { basename, join } = require('path') | ||
const { green, red, yellow, white } = require('kleur') | ||
const gzipSize = require('gzip-size') | ||
const brotliSize = require('brotli-size') | ||
const prettyBytes = require('pretty-bytes') | ||
const fs = require('fs/promises') | ||
|
||
/** | ||
* | ||
* Sauce pulled from here: | ||
* https://github.com/developit/microbundle/blob/ecb0b022912397bcf98550c1a783e9e0534f33e5/src/lib/compressed-size.js | ||
*/ | ||
function getPadLeft(str, width, char = ' ') { | ||
return char.repeat(width - str.length) | ||
} | ||
|
||
function formatSize(size, filename, suffix, raw) { | ||
const pretty = raw ? `${size} B` : prettyBytes(size) | ||
const color = size < 5000 ? green : size > 40000 ? red : yellow | ||
const indent = getPadLeft(pretty, 13) | ||
return `${indent}${color(pretty)}: ${white(basename(filename))}${suffix}` | ||
} | ||
|
||
async function getSizeInfo(path, filename) { | ||
const code = await fs.readFile(path) | ||
|
||
const [original, gzip, brotli] = await Promise.all([ | ||
fs.stat(path).then((x) => x.size), | ||
gzipSize(code).catch(() => null), | ||
brotliSize.sync(code), | ||
]) | ||
|
||
const raw = original < 5000 | ||
|
||
let out = formatSize(original, filename, '', raw) | ||
|
||
out += '\n' + formatSize(gzip, filename, '.gz', raw) | ||
|
||
if (brotli) { | ||
out += '\n' + formatSize(brotli, filename, '.br', raw) | ||
} | ||
|
||
return out | ||
} | ||
|
||
class FileSizePlugin { | ||
apply(compiler) { | ||
compiler.hooks.done.tap( | ||
'File Size Plugin', | ||
async ( | ||
stats /* stats is passed as an argument when done hook is tapped. */, | ||
) => { | ||
const promises = [] | ||
stats.compilation.assetsInfo.forEach((value, key) => { | ||
const filePath = join(stats.compilation.outputOptions.path, key) | ||
promises.push(getSizeInfo(filePath, key)) | ||
}) | ||
|
||
const resolve = await Promise.all(promises) | ||
|
||
resolve.map((log) => console.log(log)) | ||
}, | ||
) | ||
} | ||
} | ||
|
||
module.exports = FileSizePlugin |
21 changes: 21 additions & 0 deletions
21
docroot/profiles/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/dist/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<html><head><meta charset="utf-8"/><title>Islands</title><meta name="viewport" content="width=device-width,initial-scale=1"/><style>body { | ||
font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', | ||
Roboto, 'Helvetica Neue', Arial, sans-serif; | ||
} | ||
|
||
.preview { | ||
width: 100%; | ||
max-width: 1500px; | ||
margin: 80px auto; | ||
border: 1px dashed rgba(0, 0, 0, 0.2); | ||
position: relative; | ||
} | ||
|
||
.preview::before { | ||
content: 'Island'; | ||
position: absolute; | ||
display: block; | ||
top: -18px; | ||
font-size: 11px; | ||
color: rgba(0, 0, 0, 0.5); | ||
}</style><script defer="defer" src="/islands/main-menu.island.umd.js"></script></head><body><div class="preview"><div data-island="main-menu-island"></div></div></body></html> |
224 changes: 224 additions & 0 deletions
224
...ss/sdss_profile/themes/stanford_basic/decoupled-menu/dist/islands/main-menu.island.umd.js
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
...ile/themes/stanford_basic/decoupled-menu/dist/islands/main-menu.island.umd.js.LICENSE.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** @license React v16.13.1 | ||
* react-is.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ |
59 changes: 59 additions & 0 deletions
59
docroot/profiles/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"name": "preact-island-starter", | ||
"version": "1.0.0", | ||
"description": "No configuration starter project for Preact Island", | ||
"license": "MIT", | ||
"author": "Marcus Wood", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "NODE_ENV=production webpack --env prod", | ||
"codegen": "npx playwright codegen", | ||
"dev": "webpack serve --env dev", | ||
"test": "npx playwright test", | ||
"test-headed": "npx playwright test --headed", | ||
"test-headed-slow": "SLOW=true npx playwright test --headed", | ||
"tsc": "tsc --noEmit -p tsconfig.app.json", | ||
"prettier": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"", | ||
"prettier-fix": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"" | ||
}, | ||
"dependencies": { | ||
"@preact/preset-vite": "^2.3.0", | ||
"@vanilla-extract/css": "^1.7.2", | ||
"@vanilla-extract/dynamic": "^2.0.2", | ||
"@vanilla-extract/recipes": "^0.2.5", | ||
"@vanilla-extract/sprinkles": "^1.4.1", | ||
"clsx": "^1.2.1", | ||
"jsona": "^1.11.0", | ||
"polished": "^4.2.2", | ||
"preact": "^10.5.7", | ||
"preact-island": "^1.1.0", | ||
"preact-render-to-string": "^5.1.12", | ||
"redaxios": "^0.4.1", | ||
"styled-components": "^5.3.11" | ||
}, | ||
"devDependencies": { | ||
"@babel/preset-env": "^7.18.9", | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@playwright/test": "^1.25.1", | ||
"@types/webpack": "^5.28.0", | ||
"@vanilla-extract/babel-plugin": "^1.1.7", | ||
"@vanilla-extract/webpack-plugin": "^2.1.11", | ||
"babel-loader": "^8.2.5", | ||
"brotli-size": "^4.0.0", | ||
"css-loader": "^6.7.1", | ||
"dotenv": "^10.0.0", | ||
"glob": "^8.0.3", | ||
"gzip-size": "^6.0.0", | ||
"html-webpack-plugin": "^5.5.0", | ||
"kleur": "^4.1.5", | ||
"prettier": "^2.6.2", | ||
"pretty-bytes": "^5.0.0", | ||
"style-loader": "^3.3.1", | ||
"ts-node": "~10.8.0", | ||
"typescript": "^4.6.4", | ||
"webpack": "^5.74.0", | ||
"webpack-cli": "^4.10.0", | ||
"webpack-dev-server": "^4.9.3" | ||
} | ||
} |
119 changes: 119 additions & 0 deletions
119
docroot/profiles/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/playwright.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
import type { PlaywrightTestConfig } from '@playwright/test' | ||
import { devices } from '@playwright/test' | ||
|
||
/** | ||
* Read environment variables from file. | ||
* https://github.com/motdotla/dotenv | ||
*/ | ||
// require('dotenv').config(); | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
const config: PlaywrightTestConfig = { | ||
testDir: './src', | ||
/* Maximum time one test can run for. */ | ||
timeout: 20 * 1000, | ||
expect: { | ||
/** | ||
* Maximum time expect() should wait for the condition to be met. | ||
* For example in `await expect(locator).toHaveText();` | ||
*/ | ||
timeout: 5000, | ||
}, | ||
webServer: { | ||
command: 'npm run dev', | ||
url: 'http://localhost:7777/', | ||
timeout: 120 * 1000, | ||
reuseExistingServer: !process.env.CI, | ||
}, | ||
/* Run tests in files in parallel */ | ||
fullyParallel: true, | ||
/* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
forbidOnly: !!process.env.CI, | ||
/* Retry on CI only */ | ||
retries: process.env.CI ? 2 : 0, | ||
/* Opt out of parallel tests on CI. */ | ||
workers: process.env.CI ? 1 : undefined, | ||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ | ||
reporter: 'html', | ||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ | ||
use: { | ||
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */ | ||
actionTimeout: 0, | ||
/* Base URL to use in actions like `await page.goto('/')`. */ | ||
// baseURL: 'http://localhost:3000', | ||
|
||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | ||
video: 'retain-on-failure', | ||
trace: 'retain-on-failure', | ||
|
||
baseURL: 'http://localhost:7777/', | ||
launchOptions: { | ||
slowMo: process.env.SLOW === 'true' ? 3000 : 0, | ||
}, | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: 'chromium', | ||
use: { | ||
...devices['Desktop Chrome'], | ||
}, | ||
}, | ||
|
||
// { | ||
// name: 'firefox', | ||
// use: { | ||
// ...devices['Desktop Firefox'], | ||
// }, | ||
// }, | ||
|
||
// { | ||
// name: 'webkit', | ||
// use: { | ||
// ...devices['Desktop Safari'], | ||
// }, | ||
// }, | ||
|
||
/* Test against mobile viewports. */ | ||
// { | ||
// name: 'Mobile Chrome', | ||
// use: { | ||
// ...devices['Pixel 5'], | ||
// }, | ||
// }, | ||
// { | ||
// name: 'Mobile Safari', | ||
// use: { | ||
// ...devices['iPhone 12'], | ||
// }, | ||
// }, | ||
|
||
/* Test against branded browsers. */ | ||
// { | ||
// name: 'Microsoft Edge', | ||
// use: { | ||
// channel: 'msedge', | ||
// }, | ||
// }, | ||
// { | ||
// name: 'Google Chrome', | ||
// use: { | ||
// channel: 'chrome', | ||
// }, | ||
// }, | ||
], | ||
|
||
/* Folder for test artifacts such as screenshots, videos, traces, etc. */ | ||
// outputDir: 'test-results/', | ||
|
||
/* Run your local dev server before starting the tests */ | ||
// webServer: { | ||
// command: 'npm run start', | ||
// port: 3000, | ||
// }, | ||
} | ||
|
||
export default config |
8 changes: 8 additions & 0 deletions
8
.../profiles/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/src/components/caret.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const Caret = ({...props}) => { | ||
return ( | ||
<svg role="presentation" width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.4887 5.41566C24.1363 6.00024 24.1737 6.98449 23.5725 7.61404L13.1725 18.5029C12.8697 18.8199 12.4449 19 12 19C11.5551 19 11.1303 18.8199 10.8275 18.5029L0.427538 7.61404C-0.173746 6.98449 -0.136251 6.00024 0.511286 5.41566C1.15882 4.83108 2.17119 4.86753 2.77248 5.49708L12 15.1584L21.2275 5.49708C21.8288 4.86753 22.8412 4.83108 23.4887 5.41566Z" fill="currentColor"/> | ||
</svg> | ||
) | ||
} | ||
export default Caret; |
10 changes: 10 additions & 0 deletions
10
.../profiles/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/src/components/close.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const Close = ({...props}) => { | ||
return ( | ||
<svg width="22px" height="26px" viewBox="0 0 24 24" fill="none" {...props}> | ||
<g id="Menu / Close_SM"> | ||
<path id="Vector" d="M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | ||
</g> | ||
</svg> | ||
) | ||
} | ||
export default Close; |
10 changes: 10 additions & 0 deletions
10
...files/sdss/sdss_profile/themes/stanford_basic/decoupled-menu/src/components/hamburger.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const Hamburger = ({...props}) => { | ||
return ( | ||
<svg width="30px" height="26px" viewBox="0 0 24 24" fill="none" {...props}> | ||
<path d="M4 18L20 18" stroke="#000000" stroke-width="2" stroke-linecap="round"/> | ||
<path d="M4 12L20 12" stroke="#000000" stroke-width="2" stroke-linecap="round"/> | ||
<path d="M4 6L20 6" stroke="#000000" stroke-width="2" stroke-linecap="round"/> | ||
</svg> | ||
) | ||
} | ||
export default Hamburger; |
17 changes: 17 additions & 0 deletions
17
...dss/sdss_profile/themes/stanford_basic/decoupled-menu/src/components/magnifying-glass.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const MagnifyingGlass = ({...props}) => { | ||
return ( | ||
|
||
<svg fill="currentColor" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" width="800px" height="800px" viewBox="0 0 390.704 390.704" {...props}> | ||
<g> | ||
<g> | ||
<path d="M379.711,326.556L265.343,212.188c30.826-54.189,23.166-124.495-23.001-170.663c-55.367-55.366-145.453-55.366-200.818,0 | ||
c-55.365,55.366-55.366,145.452,0,200.818c46.167,46.167,116.474,53.827,170.663,23.001l114.367,114.369 | ||
c14.655,14.655,38.503,14.654,53.157,0C394.367,365.059,394.368,341.212,379.711,326.556z M214.057,214.059 | ||
c-39.77,39.771-104.479,39.771-144.25,0c-39.77-39.77-39.77-104.48,0-144.25c39.771-39.77,104.48-39.77,144.25,0 | ||
C253.828,109.579,253.827,174.29,214.057,214.059z"/> | ||
</g> | ||
</g> | ||
</svg> | ||
) | ||
} | ||
export default MagnifyingGlass; |
Oops, something went wrong.