xref: /petsc/lib/petsc/bin/maint/htmltemplate.py (revision 59e7829ccff665372c1d09026a11beea9cbf8624)
1import time
2def getHeader(title):
3  """ Generalized header"""
4  firstpart="""
5<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
6<html>
7<head>
8<title>
9"""+title+"""
10</title>
11<style type="text/css">
12div.main {
13  max-width: 1300px;
14  background: white;
15  margin-left: auto;
16  margin-right: auto;
17  padding: 20px;
18  padding-top: 0;
19  background: #FBFBFB;
20  /* border: 5px solid #CCCCCC;
21  border-radius: 10px; */
22}
23/*table, th, td {
24   border: 1px solid black;
25}*/
26table {
27   border: 1px solid black;
28}
29table, th, td {
30   vertical-align: top;
31}
32pre {
33    white-space: pre-wrap;       /* Since CSS 2.1 */
34    white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
35    white-space: -pre-wrap;      /* Opera 4-6 */
36    white-space: -o-pre-wrap;    /* Opera 7 */
37    word-wrap: break-word;       /* Internet Explorer 5.5+ */
38}
39table {
40  /*border: 1px solid black;
41  border-radius: 10px;*/
42  padding: 3px;
43  margin-top: 0;
44}
45td a:link, td a:visited, td a:focus, td a:active {
46  font-weight: bold;
47  text-decoration: underline;
48  color: black;
49  border: 1px solid black;
50}
51td a:hover {
52  font-weight: bold;
53  text-decoration: underline;
54  color: black;
55}
56td.border {
57  border-top: 2px solid #EEE;
58}
59th.gray {
60  background: #FFFFFF;
61  border-top: 10px solid #999;
62  padding: 0px;
63  padding-top: 0px;
64  padding-bottom: 0px;
65  font-size: 1.1em;
66  font-weight: bold;
67  text-align: center;
68}
69th {
70  border-top: 1px solid #000;
71  padding: 10px;
72  padding-top: 5px;
73  padding-bottom: 5px;
74  font-size: 1.1em;
75  font-weight: bold;
76  text-align: center;
77}
78td.desc {
79  max-width: 650px;
80  padding: 2px;
81  font-size: 0.9em;
82}
83td.green {
84  text-align: center;
85  vertical-align: middle;
86  padding: 2px;
87  background: #01DF01;
88  min-width: 50px;
89}
90td.yellow {
91  text-align: center;
92  vertical-align: middle;
93  padding: 2px;
94  background: #F4FA58;
95  min-width: 50px;
96}
97td.red {
98  text-align: center;
99  vertical-align: middle;
100  padding: 2px;
101  background: #FE2E2E;
102  min-width: 50px;
103}
104</style>
105</head>
106<body><div class="main">
107
108
109
110<center><span style=\"font-size:1.3em; font-weight: bold;\">
111"""+title+"""
112</span><br />
113Last update: """+ time.strftime('%a, %d %b %Y %H:%M:%S %z') +""" </center>\n\n
114</span></center><br>\n\n
115<center><span style=\"font-size:1.3em; font-weight: bold;\">\n
116
117"""
118  return firstpart
119