adding some market elements
This commit is contained in:
@@ -487,6 +487,13 @@ HTMLElement.prototype.positionType = function (value) {
|
|||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HTMLElement.prototype.gap = function(value, unit = "px") {
|
||||||
|
if (typeof value !== 'number' || Number.isNaN(value))
|
||||||
|
throw new Error(`Invalid value: ${value}. Expected a number.`);
|
||||||
|
this.style.gap = value + unit
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
/* Elements */
|
/* Elements */
|
||||||
|
|
||||||
quill.setChildren = function(el, innerContent) {
|
quill.setChildren = function(el, innerContent) {
|
||||||
@@ -617,6 +624,13 @@ window.input = function(placeholder, width, height) {
|
|||||||
return el
|
return el
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.label = function(text) {
|
||||||
|
let el = document.createElement("label")
|
||||||
|
el.innerText = text
|
||||||
|
quill.render(el)
|
||||||
|
return el
|
||||||
|
}
|
||||||
|
|
||||||
window.textarea = function(placeholder) {
|
window.textarea = function(placeholder) {
|
||||||
let el = document.createElement("textarea")
|
let el = document.createElement("textarea")
|
||||||
el.placeholder = placeholder
|
el.placeholder = placeholder
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ class Forum extends Shadow {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
ZStack(() => {
|
ZStack(() => {
|
||||||
|
p("Coming Soon!")
|
||||||
|
.position("absolute")
|
||||||
|
.x(50, vw).y(50, vh)
|
||||||
|
.transform("translate(-50%, -50%)")
|
||||||
|
|
||||||
HStack(() => {
|
HStack(() => {
|
||||||
input("Search...", "50vw")
|
input("Search...", "50vw")
|
||||||
.attr({
|
.attr({
|
||||||
|
|||||||
@@ -1,14 +1,70 @@
|
|||||||
css(`
|
css(`
|
||||||
|
market- {
|
||||||
|
font-family: 'Bona';
|
||||||
|
}
|
||||||
|
|
||||||
market- input::placeholder {
|
market- input::placeholder {
|
||||||
|
font-family: 'Bona Nova';
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="checkbox"] {
|
||||||
|
appearance: none; /* remove default style */
|
||||||
|
-webkit-appearance: none;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
border: 1px solid var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="checkbox"]:checked {
|
||||||
|
background-color: var(--red);
|
||||||
|
|
||||||
|
}
|
||||||
`)
|
`)
|
||||||
|
|
||||||
class Market extends Shadow {
|
class Market extends Shadow {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
ZStack(() => {
|
ZStack(() => {
|
||||||
|
HStack(() => {
|
||||||
|
VStack(() => {
|
||||||
|
HStack(() => {
|
||||||
|
input()
|
||||||
|
.attr({
|
||||||
|
"type": "checkbox",
|
||||||
|
"id": "hyperia-check"
|
||||||
|
})
|
||||||
|
label("Hyperia-Made")
|
||||||
|
.attr({
|
||||||
|
"for": "hyperia-check"
|
||||||
|
})
|
||||||
|
.marginLeft(0.5, em)
|
||||||
|
})
|
||||||
|
HStack(() => {
|
||||||
|
input()
|
||||||
|
.attr({
|
||||||
|
"type": "checkbox",
|
||||||
|
"id": "america-check"
|
||||||
|
})
|
||||||
|
label("America-Made")
|
||||||
|
.attr({
|
||||||
|
"for": "america-check"
|
||||||
|
})
|
||||||
|
.marginLeft(0.5, em)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.paddingLeft(3, em)
|
||||||
|
.gap(1, em)
|
||||||
|
})
|
||||||
|
.width(100, "%")
|
||||||
|
.x(0).y(25, vh)
|
||||||
|
|
||||||
|
p("0 Items")
|
||||||
|
.position("absolute")
|
||||||
|
.x(50, vw).y(50, vh)
|
||||||
|
.transform("translate(-50%, -50%)")
|
||||||
|
|
||||||
HStack(() => {
|
HStack(() => {
|
||||||
input("Search for products...", "50vw")
|
input("Search for products...", "50vw")
|
||||||
.attr({
|
.attr({
|
||||||
@@ -27,6 +83,7 @@ class Market extends Shadow {
|
|||||||
.background("transparent")
|
.background("transparent")
|
||||||
.border("1px solid var(--accent)")
|
.border("1px solid var(--accent)")
|
||||||
.color("var(--accent)")
|
.color("var(--accent)")
|
||||||
|
.fontFamily("Bona Nova")
|
||||||
})
|
})
|
||||||
.x(50, vw).y(5, vh)
|
.x(50, vw).y(5, vh)
|
||||||
.position("absolute")
|
.position("absolute")
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ class Messages extends Shadow {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
ZStack(() => {
|
ZStack(() => {
|
||||||
|
p("Coming Soon!")
|
||||||
|
.position("absolute")
|
||||||
|
.x(50, vw).y(50, vh)
|
||||||
|
.transform("translate(-50%, -50%)")
|
||||||
|
|
||||||
HStack(() => {
|
HStack(() => {
|
||||||
input("Search...", "50vw")
|
input("Search...", "50vw")
|
||||||
.attr({
|
.attr({
|
||||||
|
|||||||
@@ -61,14 +61,14 @@ class AppMenu extends Shadow {
|
|||||||
p("Market")
|
p("Market")
|
||||||
})
|
})
|
||||||
.justifyContent("center")
|
.justifyContent("center")
|
||||||
.gap("1.5em")
|
.gap(1.5, em)
|
||||||
|
|
||||||
img("_/images/divider.svg", "40vw")
|
img("_/images/divider.svg", "40vw")
|
||||||
.attr({
|
.attr({
|
||||||
"id": "divider",
|
"id": "divider",
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.gap("0.5em")
|
.gap(0.5, em)
|
||||||
|
|
||||||
if(this.selected) {
|
if(this.selected) {
|
||||||
this.styleMinimized()
|
this.styleMinimized()
|
||||||
|
|||||||
@@ -8,6 +8,16 @@ class Home extends Shadow {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
ZStack(() => {
|
ZStack(() => {
|
||||||
|
img("_/icons/logo.svg", "3.5em")
|
||||||
|
.position("fixed")
|
||||||
|
.left("3em")
|
||||||
|
.top("2em")
|
||||||
|
.zIndex(3)
|
||||||
|
// .onClick(() => {
|
||||||
|
// window.navigateTo("/")
|
||||||
|
// this.rerender()
|
||||||
|
// })
|
||||||
|
|
||||||
div()
|
div()
|
||||||
.width(100, vw)
|
.width(100, vw)
|
||||||
.height(100, vh)
|
.height(100, vh)
|
||||||
@@ -43,11 +53,6 @@ class Home extends Shadow {
|
|||||||
.top("5.5vh")
|
.top("5.5vh")
|
||||||
.right("4.5vw")
|
.right("4.5vw")
|
||||||
|
|
||||||
img("_/icons/logo.svg", "3.5em")
|
|
||||||
.position("fixed")
|
|
||||||
.left("3em")
|
|
||||||
.top("2em")
|
|
||||||
|
|
||||||
a("/signout", "Sign Out")
|
a("/signout", "Sign Out")
|
||||||
.position("fixed")
|
.position("fixed")
|
||||||
.top("3em")
|
.top("3em")
|
||||||
|
|||||||
Reference in New Issue
Block a user