Files
devplacepy/devplacepy/templates/docs_base.html
T
retoor 741d7aade6 docs: add block/mute user relations, emoji-sync CLI, and uid indexes
- Add `/block`, `/mute` endpoints with block/unblock and mute/unmute functionality in `routers/relations.py`, hiding blocked users' content everywhere except their own profile while muting only suppresses notifications
- Introduce `devplace emoji-sync` CLI command to regenerate `static/js/emoji-shortcodes.js` from the emoji library, documented in `CLAUDE.md` and wired in `cli.py`
- Create `get_blocked_uids()` database helper and apply it in `content.py` `load_detail()` to filter blocked users' posts from detail views
- Implement `_uid_index()` and `_drop_index()` helpers in `database.py` for unique uid indexes across tables, with `user_relations` added to `SOFT_DELETE_TABLES`
- Document new routes in `AGENTS.md` and `README.md`, including emoji shortcodes rendering behavior distinct from the emoji picker
2026-06-19 08:06:09 +00:00

65 lines
2.9 KiB
HTML

{% extends "base.html" %}
{% block extra_head %}
<link rel="stylesheet" href="{{ static_url('/static/css/sidebar.css') }}">
<link rel="stylesheet" href="{{ static_url('/static/css/docs.css') }}">
<link rel="stylesheet" href="{{ static_url('/static/css/components-docs.css') }}">
{% endblock %}
{% block content %}
<script>window.DEVPLACE_DOCS = {{ {
"base": base,
"loggedIn": user is not none,
"username": (user.get('username') if user else ''),
"apiKey": (user.get('api_key') if user else ''),
"isAdmin": is_admin(user)
} | tojson | safe }};</script>
<div class="docs-layout">
<aside class="sidebar-card" role="navigation" aria-label="Documentation">
<div class="sidebar-heading" role="heading" aria-level="2">Documentation</div>
<form class="docs-search-form" method="get" action="/docs/search.html" role="search">
<input type="search" name="q" value="{{ search_query|default('', true) }}" placeholder="Search docs…" aria-label="Search documentation" class="docs-search-input">
</form>
<div class="sidebar-nav">
<a href="/docs/search.html" class="sidebar-link {% if current == 'search' %}active{% endif %}">
<span class="icon">&#x1F50D;</span>
Search
</a>
{% for audience, tiers in nav %}
<div class="sidebar-heading sidebar-tier" role="heading" aria-level="2">{{ audience }}</div>
{% for section, section_pages in tiers %}
<div class="sidebar-heading sidebar-subheading" role="heading" aria-level="3">{{ section }}</div>
{% for p in section_pages %}
<a href="/docs/{{ p.slug }}.html" class="sidebar-link sidebar-link-nested {% if p.slug == current %}active{% endif %}">
<span class="icon">&#x1F4D8;</span>
{{ p.title }}
</a>
{% endfor %}
{% endfor %}
{% endfor %}
</div>
<div class="sidebar-heading docs-download-heading" role="heading" aria-level="2">Download</div>
<div class="sidebar-nav">
<a href="/docs/download.html" class="sidebar-link"><span class="icon">&#x1F4E5;</span> Single HTML</a>
<a href="/docs/download.md" class="sidebar-link"><span class="icon">&#x1F4DD;</span> Markdown</a>
</div>
</aside>
<article class="docs-main">
{% if kind == 'search' %}
{% if search_mode == 'agent' %}
{% include "docs/_chat.html" %}
{% else %}
{% include "docs/_search.html" %}
{% endif %}
{% elif kind == 'api' %}
{% include "docs/_api_page.html" %}
{% elif prose_html %}
{{ prose_html | safe }}
{% else %}
{% include "docs/" ~ current ~ ".html" %}
{% endif %}
</article>
</div>
{% endblock %}
{% block extra_js %}
<script type="module" src="{{ static_url('/static/js/ApiDocs.js') }}"></script>
{% endblock %}