diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/static/css/site.css | 4 | ||||
-rw-r--r-- | src/static/js/client-util.js | 17 | ||||
-rw-r--r-- | src/static/js/client/image-overlay.js | 2 | ||||
-rw-r--r-- | src/urls-default.yaml | 2 |
4 files changed, 16 insertions, 9 deletions
diff --git a/src/static/css/site.css b/src/static/css/site.css index 8bb978e0..e38b5e0d 100644 --- a/src/static/css/site.css +++ b/src/static/css/site.css @@ -3053,12 +3053,12 @@ html[data-language-code="preview-en"][data-url-key="localized.home"] #content max-width: 375px; } - html[data-url-key="localized.home"] #page-container.showing-sidebar-left .grid-listing > .grid-item:not(:nth-child(n+7)) { + html[data-url-key="localized.home"] #page-container.showing-sidebar-left .grid-listing > .grid-item:not(:nth-child(n+10)) { flex-basis: 23%; margin: 15px; } - html[data-url-key="localized.home"] #page-container.showing-sidebar-left .grid-listing > .grid-item:nth-child(n+7) { + html[data-url-key="localized.home"] #page-container.showing-sidebar-left .grid-listing > .grid-item:nth-child(n+10) { flex-basis: 18%; margin: 10px; } diff --git a/src/static/js/client-util.js b/src/static/js/client-util.js index f06b707a..71112313 100644 --- a/src/static/js/client-util.js +++ b/src/static/js/client-util.js @@ -1,12 +1,19 @@ /* eslint-env browser */ export function rebase(href, rebaseKey = 'rebaseLocalized') { - const relative = (document.documentElement.dataset[rebaseKey] || '.') + '/'; - if (relative) { - return relative + href; - } else { - return href; + let result = document.documentElement.dataset[rebaseKey] || './'; + + if (!result.endsWith('/')) { + result += '/'; + } + + if (href.startsWith('/')) { + href = href.slice(1); } + + result += href; + + return result; } export function cssProp(el, ...args) { diff --git a/src/static/js/client/image-overlay.js b/src/static/js/client/image-overlay.js index b51d57a4..1e0ebd75 100644 --- a/src/static/js/client/image-overlay.js +++ b/src/static/js/client/image-overlay.js @@ -170,7 +170,7 @@ function getImageSources(details) { }; } else { return { - mainSrc: originalSrc, + mainSrc: details.originalSrc, thumbSrc: null, mainThumb: '', thumbThumb: '', diff --git a/src/urls-default.yaml b/src/urls-default.yaml index 10bc0d23..dce871f6 100644 --- a/src/urls-default.yaml +++ b/src/urls-default.yaml @@ -11,7 +11,7 @@ yamlAliases: # part of a build. This is so that multiple builds of a wiki can coexist # served from the same server / file system root: older builds' HTML files # refer to earlier values of STATIC_VERSION, avoiding name collisions. - - &staticVersion 3p4 + - &staticVersion 4p1 data: prefix: 'data/' |