<div class="sidebar">
  <div class="sidebar-inner">
    <ul class="main-menu">
      <% if (page.type == 'book-en-us') { %>
        <%- partial('partials/main_menu_en', { context: 'nav' }) %>
      <% } else {%>
        <%- partial('partials/main_menu', { context: 'nav' }) %>
      <% } %>
    </ul>
    <div class="list">
      <h2>
        <% if (page.type == 'book-en-us') { %>
          <%-
          type === 'exercises'
              ? 'Exercises'
              : type === 'book-zh-cn'
              ? 'Main'
              : type === 'answers'
                  ? 'Reference Answers'
                  : type === 'about'
                  ? 'About'
                  : (type.charAt(0).toUpperCase() + type.slice(1)) 
          %>
        <% } else {%>
          <%-
          type === 'exercises'
            ? '习题'
            : type === 'book-zh-cn'
              ? '正文'
              : type === 'answers'
                ? '参考答案'
                : type === 'about'
                  ? '关于'
                  : (type.charAt(0).toUpperCase() + type.slice(1)) 
          %>
        <% } %>
      </h2>
      <%- partial('partials/toc', { type: type }) %>
    </div>
  </div>
</div>
