diff --git a/screenless/bureau/publications/article.html b/screenless/bureau/publications/article.html index 57af87d..76499ea 100644 --- a/screenless/bureau/publications/article.html +++ b/screenless/bureau/publications/article.html @@ -11,13 +11,9 @@ } h1 { font-variant: small-caps; - width: 67%; - } - p { - width: 67%; } img { - width: 67%; + max-width: 100%; } a { text-decoration: none; @@ -29,27 +25,31 @@ font-size: smaller; vertical-align: super; } + #twocol { + -moz-column-count: 2; + -webkit-column-count: 2; + column-count: 2; + text-align: justify; + } #date #article-src { padding-bottom: 10%; font-style: italic; } - .sidenote { - float: right; - clear: right; - margin-right: -30%; - width: 30%; - height: 30%; - position: relative; + .footnote { + font-size: smaller; + padding-bottom: 0.5em; } - .sidenote svg { - width: 100%; - height: 100%; + .footnote svg { + width: 50%; + height: 50%; }

${title}

+

${date}

${article}

Article Source: ${url}

+
diff --git a/screenless/bureau/publications/publications.py b/screenless/bureau/publications/publications.py index 4f14e58..ed2944c 100644 --- a/screenless/bureau/publications/publications.py +++ b/screenless/bureau/publications/publications.py @@ -98,8 +98,10 @@ class Publications(Bureau): html = lxml.html.document_fromstring(doc.summary()) + notecount = 0 # store links then make corresponding svg barcodes for link in html.findall(".//a"): + notecount += 1 tmpcode = ''.join(random.choice(string.ascii_letters +\ string.digits)\ for _ in range(5)) @@ -110,10 +112,13 @@ class Publications(Bureau): svg = code128.svg("PBr." + tmpcode) - sidenote = html.makeelement("span") - sidenote.attrib["class"] = "sidenote" - sidenote.append(lxml.html.fromstring(svg.encode())) - link.addnext(sidenote) + footnote = html.makeelement("div") + footnote.attrib["class"] = "footnote" + notetext = html.makeelement("div") + notetext.text = str(notecount) + ". " + link.attrib["href"] + footnote.append(notetext) + footnote.append(lxml.html.fromstring(svg.encode())) + html.append(footnote) self.print_full("article.html", title=doc.title(), article=lxml.html.tostring(html).decode("utf-8"),