mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-08 12:07:06 +08:00
Update page.js
修复背景渐变色无法生效
This commit is contained in:
@@ -82,7 +82,7 @@ hexo.extend.helper.register('getBgPath', path => {
|
||||
|
||||
const absoluteUrlPattern = /^(?:[a-z][a-z\d+.-]*:)?\/\//i
|
||||
const relativeUrlPattern = /^(\.\/|\.\.\/|\/|[^/]+\/).*$/
|
||||
const colorPattern = /^(#|rgb|rgba|hsl|hsla|linear-gradient|radial-gradient)/i
|
||||
const colorPattern = /^(#|rgb|rgba|hsl|hsla)/i
|
||||
|
||||
if (colorPattern.test(path)) {
|
||||
return `background-color: ${path};`
|
||||
|
||||
Reference in New Issue
Block a user