coulomb-social/coulomb_social/templates/spaces/detail.html
tegwick 1cedd8f219 Render space pages from Forgejo markdown (CSOC-WP-0004-T04)
Fetch raw files from Forgejo, sanitize markdown to HTML, and show them on
space detail. Ship a public demo fixture path and seed_demo_space command.
2026-08-12 01:56:30 +02:00

64 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ page.title|default:space.title }} — {{ site_name }}{% endblock %}
{% block extra_head %}
<style>
.md-body h1 { font-size: 1.75rem; margin-top: 0; }
.md-body h2 { font-size: 1.25rem; margin-top: 1.5rem; }
.md-body pre {
background: #f5f5f5;
padding: 0.85rem 1rem;
border-radius: 6px;
overflow-x: auto;
}
.md-body code { font-family: ui-monospace, monospace; font-size: 0.9em; }
.md-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.md-body th, .md-body td {
border: 1px solid #e5e5e5;
padding: 0.4rem 0.65rem;
text-align: left;
}
.md-body blockquote {
margin: 1rem 0;
padding-left: 1rem;
border-left: 3px solid var(--color-primary);
color: var(--color-muted);
}
.content-meta { font-size: 0.85rem; margin-top: 0.5rem; }
.content-error {
border-color: #fcd34d;
background: #fffbeb;
}
</style>
{% endblock %}
{% block content %}
<p class="muted" style="margin:0 0 0.5rem;">
<a href="{% url 'core:app_home' %}">← Spaces</a>
</p>
<h1>{{ space.title }}</h1>
{% if space.description %}
<p class="muted">{{ space.description }}</p>
{% endif %}
{% if page.error %}
<div class="card content-error">
<h2 style="margin-top:0;">Content unavailable</h2>
<p style="margin-bottom:0;">{{ page.error }}</p>
{% if space.has_content_binding %}
<p class="content-meta muted">
Binding: {{ space.forgejo_owner }}/{{ space.forgejo_repo }}
· {{ page.path }} @ {{ space.default_branch }}
</p>
{% endif %}
</div>
{% else %}
<div class="card md-body">
{{ page.html|safe }}
</div>
<p class="content-meta muted">
Source: {{ page.source }} · {{ page.path }}
{% if space.has_content_binding %}
· {{ space.forgejo_owner }}/{{ space.forgejo_repo }}@{{ space.default_branch }}
{% endif %}
</p>
{% endif %}
{% endblock %}