Friday, May 22, 2020ΒΆ

I am playing with the invoice template in different sites. A new test project lino_book.projects.confdirs is now used for doctests in Introduction to config directories.

I wanted to have a way to quickly get an overview of certain site settings and wrote the new status command.

I added a local configuration directory to lino_book.projects.apc with a custom logo.

I added a section How to customize your logo in the header or footer to the docs. I extended the Introduction to config directories page.

The weasyprint/base.weasy.html template contains among others:

{% set logo_file = rt.find_config_file("logo.jpg", "weasyprint") %}
{% if logo_file %}
margin: 15mm; margin-top: 35mm; margin-bottom: 15mm;
@top-right {
  height: 20mm;
  // width: 40mm;
  padding: 0px;
  text-align: right;
  // background-image: url(file://{{logo_file}});
  // background-size: contain;
  content: url(file://{{logo_file}});
}
{% else %}
margin: 15mm; margin-top: 15mm; margin-bottom: 15mm;
{% endif %}

This logo, weasyprint/logo.jpg, has a size of 336 x 195 pixels and a resolution of 72ppi. So the physical height is about 69 mm (195 / 72 * 25.4).