✅ COMPLETED: 1. Dockerfile uses port 80 (astro preview) 2. BaseLayout imports globals.css 3. globals.css with Tailwind v4 @theme syntax 4. index.astro has Header, Footer, FixedContact 5. All image references fixed to existing files 6. Hero uses hdpe_pipe_main.jpg 7. Product cards use hdpe001.jpg 8. pt-20 on main for fixed header ✅ TESTED LOCALLY: - Build: 15 pages in 1.27s - Docker build successful - Port 80 working - Images load - CSS works Ready for Easypanel deployment.
54 lines
1.8 KiB
JavaScript
54 lines
1.8 KiB
JavaScript
import { z } from "zod";
|
|
import { FONT_TYPES } from "./constants.js";
|
|
const weightSchema = z.union([z.string(), z.number()]);
|
|
const styleSchema = z.enum(["normal", "italic", "oblique"]);
|
|
const displaySchema = z.enum(["auto", "block", "swap", "fallback", "optional"]);
|
|
const familyPropertiesSchema = z.object({
|
|
weight: weightSchema.optional(),
|
|
style: styleSchema.optional(),
|
|
display: displaySchema.optional(),
|
|
stretch: z.string().optional(),
|
|
featureSettings: z.string().optional(),
|
|
variationSettings: z.string().optional(),
|
|
unicodeRange: z.array(z.string()).nonempty().optional()
|
|
});
|
|
const fallbacksSchema = z.object({
|
|
fallbacks: z.array(z.string()).optional(),
|
|
optimizedFallbacks: z.boolean().optional()
|
|
});
|
|
const requiredFamilyAttributesSchema = z.object({
|
|
name: z.string(),
|
|
cssVariable: z.string()
|
|
});
|
|
const _fontProviderSchema = z.object({
|
|
name: z.string(),
|
|
config: z.record(z.string(), z.any()).optional(),
|
|
init: z.custom((v) => typeof v === "function").optional(),
|
|
resolveFont: z.custom((v) => typeof v === "function"),
|
|
listFonts: z.custom((v) => typeof v === "function").optional()
|
|
}).strict();
|
|
const fontProviderSchema = z.custom((v) => {
|
|
return _fontProviderSchema.safeParse(v).success;
|
|
}, "Invalid FontProvider object");
|
|
const fontFamilySchema = z.object({
|
|
...requiredFamilyAttributesSchema.shape,
|
|
...fallbacksSchema.shape,
|
|
...familyPropertiesSchema.omit({
|
|
weight: true,
|
|
style: true
|
|
}).shape,
|
|
provider: fontProviderSchema,
|
|
options: z.record(z.string(), z.any()).optional(),
|
|
weights: z.array(weightSchema).nonempty().optional(),
|
|
styles: z.array(styleSchema).nonempty().optional(),
|
|
subsets: z.array(z.string()).nonempty().optional(),
|
|
formats: z.array(z.enum(FONT_TYPES)).nonempty().optional()
|
|
}).strict();
|
|
export {
|
|
displaySchema,
|
|
fontFamilySchema,
|
|
fontProviderSchema,
|
|
styleSchema,
|
|
weightSchema
|
|
};
|