1001 B · text History da3a685
{# List / Visual switch. `toggle_base` is the page path; the choice is
   remembered (account, or a cookie when signed out). #}
<div class="join" role="group" aria-label="View">
  <a href="{{ toggle_base }}{% if '?' in toggle_base %}&amp;{% else %}?{% endif %}view=list"
     class="join-item btn btn-sm {% if view_mode == 'list' %}btn-active{% else %}btn-ghost{% endif %}"
     aria-pressed="{{ 'true' if view_mode == 'list' else 'false' }}" title="List view">
    <i class="fas fa-list" aria-hidden="true"></i><span class="sr-only sm:not-sr-only sm:ml-1">List</span>
  </a>
  <a href="{{ toggle_base }}{% if '?' in toggle_base %}&amp;{% else %}?{% endif %}view=focus"
     class="join-item btn btn-sm {% if view_mode == 'focus' %}btn-active{% else %}btn-ghost{% endif %}"
     aria-pressed="{{ 'true' if view_mode == 'focus' else 'false' }}" title="Visual view">
    <i class="fas fa-table-cells-large" aria-hidden="true"></i><span class="sr-only sm:not-sr-only sm:ml-1">Visual</span>
  </a>
</div>