From 02648859a8b26f8dbc08218c26cb76a2396cbff7 Mon Sep 17 00:00:00 2001 From: metacryst Date: Tue, 11 Nov 2025 14:19:56 -0600 Subject: [PATCH 1/6] Adding location pin, location input --- ui/_/code/quill.js | 30 +++++++++++++++++++++++++ ui/_/code/shared.css | 17 ++++++++++++-- ui/_/icons/locationPin.svg | 13 +++++++++++ ui/public/index.html | 5 +++-- ui/site/apps/Jobs/JobsSidebar.js | 12 ++++++++-- ui/site/apps/Market/MarketGrid.js | 7 ++++++ ui/site/apps/{ => Messages}/Messages.js | 0 ui/site/components/AppWindow.js | 2 +- ui/site/components/Home.js | 2 +- 9 files changed, 80 insertions(+), 8 deletions(-) create mode 100644 ui/_/icons/locationPin.svg rename ui/site/apps/{ => Messages}/Messages.js (100%) diff --git a/ui/_/code/quill.js b/ui/_/code/quill.js index ef9148a..23d06c1 100644 --- a/ui/_/code/quill.js +++ b/ui/_/code/quill.js @@ -313,6 +313,22 @@ HTMLElement.prototype.padding = function(one, two, three = "px") { return this } + HTMLElement.prototype.paddingVertical = function(value, unit = "px") { + if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value)) + throw new Error(`Invalid value: ${value}. Expected a number.`); + this.style.paddingTop = value + unit + this.style.paddingBottom = value + unit + return this + } + + HTMLElement.prototype.paddingHorizontal = function(value, unit = "px") { + if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value)) + throw new Error(`Invalid value: ${value}. Expected a number.`); + this.style.paddingRight = value + unit + this.style.paddingLeft = value + unit + return this + } + HTMLElement.prototype.margin = function(direction, value, unit = "px") { if (!value) { this.style.margin = direction; @@ -503,6 +519,20 @@ HTMLElement.prototype.gap = function(value, unit = "px") { return this } +HTMLElement.prototype.backgroundImage = function (...values) { + const formatted = values + .map(v => { + if(v.includes("/") && !v.includes("gradient")) { + v = "url(" + v + ")" + } + return String(v).trim(); + }) + .join(", "); + + this.style.backgroundImage = formatted; + return this; +}; + /* Elements */ quill.setChildren = function(el, innerContent) { diff --git a/ui/_/code/shared.css b/ui/_/code/shared.css index 62165b6..5749d7f 100644 --- a/ui/_/code/shared.css +++ b/ui/_/code/shared.css @@ -1,6 +1,6 @@ :root { --main: #FFDFB4; - --accent: black; + --accent: var(--darkbrown); --tan: #FFDFB4; --purple: #251D44; @@ -11,7 +11,7 @@ --orange: #FE9201; --periwinkle: #655BAF; - --accent2: var(--green); + --accent2: var(--brown); } @media (prefers-color-scheme: dark) { @@ -84,3 +84,16 @@ button { padding: 1em; box-shadow: none; } + +input { + background-color: transparent; + border: 1px solid var(--accent2); + padding-left: 1em; + padding-top: 0.5em; + padding-bottom: 0.5em; + border-radius: 0.3em; +} + +input:focus { + outline: 1px solid var(--red); +} diff --git a/ui/_/icons/locationPin.svg b/ui/_/icons/locationPin.svg new file mode 100644 index 0000000..02c7690 --- /dev/null +++ b/ui/_/icons/locationPin.svg @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/ui/public/index.html b/ui/public/index.html index fab5fd2..a750596 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -12,7 +12,8 @@ } .main-image { - content:url("_/images/castle.svg"); position: absolute; height: 70vh; bottom: 2vh; left: 55vw; transform: translateX(-50%) + content:url("_/images/castle.svg"); position: absolute; height: 70vh; bottom: 2vh; left: 55vw; transform: translateX(-50%); + user-select: none; } @media (max-width: 600px) { .main-image { @@ -44,7 +45,7 @@ - hyperia + hyperia - `; + target.classList.remove("touched") - // Track which anchor was pressed down - let activeLink = null; - - // Get all anchor tags inside this element - const anchors = this.querySelectorAll('a'); - - anchors.forEach(anchor => { - anchor.addEventListener('mousedown', (e) => { - activeLink = anchor; - }); - }); - - // Listen globally for mouseup, to detect release anywhere - document.addEventListener('mouseup', (e) => { - if (activeLink) { - // Navigate to the href of the activeLink - window.location.href = activeLink.href; - activeLink = null; - } - }); - - const hamburger = this.querySelectorAll("img")[1] - const sidebar = document.querySelector("side-bar"); - - hamburger.addEventListener("click", () => { - if (sidebar.style.right === "0vw") { - sidebar.style.right = "-100vw"; - } else { - sidebar.style.right = "0vw"; - } - }); + if(target.classList.contains("selected")) { + this.selected = "" + window.navigateTo("/") + } else { + this.selected = target.innerText + window.navigateTo("/app/" + target.innerText.toLowerCase()) + } + }) + }) } } -customElements.define("nav-bar", NavBar) +register(NavBar) \ No newline at end of file diff --git a/ui/public/index.css b/ui/public/index.css deleted file mode 100644 index e69de29..0000000 diff --git a/ui/public/index.html b/ui/public/index.html index a750596..d836fa3 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -9,32 +9,12 @@ body { font-size: 16px; + background-image: url("_/images/fabric.png"); + background-size: 33vw auto; /* width height of each tile */ } - - .main-image { - content:url("_/images/castle.svg"); position: absolute; height: 70vh; bottom: 2vh; left: 55vw; transform: translateX(-50%); - user-select: none; - } - @media (max-width: 600px) { - .main-image { - max-width: 90vw; bottom: -7vh; - }} - @media (prefers-color-scheme: dark) { - .main-image { - content:url("_/images/castle-dark3.svg"); - height: 1000px; bottom: -34vmin; left: 26vw; - }} - @media (prefers-color-scheme: dark) and (max-width: 600px) { - .main-image { - max-width: 195vw; height: 80vh; left: 0vw; - }} - + - hyperia - - - - -
- - -
-

A Classical Christian Society

- -
-

Hyperia is a private club, focused on promoting the Classical Christian movement in America.

-

Inspired by Classical Christian schools, Hyperia is a similar space for adults.

-
- -
-
- - -
- - -
-
- -
- - - - - - \ No newline at end of file diff --git a/ui/public/index.js b/ui/public/index.js new file mode 100644 index 0000000..b14af88 --- /dev/null +++ b/ui/public/index.js @@ -0,0 +1,2 @@ +import "./components/Home.js" +Home() \ No newline at end of file From 7f85dbe493711268893965a8f3395038ebac06f0 Mon Sep 17 00:00:00 2001 From: metacryst Date: Tue, 18 Nov 2025 04:51:40 -0600 Subject: [PATCH 4/6] Basic Navigation --- ui/_/code/quill.js | 26 ++++++-- ui/public/components/Home.js | 25 ------- ui/public/components/NavBar.js | 63 ++++++++++-------- ui/public/index.js | 2 +- ui/public/pages/Events.js | 7 ++ ui/public/pages/Home.js | 55 +++++++++++++++ ui/public/pages/Join.js | 9 +++ ui/public/pages/SIgnIn.js | 7 ++ ui/public/pages/Why.js | 7 ++ ui/public/pages/about.html | 86 ------------------------ ui/public/pages/join.html | 118 --------------------------------- ui/public/pages/signin.html | 86 ------------------------ 12 files changed, 143 insertions(+), 348 deletions(-) delete mode 100644 ui/public/components/Home.js create mode 100644 ui/public/pages/Events.js create mode 100644 ui/public/pages/Home.js create mode 100644 ui/public/pages/Join.js create mode 100644 ui/public/pages/SIgnIn.js create mode 100644 ui/public/pages/Why.js delete mode 100644 ui/public/pages/about.html delete mode 100644 ui/public/pages/join.html delete mode 100644 ui/public/pages/signin.html diff --git a/ui/_/code/quill.js b/ui/_/code/quill.js index 8e102ad..28d3487 100644 --- a/ui/_/code/quill.js +++ b/ui/_/code/quill.js @@ -1,6 +1,7 @@ /* Sam Russell Captured Sun + 11.17.25.2 - Fixing onNavigate() and onAppear() 11.17.25 - Added dynamic function to have units in style func parameters. 11.14.25 - Added onTouch, onTap. Changed style setters to work with Safari. Added center() funcs. 11.13.25 - changed onFocus() to be a boolean event, added onInput() @@ -273,7 +274,6 @@ function extendHTMLElementWithStyleSetters() { allStyleProps.forEach(prop => { if (prop === "translate") return; - if(prop === "position") console.log("position") const type = cssValueType(prop); @@ -792,7 +792,7 @@ window.Triangle = function (width = "40px", height = "40px") { /* EVENTS */ HTMLElement.prototype.onAppear = function(func) { - func(this); + func.call(this); return this; }; @@ -867,15 +867,33 @@ HTMLElement.prototype.onTap = function(cb) { /* WHY THIS LISTENER IS THE WAY IT IS: - If we dispatch the "navigate" event on the window (as one would expect for a "navigate" event), a listener placed on the element will not pick it up. -- However, if we add the listener here on the window, it won't have the "this" scope that a callback normally would. Which makes it much less useful. +- However, if we add the listener on the window, it won't have the "this" scope that a callback normally would. Which makes it much less useful. - Then, if we try to add that scope using bind(), it makes the function.toString() unreadable, which means we cannot detect duplicate listeners. - Therefore, we just have to attach the navigate event to the element, and manually trigger that when the window listener fires. */ +navigateListeners = [] HTMLElement.prototype.onNavigate = function(cb) { this._storeListener("navigate", cb); - window.addEventListener("navigate", () => this.dispatchEvent(new CustomEvent("navigate"))) + + let found = false + for(entry of navigateListeners) { + if(entry.cb.toString() === cb.toString() && + this.nodeName === entry.el.nodeName) { + found = true + break; + } + } + if(found === false) { + navigateListeners.push({el: this, cb: cb}) + } + return this; }; +window.addEventListener("navigate", () => { + for(entry of navigateListeners) { + entry.el.dispatchEvent(new CustomEvent("navigate")) + } +}) HTMLElement.prototype.onEvent = function(name, cb) { window._storeListener(window, name, cb); diff --git a/ui/public/components/Home.js b/ui/public/components/Home.js deleted file mode 100644 index 2c35d51..0000000 --- a/ui/public/components/Home.js +++ /dev/null @@ -1,25 +0,0 @@ -import "./NavBar.js" - -class Home extends Shadow { - render() { - img("_/images/knight.png", "29vw") - .position("absolute") - .left(50, vw).top(50, vh) - .center() - - p("H   Y   P   E   R   I   A") - .x(50, vw).y(50, vh) - .center() - .color("var(--gold)") - .fontSize(5, vw) - - NavBar() - - p("A CLASSICAL CHRISTIAN ASSOCIATION") - .x(50, vw).y(94, vh) - .center() - .letterSpacing(0.3, em) - } -} - -register(Home) \ No newline at end of file diff --git a/ui/public/components/NavBar.js b/ui/public/components/NavBar.js index 350bf91..f148c08 100644 --- a/ui/public/components/NavBar.js +++ b/ui/public/components/NavBar.js @@ -1,10 +1,41 @@ class NavBar extends Shadow { + NavButton(text) { + + function normalizeText(text) { + return text.toLowerCase().replace(/[\s?]+/g, ""); + } + + function isSelected(el) { + return ("/" + normalizeText(el.innerText)) === window.location.pathname + } + + return p(text) + .cursor("default") + .textUnderlineOffset(0.5, em) + .onAppear(function() { + this.style.textDecoration = isSelected(this) ? "underline" : "" + }) + .onHover(function (hovering) { + if(hovering) { + this.style.textDecoration = "underline" + } else if(!isSelected(this)) { + this.style.textDecoration = "" + } + }) + .onClick(function (done) { + if(done) { + window.navigateTo(normalizeText(this.innerText)) + } + }) + + } + render() { HStack(() => { - p("WHY?") - p("EVENTS") - p("JOIN") - p("SIGN IN") + this.NavButton("WHY?") + this.NavButton("EVENTS") + this.NavButton("JOIN") + this.NavButton("SIGN IN") }) .x(50, vw).y(4, em) .center() @@ -13,30 +44,6 @@ class NavBar extends Shadow { .gap(3, em) .paddingRight(2, em) .onNavigate(() => { - console.log("hi") - }) - .onAppear(() => { - Array.from(this.$("p")).forEach((el) => { - el.addEventListener("mousedown", (e) => { - el.classList.add("touched") - }) - }) - window.addEventListener("mouseup", (e) => { - let target = e.target - if(!target.matches("app-menu p")) { - return - } - - target.classList.remove("touched") - - if(target.classList.contains("selected")) { - this.selected = "" - window.navigateTo("/") - } else { - this.selected = target.innerText - window.navigateTo("/app/" + target.innerText.toLowerCase()) - } - }) }) } } diff --git a/ui/public/index.js b/ui/public/index.js index b14af88..b6b7e32 100644 --- a/ui/public/index.js +++ b/ui/public/index.js @@ -1,2 +1,2 @@ -import "./components/Home.js" +import "./pages/Home.js" Home() \ No newline at end of file diff --git a/ui/public/pages/Events.js b/ui/public/pages/Events.js new file mode 100644 index 0000000..97d2f58 --- /dev/null +++ b/ui/public/pages/Events.js @@ -0,0 +1,7 @@ +class Events extends Shadow { + render() { + + } +} + +register(Events) \ No newline at end of file diff --git a/ui/public/pages/Home.js b/ui/public/pages/Home.js new file mode 100644 index 0000000..5fc5916 --- /dev/null +++ b/ui/public/pages/Home.js @@ -0,0 +1,55 @@ +import "../components/NavBar.js" +import "./Why.js" +import "./Events.js" +import "./Join.js" +import "./SignIn.js" + +class Home extends Shadow { + render() { + + ZStack(() => { + + NavBar() + + switch(window.location.pathname) { + case "/": + img("_/images/knight.png", "29vw") + .position("absolute") + .left(50, vw).top(50, vh) + .center() + + p("H   Y   P   E   R   I   A") + .x(50, vw).y(50, vh) + .center() + .color("var(--gold)") + .fontSize(5, vw) + + + p("A CLASSICAL CHRISTIAN ASSOCIATION") + .x(50, vw).y(94, vh) + .center() + .letterSpacing(0.3, em) + break; + case "/why": + Why() + break; + case "/events": + Events() + break; + case "/join": + Join() + break; + case "/signin": + SignIn() + break; + } + + }) + .onNavigate(() => { + this.rerender() + }) + + } +} + +register(Home) \ No newline at end of file diff --git a/ui/public/pages/Join.js b/ui/public/pages/Join.js new file mode 100644 index 0000000..41abbc1 --- /dev/null +++ b/ui/public/pages/Join.js @@ -0,0 +1,9 @@ +class Join extends Shadow { + render() { + p("Membership is invitation-only. Look out for us in person, or come to an event!") + .x(50, vw).y(50, vh) + .center() + } +} + +register(Join) \ No newline at end of file diff --git a/ui/public/pages/SIgnIn.js b/ui/public/pages/SIgnIn.js new file mode 100644 index 0000000..91f672e --- /dev/null +++ b/ui/public/pages/SIgnIn.js @@ -0,0 +1,7 @@ +class SignIn extends Shadow { + render() { + + } +} + +register(SignIn) \ No newline at end of file diff --git a/ui/public/pages/Why.js b/ui/public/pages/Why.js new file mode 100644 index 0000000..c56016c --- /dev/null +++ b/ui/public/pages/Why.js @@ -0,0 +1,7 @@ +class Why extends Shadow { + render() { + + } +} + +register(Why) \ No newline at end of file diff --git a/ui/public/pages/about.html b/ui/public/pages/about.html deleted file mode 100644 index 2287388..0000000 --- a/ui/public/pages/about.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - Hyperia - - - - - - - - - hyperia - - -
- -
- -
-

- -
- - - -
- - \ No newline at end of file diff --git a/ui/public/pages/join.html b/ui/public/pages/join.html deleted file mode 100644 index 74e2da4..0000000 --- a/ui/public/pages/join.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - Hyperia - - - - - - - - - hyperia - - -
- -
- -
-

- -
- - - -
- - \ No newline at end of file diff --git a/ui/public/pages/signin.html b/ui/public/pages/signin.html deleted file mode 100644 index f4802ba..0000000 --- a/ui/public/pages/signin.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - Hyperia - - - - - - - - - hyperia - - -
-
- -
- -
-

-
- -
-
- - \ No newline at end of file From 81ca35bf2faa69476a5e2748eda362a4963a2e23 Mon Sep 17 00:00:00 2001 From: metacryst Date: Tue, 18 Nov 2025 06:22:02 -0600 Subject: [PATCH 5/6] Pubilc site basically complete, apps are reasonable but could be better looking --- ui/_/code/quill.js | 58 ++++++++++++++++++----------- ui/_/code/shared.css | 15 +++++--- ui/_/icons/logo.svg | 65 +++++++++++++++++++-------------- ui/_/icons/logo2.svg | 29 +++++++++++++++ ui/public/components/NavBar.js | 10 +++-- ui/public/pages/Home.js | 11 +++++- ui/public/pages/SIgnIn.js | 30 ++++++++++++++- ui/public/pages/Why.js | 4 +- ui/site/components/AppMenu.js | 2 +- ui/site/components/AppWindow.js | 3 +- ui/site/components/Home.js | 12 +++--- 11 files changed, 169 insertions(+), 70 deletions(-) create mode 100644 ui/_/icons/logo2.svg diff --git a/ui/_/code/quill.js b/ui/_/code/quill.js index 28d3487..66118c6 100644 --- a/ui/_/code/quill.js +++ b/ui/_/code/quill.js @@ -1,6 +1,7 @@ /* Sam Russell Captured Sun + 11.17.25.3 - Adding styles() and fixing dynamic function from earlier 11.17.25.2 - Fixing onNavigate() and onAppear() 11.17.25 - Added dynamic function to have units in style func parameters. 11.14.25 - Added onTouch, onTap. Changed style setters to work with Safari. Added center() funcs. @@ -257,17 +258,38 @@ function extendHTMLElementWithStyleSetters() { const div = document.createElement("div"); const style = div.style; if (!(prop in style)) return "invalid"; - - // Does prop accept a value with px? - style[prop] = "10px"; - if (style[prop] === "10px") return "unit-number"; - - // Does prop accept a unitless number (opacity, zIndex, etc)? - style[prop] = "5"; - const computed = getComputedStyle(div)[prop]; - if (!isNaN(parseFloat(computed))) return "unitless-number"; - - return "string"; + + switch(prop) { + + case "gap": + case "borderRadius": + case "width": + case "height": + case "maxWidth": + case "maxHeight": + + case "left": + case "top": + case "bottom": + case "right": + + case "paddingLeft": + case "paddingTop": + case "paddingBottom": + case "paddingRight": + + case "marginLeft": + case "marginTop": + case "marginBottom": + case "marginRight": + + return "unit-number" + + default: + + return "string" + } + } let allStyleProps = ["accentColor", "additiveSymbols", "alignContent", "alignItems", "alignSelf", "alignmentBaseline", "all", "anchorName", "anchorScope", "animation", "animationComposition", "animationDelay", "animationDirection", "animationDuration", "animationFillMode", "animationIterationCount", "animationName", "animationPlayState", "animationRange", "animationRangeEnd", "animationRangeStart", "animationTimeline", "animationTimingFunction", "appRegion", "appearance", "ascentOverride", "aspectRatio", "backdropFilter", "backfaceVisibility", "background", "backgroundAttachment", "backgroundBlendMode", "backgroundClip", "backgroundColor", "backgroundImage", "backgroundOrigin", "backgroundPosition", "backgroundPositionX", "backgroundPositionY", "backgroundRepeat", "backgroundSize", "basePalette", "baselineShift", "baselineSource", "blockSize", "border", "borderBlock", "borderBlockColor", "borderBlockEnd", "borderBlockEndColor", "borderBlockEndStyle", "borderBlockEndWidth", "borderBlockStart", "borderBlockStartColor", "borderBlockStartStyle", "borderBlockStartWidth", "borderBlockStyle", "borderBlockWidth", "borderBottom", "borderBottomColor", "borderBottomLeftRadius", "borderBottomRightRadius", "borderBottomStyle", "borderBottomWidth", "borderCollapse", "borderColor", "borderEndEndRadius", "borderEndStartRadius", "borderImage", "borderImageOutset", "borderImageRepeat", "borderImageSlice", "borderImageSource", "borderImageWidth", "borderInline", "borderInlineColor", "borderInlineEnd", "borderInlineEndColor", "borderInlineEndStyle", "borderInlineEndWidth", "borderInlineStart", "borderInlineStartColor", "borderInlineStartStyle", "borderInlineStartWidth", "borderInlineStyle", "borderInlineWidth", "borderLeft", "borderLeftColor", "borderLeftStyle", "borderLeftWidth", "borderRadius", "borderRight", "borderRightColor", "borderRightStyle", "borderRightWidth", "borderSpacing", "borderStartEndRadius", "borderStartStartRadius", "borderStyle", "borderTop", "borderTopColor", "borderTopLeftRadius", "borderTopRightRadius", "borderTopStyle", "borderTopWidth", "borderWidth", "bottom", "boxDecorationBreak", "boxShadow", "boxSizing", "breakAfter", "breakBefore", "breakInside", "bufferedRendering", "captionSide", "caretAnimation", "caretColor", "clear", "clip", "clipPath", "clipRule", "color", "colorInterpolation", "colorInterpolationFilters", "colorRendering", "colorScheme", "columnCount", "columnFill", "columnGap", "columnRule", "columnRuleColor", "columnRuleStyle", "columnRuleWidth", "columnSpan", "columnWidth", "columns", "contain", "containIntrinsicBlockSize", "containIntrinsicHeight", "containIntrinsicInlineSize", "containIntrinsicSize", "containIntrinsicWidth", "container", "containerName", "containerType", "content", "contentVisibility", "cornerBlockEndShape", "cornerBlockStartShape", "cornerBottomLeftShape", "cornerBottomRightShape", "cornerBottomShape", "cornerEndEndShape", "cornerEndStartShape", "cornerInlineEndShape", "cornerInlineStartShape", "cornerLeftShape", "cornerRightShape", "cornerShape", "cornerStartEndShape", "cornerStartStartShape", "cornerTopLeftShape", "cornerTopRightShape", "cornerTopShape", "counterIncrement", "counterReset", "counterSet", "cursor", "cx", "cy", "d", "descentOverride", "direction", "display", "dominantBaseline", "dynamicRangeLimit", "emptyCells", "fallback", "fieldSizing", "fill", "fillOpacity", "fillRule", "filter", "flex", "flexBasis", "flexDirection", "flexFlow", "flexGrow", "flexShrink", "flexWrap", "float", "floodColor", "floodOpacity", "font", "fontDisplay", "fontFamily", "fontFeatureSettings", "fontKerning", "fontOpticalSizing", "fontPalette", "fontSize", "fontSizeAdjust", "fontStretch", "fontStyle", "fontSynthesis", "fontSynthesisSmallCaps", "fontSynthesisStyle", "fontSynthesisWeight", "fontVariant", "fontVariantAlternates", "fontVariantCaps", "fontVariantEastAsian", "fontVariantEmoji", "fontVariantLigatures", "fontVariantNumeric", "fontVariantPosition", "fontVariationSettings", "fontWeight", "forcedColorAdjust", "gap", "grid", "gridArea", "gridAutoColumns", "gridAutoFlow", "gridAutoRows", "gridColumn", "gridColumnEnd", "gridColumnGap", "gridColumnStart", "gridGap", "gridRow", "gridRowEnd", "gridRowGap", "gridRowStart", "gridTemplate", "gridTemplateAreas", "gridTemplateColumns", "gridTemplateRows", "height", "hyphenateCharacter", "hyphenateLimitChars", "hyphens", "imageOrientation", "imageRendering", "inherits", "initialLetter", "initialValue", "inlineSize", "inset", "insetBlock", "insetBlockEnd", "insetBlockStart", "insetInline", "insetInlineEnd", "insetInlineStart", "interactivity", "interpolateSize", "isolation", "justifyContent", "justifyItems", "justifySelf", "left", "letterSpacing", "lightingColor", "lineBreak", "lineGapOverride", "lineHeight", "listStyle", "listStyleImage", "listStylePosition", "listStyleType", "margin", "marginBlock", "marginBlockEnd", "marginBlockStart", "marginBottom", "marginInline", "marginInlineEnd", "marginInlineStart", "marginLeft", "marginRight", "marginTop", "marker", "markerEnd", "markerMid", "markerStart", "mask", "maskClip", "maskComposite", "maskImage", "maskMode", "maskOrigin", "maskPosition", "maskRepeat", "maskSize", "maskType", "mathDepth", "mathShift", "mathStyle", "maxBlockSize", "maxHeight", "maxInlineSize", "maxWidth", "minBlockSize", "minHeight", "minInlineSize", "minWidth", "mixBlendMode", "navigation", "negative", "objectFit", "objectPosition", "objectViewBox", "offset", "offsetAnchor", "offsetDistance", "offsetPath", "offsetPosition", "offsetRotate", "opacity", "order", "orphans", "outline", "outlineColor", "outlineOffset", "outlineStyle", "outlineWidth", "overflow", "overflowAnchor", "overflowBlock", "overflowClipMargin", "overflowInline", "overflowWrap", "overflowX", "overflowY", "overlay", "overrideColors", "overscrollBehavior", "overscrollBehaviorBlock", "overscrollBehaviorInline", "overscrollBehaviorX", "overscrollBehaviorY", "pad", "padding", "paddingBlock", "paddingBlockEnd", "paddingBlockStart", "paddingBottom", "paddingInline", "paddingInlineEnd", "paddingInlineStart", "paddingLeft", "paddingRight", "paddingTop", "page", "pageBreakAfter", "pageBreakBefore", "pageBreakInside", "pageOrientation", "paintOrder", "perspective", "perspectiveOrigin", "placeContent", "placeItems", "placeSelf", "pointerEvents", "position", "positionAnchor", "positionArea", "positionTry", "positionTryFallbacks", "positionTryOrder", "positionVisibility", "prefix", "printColorAdjust", "quotes", "r", "range", "readingFlow", "readingOrder", "resize", "result", "right", "rotate", "rowGap", "rubyAlign", "rubyPosition", "rx", "ry", "scale", "scrollBehavior", "scrollInitialTarget", "scrollMargin", "scrollMarginBlock", "scrollMarginBlockEnd", "scrollMarginBlockStart", "scrollMarginBottom", "scrollMarginInline", "scrollMarginInlineEnd", "scrollMarginInlineStart", "scrollMarginLeft", "scrollMarginRight", "scrollMarginTop", "scrollMarkerGroup", "scrollPadding", "scrollPaddingBlock", "scrollPaddingBlockEnd", "scrollPaddingBlockStart", "scrollPaddingBottom", "scrollPaddingInline", "scrollPaddingInlineEnd", "scrollPaddingInlineStart", "scrollPaddingLeft", "scrollPaddingRight", "scrollPaddingTop", "scrollSnapAlign", "scrollSnapStop", "scrollSnapType", "scrollTargetGroup", "scrollTimeline", "scrollTimelineAxis", "scrollTimelineName", "scrollbarColor", "scrollbarGutter", "scrollbarWidth", "shapeImageThreshold", "shapeMargin", "shapeOutside", "shapeRendering", "size", "sizeAdjust", "speak", "speakAs", "src", "stopColor", "stopOpacity", "stroke", "strokeDasharray", "strokeDashoffset", "strokeLinecap", "strokeLinejoin", "strokeMiterlimit", "strokeOpacity", "strokeWidth", "suffix", "symbols", "syntax", "system", "tabSize", "tableLayout", "textAlign", "textAlignLast", "textAnchor", "textAutospace", "textBox", "textBoxEdge", "textBoxTrim", "textCombineUpright", "textDecoration", "textDecorationColor", "textDecorationLine", "textDecorationSkipInk", "textDecorationStyle", "textDecorationThickness", "textEmphasis", "textEmphasisColor", "textEmphasisPosition", "textEmphasisStyle", "textIndent", "textOrientation", "textOverflow", "textRendering", "textShadow", "textSizeAdjust", "textSpacingTrim", "textTransform", "textUnderlineOffset", "textUnderlinePosition", "textWrap", "textWrapMode", "textWrapStyle", "timelineScope", "top", "touchAction", "transform", "transformBox", "transformOrigin", "transformStyle", "transition", "transitionBehavior", "transitionDelay", "transitionDuration", "transitionProperty", "transitionTimingFunction", "translate", "types", "unicodeBidi", "unicodeRange", "userSelect", "vectorEffect", "verticalAlign", "viewTimeline", "viewTimelineAxis", "viewTimelineInset", "viewTimelineName", "viewTransitionClass", "viewTransitionGroup", "viewTransitionName", "visibility", "webkitAlignContent", "webkitAlignItems", "webkitAlignSelf", "webkitAnimation", "webkitAnimationDelay", "webkitAnimationDirection", "webkitAnimationDuration", "webkitAnimationFillMode", "webkitAnimationIterationCount", "webkitAnimationName", "webkitAnimationPlayState", "webkitAnimationTimingFunction", "webkitAppRegion", "webkitAppearance", "webkitBackfaceVisibility", "webkitBackgroundClip", "webkitBackgroundOrigin", "webkitBackgroundSize", "webkitBorderAfter", "webkitBorderAfterColor", "webkitBorderAfterStyle", "webkitBorderAfterWidth", "webkitBorderBefore", "webkitBorderBeforeColor", "webkitBorderBeforeStyle", "webkitBorderBeforeWidth", "webkitBorderBottomLeftRadius", "webkitBorderBottomRightRadius", "webkitBorderEnd", "webkitBorderEndColor", "webkitBorderEndStyle", "webkitBorderEndWidth", "webkitBorderHorizontalSpacing", "webkitBorderImage", "webkitBorderRadius", "webkitBorderStart", "webkitBorderStartColor", "webkitBorderStartStyle", "webkitBorderStartWidth", "webkitBorderTopLeftRadius", "webkitBorderTopRightRadius", "webkitBorderVerticalSpacing", "webkitBoxAlign", "webkitBoxDecorationBreak", "webkitBoxDirection", "webkitBoxFlex", "webkitBoxOrdinalGroup", "webkitBoxOrient", "webkitBoxPack", "webkitBoxReflect", "webkitBoxShadow", "webkitBoxSizing", "webkitClipPath", "webkitColumnBreakAfter", "webkitColumnBreakBefore", "webkitColumnBreakInside", "webkitColumnCount", "webkitColumnGap", "webkitColumnRule", "webkitColumnRuleColor", "webkitColumnRuleStyle", "webkitColumnRuleWidth", "webkitColumnSpan", "webkitColumnWidth", "webkitColumns", "webkitFilter", "webkitFlex", "webkitFlexBasis", "webkitFlexDirection", "webkitFlexFlow", "webkitFlexGrow", "webkitFlexShrink", "webkitFlexWrap", "webkitFontFeatureSettings", "webkitFontSmoothing", "webkitHyphenateCharacter", "webkitJustifyContent", "webkitLineBreak", "webkitLineClamp", "webkitLocale", "webkitLogicalHeight", "webkitLogicalWidth", "webkitMarginAfter", "webkitMarginBefore", "webkitMarginEnd", "webkitMarginStart", "webkitMask", "webkitMaskBoxImage", "webkitMaskBoxImageOutset", "webkitMaskBoxImageRepeat", "webkitMaskBoxImageSlice", "webkitMaskBoxImageSource", "webkitMaskBoxImageWidth", "webkitMaskClip", "webkitMaskComposite", "webkitMaskImage", "webkitMaskOrigin", "webkitMaskPosition", "webkitMaskPositionX", "webkitMaskPositionY", "webkitMaskRepeat", "webkitMaskSize", "webkitMaxLogicalHeight", "webkitMaxLogicalWidth", "webkitMinLogicalHeight", "webkitMinLogicalWidth", "webkitOpacity", "webkitOrder", "webkitPaddingAfter", "webkitPaddingBefore", "webkitPaddingEnd", "webkitPaddingStart", "webkitPerspective", "webkitPerspectiveOrigin", "webkitPerspectiveOriginX", "webkitPerspectiveOriginY", "webkitPrintColorAdjust", "webkitRtlOrdering", "webkitRubyPosition", "webkitShapeImageThreshold", "webkitShapeMargin", "webkitShapeOutside", "webkitTapHighlightColor", "webkitTextCombine", "webkitTextDecorationsInEffect", "webkitTextEmphasis", "webkitTextEmphasisColor", "webkitTextEmphasisPosition", "webkitTextEmphasisStyle", "webkitTextFillColor", "webkitTextOrientation", "webkitTextSecurity", "webkitTextSizeAdjust", "webkitTextStroke", "webkitTextStrokeColor", "webkitTextStrokeWidth", "webkitTransform", "webkitTransformOrigin", "webkitTransformOriginX", "webkitTransformOriginY", "webkitTransformOriginZ", "webkitTransformStyle", "webkitTransition", "webkitTransitionDelay", "webkitTransitionDuration", "webkitTransitionProperty", "webkitTransitionTimingFunction", "webkitUserDrag", "webkitUserModify", "webkitUserSelect", "webkitWritingMode", "whiteSpace", "whiteSpaceCollapse", "widows", "width", "willChange", "wordBreak", "wordSpacing", "wordWrap", "writingMode", "x", "y", "zIndex", "zoom"] @@ -288,16 +310,6 @@ function extendHTMLElementWithStyleSetters() { }; break; - case "unitless-number": - HTMLElement.prototype[prop] = function(value) { - if (typeof value !== "number" || isNaN(value)) { - throw new Error(`Invalid value for ${prop}: ${value}. Expected a number.`); - } - this.style[prop] = String(value); - return this; - }; - break; - case "string": HTMLElement.prototype[prop] = function(value) { this.style[prop] = value; @@ -310,6 +322,10 @@ function extendHTMLElementWithStyleSetters() { extendHTMLElementWithStyleSetters(); +HTMLElement.prototype.styles = function(cb) { + cb.call(this, this) +} + HTMLElement.prototype.padding = function(one, two, three = "px") { const setPadding = (side, val) => { diff --git a/ui/_/code/shared.css b/ui/_/code/shared.css index 8b5591e..d807318 100644 --- a/ui/_/code/shared.css +++ b/ui/_/code/shared.css @@ -5,21 +5,22 @@ --tan: #FFDFB4; --gold: #F2B36F; --purple: #251D44; - --green: #0B5538; + --green: #0857265c; --red: #BC1C02; --brown: #c6a476; --darkbrown: #60320c; --orange: #FE9201; --periwinkle: #655BAF; - --accent2: var(--brown); + --accent2: var(--green); } @media (prefers-color-scheme: dark) { :root { --main: #251D44; --accent: var(--gold); - --accent2: var(--periwinkle); + --dividerColor: var(--gold); + --accent2: var(--gold); } } @@ -80,10 +81,12 @@ a:active { } button { - background-color: var(--green); - color: var(--tan); - padding: 1em; + background-color: transparent; + color: var(--accent); + padding: 0.5em; box-shadow: none; + border: 1px solid var(--accent); + border-radius: 0.3em; } input { diff --git a/ui/_/icons/logo.svg b/ui/_/icons/logo.svg index 317a745..67b933e 100644 --- a/ui/_/icons/logo.svg +++ b/ui/_/icons/logo.svg @@ -1,29 +1,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/_/icons/logo2.svg b/ui/_/icons/logo2.svg new file mode 100644 index 0000000..317a745 --- /dev/null +++ b/ui/_/icons/logo2.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/public/components/NavBar.js b/ui/public/components/NavBar.js index f148c08..d955e16 100644 --- a/ui/public/components/NavBar.js +++ b/ui/public/components/NavBar.js @@ -24,7 +24,11 @@ class NavBar extends Shadow { }) .onClick(function (done) { if(done) { - window.navigateTo(normalizeText(this.innerText)) + if(!isSelected(this)) { + window.navigateTo(normalizeText(this.innerText)) + } else { + window.navigateTo("/") + } } }) @@ -34,6 +38,7 @@ class NavBar extends Shadow { HStack(() => { this.NavButton("WHY?") this.NavButton("EVENTS") + div().width(2.5, em).height(2.5, em) this.NavButton("JOIN") this.NavButton("SIGN IN") }) @@ -43,8 +48,7 @@ class NavBar extends Shadow { .justifyContent("center") .gap(3, em) .paddingRight(2, em) - .onNavigate(() => { - }) + .width(50, vw) } } diff --git a/ui/public/pages/Home.js b/ui/public/pages/Home.js index 5fc5916..2c0e884 100644 --- a/ui/public/pages/Home.js +++ b/ui/public/pages/Home.js @@ -10,6 +10,16 @@ class Home extends Shadow { ZStack(() => { NavBar() + + img("_/icons/logo.svg", "2.5em") + .onClick((done) => { + if(!done) return + window.navigateTo("/") + }) + .position("absolute") + .left(50, vw).top(4, em) + .center() + .transform("translate(-2em, -50%)") switch(window.location.pathname) { case "/": @@ -24,7 +34,6 @@ class Home extends Shadow { .color("var(--gold)") .fontSize(5, vw) - p("A CLASSICAL CHRISTIAN ASSOCIATION") .x(50, vw).y(94, vh) .center() diff --git a/ui/public/pages/SIgnIn.js b/ui/public/pages/SIgnIn.js index 91f672e..b7eaf13 100644 --- a/ui/public/pages/SIgnIn.js +++ b/ui/public/pages/SIgnIn.js @@ -1,6 +1,32 @@ -class SignIn extends Shadow { - render() { +css(` + signin- input::placeholder { + color: var(--accent) + } +`) +class SignIn extends Shadow { + + inputStyles(el) { + console.log(el) + return el + .border("1px solid var(--accent)") + } + + render() { + ZStack(() => { + form(() => { + input("Email") + .attr({name: "email", type: "email"}) + .styles(this.inputStyles) + input("Password") + .attr({name: "password", type: "password"}) + .styles(this.inputStyles) + button("Submit") + }) + .attr({action: "/login", method: "POST"}) + .x(50, vw).y(50, vh) + .center() + }) } } diff --git a/ui/public/pages/Why.js b/ui/public/pages/Why.js index c56016c..9540886 100644 --- a/ui/public/pages/Why.js +++ b/ui/public/pages/Why.js @@ -1,6 +1,8 @@ class Why extends Shadow { render() { - + p("The West is Falling. Why Not?") + .x(50, vw).y(50, vh) + .center() } } diff --git a/ui/site/components/AppMenu.js b/ui/site/components/AppMenu.js index 42c73c3..4fafbe6 100644 --- a/ui/site/components/AppMenu.js +++ b/ui/site/components/AppMenu.js @@ -16,7 +16,7 @@ css(` padding-bottom: 4em; bottom: 1em; border-radius: 12px; - background-color: var(--main); + background-color: var(--green); } app-menu p { diff --git a/ui/site/components/AppWindow.js b/ui/site/components/AppWindow.js index bbf173f..ca8f6a7 100644 --- a/ui/site/components/AppWindow.js +++ b/ui/site/components/AppWindow.js @@ -35,7 +35,8 @@ class AppWindow extends Shadow { .display(this.app ? '' : 'none') .width(100, "vw") .height(100, "vh") - .backgroundColor("var(--main)") + .backgroundImage("/_/images/fabric.png") + .backgroundSize("33vw auto") .position("fixed") .top(0) .left(0) diff --git a/ui/site/components/Home.js b/ui/site/components/Home.js index 3911c5b..d81f34d 100644 --- a/ui/site/components/Home.js +++ b/ui/site/components/Home.js @@ -10,8 +10,8 @@ class Home extends Shadow { ZStack(() => { img("/_/icons/logo.svg", "2.5em") .position("fixed") - .left("3em") - .top("3vh") + .left(3, em) + .top(3, vh) .zIndex(3) .onClick(() => { window.navigateTo("/") @@ -59,13 +59,13 @@ class Home extends Shadow { .zIndex(1) .cursor("default") .position("fixed") - .top("5.5vh") - .right("4.5vw") + .top(5.5, vh) + .right(4.5, vw) a("/signout", "Sign Out") .position("fixed") - .top("5vh") - .right("2em") + .top(5, vh) + .right(2, em) .background("transparent") .border(window.location.pathname === "/" ? "1px solid var(--tan)" : "1px solid var(--accent2)") .color(window.location.pathname === "/" ? "var(--tan)" : "var(--accent)") From b8e48f79453c41ed126b0afbf5627451c749da63 Mon Sep 17 00:00:00 2001 From: metacryst Date: Tue, 18 Nov 2025 07:58:35 -0600 Subject: [PATCH 6/6] User Submitting Signup --- qrCodes/convertToJSON.js | 27 ++++++++++ qrCodes/package.json | 1 + server/db/db.js | 17 ++++++ server/index.js | 79 +++++++++++++++++---------- ui/_/code/quill.js | 2 + ui/public/components/JoinForm.js | 91 ++++++++++++++++++++++++++++++++ ui/public/index.html | 8 --- ui/public/pages/Home.js | 6 +++ 8 files changed, 196 insertions(+), 35 deletions(-) create mode 100644 qrCodes/convertToJSON.js create mode 100644 ui/public/components/JoinForm.js diff --git a/qrCodes/convertToJSON.js b/qrCodes/convertToJSON.js new file mode 100644 index 0000000..fc3869f --- /dev/null +++ b/qrCodes/convertToJSON.js @@ -0,0 +1,27 @@ +import fs from 'fs' +import {parse} from 'csv-parse' + +const csvFilePath = './tokens.csv'; +const jsonFilePath = './tokens.json'; + +fs.readFile(csvFilePath, 'utf8', (err, data) => { + if (err) { + console.error('Error reading file:', err); + return; + } + + parse(data, { columns: true, skip_empty_lines: true }, (err, output) => { + if (err) { + console.error('Error parsing CSV:', err); + return; + } + + fs.writeFile(jsonFilePath, JSON.stringify(output, null, 2), (err) => { + if (err) { + console.error('Error writing JSON file:', err); + } else { + console.log(`JSON successfully written to ${jsonFilePath}`); + } + }); + }); +}); \ No newline at end of file diff --git a/qrCodes/package.json b/qrCodes/package.json index d01bf7a..15566b1 100644 --- a/qrCodes/package.json +++ b/qrCodes/package.json @@ -1,6 +1,7 @@ { "type": "module", "dependencies": { + "csv-parse": "^6.1.0", "csv-writer": "^1.6.0", "qrcode": "^1.5.4", "uuid": "^13.0.0" diff --git a/server/db/db.js b/server/db/db.js index 495b76b..d433a0f 100644 --- a/server/db/db.js +++ b/server/db/db.js @@ -1,6 +1,20 @@ import QuillDB from "../_/quilldb.js" +import fs from 'fs/promises' +import path from 'path' export default class Database extends QuillDB { + tokens; + + constructor() { + super() + this.loadTokens() + } + + async loadTokens() { + const tokenData = await fs.readFile(path.join(process.cwd(), 'db/tokens.json'), 'utf8'); + let tokenJSON = JSON.parse(tokenData); + this.tokens = tokenJSON + } get = { user: (id) => { @@ -15,6 +29,9 @@ export default class Database extends QuillDB { } return null; }, + token: (id) => { + return this.tokens[id] + } } generateUserID() { diff --git a/server/index.js b/server/index.js index ed81526..4378381 100644 --- a/server/index.js +++ b/server/index.js @@ -27,11 +27,31 @@ class Server { // router.post('/api/location', handlers.updateLocation) router.post('/login', this.auth.login) router.get('/signout', this.auth.logout) + router.get('/signup', this.verifyToken, this.get) + router.post('/signup', this.verifyToken, this.newUserSubmission) router.get('/db/images/*', this.getUserImage) router.get('/*', this.get) return router } + verifyToken = (req, res, next) => { + const { token } = req.query; + if (!token) { + return res.status(400).json({ error: 'Token is required' }); + } + let fromDB = this.db.get.token(token) + if (!fromDB) { + return res.status(403).json({ error: 'Invalid or expired token' }); + } else if(fromDB.used) { + return res.status(403).json({ error: 'Invalid or expired token' }); + } + next() + } + + newUserSubmission = (req, res) => { + return res.status(400).json({ error: 'Haven\t finished this bruh' }); + } + authMiddleware = (req, res, next) => { const authHeader = req.headers.authorization; if (!authHeader) { @@ -67,37 +87,32 @@ class Server { } get = async (req, res) => { - if(!this.auth.isLoggedInUser(req, res)) { - console.log("Not logged in") - let url = req.url - if(!url.includes(".")) { // Page request - if(url === "/") { - url = "/index.html" - } else { - url = path.join("/pages", url) + ".html" - } + let url = req.url - let filePath = path.join(this.UIPath, "public", url); - res.sendFile(filePath, (err) => { - if (err) { - console.log("File not found, sending fallback:", filePath); - res.redirect("/"); - } - }); - } else { // File Request - let filePath; - if(url.startsWith("/_")) { - filePath = path.join(this.UIPath, url); - } else { - filePath = path.join(this.UIPath, "public", url); + let publicPage = () => { + url = "/index.html" + let filePath = path.join(this.UIPath, "public", url); + res.sendFile(filePath, (err) => { + if (err) { + console.log("File not found, sending fallback:", filePath); + res.redirect("/"); } - - res.sendFile(filePath); + }); + } + + let publicFile = () => { + let filePath; + if(url.startsWith("/_")) { + filePath = path.join(this.UIPath, url); + } else { + filePath = path.join(this.UIPath, "public", url); } - } else { - let url = req.url + res.sendFile(filePath); + } + + let privateSite = () => { let filePath; if(url.startsWith("/_")) { filePath = path.join(this.UIPath, url); @@ -109,6 +124,16 @@ class Server { res.sendFile(filePath); } + + if(!this.auth.isLoggedInUser(req, res)) { + if(!url.includes(".")) { + publicPage() + } else { + publicFile() + } + } else { + privateSite() + } } logRequest(req, res, next) { @@ -158,7 +183,7 @@ class Server { const PORT = 3003; server.listen(PORT, () => { console.log("\n") - console.log(chalk.yellow("**************America****************")) + console.log(chalk.yellow("*************** Hyperia ***************")) console.log(chalk.yellowBright(`Server is running on port ${PORT}: http://localhost`)); console.log(chalk.yellow("***************************************")) console.log("\n") diff --git a/ui/_/code/quill.js b/ui/_/code/quill.js index 66118c6..6232ebd 100644 --- a/ui/_/code/quill.js +++ b/ui/_/code/quill.js @@ -283,6 +283,8 @@ function extendHTMLElementWithStyleSetters() { case "marginBottom": case "marginRight": + case "textUnderlineOffset": + return "unit-number" default: diff --git a/ui/public/components/JoinForm.js b/ui/public/components/JoinForm.js new file mode 100644 index 0000000..7e30516 --- /dev/null +++ b/ui/public/components/JoinForm.js @@ -0,0 +1,91 @@ +css(` + joinform- input::placeholder { + color: var(--accent) + } +`) + +class JoinForm extends Shadow { + + inputStyles(el) { + return el + .border("1px solid var(--accent)") + } + + render() { + ZStack(() => { + form(() => { + + VStack(() => { + + HStack(() => { + + VStack(() => { + input("First Name") + .attr({name: "firstname", type: "name"}) + .styles(this.inputStyles) + + input("Last Name") + .attr({name: "lastname", type: "name"}) + .styles(this.inputStyles) + + input("Email") + .attr({name: "email", type: "email"}) + .styles(this.inputStyles) + + input("Password") + .attr({name: "password", type: "password"}) + .styles(this.inputStyles) + + input("Confirm Password") + .attr({name: "password", type: "password"}) + .styles(this.inputStyles) + }) + .width(50, "%") + .gap(1, em) + + VStack(() => { + input("Street Address") + .attr({ name: "address1", type: "text", autocomplete: "address-line1" }) + .styles(this.inputStyles) + + input("Apt, Suite, Unit (optional)") + .attr({ name: "address2", type: "text", autocomplete: "address-line2" }) + .styles(this.inputStyles) + + input("City") + .attr({ name: "city", type: "text", autocomplete: "address-level2" }) + .styles(this.inputStyles) + + input("State") + .attr({ name: "state", type: "text", autocomplete: "address-level1" }) + .styles(this.inputStyles) + + input("ZIP Code") + .attr({ name: "zip", type: "text", autocomplete: "postal-code" }) + .styles(this.inputStyles) + + input("Country") + .attr({ name: "country", type: "text", autocomplete: "country-name" }) + .styles(this.inputStyles) + }) + .width(50, "%") + .gap(1, em) + + }) + .gap(2, em) + + button("Submit") + }) + .gap(2, em) + + console.log(window.location.pathname) + }) + .attr({action: window.location.pathname + window.location.search, method: "POST"}) + .x(50, vw).y(53, vh) + .width(60, vw) + .center() + }) + } +} + +register(JoinForm) \ No newline at end of file diff --git a/ui/public/index.html b/ui/public/index.html index d836fa3..28a9064 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -15,14 +15,6 @@ - diff --git a/ui/public/pages/Home.js b/ui/public/pages/Home.js index 2c0e884..37ec179 100644 --- a/ui/public/pages/Home.js +++ b/ui/public/pages/Home.js @@ -1,4 +1,5 @@ import "../components/NavBar.js" +import "../components/JoinForm.js" import "./Why.js" import "./Events.js" import "./Join.js" @@ -51,6 +52,11 @@ class Home extends Shadow { case "/signin": SignIn() break; + + default: + if(window.location.pathname.startsWith("/signup")) { + JoinForm() + } } })