Skip to content

Commit

Permalink
Edits to productspage: button fixes and header
Browse files Browse the repository at this point in the history
  • Loading branch information
Leaxlang committed Apr 16, 2024
1 parent f8b30af commit 2071975
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
15 changes: 11 additions & 4 deletions app/routes/products.$handle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {getVariantUrl} from '~/lib/variants';
* @type {MetaFunction<typeof loader>}
*/
export const meta = ({data}) => {
return [{title: `Hydrogen | ${data?.product.title ?? ''}`}];
return [{title: `Astrophobia | ${data?.product.title ?? ''}`}];
};

/**
Expand Down Expand Up @@ -113,7 +113,7 @@ export default function Product() {
selectedVariant={selectedVariant}
product={product}
variants={variants}
/>
/>
</div>
);
}
Expand Down Expand Up @@ -233,8 +233,11 @@ function ProductForm({product, selectedVariant, variants}) {
<AddToCartButton
disabled={!selectedVariant || !selectedVariant.availableForSale}
onClick={() => {
window.location.href = window.location.href + '#cart-aside';
// window.location.href = window.location.href + '#success';
// SUCESSFULLY ADDED TO CART!
alert("Sucessfully added to cart!")
}}

lines={
selectedVariant
? [
Expand Down Expand Up @@ -270,7 +273,9 @@ function ProductOptions({option}) {
replace
to={to}
style={{
border: isActive ? '1px solid black' : '1px solid transparent',
backdropFilter: isActive ? 'blur(50px)' : 'none',
backgroundColor: isActive ? 'rgba(210,185,236,.53)' : 'transparent',
border: isActive ? '1px solid transparent' : '1px solid transparent',
opacity: isAvailable ? 1 : 0.3,
}}
>
Expand All @@ -284,6 +289,8 @@ function ProductOptions({option}) {
);
}



/**
* @param {{
* analytics?: unknown;
Expand Down
17 changes: 13 additions & 4 deletions app/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ aside li {
display: flex;
height: var(--header-height);
padding: 0 1rem;
position: sticky;
position: static;
top: 0;
z-index: 1;
}
Expand Down Expand Up @@ -203,13 +203,18 @@ aside li {
margin-left: auto;
}

.header a{
display:flex;
justify-content: center;
}

/*
* --------------------------------------------------
* components/Footer
* --------------------------------------------------
*/
.footer {
background: var(--color-dark);
background: transparent;
margin-top: auto;
}

Expand Down Expand Up @@ -484,18 +489,22 @@ aside li {
border: 0.3rem solid #D2B9EC;
border-radius: 2rem;
float: right;
padding: 3% 8%;
margin: 5%;
}

.product-options-item {
padding: 0.25rem 0.5rem;
border-radius: 50px;
}
form button{
font-size: large;
color: var(--lightpink);
background-color: var(--darkpurple);
border-radius: 15px;

border-radius: 140px;
padding: 3% 12%;
float: right;
margin: 5%;
}


Expand Down

0 comments on commit 2071975

Please sign in to comment.