diff -r 0a44aff88bfa -r d419f153925d WebBrowser/data/html/startPage.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebBrowser/data/html/startPage.html Tue Mar 15 21:15:07 2016 +0100 @@ -0,0 +1,134 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<meta http-equiv="content-type" content="text/html; charset=utf-8"> +<title>@TITLE@</title> +<link rel="icon" href="@FAVICON@" type="image/x-icon" /> +<style> +* { + margin: 0; + padding: 0; + font-family: "DejaVu Sans"; +} + +body { + background: -webkit-gradient(linear, left top, left bottom, from(#85784A), to(#FDFDFD), color-stop(0.5, #FDFDFD)); + background-repeat: repeat-x; + margin-top: 200px; +} + +#header, #search, #footer { + width: 600px; + margin: 10px auto; +} + +#header, #search { + border-radius: 0.8em; + padding: 25px; +} + +#header { + background: -webkit-gradient(linear, left top, left bottom, from(#D57E3E), to(#D57E3E), color-stop(0.5, #FFBA89)); + height: 25px; +} + +#header h1 { + display: inline; + font-size: 1.7em; + font-weight: bold; +} + +#header img { + display: inline; + float: right; + margin-top: -5px; +} + +#search { + background: -webkit-gradient(linear, left top, right top, from(#85784A), to(#85784A), color-stop(0.5, #C8C2AE)); + height: 50px; + color: #000; + text-align: center; + padding-top: 40px !important; +} + +#search fieldset { + border: 0; +} + +#search input[type=text] { + width: 65%; +} + +#search input[type=submit] { + width: 25%; +} + +#footer { + text-align: center; + color: #999; +} + +#footer a { + color: #555; + text-decoration: none; +} + +#footer a:hover { + text-decoration: underline; +} + </style> + <script type="text/javascript"> + function update() + { + alert(window.external.searchUrl()); + document.getElementById('footer').innerHTML = window.external.providerString() + + ' | <a href="http://eric-ide.python-projects.org/">' + + '@ERIC_LINK@</a>'; + document.getElementById('lineEdit').placeholder = window.external.providerString(); + + // Try to change the direction of the page: + + var newDir = '@QT_LAYOUT_DIRECTION@'; + newDir = newDir.toLowerCase(); + if ((newDir != 'ltr') && (newDir != 'rtl')) + newDir = 'ltr'; + document.getElementsByTagName('body')[0].setAttribute('dir', newDir); + } + + function formSubmitted() + { + var string = lineEdit.value; + + if (string.length == 0) + return; + + var url = window.external.searchUrl(string); + window.location.href = url; + } + + // Initialize + if (window.external) { + update(); + } else { + document.addEventListener('_eric_external_created', update); + } + </script> +</head> +<body onload="document.forms[0].lineEdit.select();"> + <div id="header"> + <h1>@HEADER_TITLE@</h1> + <img src="@IMAGE@" width="32" height="32"/> + </div> + <div id="search"> + <form action="javascript:formSubmitted();"> + <fieldset> + <input id="lineEdit" name="lineEdit" type="text" /> + <input type="submit" value="@SUBMIT@"/> + </fieldset> + </form> + </div> + <div id="footer"></div> +</body> +</html>