From f9e00e81514417ec8be9f081d9446dbd76f35e20 Mon Sep 17 00:00:00 2001 From: XanGrab <60899653+XanGrab@users.noreply.github.com> Date: Wed, 15 Jan 2025 08:58:02 -0600 Subject: [PATCH] =?UTF-8?q?Updates=20to=20FloatingDropdown=20=E2=AC=87?= =?UTF-8?q?=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 3 + .vscode/extensions.json | 5 + .../WebGLTemplates/FieldDay/FloatingDropdown | 1 + .../FieldDay/FloatingDropdown/.gitignore | 1 - .../FieldDay/FloatingDropdown/README.md | 37 ------ .../FieldDay/FloatingDropdown/README.md.meta | 7 -- .../FieldDay/FloatingDropdown/index.js | 37 ------ .../FieldDay/FloatingDropdown/index.js.meta | 7 -- .../FieldDay/FloatingDropdown/styles.css | 109 ------------------ .../FieldDay/FloatingDropdown/styles.css.meta | 7 -- .../FieldDay/FloatingDropdown/template.html | 13 --- .../FloatingDropdown/template.html.meta | 7 -- .../FloatingDropdown/vault-library-logo.png | Bin 5489 -> 0 bytes .../vault-library-logo.png.meta | 7 -- 14 files changed, 9 insertions(+), 232 deletions(-) create mode 100644 .vscode/extensions.json create mode 160000 Assets/WebGLTemplates/FieldDay/FloatingDropdown delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/.gitignore delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/README.md delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/README.md.meta delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/index.js delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/index.js.meta delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/styles.css delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/styles.css.meta delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/template.html delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/template.html.meta delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/vault-library-logo.png delete mode 100644 Assets/WebGLTemplates/FieldDay/FloatingDropdown/vault-library-logo.png.meta diff --git a/.gitmodules b/.gitmodules index a61ee90b..dc20bdc4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "Assets/WebGLTemplates/FloatingDropdown"] path = Assets/WebGLTemplates/FloatingDropdown url = https://github.com/fielddaylab/FloatingDropdown.git +[submodule "Assets/WebGLTemplates/FieldDay/FloatingDropdown"] + path = Assets/WebGLTemplates/FieldDay/FloatingDropdown + url = https://github.com/fielddaylab/FloatingDropdown.git diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..ddb6ff85 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "visualstudiotoolsforunity.vstuc" + ] +} diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown b/Assets/WebGLTemplates/FieldDay/FloatingDropdown new file mode 160000 index 00000000..50a7fb68 --- /dev/null +++ b/Assets/WebGLTemplates/FieldDay/FloatingDropdown @@ -0,0 +1 @@ +Subproject commit 50a7fb6824f2b774c3ee60848d0a2fa616253376 diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/.gitignore b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/.gitignore deleted file mode 100644 index 3b8bd73c..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/.gitignore +++ /dev/null @@ -1 +0,0 @@ -public/* \ No newline at end of file diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/README.md b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/README.md deleted file mode 100644 index 3e8efdcc..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# FloatingDropdown -Simple reusable web component for web games linking to the [Vault](https://vault.fielddaylab.wisc.edu/) - -This repository houses a reusable HTML component for the Vault floating dropdown on free browser-based games. There are two pieces used for this component: -1. The HTML template used to display the component on the dom -2. the Unity javascript plugin to be used to remove the button after exiting the title screen. - -## 1. Adding the Component -This example illustrates how this component can be added to a project - -### Step 1: Add a custom component to the header of the index file - -```javascript - -``` - -### Step 2: Add the custom element to the body of the file - -This element uses ***slots*** to make the component more flexible. If you are unfamiliar with slots, you can read more [here](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots#adding_flexibility_with_slots) - -Example of Template: -```javascript - - - - Vault Games Library - - Put the body text here - - - Put button label here - - -
-... - -``` diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/README.md.meta b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/README.md.meta deleted file mode 100644 index 5244b23c..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 1f46e3295aa44c54e98e8d38f29a9a28 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/index.js b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/index.js deleted file mode 100644 index e8f12e01..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/index.js +++ /dev/null @@ -1,37 +0,0 @@ -// This is where the custom component is defined -fetch('FloatingDropdown/template.html') - .then(stream => stream.text()) - .then(text => define(text)) - -/** - * Sets up the custom component as defined in the FloatingDropdown template - * - * @param {string} html the outerHTML attribute of the floating dropdown element defined in `index.html` - */ -function define(html) { - class FloatingDropdown extends HTMLElement { - constructor() { - self = super(); - } - - connectedCallback() { - const parser = new DOMParser(); - const doc = parser.parseFromString(html, "text/html"); - - const template = doc.getElementById("floating-dropdown"); - //Custom element - const dropdown = template.content.cloneNode(true); - - const shadowRoot = this.attachShadow({mode: "open"}) - shadowRoot.appendChild(dropdown); - - // Apply external styles to the shadow dom - const styles = document.createElement("link"); - styles.setAttribute("rel", "stylesheet"); - styles.setAttribute("href", "FloatingDropdown/styles.css"); - - shadowRoot.appendChild(styles); - } - } - customElements.define("floating-dropdown", FloatingDropdown); -} \ No newline at end of file diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/index.js.meta b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/index.js.meta deleted file mode 100644 index 5b7d5e8c..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/index.js.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 6a7ff093b5a69ff4a837c15977f77cd2 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/styles.css b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/styles.css deleted file mode 100644 index 3bd0bc7a..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/styles.css +++ /dev/null @@ -1,109 +0,0 @@ -#header { - content: ""; - position: absolute; - transform: translate(-50%, 0%); - - pointer-events: none; - - top: 16px; - left: 50%; - z-index: 100; -} - -#dropdown { - content: ""; - background-color: #001e2a; - - display: grid; - box-sizing: border-box; - - border-bottom-left-radius: 7px; - border-bottom-right-radius: 7px; - - margin: 0px auto; - padding-top: 256px; - padding-left: 16px; - padding-right: 16px; - width: 275px; - height: 300px; - - position: absolute; - transform: translate(-50%, -75%); - /* transform: translate(-50%, 0%); */ - top: 0px; - left: 50%; - z-index: 10; - - align-content: end; - justify-items: center; - - &:hover, - &:focus { - transition: 0.3s; - transform: translate(-50%, 0%); - } - - & > * { - opacity: 0; - } - - &:hover > * { - opacity: 100; - transition: 0.5s ease-in; - } -} - -#vault-button { - border: none; - padding: 5px; - margin: 0px auto 15px auto; - justify-content: center; - align-items: center; - - border-bottom-right-radius: 32px; - border-bottom-left-radius: 32px; - border-top-right-radius: 32px; - background-color: #00ecd0; - - width: 200px; - height: 40px; - - font-size: 18px; - font-weight: bolder; - text-decoration: none; - line-height: 2px; - letter-spacing: 3px; - - & > span { - color: #001e2a; - font-size: 18px; - font-weight: bolder; - - line-height: 2px; - letter-spacing: 3px; - } - - cursor: pointer; - - &:hover { - scale: 1.1; - } -} - -a { - text-decoration: none; -} - -.content { - display: flex; - justify-content: center; - align-items: center; -} - -p.content { - color: white; - text-decoration: none; - - font-family: "brandon-grotesque", sans-serif; - font-size: 24px; -} diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/styles.css.meta b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/styles.css.meta deleted file mode 100644 index cceabd6d..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/styles.css.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 55a92fdd79d18954482106e70adda4f7 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/template.html b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/template.html deleted file mode 100644 index a9cd1aa2..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/template.html +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/template.html.meta b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/template.html.meta deleted file mode 100644 index a7c9db08..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/template.html.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ec81e85465aaafc4fa5f830aef2c042c -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/vault-library-logo.png b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/vault-library-logo.png deleted file mode 100644 index d2501a524e0460f7ce0c48b26aab7f7993ae4035..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5489 zcmaKwWmFW-*Tdg5d?;ErT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~ z6h7A}X!4-z0sVeGxSQ1XGzeqw(#{)I$huHn&$(FoA*fPZZG1C}Y%d~0Z@m}Q^8^n- zzS2SjA?Zy!-RMiqf0leO#+2xpSN!XZxe5OvBhU36Phyf-VW*1kHB$fUD?X<*GB;Z{ ij9}sUPyIhe{`(8{+`C&zYMA+dQ92q1>NTqN@BRluU4@hY diff --git a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/vault-library-logo.png.meta b/Assets/WebGLTemplates/FieldDay/FloatingDropdown/vault-library-logo.png.meta deleted file mode 100644 index 13cf786c..00000000 --- a/Assets/WebGLTemplates/FieldDay/FloatingDropdown/vault-library-logo.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: cbe41da7b6076a5448b1b5c87184c405 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: