mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
fix(render): custom cover background image
This commit is contained in:
parent
d67d25fed4
commit
8f9bf29ee5
@ -104,10 +104,12 @@ export function renderMixin (proto) {
|
||||
let path = m[1]
|
||||
|
||||
dom.toggleClass(el, 'add', 'has-mask')
|
||||
if (isAbsolutePath(m[1])) {
|
||||
if (!isAbsolutePath(m[1])) {
|
||||
path = getPath(getBasePath(this.config.basePath), m[1])
|
||||
}
|
||||
el.style.backgroundImage = `url(${path})`
|
||||
el.style.backgroundSize = 'cover'
|
||||
el.style.backgroundPosition = 'center center'
|
||||
}
|
||||
html = html.replace(m[0], '')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user