1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

2.6.2 fix (#682)

2.6.2 release:
* fix for regression caused by 2.6.1, invalid static path #681
* add missing base.css
This commit is contained in:
Ilya Kreymer 2021-11-12 17:51:34 -08:00 committed by GitHub
parent a6be76642a
commit e64e58f040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 53 additions and 7 deletions

View File

@ -1,3 +1,9 @@
pywb 2.6.2 changelist
~~~~~~~~~~~~~~~~~~~~~
Fix regression caused by 2.6.1, with static files not being loaded correctly. `#678 <https://github.com/webrecorder/pywb/pull/678>`_
pywb 2.6.1 changelist
~~~~~~~~~~~~~~~~~~~~~

View File

@ -22,7 +22,7 @@ framed_replay: true
# default_locale: en
# uncomment to set available locales
# locales:
# - en
# - es
locales:
- en
- fr

View File

@ -334,8 +334,6 @@ class RewriterApp(object):
if is_proxy and self.is_preflight(environ):
return WbResponse.options_response(environ)
environ['pywb.host_prefix'] = host_prefix
if self.use_js_obj_proxy:
content_rw = self.js_proxy_rw
else:

View File

@ -322,7 +322,7 @@ class BaseInsertView(object):
kwargs.update(params)
kwargs['env'] = env
kwargs['static_prefix'] = env.get('pywb.static_prefix')
kwargs['static_prefix'] = env.get('pywb.static_prefix', '/static')
return template.render(**kwargs)

41
pywb/static/css/base.css Normal file
View File

@ -0,0 +1,41 @@
header {
display: flex;
display: -webkit-box;
display: -moz-box;
display: -webkit-flex;
display: -ms-flexbox;
justify-content: space-between;
-webkit-box-pack: justify;
-moz-box-pack: justify;
-ms-flex-pack: justify;
}
header .language-select {
position: absolute;
top: 10px;
right: 10px;
}
header .language-select ul {
display: inline-block;
list-style-type: none;
margin: 0;
padding: 0;
}
header .language-select ul li {
display: inline-block;
}
header .language-select ul li:not(:last-child):after {
content: ' / ';
}
header .language-select a:link,
header .language-select a:visited,
header .language-select a:active {
text-decoration: none;
}
header .language-select a:hover {
text-decoration: underline;
}

View File

@ -1,4 +1,4 @@
__version__ = '2.6.1'
__version__ = '2.6.2'
if __name__ == '__main__':
print(__version__)

View File

@ -17,6 +17,7 @@ class TestWbIntegration(BaseConfigTest):
def test_pywb_root(self):
resp = self.testapp.get('/pywb/')
self._assert_basic_html(resp)
assert '<link rel="stylesheet" href="/static/css/base.css"' in resp.text
assert 'Search' in resp.text
def test_pywb_root_head(self):