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

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