博客上的多个管理员:如何使用不同的描述和社交图标在自己的帖子中显示每个管理员

时间:2017-11-07 10:48:21

标签: html xml blogger

我有博客博客,我的朋友有兴趣加入我的博客。我做了两个作者。请问如何在自己的帖子中显示每个Google+个人资料,其中包含不同的描述和社交图标?

以下是我的Google+个人资料框的代码:

<!-- blog_post_author_profile -->    
         <b:if cond='data:blog.pageType == &quot;item&quot;'>
           <fieldset><legend><h2>About The Author</h2></legend><br/>
           <div class='authorboxwrap'>
           <div class='authorboxfull'>
           <div class='avatar-container'>
            <a href=''>
             <img class='author_avatar img-circle' expr:alt='data:post.author' expr:src='data:post.authorPhoto.url' height='96' width='96'/>
            </a>
           </div>
           <div class='author_description_container'>
            <h4><a href='https://plus.google.com/u/0/106865899677497908784' rel='author'><data:post.author/></a></h4>
             <p>
          <data:post.authorAboutMe/>       
             </p>
          <div class='authorsocial'>
             <a class='img-circle' href='http://facebook.com/munir.a.narogo' target='_blank'><i class='fa fa-facebook'/></a>
             <a class='' href='http://twitter.com/manmunir' target='_blank'><i class='fa fa-twitter'/></a>
             <a class='' href='http://instagram.com/manmunir' target='_blank'><i class='fa fa-instagram'/></a>
            <br/><br/><p>Tech Blogger. He is a Technology Enthusiast with a keen eye on the Cyberspace and other tech related developments.</p>
          <div class='clr'/>
          </div>
          </div>
          </div>
             </div></fieldset>
          </b:if>
  

这是CSS

.authorboxwrap {margin-bottom: 30px;} .avatar-container {width: 100%;float: left;padding: 12px 13px;} .avatar-container img {border-radius: 50%;width: 125px;height: auto;border: 5px solid transparent;box-shadow: 0px 0px 20px -5px #000;-moz-box-shadow: 0px 0px 20px -5px #000;-webkit-box-shadow: 0px 0px 20px -5px #000;-ms-box-shadow: 0px 0px 20px -5px #000;-o-box-shadow: 0px 0px 20px -5px #000;} .author_description_container {margin-right: 70px;} .author_description_container h4 {font-weight:600;font-size: 16px;display: block;margin-bottom: 10px;} .author_description_container h4 a{color: #444;} .author_description_container p {font-size: 12px;line-height: 1.7;margin-bottom: 15px;} .authorsocial a {display: inline-block;margin-right: 5px;text-align: center;float:left;margin-right:2px;} .authorsocial a i {width: 30px;height: 20px;padding: 8px 9px;display: block;background: #E9E9E9!important;color: #555;} .author_description_container {margin-left: 120px;} .avatar-container {width: 120px;} .avatar-container img{width:100%;height:auto;} .clr { clear:both; float:none; }

2 个答案:

答案 0 :(得分:0)

使用data:post.author.nameb:if一起显示特定作者的特定内容,如下所示

<b:if cond='data:post.author.name == "first author"'>
  <!-- first author description and social icons -->
<b:elseif cond='data:post.author.name == "second author"'>
  <!-- second author description and social icons -->
</b:if>

答案 1 :(得分:0)

最后它奏效了!但这是我使用的条件标签

<b:if cond='data:post.author == "First Author Name"'>
<!-- first author description and social icons -->
<b:elseif cond='data:post.author == "Second Author Name"'/>
<!-- second author description and social icons -->
</b:if>

你的代码给了我一个提示,但它有效。非常感谢。