forked from retoor/devplacepy
Add `_alt_from_url` helper in Python rendering and `altFromUrl` in JS ContentRenderer to generate descriptive alt attributes from image filenames, replacing empty alt strings. Update image embed templates and Avatar component to use derived alt text. Migrate inline `style.width` assignments to CSS custom properties (`--poll-pct`, `--hud-xp`, `--quest-pct`, `--bar-pct`, `--quota-pct`) across PollManager, GameFarm, and profile/quest CSS for better maintainability. Introduce new admin, docs, projects, services, and base CSS utility classes. Add "Code Farm" docs page entry.
22 lines
1.2 KiB
HTML
22 lines
1.2 KiB
HTML
<div class="docs-content" data-render>
|
|
# devRant API: Users & avatars
|
|
|
|
Profiles are public; editing your own needs the token triple (log in below). `score` is the
|
|
user's net stars, `about` is the bio, `github` is the git link, and `skills` is derived from the
|
|
bio. The nested `content.content` holds the user's serialized rants and comments.
|
|
</div>
|
|
{% set devrant_slug = 'devrant-users' %}
|
|
{% include "docs/_devrant_endpoints.html" %}
|
|
<section class="endpoint-card" id="devrant-avatar">
|
|
<header class="endpoint-head">
|
|
<span class="method-badge method-get">GET</span>
|
|
<code class="endpoint-path">/api/avatars/u/{username}.png</code>
|
|
<span class="auth-badge auth-public" title="Minimal role required to call this endpoint">Minimal role: Public</span>
|
|
</header>
|
|
<h3 class="endpoint-title">Avatar image</h3>
|
|
<p class="endpoint-summary">Every <code>user_avatar.i</code> points at this path. It renders a real PNG from the username seed; pass <code>?size=</code> (16-512, default 128).</p>
|
|
<div class="api-tester">
|
|
<img src="/api/avatars/u/devplace.png?size=96" alt="Example devRant avatar" width="96" height="96" class="docs-demo-avatar">
|
|
</div>
|
|
</section>
|