The Roles tab is news's feed row: the title opens /roles/{uid}, company,
place and age under it, the badges, a one-line excerpt (summary, else the
description's opening), and ▲ ● ▼ ★ on the right, under the text at 640px.
The company affinity control leaves the row. A passed role and a hidden
company's are dimmed and stay. The filter bar is one row: order, search and
a Filters <details> holding the rest, with a judged select and "Show hidden
companies". The list loads 60 and appends on an IntersectionObserver
sentinel; back from a read page restores the filters, rows and scroll.
GET /api/roles takes offset, defaults to 60 and answers {items, total}.
judged= is a WHERE on roles.vote. Under a ranking the served score and the
order are the stored score moved by the vote (x0.5 pass, x1.2 like, capped
at 1), so a vote shows at once without a rescore. POST and DELETE
/api/roles/{uid}/vote set and clear it; pressing the pressed stance clears.
★ saves; pressed again it calls DELETE /api/applications/{id}, which drops
the application while it is still saved and answers 409 after. save_role no
longer writes the placeholder next step.
The read page (role.html, role.js) is news's reader: a bar with back,
▲ ● ▼ ★ and ↗, the company with its affinity control, place, badges, salary,
summary, the text (fetched posting, else description) and the link out.
It offers Fetch the posting for a teaser and Summarise without a summary,
against the /text and /summarise routes B4 adds. The vote and star buttons
are judge.js, shared by the feed and the reader.
Applications: titles open the read page, the Next column is gone, a Saved
column instead, and the lede says what the page is for.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
48 lines
1.8 KiB
HTML
48 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Role — roledesk{% endblock %}
|
|
|
|
{# The read page of one role, news's reader: a bar with the back arrow,
|
|
▲ ● ▼ ★ and ↗, then the posting. An empty shell like every page;
|
|
`static/role.js` fetches `/api/roles/{uid}` and fills it. #}
|
|
{% block content %}
|
|
<article id="role" class="reader" data-uid="{{ uid }}" aria-busy="true">
|
|
<div class="reader-bar">
|
|
<a class="reader-back" id="role-back" href="/" title="Back to the roles"
|
|
aria-label="Back to the roles">←</a>
|
|
<span class="judge" id="role-judge"></span>
|
|
<span class="spacer"></span>
|
|
<a class="reader-external" id="role-out" target="_blank" rel="noopener"
|
|
title="Open the posting" aria-label="Open the posting" hidden>↗</a>
|
|
</div>
|
|
<div class="reader-body">
|
|
<div class="reader-meta">
|
|
<b id="role-company"></b>
|
|
<span id="role-affinity"></span>
|
|
<span id="role-place"></span>
|
|
<span id="role-age"></span>
|
|
</div>
|
|
<h1 id="role-title">Loading…</h1>
|
|
<div class="role-badges" id="role-badges"></div>
|
|
<p class="reader-salary" id="role-salary" hidden></p>
|
|
<section class="reader-summary" id="role-summary" hidden>
|
|
<h2 class="reader-label">Summary</h2>
|
|
<p></p>
|
|
</section>
|
|
<div class="reader-tools">
|
|
<button type="button" class="secondary" id="role-summarise" hidden>Summarise</button>
|
|
<button type="button" class="secondary" id="role-fetch" hidden>Fetch the posting</button>
|
|
<span class="muted small" id="role-note" role="status"></span>
|
|
</div>
|
|
<div class="prose" id="role-text"></div>
|
|
<p class="reader-out" id="role-out-end" hidden>
|
|
<a target="_blank" rel="noopener"></a>
|
|
</p>
|
|
</div>
|
|
</article>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{{ asset('judge.js') }}"></script>
|
|
<script src="{{ asset('role.js') }}"></script>
|
|
{% endblock %}
|