Merge remote-tracking branch 'origin/main'

This commit is contained in:
Emil Gulamov 2024-04-23 23:50:04 +04:00
commit 61882e896e
5 changed files with 107 additions and 46 deletions

44
package-lock.json generated
View file

@ -8,12 +8,12 @@
"version": "0.0.1",
"dependencies": {
"@astrojs/check": "^0.5.10",
"@astrojs/sitemap": "^3.1.2",
"@astrojs/sitemap": "^3.1.4",
"@astrojs/starlight": "^0.21.5",
"@astrojs/starlight-tailwind": "^2.0.2",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.5.3",
"astro": "^4.6.1",
"astro": "^4.6.3",
"astro-compressor": "^0.4.1",
"globby": "^14.0.1",
"gsap": "^3.12.5",
@ -25,10 +25,10 @@
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.7",
"astro-vtbot": "^1.7.9",
"astro-vtbot": "^1.7.12",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0",
"prettier-plugin-tailwindcss": "^0.5.13",
"prettier-plugin-tailwindcss": "^0.5.14",
"typescript": "^5.4.5"
}
},
@ -194,11 +194,12 @@
}
},
"node_modules/@astrojs/sitemap": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.1.2.tgz",
"integrity": "sha512-FxOJldIl5ltZ5CNjocQxHkAO9orwHBjqtaU28o4smobp9vowS0nbGp+I9CrPxkzWdl1crSDm9vjL9tnvG1DSug==",
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.1.4.tgz",
"integrity": "sha512-po8CqDCK14O6phU1mB5C8SyVLyQEa+7pJM8oXxs1mVh8DgvxxaA5E7lak1vzOmBcyyyHBW32jakGqNYc66sBRw==",
"dependencies": {
"sitemap": "^7.1.1",
"stream-replace-string": "^2.0.0",
"zod": "^3.22.4"
}
},
@ -2364,6 +2365,11 @@
"@babel/types": "^7.20.7"
}
},
"node_modules/@types/cookie": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.4.tgz",
"integrity": "sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA=="
},
"node_modules/@types/debug": {
"version": "4.1.12",
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",
@ -2817,9 +2823,9 @@
}
},
"node_modules/astro": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.6.1.tgz",
"integrity": "sha512-gcL22NEhuRi4wu9/x5Kn2eJf7nT6GeU5BxdN6AHbUnX6UzEDIWtpgHs5lBIZYExKbHKN9PjEGXWQzQtFwLU+5g==",
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.6.3.tgz",
"integrity": "sha512-p2zs1Gac+ysdc/yFCoc8pOXTZE5L9foAtmqUzUVL22WX68bYTRovd03GRs7J1MDpwzsl9kJtlK20ROpjyIFpNw==",
"dependencies": {
"@astrojs/compiler": "^2.7.1",
"@astrojs/internal-helpers": "0.4.0",
@ -2832,6 +2838,7 @@
"@babel/traverse": "^7.23.3",
"@babel/types": "^7.23.3",
"@types/babel__core": "^7.20.4",
"@types/cookie": "^0.5.4",
"acorn": "^8.11.2",
"aria-query": "^5.3.0",
"axobject-query": "^4.0.0",
@ -3161,9 +3168,9 @@
}
},
"node_modules/astro-vtbot": {
"version": "1.7.9",
"resolved": "https://registry.npmjs.org/astro-vtbot/-/astro-vtbot-1.7.9.tgz",
"integrity": "sha512-4HYeIHbdKxunje7ZH1/XyMgKEBlSmfbRH7zVDKHljYSi/Gl/IT4mahdOYSALE5O0/SdGY7AU6CYus/r/rS39vQ==",
"version": "1.7.12",
"resolved": "https://registry.npmjs.org/astro-vtbot/-/astro-vtbot-1.7.12.tgz",
"integrity": "sha512-/botqljlm507eZtGY4+j5yEr9GbqR1unD7r0Rzg89dOU6MVjCrk//QSB7fg1NyDwur74LeYjcArMGE4FjOo/Dg==",
"dev": true,
"funding": {
"type": "github",
@ -7761,9 +7768,9 @@
"devOptional": true
},
"node_modules/prettier-plugin-tailwindcss": {
"version": "0.5.13",
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.13.tgz",
"integrity": "sha512-2tPWHCFNC+WRjAC4SIWQNSOdcL1NNkydXim8w7TDqlZi+/ulZYz2OouAI6qMtkggnPt7lGamboj6LcTMwcCvoQ==",
"version": "0.5.14",
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.14.tgz",
"integrity": "sha512-Puaz+wPUAhFp8Lo9HuciYKM2Y2XExESjeT+9NQoVFXZsPPnc9VYss2SpxdQ6vbatmt8/4+SN0oe0I1cPDABg9Q==",
"dev": true,
"engines": {
"node": ">=14.21.3"
@ -9251,6 +9258,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/stream-replace-string": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/stream-replace-string/-/stream-replace-string-2.0.0.tgz",
"integrity": "sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w=="
},
"node_modules/streamx": {
"version": "2.16.1",
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz",

View file

@ -11,12 +11,12 @@
},
"dependencies": {
"@astrojs/check": "^0.5.10",
"@astrojs/sitemap": "^3.1.2",
"@astrojs/sitemap": "^3.1.4",
"@astrojs/starlight": "^0.21.5",
"@astrojs/starlight-tailwind": "^2.0.2",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.5.3",
"astro": "^4.6.1",
"astro": "^4.6.3",
"astro-compressor": "^0.4.1",
"globby": "^14.0.1",
"gsap": "^3.12.5",
@ -28,10 +28,10 @@
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.7",
"astro-vtbot": "^1.7.9",
"astro-vtbot": "^1.7.12",
"prettier": "^3.2.5",
"prettier-plugin-astro": "^0.13.0",
"prettier-plugin-tailwindcss": "^0.5.13",
"prettier-plugin-tailwindcss": "^0.5.14",
"typescript": "^5.4.5"
}
}

View file

@ -46,6 +46,12 @@ const productsCollection = defineCollection({
subTitle: z.string(),
})
).optional(),
tableData: z.array(
z.object({
feature: z.array(z.string()),
description: z.array(z.array(z.string())),
})
).optional(),
blueprints: z.object({
first: image().optional(),
second: image().optional(),

View file

@ -1,6 +1,6 @@
---
title: "SF-AB A765"
description: "Assorted Screw Set"
description: " "
main:
id: 2
content: |
@ -40,15 +40,14 @@ specificationsLeft:
subTitle: "Each set includes a sufficient quantity of screws to handle a wide range of projects and tasks."
- title: "Sizes"
subTitle: "Available in various sizes to suit different project requirements, ensuring compatibility and versatility."
specificationsRight:
- title: "Thread Design"
subTitle: "Precision-engineered threads ensure a tight and secure fit, providing reliable fastening for your projects."
- title: "Durability"
subTitle: "Designed to withstand the rigors of everyday use, delivering long-lasting performance and reliability."
- title: "Quality Assurance"
subTitle: "Manufactured to meet or exceed industry standards, guaranteeing consistent quality and performance."
- title: "Applications"
subTitle: "Suitable for a wide range of applications, including woodworking, metalworking, construction, and more."
tableData:
- feature: ["Specification", "Value"]
description:
- ["Length (mm)", "Various"]
- ["Weight (g)", "N/A"]
- ["Material", "Stainless Steel"]
- ["Finish", "Assorted"]
- ["Package Contents", "Various screws in a set"]
blueprints:
first: "@/images/blueprint-1.avif"
second: "@/images/blueprint-2.avif"

View file

@ -148,20 +148,65 @@ const pageTitle: string = `${product.data.title} | ${SITE.title}`;
))
}
</div>
<div class="mt-6 max-w-md space-y-6 md:ml-auto md:mt-0">
{
product.data.specificationsRight?.map((spec) => (
<div>
<h3 class="block font-bold text-neutral-800 dark:text-neutral-200">
{spec.title}
</h3>
<p class="text-neutral-600 dark:text-neutral-400">
{spec.subTitle}
</p>
{
product.data.specificationsRight ? (
<div class="mt-6 max-w-md space-y-6 md:ml-auto md:mt-0">
{product.data.specificationsRight?.map((spec) => (
<div>
<h3 class="block font-bold text-neutral-800 dark:text-neutral-200">
{spec.title}
</h3>
<p class="text-neutral-600 dark:text-neutral-400">
{spec.subTitle}
</p>
</div>
))}
</div>
) : product.data.tableData ? (
<div class="mt-6 space-y-6 md:ml-auto md:mt-0">
<div class="flex flex-col">
<div class="-m-1.5 overflow-x-auto">
<div class="inline-block min-w-full p-1.5 align-middle">
<div class="overflow-hidden">
<table class="min-w-full divide-y divide-neutral-300 dark:divide-neutral-700">
<thead>
<tr>
{product.data.tableData?.[0].feature?.map(
(header) => (
<th
scope="col"
class="px-6 py-3 text-start text-xs font-medium uppercase text-neutral-500 dark:text-neutral-500"
>
{header}
</th>
)
)}
</tr>
</thead>
<tbody class="divide-y divide-neutral-300 dark:divide-neutral-700">
{product.data.tableData?.map((row) =>
// Wrap each row's content in a separate <tr> element
row.description.map((rowData) => (
<tr>
{/* Iterate through each cell value in the row's description array */}
{rowData.map((cellValue) => (
// Render each cell value in its own <td> element
<td class="whitespace-nowrap px-6 py-4 text-sm font-medium text-neutral-600 dark:text-neutral-400">
{cellValue}
</td>
))}
</tr>
))
)}
</tbody>
</table>
</div>
</div>
</div>
</div>
))
}
</div>
</div>
) : null
}
</div>
</div>
</div>
@ -199,7 +244,7 @@ const pageTitle: string = `${product.data.title} | ${SITE.title}`;
</div>
</div>
</div>
</MainLayout>
<script is:inline src="/scripts/vendor/gsap/gsap.min.js"></script>
<script>
window.addEventListener("load", () => {
@ -326,5 +371,4 @@ const pageTitle: string = `${product.data.title} | ${SITE.title}`;
});
});
});
</script>
</MainLayout>
</script>