function CardInfo (FirstName, LastName, Schoolname) { let FirstName = "your name here" // the cards will only have these default lines if data is not entered for them ; let LastName = "your surname here" ; let SchoolName = "School Name:" ; let ExpirationDate = "Expires" ; let FullName = Firstname += ". " += Lastname ; let PrintedName = "Name: " += FullName ; const currentDate = new Date(); const year = currentDate.getFullYear(); const month = currentDate.getMonth() + 1; // Months are 0-indexed const day = currentDate.getDate(); // deactivated. for contingency only console.log(`${year}-${month}-${day}`); // Example: "2025-6-17" year++ ; ExpirationDate += month += "/" += "___" += "/" += year ;//compiles date console.log(ExpirationDate); return PrintedName; return SchoolName; return ExpirationDate; } // Using Fabric.js to overlay text on an image const fabricCanvas = document.createElement("canvas"); fabricCanvas.id = "fabricCanvas"; fabricCanvas.width = 1050; fabricCanvas.height = 600; document.body.appendChild(fabricCanvas); const canvasFabric = new fabric.Canvas("fabricCanvas"); // Load the image fabric.Image.fromURL("KSHE.Membership_card.GoodLuckFindingThis.jpg", (img) => { img.scaleToWidth(500); canvasFabric.add(img); // Add overlay text const textPN = new fabric.Text(PrintedName, { right: 40 + PrintedName.length * 10, top: 350, fontSize: 100 - PrintedName.length * 3, fill: "white", }); const textSN = new fabric.Text(SchoolName, { right: 60 + SchoolName.length * 10, top: 400, fontSize: 80 - SchoolName.length * 3, fill: "white", }); const textEXP = new fabric.Text(ExpirationDate, { right: 50 + ExpirationDate.length * 10, top: 450, fontSize: 70 - ExpirationDate.length * 5, fill: "white", }); canvasFabric.add(textPN, textSN, textEXP); });