<h2 style="display: flex; justify-content: space-between; align-items: center;">
  Posts
  <span
    style="cursor: pointer;"
    hx-on:click="document.getElementById('sidebar').innerHTML = ''"
  >X</span>
</h2>
<ul>
  {{#each posts}}
    <li><a href="{{path}}">{{title}} - {{date}}</a></li>
  {{/each}}
</ul>