Skip to content

Commit

Permalink
2.6.2 fix (#682)
Browse files Browse the repository at this point in the history
2.6.2 release:
* fix for regression caused by 2.6.1, invalid static path #681
* add missing base.css
  • Loading branch information
ikreymer authored Nov 13, 2021
1 parent a6be766 commit e64e58f
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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
~~~~~~~~~~~~~~~~~~~~~

Expand Down
6 changes: 3 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ framed_replay: true
# default_locale: en

# uncomment to set available locales
# locales:
# - en
# - es
locales:
- en
- fr

2 changes: 0 additions & 2 deletions pywb/apps/rewriterapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ def render_content(self, wb_url, kwargs, environ):
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:
Expand Down
2 changes: 1 addition & 1 deletion pywb/rewrite/templateview.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def render_to_string(self, env, **kwargs):
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)
Expand Down
41 changes: 41 additions & 0 deletions pywb/static/css/base.css
Original file line number Diff line number Diff line change
@@ -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;
}

2 changes: 1 addition & 1 deletion pywb/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '2.6.1'
__version__ = '2.6.2'

if __name__ == '__main__':
print(__version__)
1 change: 1 addition & 0 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def test_home(self):
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):
Expand Down

0 comments on commit e64e58f

Please sign in to comment.