add logo config

This commit is contained in:
ppoffice 2015-07-24 21:46:30 +08:00
parent e82b6fdb83
commit 65a297a1b3
4 changed files with 6 additions and 5 deletions

View File

@ -1,3 +1,6 @@
# Logo
logo: css/images/logo.png # Empty this to unset logo
# Header
menu:
Home: .

View File

@ -1,7 +1,7 @@
<header id="header">
<div id="header-main" class="header-inner">
<div class="outer">
<a href="<%- url_for() %>" id="logo"><%=(theme.showlogo? '<i class="logo"></i>':'')%><span class="site-title"><%= config.title %></span></a>
<a href="<%- url_for() %>" id="logo"><%- (theme.logo? '<i class="logo" style="background-image: url(' + url_for(theme.logo) + ')"></i>':'') %><span class="site-title"><%= config.title %></span></a>
<nav id="main-nav">
<% for (var i in theme.menu){ %>
<a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>

View File

@ -30,7 +30,6 @@ line-height-title = 1.1em
logo-size = 40px
header-height = 64px
header-sub-height = 48px
logo-url = "images/logo.png"
// Sidebar
sidebar = hexo-config("sidebar")

View File

@ -20,7 +20,7 @@ body
background: color-background
font: font-size font-sans
-webkit-text-size-adjust: 100%
a
color: color-link
text-decoration: none
@ -43,9 +43,8 @@ a
.clear
clear: both
.logo
background-image: url(logo-url)
background-size: cover
#container