The second half of the superadministrator's job: not just who may do things, but
what they get to do that nobody else does.
**Identidad** is everything that used to be frozen in config.yaml — the name and
the one-line tagline in all three languages, the association's accounts
elsewhere, a public email, a city and street, a share picture and the footer
line. It commits data/site.yaml the way Marca commits data/brand.yaml.
Hugo cannot have config.yaml overridden by a data file, so the name and tagline
are read through two new partials that prefer the data file and fall back to the
config; every template showing either calls one, so they cannot drift. A site
with no data/site.yaml builds byte-for-byte what it built before — asserted by
building both ways and diffing with the stylesheet fingerprint normalised.
The contact fields are not decoration: they become ContactPoint and
PostalAddress in the Organization schema, which is what puts an association in a
local result rather than only a web one, and the social links become sameAs,
which is how an engine knows an Instagram account and this site are one body.
**Marca** grows a typeface and a roundness. Four system stacks — nothing
downloaded, which is deliberate and a GDPR matter — or an uploaded .woff2,
sniffed by its wOF2 signature, capped at 400 KB, named ahead of the old stack so
a font that fails to load leaves a readable site. The fold-out warning covers
missing accented glyphs, file size, synthesised bold, and licensing: a font is
software, a desktop licence is not a webfont licence, and that liability follows
the platform to every organisation it is installed for. SIL OFL and Apache-2.0
are named, with seven places to find them.
**Three tools.** Estado del sistema exercises the content token against the
repository rather than checking it is non-empty — "present" was never the
problem, a wrong scope broke publishing for three phases while looking fine —
and reports mail, backups, disk and every documented setting the container does
not have. It changes nothing on purpose. Registro de actividad records the dozen
acts that change who can do what; the actor is cleared and not cascaded on
erasure, and log() never raises, because an administrator who could not be
appointed because the note about it could not be saved is worse than a gap in
the notes. Biblioteca de medios lists every picture with the posts that use it
and, finally, shows the orphans — a picture whose post was deleted has stayed in
the repository, deployed and unreferenced, for the life of this site with no way
to see one.
Two bugs found by looking at the rendered pages rather than at the tests:
**Gestión had disappeared from the superadministrator's own navigation.**
base.html asked `g.member.role in ('owner', 'admin')`, right until a role
appeared above both. 622 tests passed while it was broken, because every one of
them signed in as an admin or below. The templates now call the same
`is_at_least` the handlers do, and test_navigation.py covers the tier above
admin — verified by reintroducing the tuple and watching it fail.
And the status screen counted the tombstone as a suspended member.
Migration 8 is plain ADD COLUMNs; `activity` and `site` are new tables, so
CREATE TABLE IF NOT EXISTS covers them with no step at all. The erase guard
caught both the moment they existed, which is that test doing its job.
627 tests pass. Hugo builds clean with the pipeline's flags, both with and
without the two data files.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
113 lines
4.8 KiB
HTML
113 lines
4.8 KiB
HTML
{# Gestión → Identidad: what the site is called and where to find it.
|
|
|
|
Everything here used to be in config.yaml, which meant it could only be
|
|
changed by somebody with the repository. The fields show their current value
|
|
as a placeholder rather than as a value, deliberately: a form prefilled with
|
|
the fallback saves the fallback the first time anybody presses the button,
|
|
and the default is frozen from then on. #}
|
|
{% extends "base.html" %}
|
|
{% block title %}Identidad{% endblock %}
|
|
|
|
{% block main %}
|
|
<div class="feed-head">
|
|
<h1>Identidad</h1>
|
|
<a class="linkish" href="{{ url_for('home.gestion') }}">Volver a Gestión</a>
|
|
</div>
|
|
|
|
<p class="muted">
|
|
Cómo se llama el sitio, qué dice que es y dónde encontrarlo. Lo de aquí
|
|
alimenta también los datos estructurados: es lo que lee un buscador —o una IA
|
|
que responde preguntas— para saber que esta asociación y esas cuentas son el
|
|
mismo cuerpo.
|
|
</p>
|
|
|
|
{% if state.updated_at and not state.published_at %}
|
|
<section class="panel panel--attention">
|
|
<div class="panel__head"><h2>Pendiente de publicar</h2></div>
|
|
<p class="panel__row">
|
|
Guardado aquí, pero no ha llegado al sitio público: no se pudo contactar
|
|
con el servidor de git la última vez.
|
|
</p>
|
|
<form method="post" action="{{ url_for('identity.publish') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="btn" type="submit">Reintentar publicar</button>
|
|
</form>
|
|
</section>
|
|
{% endif %}
|
|
|
|
<form class="card" method="post" action="{{ url_for('identity.edit') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
|
|
<h2 class="section-title">Nombre y lema</h2>
|
|
<p class="muted small">
|
|
Uno por idioma. El lema es la frase que sale al compartir un enlace, la que
|
|
describe al sitio en los buscadores y la primera línea de
|
|
<span class="mono">llms.txt</span>. Déjalo vacío para no cambiar lo que hay.
|
|
</p>
|
|
|
|
{% for code, label, _name, _tagline in languages %}
|
|
<fieldset class="fieldset">
|
|
<legend>{{ label }}</legend>
|
|
<label for="name-{{ code }}">Nombre</label>
|
|
<input id="name-{{ code }}" name="name-{{ code }}" type="text" maxlength="80"
|
|
value="{{ state.languages[code].stored_name }}"
|
|
placeholder="{{ state.languages[code].name }}">
|
|
|
|
<label for="tagline-{{ code }}">Lema</label>
|
|
<textarea id="tagline-{{ code }}" name="tagline-{{ code }}" rows="2"
|
|
maxlength="300"
|
|
placeholder="{{ state.languages[code].tagline }}">{{ state.languages[code].stored_tagline }}</textarea>
|
|
</fieldset>
|
|
{% endfor %}
|
|
|
|
<h2 class="section-title">Perfiles</h2>
|
|
<p class="muted small">
|
|
Las cuentas de la asociación en otros sitios. Salen en el pie de página y
|
|
como <span class="mono">sameAs</span> en los datos estructurados, que es
|
|
como un buscador sabe que esa cuenta de Instagram y esta web son lo mismo.
|
|
</p>
|
|
{% for key, label, placeholder in networks %}
|
|
<label for="social-{{ key }}">{{ label }}</label>
|
|
<input id="social-{{ key }}" name="social-{{ key }}" type="url" maxlength="300"
|
|
value="{{ state.social[key] }}" placeholder="{{ placeholder }}">
|
|
{% endfor %}
|
|
|
|
<h2 class="section-title">Contacto y lugar</h2>
|
|
<p class="muted small">
|
|
Público, y pensado para que lo lea una persona tanto como un buscador: una
|
|
dirección y una ciudad son lo que pone a una asociación en un resultado
|
|
local y no sólo en uno web.
|
|
</p>
|
|
<label for="email">Correo público</label>
|
|
<input id="email" name="email" type="email" maxlength="120" value="{{ state.email }}"
|
|
placeholder="hola@vienalatina.com">
|
|
|
|
<label for="phone">Teléfono <span class="muted small">(opcional)</span></label>
|
|
<input id="phone" name="phone" type="text" maxlength="40" value="{{ state.phone }}">
|
|
|
|
<label for="city">Ciudad</label>
|
|
<input id="city" name="city" type="text" maxlength="80" value="{{ state.city }}"
|
|
placeholder="Wien">
|
|
|
|
<label for="street">Calle <span class="muted small">(opcional)</span></label>
|
|
<input id="street" name="street" type="text" maxlength="160" value="{{ state.street }}">
|
|
|
|
<h2 class="section-title">Al compartir, y el pie</h2>
|
|
<label for="share_image">Imagen por defecto <span class="muted small">(opcional)</span></label>
|
|
<input id="share_image" name="share_image" type="text" maxlength="200"
|
|
value="{{ state.share_image }}" placeholder="/uploads/algo.png">
|
|
<p class="muted small">
|
|
La que sale al compartir un artículo que no tiene foto propia. Si la dejas
|
|
vacía se usa el logotipo, que casi siempre es lo que quieres: esto es para
|
|
cuando prefieres otra cosa —una foto de la ciudad, por ejemplo.
|
|
</p>
|
|
|
|
<label for="footer_text">Texto del pie <span class="muted small">(opcional)</span></label>
|
|
<input id="footer_text" name="footer_text" type="text" maxlength="200"
|
|
value="{{ state.footer_text }}">
|
|
<p class="muted small">Si lo dejas vacío, el pie pone el nombre y el año.</p>
|
|
|
|
<button class="btn" type="submit">Guardar</button>
|
|
</form>
|
|
{% endblock %}
|