Improving the 3 apps

This commit is contained in:
metacryst
2025-11-07 20:14:38 -06:00
parent cb526b5ec0
commit e17efce338
13 changed files with 364 additions and 84 deletions

View File

@@ -43,7 +43,7 @@ css(`
}
`)
registerShadow(
register(
class AppMenu extends Shadow {
selected;
@@ -56,12 +56,13 @@ class AppMenu extends Shadow {
render() {
VStack(() => {
HStack(() => {
p("Forum")
p("Messages")
p("Market")
p("Jobs")
})
.justifyContent("center")
.gap(1.5, em)
.paddingRight(2, em)
img("_/images/divider.svg", "40vw")
.attr({

View File

@@ -1,4 +1,4 @@
import "../apps/Forum.js"
import "../apps/Jobs/Jobs.js"
import "../apps/Messages.js"
import "../apps/Market.js"
@@ -13,8 +13,8 @@ class AppWindow extends Shadow {
render() {
ZStack(() => {
switch(this.app) {
case "Forum":
Forum()
case "Jobs":
Jobs()
break;
case "Messages":
Messages()
@@ -44,4 +44,4 @@ class AppWindow extends Shadow {
}
registerShadow(AppWindow, "app-window")
register(AppWindow, "app-window")

View File

@@ -8,10 +8,10 @@ class Home extends Shadow {
render() {
ZStack(() => {
img("_/icons/logo.svg", "3.5em")
img("_/icons/logo.svg", "2.5em")
.position("fixed")
.left("3em")
.top("2em")
.top("3vh")
.zIndex(3)
// .onClick(() => {
// window.navigateTo("/")
@@ -32,9 +32,9 @@ class Home extends Shadow {
AppWindow()
AppMenu()
break
case "/app/forum":
AppWindow("Forum")
AppMenu("Forum")
case "/app/jobs":
AppWindow("Jobs")
AppMenu("Jobs")
break;
case "/app/messages":
AppWindow("Messages")
@@ -55,20 +55,17 @@ class Home extends Shadow {
a("/signout", "Sign Out")
.position("fixed")
.top("3em")
.top("5vh")
.right("2em")
.background("transparent")
.border(window.location.pathname === "/" ? "1px solid var(--tan)" : "1px solid var(--accent)")
.border(window.location.pathname === "/" ? "1px solid var(--tan)" : "1px solid var(--periwinkle)")
.color(window.location.pathname === "/" ? "var(--tan)" : "var(--accent)")
.borderRadius(5, px)
.onHover(function (hovering) {
console.log('hovering', hovering, this)
if(hovering) {
this.style.background = "var(--tan)"
this.style.color = "black"
this.style.background = "var(--green)"
} else {
this.style.background = ""
this.style.color = window.location.pathname === "/" ? "var(--tan)" : "var(--accent)"
}
})
.onNavigate(function () {
@@ -77,7 +74,7 @@ class Home extends Shadow {
this.style.border = "1px solid var(--tan)"
this.style.color = "var(--tan)"
} else {
this.style.border = "1px solid var(--accent)"
this.style.border = "1px solid var(--periwinkle)"
this.style.color = "var(--accent)"
}
})
@@ -85,4 +82,4 @@ class Home extends Shadow {
}
}
registerShadow(Home)
register(Home)

View File

@@ -40,4 +40,4 @@ class ProfileButton extends Shadow {
}
}
registerShadow(ProfileButton)
register(ProfileButton)

View File

@@ -49,4 +49,4 @@ class ProfileMenu extends Shadow {
}
}
registerShadow(ProfileMenu, "profile-menu")
register(ProfileMenu, "profile-menu")