This folder includes components that are not visibly utilized in the frontend template, but they are used by the DOMPDF library.
The certificates generated can come in two distinct versions:
1. Without the Donated Amount: This version is used when the user opts to hide the amount they donated.
2. With the Donated Amount: This version displays the value that the user donated.
Select different templates upon the user's choice to either hide or display the donated amount.
There is a testing tool that can be found here, which accepts the HTML/CSS found on this folder as a template to generate a PDF out of it.
Just copy and paste the full code from one of the two versions into the Manual entry
tab, then go over to the options tab, and change Paper size and orientaion
to a4 - portrait
, and DPI
to 150. When done, click submit
to generate the PDF file.
The output size in pixels is 1241x1754, which is the equivalent of an A4 paper in 150 DPI. Can be used to calculate the size of the elements in the certificate.
src/components/template-components/certificate
// src/components/template-components/certificate/schema.yaml
$schema: http://json-schema.org/draft-07/schema
$id: /template-components/certificate
required: []
properties: {}