diff --git a/assets/styles/user/item.css b/assets/styles/user/item.css index e8f569f..ae9730d 100644 --- a/assets/styles/user/item.css +++ b/assets/styles/user/item.css @@ -27,32 +27,34 @@ transition: all; } -.radio-button input[type="radio"]:checked + label { +.radio-button input[type="radio"]:checked+label { background-color: var(--primary); color: var(--text-surface); } -.radio-button input[type="radio"]:hover + label { +.radio-button input[type="radio"]:hover+label { background-color: var(--primary); color: var(--text-surface); } -.radio-button input[type="radio"]:checked:hover + label { +.radio-button input[type="radio"]:checked:hover+label { background-color: var(--primary); color: var(--text-surface); } -.no-line-height{ + +.no-line-height { line-height: 0; } -.description-container{ + +.description-container { display: flex; flex-direction: column; - gap: 1rem; width: calc(100% - var(--padding-inner)); max-width: 500px; } -.description-container span{ + +.description-container span { display: flex; flex-direction: column; gap: 0.5rem; @@ -63,23 +65,24 @@ dialog[open] { max-width: 600px; height: 300px; - + /* justify-content: center; align-items: center; */ position: relative; } -dialog > img{ + +dialog>img { max-width: 100%; min-width: 100%; } @media screen and (min-width: 800px) { - main > div{ + main>div { display: space-between; flex-direction: row !important; gap: 2rem; - + align-items: flex-start !important; justify-content: center !important; padding: var(--padding); @@ -99,24 +102,24 @@ dialog > img{ border: 1px solid #ccc; } -.radio-button input[type="radio"]:disabled + label { +.radio-button input[type="radio"]:disabled+label { background-color: #f0f0f0; color: #999; border: 1px solid #ccc; } -dialog[open]{ +dialog[open] { min-width: unset !important; max-width: max-content !important; height: max-content; } -.size-recommend{ +.size-recommend { overflow: hidden; } -.size-recommend > form{ +.size-recommend>form { width: 100%; max-width: 600px; margin: 0 auto; @@ -127,38 +130,38 @@ dialog[open]{ display: flex; flex-direction: column; padding: var(--padding); - } - - .size-recommend > form > section { +} + +.size-recommend>form>section { display: none; width: 300px; transition: transform 0.3s ease-in-out; - } - - .size-recommend > form > section.active { +} + +.size-recommend>form>section.active { display: flex; flex-direction: column; justify-content: space-between; height: 100%; flex: 1; - } +} - .size-recommend > form > section > .input-group { +.size-recommend>form>section>.input-group { display: flex; flex-direction: column; - } +} - .button-container{ +.button-container { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.2rem; - } +} - - /* @media (max-width: 768px) { + +/* @media (max-width: 768px) { .size-recommend > form { width: 100%; padding: 0 1rem; @@ -169,7 +172,8 @@ dialog[open]{ } } */ -input.invalid, select.invalid { +input.invalid, +select.invalid { border: 2px solid red; background-color: #ffe6e6; } diff --git a/view/user/Item.templ b/view/user/Item.templ index 2a26740..730b604 100644 --- a/view/user/Item.templ +++ b/view/user/Item.templ @@ -20,11 +20,11 @@ templ Item(product models.Product, stock map[string]int) {

{product.Name}

-

₨. {fmt.Sprintf("%d",product.Price)}

+

₨. {fmt.Sprintf("%d",product.Price)}

{product.Description}

Size: - +

@@ -178,7 +178,7 @@ templ Item(product models.Product, stock map[string]int) {
} - +

Basic Details

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "\">Size:

Basic Details

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -255,7 +255,7 @@ func Item(product models.Product, stock map[string]int) templ.Component { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -119,85 +115,85 @@ func OrdersCard(product models.Product) templ.Component { templ_7745c5c3_Var5 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(product.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/user/cart-order.templ`, Line: 61, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/user/cart-order.templ`, Line: 54, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "
₨. ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "

₨. ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", product.Price)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/user/cart-order.templ`, Line: 62, Col: 53} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `view/user/cart-order.templ`, Line: 55, Col: 53} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "\" hx-target=\"body\">View Product
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/view/user/order.templ b/view/user/order.templ index ad77479..7deae89 100644 --- a/view/user/order.templ +++ b/view/user/order.templ @@ -23,16 +23,17 @@ templ Order(product models.Product, size string) {
- - - - - - - - + + + + + + +
diff --git a/view/user/order_templ.go b/view/user/order_templ.go index 364d1a2..0046fea 100644 --- a/view/user/order_templ.go +++ b/view/user/order_templ.go @@ -135,7 +135,7 @@ func Order(product models.Product, size string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\"> ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\"> ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }