<%
  var hasInnerArchive = theme.smart_menu.innerArchive
  var hasFriends = theme.smart_menu.friends
  var hasAboutme = theme.smart_menu.aboutme
%>
<div class="tools-col" :class="{show:isShow,hide:!isShow}" @click="stop">
  <div class="tools-nav header-menu">
    <% 
    var count = 0
    for(let menu_name in theme.smart_menu) {
      if(theme.smart_menu[menu_name]) count++
    }
    %>
    <ul style="width:70%">
    <% var divide = 100 / count + '%' 
    for (let menu_name in theme.smart_menu){ 
      if(theme.smart_menu[menu_name]){ %>
      <li style="width: <%= divide %>" @click="openSlider($event, '<%-menu_name%>')"><a href="javascript:void(0)" :class="{active:<%-menu_name%>}"><%= __(theme.smart_menu[menu_name]) %></a></li>
      <% }
      } %>
    </ul>
  </div>
  <div class="tools-wrap">
    <%if(hasInnerArchive){%>
    	<section class="tools-section tools-section-all" v-show="innerArchive">
        <div class="search-wrap">
          <input class="search-ipt" v-model="search" type="text" placeholder="<%=__('search') %>…">
          <i class="icon" :class="search?'icon-close':'icon-search'" @click="clearChose"></i>
        </div>
        <div class="widget tagcloud search-tag">
          <div>
            <span ><%=__('tags') %>:</span>
            <label class="bui-switch-label bui-switch-animbg">
              <input type="checkbox" @click="showTags=!showTags"/>
              <i class="bui-switch"></i>
            </label>
            <span style="margin-left: 50px;"><%=__('categories') %>:</span>
            <label class="bui-switch-label bui-switch-animbg">
              <input type="checkbox" @click="showCategories=!showCategories"/>
              <i class="bui-switch"></i>
            </label>
          </div>
          <ul class="article-tag-list" v-show="showTags">
            <% site.tags.forEach(function(tag, i){ %> 
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" @click="chose('<%-tag.name%>','#')" class="js-tag color<%= tag.name.length % 5 + 1 %>"><%-tag.name%></a>
              </li>
            <% }) %>
            <div class="clearfix"></div>
          </ul>
          <ul class="article-tag-list" v-show="showCategories">
            <% site.categories.forEach(function(category, i){ %> 
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" @click="chose('<%-category.name%>','$')" class="js-tag color<%= category.name.length % 5 + 1 %>"><%-category.name%></a>
              </li>
            <% }) %>
            <div class="clearfix"></div>
          </ul>
        </div>
        <ul class="search-ul">
          <li class="search-li" v-for="item in items" v-show="!item.isHide">
            <a :href="item.path|urlformat" class="search-title"><i class="icon-quo-left icon"></i>
              <span v-text="item.title"></span>
            </a>
            <p class="search-time">
              <i class="icon-calendar icon"></i>
              <span v-text="item.date"></span>
            </p>
            <p class="search-category" v-if="item.categories.length">
              <i class="icon-book icon" ></i>
              <span v-for="category in item.categories" @click="chose(category.name, '$')" v-text="category.name"></span>
            </p>
            <p class="search-tag" v-if="item.tags.length">
              <i class="icon-price-tags icon" ></i>
              <span v-for="tag in item.tags" @click="chose(tag.name, '#')" v-text="tag.name"></span>
            </p>
          </li>
        </ul>
    	</section>
    <%}%>
    <%if(hasFriends){%>
    	<section class="tools-section tools-section-friends" v-show="friends">
  		<%if(theme.friends && theme.friends.length != 0){%>
        <ul class="search-ul">
          <% for (var i in theme.friends){ %>
            <li class="search-li">
              <a href="<%- url_for(theme.friends[i]) %>" target="_blank" class="search-title"><i class="icon-quo-left icon"></i><%= i %></a>
            </li>
          <% } %>
        </ul>
  		<%}%>
    	</section>
    <%}%>
    <%if(hasAboutme){%>
    	<section class="tools-section tools-section-me" v-show="aboutme">
      <%if(theme.aboutme){%>
        <div class="aboutme-wrap" id="js-aboutme"><%-theme.aboutme%></div>
      <%}%>
    	</section>
    <%}%>
  </div>
</div>