-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfbhtml.py
More file actions
54 lines (48 loc) · 2.01 KB
/
fbhtml.py
File metadata and controls
54 lines (48 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version = "v20210803"
copyyear = "2005-2021"
from sitedefs import SHOW_VAT
def getHTMLHeader(title):
"""
The HTML header for all pages
"""
return """<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>FruityBanking - %s</title>
<link rel="stylesheet" href="static/style.css" />
<link type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.css" rel="stylesheet" />
<link rel="shortcut icon" href="static/icon-16.png" />
<link rel="icon" href="static/icon-16.png" sizes="16x16" />
<link rel="icon" href="static/icon-32.png" sizes="32x32" />
<link rel="icon" href="static/icon-48.png" sizes="48x48" />
<script type="text/javascript">
SHOW_VAT = %s;
</script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script type="text/javascript" src="static/fb.js"></script>
</head>
<body>
<img src="static/fruity.png" align="right" />
""" % (title, SHOW_VAT and "true" or "false")
def getHTMLFooter():
"""
The HTML footer for all pages
"""
return """
<div id="footer"><span class="brand">FB! %s</span><br/><span class="copyright">
Copyright(c)%s, R. Rawson-Tetley. This software is covered
under the terms of the
<a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License.</a>
</span></div>
</body></html>
""" % ( version, copyyear )
class StringBuilder:
buffer = []
def __init__(self):
self.buffer = []
def add(self, s):
self.buffer.append(s)
def get(self):
return "".join(self.buffer)