Use inherited templates for error page.
This commit is contained in:
parent
dd3489b936
commit
350f1c1405
29
qutebrowser/html/base.html
Normal file
29
qutebrowser/html/base.html
Normal file
@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- vim: ft=html fileencoding=utf-8 sts=4 sw=4 et: -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ title }}</title>
|
||||
{% if icon %}
|
||||
<link rel='icon' type='image/png' href="{{ icon }}">
|
||||
{% endif %}
|
||||
<style type="text/css">
|
||||
{% block style %}
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
{% endblock %}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
{% block script %}
|
||||
{% endblock %}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
@ -1,67 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
vim: ft=html fileencoding=utf-8 sts=4 sw=4 et:
|
||||
Based on html/error.html from dwb
|
||||
-->
|
||||
{% extends "base.html" %}
|
||||
{% block style %}
|
||||
{{ super() }}
|
||||
#errorContainer {
|
||||
background: #fff;
|
||||
min-width: 35em;
|
||||
max-width: 35em;
|
||||
position: absolute;
|
||||
top: 2em;
|
||||
left: 1em;
|
||||
padding: 10px;
|
||||
border: 2px solid #eee;
|
||||
-webkit-border-radius: 5px;
|
||||
}
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ title }}</title>
|
||||
<!--<link rel='icon' type='image/png' href="{{ icon }}">-->
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#errorTitleText {
|
||||
font-size: 118%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#errorContainer {
|
||||
background: #fff;
|
||||
min-width: 35em;
|
||||
max-width: 35em;
|
||||
position: absolute;
|
||||
top: 2em;
|
||||
left: 1em;
|
||||
padding: 10px;
|
||||
border: 2px solid #eee;
|
||||
-webkit-border-radius: 5px;
|
||||
}
|
||||
#errorMessageText {
|
||||
font-size: 80%;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
#errorTitleText {
|
||||
font-size: 118%;
|
||||
font-weight: bold;
|
||||
}
|
||||
{% block script %}
|
||||
{{ super() }}
|
||||
function tryagain()
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
function searchFor(uri) {
|
||||
location.href = uri;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
#errorMessageText {
|
||||
font-size: 80%;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function tryagain()
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
function searchFor(uri) {
|
||||
location.href = uri;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="errorContainer">
|
||||
<div id="errorTitle">
|
||||
<p id="errorTitleText">Unable to load page</p>
|
||||
</div>
|
||||
<div id="errorMessage">
|
||||
<p>Problem occurred while loading the URL {{ url }}</p>
|
||||
<p id="errorMessageText">{{ error }}</p>
|
||||
</p>
|
||||
</div>
|
||||
{% block content %}
|
||||
<div id="errorContainer">
|
||||
<div id="errorTitle">
|
||||
<p id="errorTitleText">Unable to load page</p>
|
||||
</div>
|
||||
<div id="errorMessage">
|
||||
<p>Problem occurred while loading the URL {{ url }}</p>
|
||||
<p id="errorMessageText">{{ error }}</p>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form name="bl">
|
||||
<input type="button" value="Try again" onclick="javascript:tryagain()" />
|
||||
<!--<input type="button" value="Search" style="visibility:%s" onclick="javascript:searchFor('%s')" />-->
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<form name="bl">
|
||||
<input type="button" value="Try again" onclick="javascript:tryagain()" />
|
||||
<!--<input type="button" value="Search" style="visibility:%s" onclick="javascript:searchFor('%s')" />-->
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user