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

ui: logo: don't require '/static/' before logo in old ui - consistent with new ui, update docs

This commit is contained in:
Ilya Kreymer 2022-01-27 11:06:08 -08:00
parent 08826f886b
commit 8d85fefa57
2 changed files with 6 additions and 4 deletions

View File

@ -25,12 +25,13 @@ To enable the logo set the ``ui.logo`` property in ``config.yaml`` to point to t
The URL can be any image URL, including a URL served from the static directory.
For example, to add the default pywb logo to the banner, use the following in the config:
For example, to add the default pywb logo to the banner, use the following in the config, which will
load the logo from ``./static/pywb-logo-sm.png``
.. code:: yaml
ui:
logo: /static/pywb-logo-sm.png
logo: pywb-logo-sm.png
New Vue-based UI (Alpha)

View File

@ -160,8 +160,9 @@ This file is part of pywb, https://github.com/webrecorder/pywb
logo.setAttribute("class", "_wb_linked_logo");
var logoContents = "";
logoContents += "<img src='" + window.banner_info.logoImg + "' alt='" + window.banner_info.logoAlt + "'>";
logoContents += "<img src='" + window.banner_info.logoImg + "' class='_wb_mobile' alt='" + window.banner_info.logoAlt + "'>";
var logoUrl = window.banner_info.staticPrefix + "/" + window.banner_info.logoImg;
logoContents += "<img src='" + logoUrl + "' alt='" + window.banner_info.logoAlt + "'>";
logoContents += "<img src='" + logoUrl + "' class='_wb_mobile' alt='" + window.banner_info.logoAlt + "'>";
logo.innerHTML = logoContents;
this.banner.appendChild(logo);