diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f4e5c29a0..1d6e98597 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -45,6 +45,7 @@ Changed relative paths in `~/.local/share/qutebrowser/userscripts` or `$XDG_DATA_DIR`. Using a binary in `$PATH` won't work anymore with `--userscript`. +- New design for error pages Fixed ~~~~~ diff --git a/MANIFEST.in b/MANIFEST.in index 80f440197..1e7730676 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,7 +2,7 @@ global-exclude __pycache__ *.pyc *.pyo recursive-include qutebrowser *.py recursive-include qutebrowser/html *.html -recursive-include qutebrowser/img *.svg +recursive-include qutebrowser/img *.svg *.png recursive-include qutebrowser/test *.py recursive-include qutebrowser/javascript *.js graft icons diff --git a/README.asciidoc b/README.asciidoc index 4385ad1fb..8aee2e880 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -148,6 +148,7 @@ Contributors, sorted by the number of commits in descending order: * Artur Shaik * Thorsten Wißmann * Alexey "Averrin" Nabrodov +* meles5 * ZDarian * John ShaggyTwoDope Jenkins * Peter Vilim @@ -173,7 +174,6 @@ Contributors, sorted by the number of commits in descending order: * Fritz V155 Reichwald * Franz Fellner * zwarag -* meles5 * error800 * Tim Harder * Thiago Barroso Perrotta diff --git a/qutebrowser/browser/network/filescheme.py b/qutebrowser/browser/network/filescheme.py index 3d92f190c..fc1cb60d7 100644 --- a/qutebrowser/browser/network/filescheme.py +++ b/qutebrowser/browser/network/filescheme.py @@ -25,10 +25,8 @@ import os -from PyQt5.QtCore import QUrl - from qutebrowser.browser.network import schemehandler, networkreply -from qutebrowser.utils import utils, jinja +from qutebrowser.utils import jinja def get_file_list(basedir, all_files, filterfunc): @@ -76,12 +74,6 @@ def dirbrowser_html(path): # pylint: disable=no-member # https://bitbucket.org/logilab/pylint/issue/490/ - folder_icon = utils.resource_filename('img/folder.svg') - file_icon = utils.resource_filename('img/file.svg') - - folder_url = QUrl.fromLocalFile(folder_icon).toString(QUrl.FullyEncoded) - file_url = QUrl.fromLocalFile(file_icon).toString(QUrl.FullyEncoded) - if is_root(path): parent = None else: @@ -101,8 +93,7 @@ def dirbrowser_html(path): directories = get_file_list(path, all_files, os.path.isdir) html = template.render(title=title, url=path, icon='', parent=parent, files=files, - directories=directories, folder_url=folder_url, - file_url=file_url) + directories=directories) return html.encode('UTF-8', errors='xmlcharrefreplace') diff --git a/qutebrowser/html/dirbrowser.html b/qutebrowser/html/dirbrowser.html index 2365cfbea..ab0000c36 100644 --- a/qutebrowser/html/dirbrowser.html +++ b/qutebrowser/html/dirbrowser.html @@ -32,11 +32,11 @@ ul > li { } ul > li { - background-image: url('{{folder_url}}'); + background-image: url('{{ resource_url('img/folder.svg') }}'); } ul.files > li { - background-image: url('{{file_url}}'); + background-image: url('{{ resource_url('img/file.svg') }}'); } {% endblock %} diff --git a/qutebrowser/html/error.html b/qutebrowser/html/error.html index 664725f1e..80bd0cf61 100644 --- a/qutebrowser/html/error.html +++ b/qutebrowser/html/error.html @@ -1,25 +1,59 @@ {% 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; +* { + margin: 0px 0px; + padding: 0px 0px; } -#errorTitleText { - font-size: 118%; - font-weight: bold; +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + -webkit-text-size-adjust: none; + color: #333333; + background-color: #EEEEEE; + font-size: 1.2em; } -#errorMessageText { - font-size: 80%; +#error-container { + margin-left: 20px; + margin-right: 20px; + margin-top: 20px; + border: 1px solid #CCCCCC; + box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.20); + border-radius: 5px; + background-color: #FFFFFF; + padding: 20px 20px; +} + +#header { + border-bottom: 1px solid #CCC; +} + +.qutebrowser-broken { + display: block; + width: 100%; +} + +td { + margin-top: 20px; + color: #555; +} + +h1 { + font-weight: normal; + color: #1e89c6; + margin-bottom: 10px; +} + +ul { + margin-left: 20px; + margin-top: 20px; + margin-bottom: 20px; +} + +li { + margin-top: 10px; + margin-bottom: 10px; } {% endblock %} @@ -35,19 +69,22 @@ function searchFor(uri) { {% endblock %} {% block content %} -
Unable to load page
-Problem occurred while loading the URL {{ url }}
-{{ error }}
- -+ + | +
+ Unable to load page+ Error while opening {{ url }}:+ {{ error }} + + + |
+