From 73a3400110c4a2bfdb1b603487f79f0987ce133b Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Wed, 5 Aug 2020 09:06:19 +0200 Subject: [PATCH] fix email barcode refs. move news headers to top of page. --- screenless/bureau/mailroom/mailroom.py | 13 ++++++------- screenless/bureau/publications/news.html | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/screenless/bureau/mailroom/mailroom.py b/screenless/bureau/mailroom/mailroom.py index 11d8012..48da3be 100644 --- a/screenless/bureau/mailroom/mailroom.py +++ b/screenless/bureau/mailroom/mailroom.py @@ -185,19 +185,18 @@ class MailRoom(Bureau): msg = self._make_msg_object(imap_id, resp) - # TODO: switch this to inline svgs # make action barcodes - msg.un_bc = os.path.join("/tmp", "POun." + shortcode + ".png") + msg.un_bc = os.path.join("/tmp", "POun." + shortcode + ".svg") kode256.image("POun." + shortcode).save(msg.un_bc) - msg.d_bc = os.path.join("/tmp", "POd." + shortcode + ".png") + msg.d_bc = os.path.join("/tmp", "POd." + shortcode + ".svg") kode256.image("POd." + shortcode).save(msg.d_bc) - msg.sp_bc = os.path.join("/tmp", "POsp." + shortcode + ".png") + msg.sp_bc = os.path.join("/tmp", "POsp." + shortcode + ".svg") kode256.image("POsp." + shortcode).save(msg.sp_bc) - msg.re_bc = os.path.join("/tmp", "POre." + shortcode + ".png") + msg.re_bc = os.path.join("/tmp", "POre." + shortcode + ".svg") kode256.image("POre." + shortcode).save(msg.re_bc) - msg.rea_bc = os.path.join("/tmp", "POrea." + shortcode + ".png") + msg.rea_bc = os.path.join("/tmp", "POrea." + shortcode + ".svg") kode256.image("POrea." + shortcode).save(msg.rea_bc) - msg.r_bc = os.path.join("/tmp", "POr." + shortcode + ".png") + msg.r_bc = os.path.join("/tmp", "POr." + shortcode + ".svg") kode256.image("POr." + shortcode).save(msg.r_bc) self.print_full("email.html", msg=msg, shortcode=shortcode) diff --git a/screenless/bureau/publications/news.html b/screenless/bureau/publications/news.html index 1404c99..7b5976f 100644 --- a/screenless/bureau/publications/news.html +++ b/screenless/bureau/publications/news.html @@ -7,21 +7,30 @@ @media print { @page { size: A4; - margin: 0.5cm 1cm 2cm 1cm; - @bottom-left { + margin: 1cm; + @top-left { content: counter(page); + font-size: 11px; font-family: "Cormorant SC"; + border-top: 1px solid black; + border-bottom: 1px solid black; } - @bottom-center { + @top-center { content: "Yesterday's Tomorrows"; + font-size: 11px; font-family: "Cormorant SC"; + border-top: 1px solid black; + border-bottom: 1px solid black; } - @bottom-right { + @top-right { content: '${date}'; + font-size: 11px; font-family: "Cormorant SC"; + border-top: 1px solid black; + border-bottom: 1px solid black; } } - @page first { + @page :first { @top-left { content: none; } @top-center {