Helpviewer/HTMLResources.py

changeset 1665
b248526d3a1b
parent 1664
863114db258e
child 1666
098e7d94d372
equal deleted inserted replaced
1664:863114db258e 1665:b248526d3a1b
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2009 - 2012 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module containing some HTML resources.
8 """
9
10 notFoundPage_html = """\
11 <?xml version="1.0" encoding="UTF-8" ?>
12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
13 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
14 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
15 <head>
16 <title>{0}</title>
17 <link rel="icon" href="data:image/png;base64,@FAVICON@" type="image/x-icon" />
18 <style>
19 body {{
20 padding: 3em 0em;
21 background: -webkit-gradient(linear, left top, left bottom, from(#85784A), to(#FDFDFD), color-stop(0.5, #FDFDFD));
22 background-repeat: repeat-x;
23 }}
24 img {{
25 float: left;
26 opacity: .8;
27 }}
28 #box {{
29 background: white;
30 border: 1px solid #85784A;
31 width: 600px;
32 padding: 60px;
33 margin: auto;
34 border-radius: 0.8em;
35 }}
36 h1 {{
37 font-size: 130%;
38 font-weight: bold;
39 border-bottom: 1px solid #85784A;
40 margin-left: 64px;
41 }}
42 h2 {{
43 font-size: 100%;
44 font-weight: normal;
45 border-bottom: 1px solid #85784A;
46 margin-left: 64px;
47 }}
48 ul {{
49 font-size: 100%;
50 padding-left: 64px;
51 margin: 5px 0;
52 }}
53 </style>
54 </head>
55 <body>
56 <div id="box">
57 <img src="data:image/png;base64,@IMAGE@" width="48" height="48"/>
58 <h1>{1}</h1>
59 <h2>{2}</h2>
60 <ul>
61 <li>{3}</li>
62 <li>{4}</li>
63 <li>{5}</li>
64 <li>{6}</li>
65 <input type="submit" id="reloadButton" value="{7}" onclick="window.location.reload()">
66 </ul>
67 </div>
68 </body>
69 </html>
70 """
71
72 ##########################################################################################
73
74 adblockPage_html ="""\
75 <?xml version="1.0" encoding="UTF-8" ?>
76 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
77 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
78 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
79 <head>
80 <title>{0}</title>
81 <link rel="icon" href="data:image/png;base64,@FAVICON@" type="image/x-icon" />
82 <style>
83 body {{
84 padding: 3em 0em;
85 background: -webkit-gradient(linear, left top, left bottom, from(#85784A), to(#FDFDFD), color-stop(0.5, #FDFDFD));
86 background-repeat: repeat-x;
87 }}
88 #box {{
89 background: white;
90 border: 1px solid #85784A;
91 max-width: 600px;
92 height: 50%;
93 padding: 40px;
94 padding-bottom: 10px;
95 margin: auto;
96 border-radius: 0.8em;
97 text-align: center;
98 vertical-align: middle;
99 margin: auto;
100 }}
101 h1 {{
102 font-size: 130%;
103 font-weight: bold;
104 border-bottom: 1px solid #85784A;
105 margin-bottom: 0px;
106 }}
107 </style>
108 </head>
109 <body>
110 <div id="box">
111 <img src="data:image/png;base64,@IMAGE@" width="64" height="64"/>
112 <h1>AdBlock Plus</h1>
113 <p>{1}</p>
114 </div>
115 </body>
116 </html>
117 """
118
119 ##########################################################################################
120
121 startPage_html = """\
122 <?xml version="1.0" encoding="UTF-8" ?>
123 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
124 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
125 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
126 <head>
127 <title></title>
128 <link rel="icon" href="data:image/png;base64,@FAVICON@" type="image/x-icon" />
129 <style>
130 * {
131 margin: 0;
132 padding: 0;
133 font-family: "DejaVu Sans";
134 }
135
136 body {
137 background: -webkit-gradient(linear, left top, left bottom, from(#85784A), to(#FDFDFD), color-stop(0.5, #FDFDFD));
138 background-repeat: repeat-x;
139 margin-top: 200px;
140 }
141
142 #header, #search, #footer {
143 width: 600px;
144 margin: 10px auto;
145 }
146
147 #header, #search {
148 border-radius: 0.8em;
149 padding: 25px;
150 }
151
152 #header {
153 background: -webkit-gradient(linear, left top, left bottom, from(#D57E3E), to(#D57E3E), color-stop(0.5, #FFBA89));
154 height: 25px;
155 }
156
157 #header h1 {
158 display: inline;
159 font-size: 1.7em;
160 font-weight: bold;
161 }
162
163 #header img {
164 display: inline;
165 float: right;
166 margin-top: -5px;
167 }
168
169 #search {
170 background: -webkit-gradient(linear, left top, right top, from(#85784A), to(#85784A), color-stop(0.5, #C8C2AE));
171 height: 50px;
172 color: #000;
173 text-align: center;
174 padding-top: 40px !important;
175 }
176
177 #search fieldset {
178 border: 0;
179 }
180
181 #search input[type=text] {
182 width: 65%;
183 }
184
185 #search input[type=submit] {
186 width: 25%;
187 }
188
189 #footer {
190 text-align: center;
191 color: #999;
192 }
193
194 #footer a {
195 color: #555;
196 text-decoration: none;
197 }
198
199 #footer a:hover {
200 text-decoration: underline;
201 }
202 </style>
203 <script type="text/javascript">
204 function update()
205 {
206 document.title = window.eric.translate('Welcome to eric5 Web Browser!');
207 document.getElementById('headerTitle').innerHTML = window.eric.translate('eric5 Web Browser');
208 document.getElementById('searchButton').value = window.eric.translate('Search!');
209 document.getElementById('footer').innerHTML = window.eric.providerString()
210 + ' | ' + '<a href="http://eric-ide.python-projects.org/">'
211 + window.eric.translate('About eric5') + '</a>';
212 document.getElementById('lineEdit').placeholder = window.eric.providerString();
213
214 // Try to change the direction of the page:
215
216 var newDir = window.eric.translate('QT_LAYOUT_DIRECTION');
217 newDir = newDir.toLowerCase();
218 if ((newDir != 'ltr') && (newDir != 'rtl'))
219 newDir = 'ltr';
220 document.getElementsByTagName('body')[0].setAttribute('dir', newDir);
221 }
222
223 function formSubmitted()
224 {
225 var string = lineEdit.value;
226
227 if (string.length == 0)
228 return;
229
230 var url = window.eric.searchUrl(string);
231 window.location.href = url;
232 }
233 </script>
234 </head>
235 <body onload="document.forms[0].lineEdit.select(); update();">
236 <div id="header">
237 <h1 id="headerTitle"></h1>
238 <img src="data:image/png;base64,@IMAGE@" width="32" height="32"/>
239 </div>
240 <div id="search">
241 <form action="javascript:formSubmitted();">
242 <fieldset>
243 <input id="lineEdit" name="lineEdit" type="text" />
244 <input id="searchButton" type="submit" />
245 </fieldset>
246 </form>
247 </div>
248 <div id="footer"></div>
249 </body>
250 </html>
251 """

eric ide

mercurial