mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
ui fixes:
- fix static prefix path customization - fix old ui logo link without locales
This commit is contained in:
parent
af04deabe6
commit
e687ec673c
@ -107,6 +107,7 @@ class FrontEndApp(object):
|
|||||||
|
|
||||||
self.templates_dir = config.get('templates_dir', 'templates')
|
self.templates_dir = config.get('templates_dir', 'templates')
|
||||||
self.static_dir = config.get('static_dir', 'static')
|
self.static_dir = config.get('static_dir', 'static')
|
||||||
|
self.static_prefix = config.get('static_prefix', 'static')
|
||||||
|
|
||||||
metadata_templ = os.path.join(self.warcserver.root_dir, '{coll}', 'metadata.yaml')
|
metadata_templ = os.path.join(self.warcserver.root_dir, '{coll}', 'metadata.yaml')
|
||||||
self.metadata_cache = MetadataCache(metadata_templ)
|
self.metadata_cache = MetadataCache(metadata_templ)
|
||||||
@ -118,8 +119,8 @@ class FrontEndApp(object):
|
|||||||
specific routes (proxy mode, record)
|
specific routes (proxy mode, record)
|
||||||
"""
|
"""
|
||||||
self.url_map = Map()
|
self.url_map = Map()
|
||||||
self.url_map.add(Rule('/static/_/<coll>/<path:filepath>', endpoint=self.serve_static))
|
self.url_map.add(Rule('/{0}/_/<coll>/<path:filepath>'.format(self.static_prefix), endpoint=self.serve_static))
|
||||||
self.url_map.add(Rule('/static/<path:filepath>', endpoint=self.serve_static))
|
self.url_map.add(Rule('/{0}/<path:filepath>'.format(self.static_prefix), endpoint=self.serve_static))
|
||||||
self.url_map.add(Rule('/collinfo.json', endpoint=self.serve_listing))
|
self.url_map.add(Rule('/collinfo.json', endpoint=self.serve_listing))
|
||||||
|
|
||||||
if self.is_valid_coll('$root'):
|
if self.is_valid_coll('$root'):
|
||||||
|
@ -156,7 +156,7 @@ This file is part of pywb, https://github.com/webrecorder/pywb
|
|||||||
|
|
||||||
if (window.banner_info.logoImg) {
|
if (window.banner_info.logoImg) {
|
||||||
var logo = document.createElement("a");
|
var logo = document.createElement("a");
|
||||||
logo.setAttribute("href", "/" + (window.banner_info.locale ? window.banner_info.locale + "/" : ""));
|
logo.setAttribute("href", "/" + (window.banner_info.curr_locale ? window.banner_info.curr_locale + "/" : ""));
|
||||||
logo.setAttribute("class", "_wb_linked_logo");
|
logo.setAttribute("class", "_wb_linked_logo");
|
||||||
|
|
||||||
var logoContents = "";
|
var logoContents = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user