1.3 KiB · text History 2264215
{% extends "root.html" %}

{% block inner %}
<div class="space-y-4 text-left">
  <h1 class="text-3xl font-bold">Bookmarks</h1>

  {% if bookmarks|length == 0 %}
    <p class="opacity-70">No bookmarks yet. Bookmark a post with the
      <i class="far fa-bookmark"></i> button on any post.</p>
  {% else %}
  <div class="space-y-3">
    {% for b in bookmarks %}
    <article class="card bg-base-200 border border-base-300 p-4">
      <header class="flex items-center justify-between text-sm mb-2 gap-2">
        <a href="/p/{{ b.post_id }}" class="font-semibold link link-hover truncate">
          {{ b.topic_title }} <span class="opacity-60">#{{ b.post_number }}</span>
        </a>
        <span class="flex items-center gap-3 shrink-0">
          <span class="opacity-60 text-xs" title="{{ b.created_abs }}">{{ b.created }}</span>
          <form method="post" action="/p/{{ b.post_id }}/bookmark?next=/bookmarks" class="m-0">
            <button class="btn btn-ghost btn-xs text-error" type="submit">Remove</button>
          </form>
        </span>
      </header>
      {% if b.deleted %}
        <p class="opacity-60 italic">This post was removed.</p>
      {% else %}
        <div class="prose prose-sm max-w-none">{{ b.cooked | safe }}</div>
      {% endif %}
    </article>
    {% endfor %}
  </div>
  {% endif %}
</div>
{% endblock %}