Small edits, fixing bug with app spawning, working on forum page

This commit is contained in:
metacryst
2025-11-20 00:44:42 -06:00
parent 2bc5c00830
commit 30faf12b20
9 changed files with 42 additions and 81 deletions

View File

@@ -17,7 +17,7 @@
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--main: var(--brown);; --main: var(--brown);
--accent: var(--gold); --accent: var(--gold);
--dividerColor: var(--gold); --dividerColor: var(--gold);
--accent2: var(--gold); --accent2: var(--gold);

View File

@@ -12,7 +12,12 @@ class Events extends Shadow {
render() { render() {
VStack(() => { VStack(() => {
(window.isMobile() ? VStack : HStack)(() => { p("Public Events")
.fontSize(1.2, em)
.marginBottom(2, em)
const Stack = window.isMobile() ? VStack : HStack
Stack(() => {
VStack(() => { VStack(() => {
p(`January 2, 2025`) p(`January 2, 2025`)
@@ -24,8 +29,8 @@ class Events extends Shadow {
}) })
p(`Join us in Austin, Texas for a dance. Live music and drinks will be included. <br>Admission for men is $50, women are free. Open to the public.`) p(`Join us in Austin, Texas for a great dance, with free drinks and live music by Boerne's own Noah Kurtis. <br><br>Admission: $50 for men, women are free.`)
.marginTop(1, em) .marginRight(4, em)
button("Buy Ticket") button("Buy Ticket")
.color("var(--darkbrown") .color("var(--darkbrown")

View File

@@ -1,12 +1,10 @@
class Why extends Shadow { class Why extends Shadow {
render() { render() {
p(`I grew up going to Classical Christian schools all my life. It was great - because we got to learn all about our history, and everyone had a shared understanding of what it looks like to lead a moral life. p(`I grew up going to Classical Christian schools all my life. Little did I know, this was a very unique experience - we got to learn all about our history, and everyone had a shared moral understanding.
<br><br>Only when I went out into the world did I realize that most Americans have no idea what this is like. They have never been a part of a shared culture, and the only value they know is multiculturalism. <br><br>Only when I went out into the world did I realize that most Americans have no idea what this is like. They have never been a part of a shared culture, and the only value they know is multiculturalism.
<br><br>And the reality is that actually, that world, with no culture and no morals, is the default one today. <br><br>As adults, that is the world the we are all expected to live in.
<br><br>That is the world the we are all expected to live in, as adults.
<br><br>Classical Christian schools are great, but what if I want to live a Classical Christian life? <br><br>Classical Christian schools are great, but what if I want to live a Classical Christian life?

View File

@@ -30,44 +30,46 @@ class Forum extends Shadow {
ZStack(() => { ZStack(() => {
HStack(() => { HStack(() => {
VStack(() => { VStack(() => {
h3("Friends") p("Hyperia")
.background("var(--darkbrown)")
.textAlign("center")
.paddingVertical(0.5, em)
.width(20, vh)
.marginTop(0) .marginTop(0)
.marginBottom(1, em) .marginBottom(1, em)
.marginLeft(0.4, em) .marginLeft(0.4, em)
if (this.friends.length > 1) {
for(let i = 0; i < this.friends.length; i++) {
p(this.friends[i].name)
}
} else {
p("No Friends!")
}
}) })
.height(100, vh) .height(100, vh)
.paddingLeft(2, em) .paddingLeft(2, em)
.paddingRight(2, em) .paddingRight(2, em)
.paddingTop(2, em) .paddingTop(2, em)
.gap(0, em) .gap(0, em)
.borderRight("1px solid var(--accent2)")
VStack(() => {
input("Message Hyperia", "80%")
.paddingVertical(1, em)
.color("var(--accent)")
.background("var(--darkbrown)")
.marginBottom(6, em)
.border("none")
})
.width(100, pct)
.alignHorizontal("center")
.alignVertical("end")
}) })
.width(100, "%") .width(100, "%")
.height(87, vh)
.x(0).y(13, vh) .x(0).y(13, vh)
.borderTop("1px solid var(--accent2)")
p("0 Items")
.position("absolute")
.x(50, vw).y(50, vh)
.transform("translate(-50%, -50%)")
HStack(() => { HStack(() => {
input("Search messages...", "45vw") input("Search...", "45vw")
.attr({ .attr({
"type": "text" "type": "text"
}) })
.fontSize(1.1, em) .fontSize(1.1, em)
.paddingLeft(1.3, em) .paddingLeft(1.3, em)
.background("transparent") .background("transparent")
.border("1px solid var(--accent2)") .border("0.5px solid #bb7c36")
.outline("none") .outline("none")
.color("var(--accent)") .color("var(--accent)")
.borderRadius(10, px) .borderRadius(10, px)
@@ -76,7 +78,7 @@ class Forum extends Shadow {
.marginLeft(2, em) .marginLeft(2, em)
.borderRadius(10, px) .borderRadius(10, px)
.background("transparent") .background("transparent")
.border("1px solid var(--accent2)") .border("0.5px solid #bb7c36")
.color("var(--accent)") .color("var(--accent)")
.fontFamily("Bona Nova") .fontFamily("Bona Nova")
.onHover(function (hovering) { .onHover(function (hovering) {
@@ -94,7 +96,7 @@ class Forum extends Shadow {
.marginLeft(1, em) .marginLeft(1, em)
.borderRadius(10, px) .borderRadius(10, px)
.background("transparent") .background("transparent")
.border("1px solid var(--accent2)") .border("0.5px solid #bb7c36")
.color("var(--accent)") .color("var(--accent)")
.fontFamily("Bona Nova") .fontFamily("Bona Nova")
.onHover(function (hovering) { .onHover(function (hovering) {
@@ -115,42 +117,8 @@ class Forum extends Shadow {
.position("absolute") .position("absolute")
.transform("translateX(-50%)") .transform("translateX(-50%)")
}) })
.width(100, "%") .width(100, pct)
.height(100, "%") .height(100, pct)
}
SidebarName(name) {
let firstLetter = name[0]
HStack(() => {
div(firstLetter)
.display("flex")
.justifyContent("center")
.alignItems("center")
.width(1.5, em)
.height(1.5, em)
.border("1px solid var(--accent2)")
.borderRadius(100, "%")
p(name)
.marginLeft(1, em)
})
.alignItems("center")
.padding(5, px)
.borderRadius(0.5, em)
.cursor("default")
.onHover(function (hovering) {
if(hovering) {
this.style.background = "var(--green)"
} else {
this.style.background = "transparent"
}
})
}
connectedCallback() {
// Optional additional logic
} }
} }

View File

@@ -54,7 +54,6 @@ class JobsGrid extends Shadow {
.paddingTop(2, em) .paddingTop(2, em)
.gap(0, em) .gap(0, em)
.width(100, "%") .width(100, "%")
.borderTop("1px solid var(--accent2)")
} }
} }

View File

@@ -19,7 +19,6 @@ class JobsSidebar extends Shadow {
.paddingLeft(3, em) .paddingLeft(3, em)
.paddingRight(3, em) .paddingRight(3, em)
.gap(1, em) .gap(1, em)
.borderTop("1px solid var(--accent2)")
.minWidth(10, vw) .minWidth(10, vw)
} }
} }

View File

@@ -58,7 +58,6 @@ class AppMenu extends Shadow {
VStack(() => { VStack(() => {
HStack(() => { HStack(() => {
p("Forum") p("Forum")
p("Tasks")
p("Messages") p("Messages")
p("Market") p("Market")
p("Jobs") p("Jobs")

View File

@@ -18,9 +18,6 @@ class AppWindow extends Shadow {
case "Forum": case "Forum":
Forum() Forum()
break; break;
case "Tasks":
Tasks()
break;
case "Messages": case "Messages":
Messages() Messages()
break; break;
@@ -32,15 +29,15 @@ class AppWindow extends Shadow {
break; break;
} }
}) })
.display(this.app ? '' : 'none') .position("fixed")
.display(this.app ? 'block' : 'none')
.width(100, "vw") .width(100, "vw")
.height(100, "vh") .height(100, "vh")
.background("var(--main)") .background("#591d10")
.top(0) .x(0)
.left(0) .y(0)
// .backgroundImage("/_/images/fabric.png") // .backgroundImage("/_/images/fabric.png")
// .backgroundSize("33vw auto") // .backgroundSize("33vw auto")
// .position("fixed")
} }
open(app) { open(app) {

View File

@@ -43,10 +43,6 @@ class Home extends Shadow {
AppWindow("Market") AppWindow("Market")
AppMenu("Market") AppMenu("Market")
break; break;
case "/app/tasks":
AppWindow("Tasks")
AppMenu("Tasks")
break;
case "/app/forum": case "/app/forum":
AppWindow("Forum") AppWindow("Forum")
AppMenu("Forum") AppMenu("Forum")
@@ -67,7 +63,7 @@ class Home extends Shadow {
.top(5, vh) .top(5, vh)
.right(2, em) .right(2, em)
.background("transparent") .background("transparent")
.border(window.location.pathname === "/" ? "1px solid var(--tan)" : "1px solid var(--accent2)") .border(window.location.pathname === "/" ? "1px solid var(--tan)" : "0.5px solid #bb7c36")
.color(window.location.pathname === "/" ? "var(--tan)" : "var(--accent)") .color(window.location.pathname === "/" ? "var(--tan)" : "var(--accent)")
.borderRadius(5, px) .borderRadius(5, px)
.onHover(function (hovering) { .onHover(function (hovering) {
@@ -82,7 +78,7 @@ class Home extends Shadow {
this.style.border = "1px solid var(--tan)" this.style.border = "1px solid var(--tan)"
this.style.color = "var(--tan)" this.style.color = "var(--tan)"
} else { } else {
this.style.border = "1px solid var(--accent2)" this.style.border = "0.5px solid #bb7c36"
this.style.color = "var(--accent)" this.style.color = "var(--accent)"
} }
}) })