<section class="d-dropdown" id="site-map-dropdown">
  <ul class="location-links">
    {{#if showAdminLinks}}
      <li>
        <a href="/admin" class="admin-link"><i class='fa fa-wrench'></i> {{i18n admin_title}}</a>
      </li>
      <li>
        <a href="/admin/flags/active" class="flagged-posts-link">
          <i class='fa fa-flag'></i> {{i18n flags_title}}
          {{#if flaggedPostsCount}}
            <span title='{{i18n notifications.total_flagged}}' class='badge-notification flagged-posts'>{{flaggedPostsCount}}</span>
          {{/if}}
        </a>
      </li>
    {{/if}}
    <li>
      <a href="/latest" title="{{i18n filters.latest.help}}" class="latest-topics-link">{{i18n filters.latest.title}}</a>
    </li>
    {{#if showBadgesLink}}
      <li>
        <a href="{{unbound badgesUrl}}" class="badge-link">{{i18n badges.title}}</a>
      </li>
    {{/if}}
    {{#if showKeyboardShortcuts}}
      <li><a href="#" {{action "keyboardShortcuts"}} class="keyboard-shortcuts-link">{{i18n keyboard_shortcuts_help.title}}</a>
    {{/if}}
    <li>
      <a href="{{unbound faqUrl}}" class="faq-link">{{i18n faq}}</a>
    </li>
    <li>
      {{#link-to 'about'}}{{i18n about.simple_title}}{{/link-to}}
    </li>
    {{#if showMobileToggle}}
      <li><a href="#" class="mobile-toggle-link" {{action "toggleMobileView"}}>{{boundI18n mobileViewLinkTextKey}}</a></li>
    {{/if}}
  </ul>

  {{#if categories}}
    <ul class="category-links">
      <li class="heading" title="{{i18n filters.categories.help}}">
        {{#link-to "discovery.categories"}}{{i18n filters.categories.title}}{{/link-to}}
      </li>

      {{#each categories itemController='site-map-category'}}
        <li class="category">
          {{category-link this allowUncategorized=true showParent=true}}

          {{#if unreadTotal}}
            <a href={{unbound url}} class='badge badge-notification'>{{unreadTotal}}</a>
          {{/if}}

          {{#if showTopicCount}}
            <b class="topics-count">{{unbound topic_count}}</b>
          {{/if}}
        </li>
      {{/each}}
    </ul>
  {{/if}}
</section>
