Skip to content

Commit 91413c6

Browse files
authored
Merge pull request #816 from evershopcommerce/theming
Theming
2 parents 4db69d7 + c827b19 commit 91413c6

10 files changed

Lines changed: 50 additions & 33 deletions

File tree

packages/evershop/src/bin/seed/data/pages.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
"type": "image",
4242
"data": {
4343
"file": {
44-
"url": "https://raw.githubusercontent.com/evershopcommerce/evershop/refs/heads/dev/seed/images/banner-one.jpg"
44+
"url": "https://raw.githubusercontent.com/evershopcommerce/evershop/refs/heads/dev/seed/images/banner-one.jpg",
45+
"width": 2400,
46+
"height": 1200
4547
},
4648
"caption": "Our carefully curated collection",
4749
"withBorder": false,

packages/evershop/src/bin/seed/data/products.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@
107107
"collections": ["homepage", "best-sellers"],
108108
"category": "accessories",
109109
"variant_group": "ceramic-coffee-cup",
110-
"images": [],
110+
"images": [
111+
{
112+
"url": "https://raw.githubusercontent.com/evershopcommerce/evershop/refs/heads/dev/seed/images/cup-black.jpg",
113+
"isMain": true
114+
}
115+
],
111116
"attributes": [
112117
{
113118
"attribute_code": "color",

packages/evershop/src/bin/seed/data/widgets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"id": "slide-1",
5252
"image": "https://raw.githubusercontent.com/evershopcommerce/evershop/refs/heads/dev/seed/images/banner-one.jpg",
5353
"width": 2400,
54-
"height": 800,
54+
"height": 1200,
5555
"subText": "Discover our exquisite collection of ceramic and stainless steel products",
5656
"headline": "Premium Quality Products",
5757
"buttonLink": "/accessories",
@@ -62,7 +62,7 @@
6262
"id": "slide-2",
6363
"image": "https://raw.githubusercontent.com/evershopcommerce/evershop/refs/heads/dev/seed/images/banner-two.jpg",
6464
"width": 2400,
65-
"height": 800,
65+
"height": 1200,
6666
"subText": "Elegant designs that enhance your daily life, from morning coffee to home organization",
6767
"headline": "Crafted With Care",
6868
"buttonLink": "/accessories",

packages/evershop/src/components/common/Editor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ interface EditorProps {
152152

153153
export function Editor({ rows }: EditorProps) {
154154
return (
155-
<div className="editor__html">
155+
<div className="editor__html space-y-6">
156156
{rows.map((row, index) => {
157157
const rowClasses = getRowClasses(row.size);
158158
return (
159159
<div
160-
className={`row__container mt-7 grid ${rowClasses} grid-cols-1 gap-5`}
160+
className={`row__container grid ${rowClasses} grid-cols-1 gap-5`}
161161
key={index}
162162
>
163163
{row.columns.map((column, index) => {

packages/evershop/src/components/frontStore/CouponForm.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function CouponForm() {
2929
{(state: CouponState, actions: CouponActions) => (
3030
<div className="coupon-form">
3131
<Form form={form} method="POST" submitBtn={false}>
32-
<div className="flex justify-between gap-7">
32+
<div className="flex justify-between gap-3">
3333
<div className="w-4/5">
3434
<InputField
3535
name="coupon"
@@ -61,6 +61,7 @@ export function CouponForm() {
6161
}
6262
}}
6363
variant={state.appliedCoupon ? 'danger' : 'primary'}
64+
className="text-base"
6465
/>
6566
</div>
6667
</div>

packages/evershop/src/components/frontStore/cart/DefaultCartItemList.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,19 @@ export const DefaultCartItemList: React.FC<CartItemsTableProps> = ({
3939
: row.productPrice?.text;
4040
return (
4141
<div className="flex justify-start gap-4">
42-
{row.thumbnail ? (
43-
<Image
44-
src={row.thumbnail}
45-
alt={row.productName}
46-
width={80}
47-
height={80}
48-
className="rounded-md"
49-
/>
50-
) : (
51-
<ProductNoThumbnail />
52-
)}
42+
<div>
43+
{row.thumbnail ? (
44+
<Image
45+
src={row.thumbnail}
46+
alt={row.productName}
47+
width={80}
48+
height={80}
49+
className="rounded-md"
50+
/>
51+
) : (
52+
<ProductNoThumbnail width={80} height={80} />
53+
)}
54+
</div>
5355
<div className="font-medium flex flex-col gap-1 items-start h-full">
5456
<span className="font-semibold">{row.productName}</span>
5557
{row.variantOptions?.map((option) => (

packages/evershop/src/components/frontStore/catalog/ProductSingleForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ export function ProductSingleForm() {
7676
}
7777
});
7878
}}
79-
className="w-full py-3 text-lg font-medium !rounded-full mt-8"
79+
className="w-full py-3 text-lg font-base !rounded-full mt-8"
8080
/>
8181
)}
8282
{state.isInStock === false && (
8383
<Button
8484
title={_('SOLD OUT')}
8585
onAction={() => {}}
86-
className="w-full py-3 text-lg font-medium !rounded-full"
86+
className="w-full py-3 text-lg font-base !rounded-full"
8787
/>
8888
)}
8989
</>

packages/evershop/src/modules/base/pages/frontStore/all/global.scss

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ html {
5050
padding: 0.625rem 0.75rem;
5151
}
5252

53-
.button {
54-
padding: 0.2rem 1.25rem;
55-
font-weight: 400;
56-
border-radius: 2px;
57-
}
58-
5953
main.content {
6054
padding-top: 2rem;
6155
padding-bottom: 2rem;
@@ -68,6 +62,13 @@ body {
6862
padding-top: 1rem;
6963
padding-bottom: 1rem;
7064
}
65+
66+
@media (max-width: 640px) {
67+
.slide__wrapper {
68+
height: 30rem !important;
69+
}
70+
}
71+
7172
@media screen and (max-width: 767px) {
7273
$font-size-base: $font-size-sm;
7374
body {

packages/evershop/src/modules/catalog/components/CollectionProducts.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ export default function CollectionProducts({
2626
return (
2727
<div className="pt-7 collection__products__widget">
2828
<div className="page-width">
29-
<h3 className="mt-7 mb-7 text-center uppercase h5 tracking-widest">
29+
<h3 className="text-center uppercase h5 tracking-widest">
3030
{collection?.name}
3131
</h3>
32-
{collection?.description && <Editor rows={collection?.description} />}
33-
<ProductList
34-
products={collection?.products?.items}
35-
gridColumns={countPerRow}
36-
/>
32+
<div className="flex justify-center">
33+
{collection?.description && <Editor rows={collection?.description} />}
34+
</div>
35+
<div className="mt-3">
36+
<ProductList
37+
products={collection?.products?.items}
38+
gridColumns={countPerRow}
39+
/>
40+
</div>
3741
</div>
3842
</div>
3943
);

packages/evershop/src/modules/checkout/pages/frontStore/all/MiniCartIcon.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ interface MiniCartIconProps {
55
cartUrl: string;
66
}
77
export default function MiniCartIcon({ cartUrl }: MiniCartIconProps) {
8-
return <MiniCart cartUrl={cartUrl} />;
8+
return (
9+
<MiniCart className="flex justify-center items-center" cartUrl={cartUrl} />
10+
);
911
}
1012

1113
export const layout = {

0 commit comments

Comments
 (0)