Templates
Overview
Cakedesk features a powerful templating system that allows you to create your own page layouts for invoices and proposals using HTML & CSS.
While there is a small learning curve involved, the ability to create templates with code means that you have full control over the appearance of your documents.
#Paged.js
HTML & CSS are primarily designed to layout web pages. With a little bit of help from Paged.js, it is possible to layout print media (like invoices and proposals) as well.
Paged.js is used by Cakedesk under the hood and you can use all the features of this library to layout to, for example:
#Anatomy of a Template
A template consists of the following files:
#template.ejs
The HTML markup for the invoice/proposal, using the EJS templating language.
#styles.css
The CSS styles for the invoice/proposal. You can use cm
and px
units in the CSS. You can also use web fonts by placing them in the same directory as the CSS file and referencing them using a relative path.