瀏覽代碼

Add `avatar` setting

George Cushen 9 年之前
父節點
當前提交
20ece690c8
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      exampleSite/config.toml
  2. 1 1
      layouts/partials/home_biography.html

+ 1 - 0
exampleSite/config.toml

@@ -15,6 +15,7 @@ googleAnalytics = ""
   name = "Lena Smith"
   role = "Professor of Artificial Intelligence"
   organization = "Stanford University"
+  avatar = "portrait.jpg"
   email = "test@example.org"
   address = "Stanford AI Lab, Stanford University, California, 90210, USA."
   phone = "888 888 88 88"

+ 1 - 1
layouts/partials/home_biography.html

@@ -2,7 +2,7 @@
     <div class="col-xs-12 col-md-4">
         <div id="profile">
 
-            <div class="portrait" itemprop="image"></div>
+            <div class="portrait" itemprop="image" style="background-image: url('{{ .Site.BaseURL }}img/{{ .Site.Params.avatar }}');"></div>
 
             <div class="portrait-title">
                 <h2 itemprop="name">{{ .Site.Params.name }}</h2>