From 1d98df49d5d6b398fb3524d58e820f3951740cde Mon Sep 17 00:00:00 2001 From: alpaca0x0 Date: Thu, 31 Dec 2020 16:13:31 +0800 Subject: [PATCH] bg-image: url('') --- layout/404.pug | 2 +- layout/includes/header/index.pug | 2 +- layout/includes/layout.pug | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layout/404.pug b/layout/404.pug index 364b7cf..4bd2553 100644 --- a/layout/404.pug +++ b/layout/404.pug @@ -1,5 +1,5 @@ - var top_img = theme.error_404.background || theme.default_top_img -- var bg_img = `background-image: url(${url_for(top_img)})` +- var bg_img = `background-image: url('${url_for(top_img)}')` doctype html html(lang=config.language data-theme=theme.display_mode) diff --git a/layout/includes/header/index.pug b/layout/includes/header/index.pug index 4fe2e2c..7c99d45 100644 --- a/layout/includes/header/index.pug +++ b/layout/includes/header/index.pug @@ -17,7 +17,7 @@ if page.top_img !== false - var top_img = page.top_img || theme.default_top_img if top_img !== false - - var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url(${url_for(top_img)})` : `background: ${top_img}` + - var imgSource = top_img && top_img.indexOf('/') !== -1 ? `background-image: url('${url_for(top_img)}')` : `background: ${top_img}` - var bg_img = top_img ? imgSource : '' - var site_title = is_archive() ? _p('page.archives') : page.title || page.tag || page.category || config.title - var isHomeClass = is_home() ? 'full_page' : 'not-index-bg' diff --git a/layout/includes/layout.pug b/layout/includes/layout.pug index e9d68fe..b264b15 100644 --- a/layout/includes/layout.pug +++ b/layout/includes/layout.pug @@ -31,7 +31,7 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside if (footerBg === true) - var footer_bg = bg_img else - - var footer_bg = theme.footer_bg.indexOf('/') !== -1 ? `background-image: url(${url_for(footerBg)})` : `background: ${footerBg}` + - var footer_bg = theme.footer_bg.indexOf('/') !== -1 ? `background-image: url('${url_for(footerBg)}')` : `background: ${footerBg}` else - var footer_bg = ''