ppoffice 10 роки тому
батько
коміт
65a297a1b3

+ 3 - 0
_config.yml.example

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

+ 1 - 1
layout/_partial/header.ejs

@@ -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>

+ 0 - 1
source/css/_variables.styl

@@ -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")

+ 2 - 3
source/css/style.styl

@@ -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