/**
* Fix Contact Page Colors
* Updates the contact page content in the database to use the pink color palette
*/
const { query } = require("./config/database");
const logger = require("./config/logger");
const UPDATED_CONTACT_CONTENT = `
Our Contact Information
Reach out to us through any of these channels
Email
contact@skyartshop.com
Location
123 Art Street, Creative City, CC 12345
Business Hours
Monday - Friday
9:00 AM - 6:00 PM
Saturday
10:00 AM - 4:00 PM
`;
async function fixContactColors() {
try {
logger.info(
"šØ Updating contact page colors to match pink color palette..."
);
const result = await query(
`UPDATE pages
SET pagecontent = $1,
updatedat = CURRENT_TIMESTAMP
WHERE slug = 'contact'
RETURNING id, slug`,
[UPDATED_CONTACT_CONTENT]
);
if (result.rowCount > 0) {
logger.info("ā
Contact page colors updated successfully!");
logger.info(
` Updated page: ${result.rows[0].slug} (ID: ${result.rows[0].id})`
);
console.log(
"\nā
SUCCESS: Contact page now uses the pink color palette!"
);
console.log("\nUpdated gradients:");
console.log(" ⢠Phone card: #FFEBEB ā #FFD0D0 (light pink)");
console.log(" ⢠Email card: #FFD0D0 ā #FCB1D8 (medium pink)");
console.log(" ⢠Location card: #F6CCDE ā #FCB1D8 (rosy pink)");
console.log(
" ⢠Business Hours: #FCB1D8 ā #FFD0D0 ā #F6CCDE (multi-tone pink)"
);
console.log(" ⢠All text: #202023 (dark charcoal)\n");
} else {
logger.warn("ā ļø No contact page found to update");
console.log("\nā ļø WARNING: Contact page not found in database");
}
process.exit(0);
} catch (error) {
logger.error("ā Error updating contact page colors:", error);
console.error("\nā ERROR:", error.message);
process.exit(1);
}
}
// Run the fix
fixContactColors();