Roles is newsdesk's feed: rail, feed and reader, with read state and tags
The Roles tab takes newsdesk's shell, ported from its index.html and
app.css rather than rewritten: a filter rail (Show read, Best first or
Newest first, first seen, tag chips with counts, the old filters behind a
disclosure), the feed in newsdesk's row layout (score gutter, title,
company, place, badges, age, tags, the summary as excerpt, judge buttons)
and the reader as a third column that replaces the list on a phone. The
router pushes /roles/{uid}, which the server also renders with the reader
open, so the separate read page and role.js go. j/k, u/n/d, S, Enter,
Escape, o, /, f and c work as in newsdesk. The phone rules come with their
comments.
Two things the row lacked: roles.read_at, stamped when the reader opens a
role or a vote is cast, behind include_read on /api/roles; and role_tags,
written by summarise alongside the summary and served with counts by
/api/filters, filtered in SQL before LIMIT. Migration 5.
PyCharm run configurations in .run/ for serve, pull, seed and pytest.
core.autocrlf=input is set locally so a Windows-side checkout commits LF.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
515d2250fc
commit
a9290a6926
23 files changed
+2252
-715
No files matched your search
+14
-3
@@ -1,6 +1,13 @@
|
||||
{# The frame every page is in. The top bar is `TABS` from app/web/pages.py
|
||||
plus the cog, and the cog's sub-tabs are `SETTINGS` there: adding a page is
|
||||
one entry in one of those lists, never a link here. #}
|
||||
one entry in one of those lists, never a link here.
|
||||
|
||||
Three blocks let a page go past the default frame, which only the Roles
|
||||
page does: `body_attrs` for attributes on `<body>`, `header_tools` for
|
||||
controls between the brand and the tabs (its burger and search box), and
|
||||
`page` to replace the centred `<main>` with a layout of its own (its rail,
|
||||
feed and reader). A page setting `active_path` lights the tab for that path
|
||||
rather than its own, which is how `/roles/{uid}` keeps Roles lit. #}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -29,13 +36,15 @@
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<link rel="stylesheet" href="{{ asset('app.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<body{% block body_attrs %}{% endblock %}>
|
||||
{% set here = active_path | default(request.url.path, true) %}
|
||||
<header class="top">
|
||||
<a class="brand" href="/">role<span>desk</span></a>
|
||||
{% block header_tools %}{% endblock %}
|
||||
<nav>
|
||||
{% for tab in TABS %}
|
||||
<a href="{{ tab.path }}"
|
||||
{% if request.url.path == tab.path %}class="active" aria-current="page"{% endif %}>{{ tab.label }}</a>
|
||||
{% if here == tab.path %}class="active" aria-current="page"{% endif %}>{{ tab.label }}</a>
|
||||
{% endfor %}
|
||||
{# health's cog: an icon because it is not a place you go to often, and a
|
||||
word would take a third of the bar on a phone. #}
|
||||
@@ -46,9 +55,11 @@
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
{% block page %}
|
||||
<main>
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
{# toasts first, and the order is load-bearing: it owns `window.toast`, which
|
||||
app.js calls on a failed fetch and live.js feeds server notices into, and
|
||||
|
||||
Reference in new issue
Block a user