Update product images paths and optimize scripts order in MainLayout
Changed the paths of main product images for each product for clarity and better organization. Also rearranged the order of scripts in 'MainLayout.astro' to improve efficiency and made image properties in 'config.ts' optional for better flexibility in handling blueprint images.
This commit is contained in:
parent
88b246d366
commit
389e17334f
9 changed files with 20 additions and 20 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { z, defineCollection } from 'astro:content';
|
||||
|
||||
const productCollection = defineCollection({
|
||||
const productsCollection = defineCollection({
|
||||
type: 'content',
|
||||
schema: ({ image }) => z.object({
|
||||
main: z.object({
|
||||
|
@ -46,8 +46,8 @@ const productCollection = defineCollection({
|
|||
})
|
||||
).optional(),
|
||||
blueprints: z.object({
|
||||
first: z.string().optional(),
|
||||
second: z.string().optional(),
|
||||
first: image().optional(),
|
||||
second: image().optional(),
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
@ -59,6 +59,6 @@ const productCollection = defineCollection({
|
|||
|
||||
// 3. Export a single `collections` object to register your collection(s)
|
||||
export const collections = {
|
||||
'products': productCollection,
|
||||
'products': productsCollection,
|
||||
// 'blog': blogCollection,
|
||||
};
|
|
@ -6,7 +6,7 @@ main:
|
|||
content: |
|
||||
Introducing the SF-AB A765 Assorted Screw Set – the ultimate solution for your screw fastening needs. This comprehensive set includes a wide variety of screws meticulously curated to tackle various projects with ease and precision.
|
||||
imgCard: "../../images/product-image-2.avif"
|
||||
imgMain: "../../images/product-image-3-main.avif"
|
||||
imgMain: "../../images/product-image-main-2.avif"
|
||||
imgAlt: "Mockup boxes of assorted screw set"
|
||||
tabs:
|
||||
- id: "tabs-with-card-item-1"
|
||||
|
|
|
@ -6,7 +6,7 @@ main:
|
|||
content: |
|
||||
Meet the SF-BN B203 – your reliable companion for professional-grade fastening. This comprehensive box set comes with a versatile selection of tap bolts and nuts, meticulously crafted to provide the strongest hold for your construction and assembly projects.
|
||||
imgCard: "../../images/product-image-3.avif"
|
||||
imgMain: "../../images/product-image-3-main.avif"
|
||||
imgMain: "../../images/product-image-main-3.avif"
|
||||
imgAlt: "Mockup boxes of a tap bolts and nuts set"
|
||||
tabs:
|
||||
- id: "tabs-with-card-item-1"
|
||||
|
|
|
@ -6,7 +6,7 @@ main:
|
|||
content: |
|
||||
Introducing the SF-FN F303 Hex Bolts – the perfect choice for heavy-duty fastening applications. Crafted with precision and durability in mind, these hex bolts provide the strength and reliability you need for your toughest projects.
|
||||
imgCard: "../../images/product-image-4.avif"
|
||||
imgMain: "../../images/product-image-3-main.avif"
|
||||
imgMain: "../../images/product-image-main-4.avif"
|
||||
imgAlt: "Mockup boxes of hex bolts"
|
||||
tabs:
|
||||
- id: "tabs-with-card-item-1"
|
||||
|
|
|
@ -6,7 +6,7 @@ main:
|
|||
content: |
|
||||
Introducing the SF-TB T845 – your go-to solution for precision fastening in machinery and equipment. This comprehensive set of machine screws is meticulously crafted to meet the stringent demands of industrial applications, ensuring secure and reliable fastening.
|
||||
imgCard: "../../images/product-image-1.avif"
|
||||
imgMain: "../../images/product-image-3-main.avif"
|
||||
imgMain: "../../images/product-image-main-1.avif"
|
||||
imgAlt: "Mockup boxes of machine screws set"
|
||||
tabs:
|
||||
- id: "tabs-with-card-item-1"
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 49 KiB |
Binary file not shown.
Before Width: | Height: | Size: 53 KiB |
Binary file not shown.
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 69 KiB |
|
@ -27,6 +27,18 @@ interface Props {
|
|||
document.documentElement.classList.remove("dark");
|
||||
}
|
||||
</script>
|
||||
<script is:inline src="/assets/vendor/lenis/lenis.js"></script>
|
||||
<script is:inline>
|
||||
// This script is to handle lenis library settings and behaviors, like the smooth scrolling
|
||||
const lenis = new Lenis({ smooth: true, smoothTouch: false });
|
||||
|
||||
function raf(time) {
|
||||
lenis.raf(time);
|
||||
requestAnimationFrame(raf);
|
||||
}
|
||||
|
||||
requestAnimationFrame(raf);
|
||||
</script>
|
||||
<script is:inline src="/assets/vendor/preline/preline.js"></script>
|
||||
</head>
|
||||
<body
|
||||
|
@ -67,17 +79,5 @@ interface Props {
|
|||
pointer-events: none;
|
||||
}
|
||||
</style>
|
||||
<script is:inline src="/assets/vendor/lenis/lenis.js"></script>
|
||||
<script is:inline>
|
||||
// This script is to handle lenis library settings and behaviors, like the smooth scrolling
|
||||
const lenis = new Lenis({ smooth: true, smoothTouch: false });
|
||||
|
||||
function raf(time) {
|
||||
lenis.raf(time);
|
||||
requestAnimationFrame(raf);
|
||||
}
|
||||
|
||||
requestAnimationFrame(raf);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Reference in a new issue