mirror of https://github.com/nealey/Horrors2
Now with style sheet
This commit is contained in:
parent
d086d3f580
commit
ccabcc6d28
|
@ -0,0 +1,26 @@
|
||||||
|
body {
|
||||||
|
max-width: 40em;
|
||||||
|
font-family: Antykwa Torunska;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.part {
|
||||||
|
padding: 40% 0;
|
||||||
|
page-break-before: always;
|
||||||
|
page-break-after: always;
|
||||||
|
font-size: 400%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chapter {
|
||||||
|
page-break-before: always;
|
||||||
|
margin-top: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.author {
|
||||||
|
border-bottom: 2px solid black;
|
||||||
|
}
|
|
@ -93,9 +93,10 @@ def art(artist, url, title=None):
|
||||||
print('<div class="art">')
|
print('<div class="art">')
|
||||||
print('<img src="%s" alt="%s" />' % (url, alt))
|
print('<img src="%s" alt="%s" />' % (url, alt))
|
||||||
if title:
|
if title:
|
||||||
print('<em>%s</em> by %s' % (title, artist))
|
atxt = '<em>%s</em> by %s' % (title, artist)
|
||||||
else:
|
else:
|
||||||
print(alt)
|
atxt = alt
|
||||||
|
print('<p class="artist">%s</p>' % (atxt))
|
||||||
print('</div>')
|
print('</div>')
|
||||||
|
|
||||||
outbuf = ''
|
outbuf = ''
|
||||||
|
@ -198,6 +199,22 @@ for l in f:
|
||||||
if l.startswith('\\begin{document'):
|
if l.startswith('\\begin{document'):
|
||||||
break
|
break
|
||||||
|
|
||||||
|
print('''<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC
|
||||||
|
"-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>Horrors 2</title>
|
||||||
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
''')
|
||||||
|
|
||||||
for l in f:
|
for l in f:
|
||||||
outline(l)
|
outline(l)
|
||||||
|
|
||||||
|
print('''</body>
|
||||||
|
</html>
|
||||||
|
''')
|
Loading…
Reference in New Issue