Website exporter in progress - completed home page
[biaweb_qt.git] / biaweb_strings.py
1 # BiaWeb Website content manager (c) 2010 V.Harishankar
2 # Strings class
3
4 template_main = """<?xml version="1.0" encoding="UTF-8"?>
5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
6 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <head>
8 <title>${site_title}</title>
9 <base href="${site_url}" />
10 <meta name="generator" content="BiaWeb"/>
11 <meta name="keywords" content="${meta_keywords}"/>
12 <meta name="description" content="${meta_description}"/>
13 <link rel="StyleSheet" type="text/css" href="style.css" />
14 <link rel="alternate" type="application/rss+xml" title="Entries RSS 2.0" href="subscribe.xml" />
15 </head>
16 <body>
17 <div id="head">
18 <h1><a href="${site_url}">${page_title}</a></h1>
19 <div class="headerdesc">${page_desc}</div>
20 </div>
21 <div id="main">
22 ${contents_bit}
23 </div>
24 <div id="sidebar">
25 <h2>Categories</h2>
26 ${list_of_categories}
27 <h2>Best rated</h2>
28 ${list_best_rated}
29 <h2>Subscribe</h2>
30 <a href="subscribe.xml">Latest articles (RSS)</a>
31 <h2>Search</h2>
32 <form action="cgi-bin/search.py" method="post" enctype="multipart/form-data">
33 <p><input type="text" name="query" maxlength="255" style="width:142px;border: 1px inset #5A5A5A; color:#5A5A5A; background-color:#FFFFFF;" value="" /><br />
34 <input type="submit" value="Search" /><br />
35 <input type="hidden" name="fromsearch" value="fromsearch" />
36 <input type="radio" name="criteria" value="1" checked="checked" />All words<br />
37 <input type="radio" name="criteria" value="2" />Any word</p>
38 </form>
39 </div>
40 <div id="footer">${copyright}<br />Site generated by
41 <a href=\"http://harishankar.org/software/biaweb.php\">BiaWeb</a> created by V. Harishankar</div>
42 </body>
43 </html>"""
44
45 template_article_bit = """<h2>${article_title}</h2>
46 <div class="modified">Created: ${article_cdate} | Last modified: ${article_mdate}</div>
47 <div class="rating">Rating: ${rating}</div>
48 <div class="content">${article_contents}</div>
49 """
50
51 template_news_item_bit = """<h3><a href="${news_link}">${news_title}</a></h3>
52 <div class="modified">${news_datetime}</div>
53 <div class="content">${news_description}</div>
54 """
55
56 template_index_bit = """<h2>Welcome to ${site_name}</h2>
57 <div class="content">
58 Welcome to my site, ${site_name}.
59 </div>
60 <h2>Latest Articles</h2>
61 ${news_updates}
62 """
63
64 template_table_bit = """<h2>${category_title}</h2>
65 <p>${category_desc}</p>
66 <table class="categorytable">
67 <thead>
68 <tr>
69 <td style="width:50%">Title</td>
70 <td>Created on</td>
71 <td>Rated</td>
72 </tr>
73 </thead>
74 <tbody>
75 ${table_rows}
76 </tbody>
77 </table>
78 """
79
80 template_tablerow_bit = """<tr>
81 <td style="width:50%"><a href="${article_url}">${title}</a></td>
82 <td>${created}</td>
83 <td>${rating}</td>
84 </tr>
85 """
86
87 template_style = """body {
88 font-family: "Bitstream Vera Sans", Verdana, Arial, Sans Serif;
89 font-size: 0.9em;
90 background-color: #ffffff;
91 color: #000000;
92 margin: auto
93 }
94 #head {
95 width: 98%;
96 background-color: #efefef;
97 padding: 1%;
98 text-align: center;
99 }
100
101 #main {
102 width: 73%;
103 padding: 1%;
104 float: left;
105 }
106
107 #sidebar {
108 width: 23%;
109 padding: 1%;
110 float: right;
111 }
112
113 #footer {
114 width: 100%;
115 padding-top: 5px;
116 padding-bottom: 5px;
117 font-size: 0.9em;
118 text-align: center;
119 float: left;
120 background-color: #efefef;
121 }
122
123 .headerdesc {
124 font-variant: small-caps;
125 font-size: 1.1em;
126 }
127
128 .content {
129 text-align: justify;
130 line-height: 1.1em;
131 }
132
133 .categorytable {
134 width: 100%;
135 }
136
137 .categorytable thead {
138 font-weight: bold;
139 }
140
141 .modified {
142 font-size: 0.8em;
143 color: #666666;
144 }
145
146 .rating {
147 font-size: 0.8em;
148 color: #666666;
149 }
150
151 h1, h2, h3 {
152 font-family: "Bitstream Vera Serif", Serif;
153 padding: 0;
154 margin: 0;
155 margin-top: 5px;
156 margin-bottom: 5px;
157 }
158
159 hr {
160 border: 0;
161 border-bottom: 1px solid;
162 border-color: #888888;
163 }
164
165 h1 {
166 font-size: 2.4em;
167 color: #000099;
168
169 }
170 h1 a, h1 a:hover, h1 a:visited, h2 a:active {
171 text-decoration: none;
172 }
173 h2 {
174 font-size: 1.4em;
175 background-color: #efefef;
176 }
177 h2 a, h2 a:hover, h2 a:visited, h2 a:active {
178 text-decoration: none;
179 }
180 h3 {
181 font-size: 1.2em;
182 a {
183 color: #0000dd;
184 }
185 a:visited {
186 color: #0000aa;
187 }
188 a:active, a:hover {
189 color: #0000ff;
190 }"""
191
192 template_rss = """<?xml version="1.0"?>
193 <rss version="2.0">
194 <channel>
195 <title>${title}</title>
196 <link>${link}</link>
197 <description>${description}</description>
198 <generator>BiaWeb</generator>
199 ${rss_items}
200 </channel>
201 </rss>"""
202
203 template_rss_item = """
204 <item>
205 <title>${item_title}</title>
206 <link>${item_link}</link>
207 <description>${description}</description>
208 <guid>${item_link}</guid>
209 </item>
210 """