Roles as a feed, a read page, votes that move the rank, unstar
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>
This commit is contained in:
1 parent
7d31cca394
commit
09c5dde113
13 files changed
+1216
-192
No files matched your search
@@ -3,12 +3,12 @@
|
||||
|
||||
{% block content %}
|
||||
<h1>Applications</h1>
|
||||
<p class="lede">Every role you saved on the Roles tab, and where it stands. Change the status as it moves.</p>
|
||||
<p class="lede">The roles you starred, and where each one stands. Change the status as it moves; while it is still Saved, unstarring the role drops it from here.</p>
|
||||
|
||||
<p id="applications-count" class="count" role="status"></p>
|
||||
<table class="list">
|
||||
<table class="list applications">
|
||||
<thead>
|
||||
<tr><th>Role</th><th>Company</th><th>Status</th><th>Next</th></tr>
|
||||
<tr><th>Role</th><th>Company</th><th>Status</th><th>Saved</th></tr>
|
||||
</thead>
|
||||
<tbody id="applications-list"></tbody>
|
||||
</table>
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{% 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 %}
|
||||
+68
-46
@@ -3,65 +3,87 @@
|
||||
|
||||
{# An empty shell: `static/roles.js` fills it and drives every action. The
|
||||
server renders only the select options, from `app.models` and
|
||||
`plugins.ats.FUNCTIONS`, so they cannot drift from what the store accepts. #}
|
||||
`plugins.ats.FUNCTIONS`, so they cannot drift from what the store accepts.
|
||||
|
||||
The bar is one row at any width: the order, the search box, and a Filters
|
||||
toggle. The toggle is a `<details>` whose summary is lifted into that row
|
||||
by the stylesheet, so the panel it opens is in the flow under the row and
|
||||
pushes the list down rather than covering it. #}
|
||||
{% block content %}
|
||||
<form id="filters" class="filters" autocomplete="off">
|
||||
<select id="f-agent" aria-label="Order">
|
||||
<option value="">Newest</option>
|
||||
</select>
|
||||
<input type="search" id="f-q" placeholder="Search titles" aria-label="Search titles">
|
||||
<input type="text" id="f-company" placeholder="Company" aria-label="Company">
|
||||
<input type="text" id="f-place" placeholder="Place" aria-label="Place">
|
||||
<select id="f-function" aria-label="Function">
|
||||
<option value="">Any function</option>
|
||||
{% for value, label in functions %}
|
||||
<option value="{{ value }}">{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select id="f-remote" aria-label="Remote">
|
||||
<option value="">Any remote</option>
|
||||
{% for value, label in remote_options %}
|
||||
<option value="{{ value }}">{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select id="f-days" aria-label="New in">
|
||||
<option value="">Any time</option>
|
||||
<option value="1">New in 1 day</option>
|
||||
<option value="3">New in 3 days</option>
|
||||
<option value="7">New in 7 days</option>
|
||||
<option value="30">New in 30 days</option>
|
||||
</select>
|
||||
<label class="check">
|
||||
<input type="checkbox" id="f-show-muted"> Show muted
|
||||
</label>
|
||||
<label class="check" id="show-gated" hidden>
|
||||
<input type="checkbox" id="f-gated"> Show gated
|
||||
</label>
|
||||
<form id="filters" class="filters roles-filters" autocomplete="off">
|
||||
<div class="filter-line">
|
||||
<select id="f-agent" aria-label="Order">
|
||||
<option value="">Newest</option>
|
||||
</select>
|
||||
<input type="search" id="f-q" placeholder="Search titles" aria-label="Search titles">
|
||||
</div>
|
||||
<details id="f-more" class="filter-more">
|
||||
<summary>Filters<span id="f-active" class="filter-active"></span></summary>
|
||||
<div class="filter-panel">
|
||||
<input type="text" id="f-company" placeholder="Company" aria-label="Company">
|
||||
<input type="text" id="f-place" placeholder="Place" aria-label="Place">
|
||||
<select id="f-function" aria-label="Function">
|
||||
<option value="">Any function</option>
|
||||
{% for value, label in functions %}
|
||||
<option value="{{ value }}">{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select id="f-remote" aria-label="Remote">
|
||||
<option value="">Any remote</option>
|
||||
{% for value, label in remote_options %}
|
||||
<option value="{{ value }}">{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select id="f-days" aria-label="New in">
|
||||
<option value="">Any time</option>
|
||||
<option value="1">New in 1 day</option>
|
||||
<option value="3">New in 3 days</option>
|
||||
<option value="7">New in 7 days</option>
|
||||
<option value="30">New in 30 days</option>
|
||||
</select>
|
||||
<select id="f-judged" aria-label="Judged">
|
||||
<option value="">Any vote</option>
|
||||
<option value="liked">Liked</option>
|
||||
<option value="unjudged">Unjudged</option>
|
||||
<option value="passed">Passed</option>
|
||||
</select>
|
||||
<label class="check">
|
||||
<input type="checkbox" id="f-show-muted"> Show hidden companies
|
||||
</label>
|
||||
<label class="check" id="show-gated" hidden>
|
||||
<input type="checkbox" id="f-gated"> Show gated
|
||||
</label>
|
||||
</div>
|
||||
</details>
|
||||
</form>
|
||||
|
||||
<p id="roles-count" class="count" role="status"></p>
|
||||
<ul id="roles-list" class="roles"></ul>
|
||||
<div id="roles-end" class="roles-end" aria-hidden="true"></div>
|
||||
|
||||
<template id="role-row">
|
||||
<li class="role">
|
||||
<div class="role-main">
|
||||
<a class="role-title" target="_blank" rel="noopener"></a>
|
||||
<span class="role-company"></span>
|
||||
<span class="affinity" role="group"></span>
|
||||
<div class="role-body">
|
||||
<a class="role-title"></a>
|
||||
<div class="role-meta">
|
||||
<b class="role-company"></b>
|
||||
<span class="role-place"></span>
|
||||
<span class="role-age"></span>
|
||||
</div>
|
||||
<div class="role-badges">
|
||||
<span class="role-remote badge"></span>
|
||||
<span class="role-function badge"></span>
|
||||
<span class="role-score badge"></span>
|
||||
<span class="role-gated"></span>
|
||||
</div>
|
||||
<p class="role-excerpt"></p>
|
||||
</div>
|
||||
<div class="role-meta">
|
||||
<span class="role-place"></span>
|
||||
<span class="role-remote badge"></span>
|
||||
<span class="role-function badge"></span>
|
||||
<span class="role-score badge"></span>
|
||||
<span class="role-gated"></span>
|
||||
<span class="role-age"></span>
|
||||
</div>
|
||||
<button type="button" class="save"></button>
|
||||
<div class="role-actions judge"></div>
|
||||
</li>
|
||||
</template>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ asset('judge.js') }}"></script>
|
||||
<script src="{{ asset('roles.js') }}"></script>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user