{% extends "base.html" %}

{% block title %}{{ page.title }}{% endblock title %}
{% block crumb %}about{% endblock crumb %}

{% block content %}
{% if logged_in_admin %}
<header class="term-cmd">
  <div>
    <h1 class="term-title">{{ page.title }}</h1>
    <p class="term-sub">// {{ t(key="about-sub", lang=lang | default(value='sk')) }}</p>
  </div>
  <div class="term-cmd-actions">
    <a href="/admin/about" hx-boost="false" class="btn btn-outline btn-sm">[ {{ t(key="edit", lang=lang | default(value='sk')) }} ]</a>
  </div>
</header>

<article class="card">
  <div class="term-head">
    <span class="term-head-name">~/about.txt</span>
    <span class="term-head-meta term-tag is-blue">{{ t(key="readonly", lang=lang | default(value='sk')) }}</span>
  </div>
  <div class="card-body">
    <div class="term-prose whitespace-pre-line">{{ page.content }}</div>
  </div>
</article>
{% else %}
<header class="term-cmd">
  <div>
    <h1 class="term-title">{{ page.title }}</h1>
    <p class="term-sub">{{ t(key="about-sub", lang=lang | default(value='sk')) }}</p>
  </div>
</header>

<article class="card">
  <div class="term-head">
    <span class="term-head-name">~/about.txt</span>
    <span class="term-head-meta term-tag is-blue">{{ t(key="readonly", lang=lang | default(value='sk')) }}</span>
  </div>
  <div class="card-body">
    <div class="term-prose whitespace-pre-line">{{ page.content }}</div>
  </div>
</article>
{% endif %}
{% endblock content %}
