diff --git a/.vscode/settings.json b/.vscode/settings.json index c3735da6..a70d1e45 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,5 @@ { "deno.enable": false, "deno.lint": false, - "deno.unstable": false, - "spellright.language": [], - "spellright.documentTypes": ["latex", "plaintext"] + "deno.unstable": false } diff --git a/apps/backend/certificate.html b/apps/backend/certificate.html index 86cea1d6..26392dbf 100644 --- a/apps/backend/certificate.html +++ b/apps/backend/certificate.html @@ -1,98 +1,431 @@ - + + + + + + + + + Certificate + + - .student-name { - font-family: 'Qwitcher Grypen', cursive; - } - - + + +
+
+ +

${orgName}

+
- -
-
-
-

- Certificate
of completion +

+

This certificate is awarded to

+

${studentName}

+
+ +
+

has succesfully completed training on

+

${courseName}

+
+ +
+
+

${dateIssued}

+

Date Issued

+
+ +
+

+

Signature

+
+
+ +
${courseDescription}
+
+ + + + + + + + + + + + + + + + + + + - - - - \ No newline at end of file +
--> + + diff --git a/apps/backend/src/utils/certificate.js b/apps/backend/src/utils/certificate.js index 354f52ba..d962c264 100644 --- a/apps/backend/src/utils/certificate.js +++ b/apps/backend/src/utils/certificate.js @@ -1,5 +1,11 @@ const { getPdfBuffer } = require('./puppeteer'); +function getCurrentDate() { + const date = new Date(); + const options = { year: 'numeric', month: 'long', day: 'numeric' }; + return date.toLocaleDateString(undefined, options); +} + function getHtmlTemplate(body) { return ` @@ -18,9 +24,9 @@ function getHtmlTemplate(body) {