-new template for main menu. some barcode tweaks.

workspace
Brendan Howell 9 years ago
parent 83fc86a1c1
commit 7df4a77645

@ -51,7 +51,7 @@ class InhumanResources(Bureau):
cmd = data["cmd"]
cmdname = data["cmdname"]
desc = data["desc"]
barcode = code128.svg(prefix + cmd + ".")
barcode = code128.svg(prefix + cmd + ".", thickness=1.5)
except KeyError as e:
print("cannot add invalid command:", str(e))
return
@ -88,7 +88,6 @@ class InhumanResources(Bureau):
Prints the menu of commands for all operational bureaus.
"""
self.print_full("menu.html", menu=self.menu)
print(self.menu)
def main():

@ -3,40 +3,63 @@
<title>The Screenless Office - Main Menu</title>
<style type="text/css">
body {
font-family: Georgia;
font-size: 11pt;
font-family: Junicode;
font-size: 12pt;
}
h1, h3 {
font-family: "TeX Gyre Adventor";
}
.bureau {
clear: both;
width: 100%;
page-break-inside: avoid;
}
.bureau h3 {
border-bottom: 1px solid black;
}
.cmd {
width: 33%;
clear: both;
width: 100%;
}
.cmdcol{
width: 30%;
float: left;
padding-right: 3%;
padding-bottom: 0.5em;
}
.barcode {
height: 1cm;
.cmdcol svg {
width: 300px;
}
svg {
width: 100%;
.cmddesc {
margin-top: 0;
}
.cmdname {
font-weight: bold;
font-family: "TeX Gyre Adventor";
}
</style>
</head>
<body>
<div "main">
<h1 id="title">The Screenless Office</h1>
<em>Directory of Services</em>
%for prefix, buro in menu.items():
<div class="bureau">
<h1>${buro["name"]}</h1>
<h3>${buro["name"]}</h3>
<div class="prefix">Prefix: ${prefix}</div>
<p class="description">${buro["desc"]}</p>
<div class="commands">
%for cmdtxt, cmd in buro["commands"].items():
% if cmdtxt != "test":
<div class="cmd">
<h3>${cmd["name"]}</h3>
<div class="cmdtxt">${cmdtxt}</div>
<div class="barcode">${cmd["barcode"]}</div>
<p>${cmd["desc"]}</p>
<div class="cmdcol">
<div class="cmdname">${cmd["name"]}</div>
<div class="cmdtxt">command: <kbd>${cmdtxt}</kbd></div>
</div>
<div class="cmdcol">
<p class="cmddesc">${cmd["desc"]}</p>
</div>
<div class="cmdcol">${cmd["barcode"]}</div>
</div>
% endif
%endfor

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.2"
width="541.42859"
height="328.57144"
id="svg2">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-101.33295,-361.89539)"
id="layer1">
<flowRoot
id="flowRoot2985"
xml:space="preserve"
style="font-size:36px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Vollkorn;-inkscape-font-specification:Vollkorn Bold"><flowRegion
id="flowRegion2987"><rect
width="625.71429"
height="380"
x="50"
y="295.21933"
id="rect2989"
style="font-size:36px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Vollkorn;-inkscape-font-specification:Vollkorn Bold" /></flowRegion><flowPara
id="flowPara2991"></flowPara></flowRoot> <rect
width="541.42859"
height="328.57144"
x="101.33295"
y="361.89539"
id="rect3014"
style="fill:#000000;fill-opacity:1;stroke:none" />
<flowRoot
transform="translate(-313.40332,124.66984)"
id="flowRoot2993"
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:end;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:none;font-family:EB Garamond;-inkscape-font-specification:EB Garamond"><flowRegion
id="flowRegion2995"><rect
width="908.57147"
height="711.42859"
x="1.4285715"
y="263.79074"
id="rect2997"
style="text-align:end;text-anchor:end;fill:#ffffff" /></flowRegion><flowPara
id="flowPara2999"
style="font-size:72px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;font-family:Vollkorn;-inkscape-font-specification:Vollkorn Bold">THE</flowPara><flowPara
id="flowPara3003"
style="font-size:72px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;font-family:Vollkorn;-inkscape-font-specification:Vollkorn Bold">SCREENLESS</flowPara><flowPara
id="flowPara3012"
style="font-size:72px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#ffffff;font-family:Vollkorn;-inkscape-font-specification:Vollkorn Bold">OFFICE</flowPara></flowRoot> </g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

Loading…
Cancel
Save