diff --git a/_config.yml b/_config.yml index 5141d95..01f6a46 100644 --- a/_config.yml +++ b/_config.yml @@ -15,10 +15,10 @@ style: primary_color: '#0066CC' # Avatar (You can use local image or image external link) - avatar: images/avatar.png + avatar: /images/avatar.png # Favicon (You can use local image or image external link) - favicon: images/logo.svg + favicon: /images/logo.svg # Image align position, value: left | center img_position: left @@ -37,7 +37,8 @@ style: # First screen first_screen: enable: true - description: Welcome to use Hexo theme Keep + background_img: /images/bg.svg + description: Keep writing and Keep loving. # --------------------------------------------------------------------------------------- diff --git a/source/css/layout/_partial/first-screen.styl b/source/css/layout/_partial/first-screen.styl index 9a37f93..c8f0ab6 100644 --- a/source/css/layout/_partial/first-screen.styl +++ b/source/css/layout/_partial/first-screen.styl @@ -1,12 +1,15 @@ $first-screen-font-size = 2rem; $first-screen-icon-size = 1.6rem; +$temp-img = hexo-config('style.first_screen.background_img'); +$first-screen-img = $temp-img ? $temp-img : '/images/bg.svg'; + .first-screen-container { position: relative; box-sizing: border-box; width: 100%; overflow: hidden; - background: url("/images/bg.svg") center center / cover no-repeat; + background: url($first-screen-img) center center / cover no-repeat; .content { position: relative;