diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-09 02:25:56 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-09 02:25:56 +0200 |
| commit | 332ffbeed90cf07342925b82ed3fda1762346be2 (patch) | |
| tree | f507b6af5f467fd0aeb89286561e6af3b78f8ce1 /public/stylesheets/admin.css | |
| parent | 168ff3f8b6037bc3c2b5bce74adac37e48366dac (diff) | |
Restyle revisions#index: sticky diff bar, computation button style, pre-selected defaults
Adds a fourth button category, .computation -- teal, matching Preview's
existing color -- for actions that compute a view without changing state,
the first case in the app that didn't fit reversible/state-changing/
destructive. Diff revisions now starts disabled and only enables once two
distinct revisions are selected, matching the disabled-state pattern
already used for Unlock + Back.
The header row is wrapped in a real <thead> (previously flat inside the
table alongside data rows) so a sticky diff bar can sit above the fold on
long revision lists -- selecting a comparison pair no longer requires
scrolling back up to find the button, or back down to confirm what's
selected, both surfaced live via one shared JS function.
The two most recent revisions are pre-selected by default, covering the
most common comparison (current against previous) with no extra clicks.
Deliberately scoped to numbered revisions only -- comparing draft/head or
autosave/draft was raised and set aside, since neither exists as a row in
this table by design and extending the comparison to them is a separate
feature, not a default on this one.
Also drops the dead "Edit" subnav link, redundant with nodes#show's
Status section covering the same action with state-aware labeling this
static link could never have.
Diffstat (limited to 'public/stylesheets/admin.css')
| -rw-r--r-- | public/stylesheets/admin.css | 66 |
1 files changed, 52 insertions, 14 deletions
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index a6e8bf6..3607166 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -29,6 +29,7 @@ table.node_table a, | |||
| 29 | table.assets_table a, | 29 | table.assets_table a, |
| 30 | table.events_table a, | 30 | table.events_table a, |
| 31 | table.user_table a, | 31 | table.user_table a, |
| 32 | table.revisions_table a, | ||
| 32 | .add_child_links a, | 33 | .add_child_links a, |
| 33 | div#draft_list table td.actions a { | 34 | div#draft_list table td.actions a { |
| 34 | text-decoration: underline; | 35 | text-decoration: underline; |
| @@ -297,6 +298,27 @@ form.button_to.destructive button[type="submit"]:hover { | |||
| 297 | background-color: #cc0000; | 298 | background-color: #cc0000; |
| 298 | } | 299 | } |
| 299 | 300 | ||
| 301 | form.button_to.computation input[type="submit"], | ||
| 302 | form.button_to.computation button[type="submit"] { | ||
| 303 | color: #00838f; | ||
| 304 | background-color: #e0f2f1; | ||
| 305 | border-radius: 2px; | ||
| 306 | padding: 2px 8px; | ||
| 307 | } | ||
| 308 | |||
| 309 | form.button_to.computation input[type="submit"]:hover, | ||
| 310 | form.button_to.computation button[type="submit"]:hover { | ||
| 311 | color: #ffffff; | ||
| 312 | background-color: #00838f; | ||
| 313 | } | ||
| 314 | |||
| 315 | form.button_to.computation input[type="submit"]:disabled, | ||
| 316 | form.button_to.computation button[type="submit"]:disabled { | ||
| 317 | opacity: 0.4; | ||
| 318 | cursor: not-allowed; | ||
| 319 | pointer-events: none; | ||
| 320 | } | ||
| 321 | |||
| 300 | /* Native (non-button_to) submit buttons -- Create/Save/Publish forms. | 322 | /* Native (non-button_to) submit buttons -- Create/Save/Publish forms. |
| 301 | Lower specificity than form.button_to's own rule, so button_to forms | 323 | Lower specificity than form.button_to's own rule, so button_to forms |
| 302 | are correctly unaffected. If a button_to output ever loses its class | 324 | are correctly unaffected. If a button_to output ever loses its class |
| @@ -420,42 +442,58 @@ table.node_table tr:hover { | |||
| 420 | content: "• "; | 442 | content: "• "; |
| 421 | } | 443 | } |
| 422 | 444 | ||
| 423 | table#revisions { | 445 | table.revisions_table { |
| 424 | border-collapse: collapse; | 446 | border-collapse: collapse; |
| 425 | } | 447 | } |
| 426 | 448 | ||
| 427 | table#revisions tr { | 449 | table.revisions_table thead { |
| 428 | height: 45px; | 450 | position: sticky; |
| 451 | top: 0; | ||
| 452 | z-index: 1; | ||
| 429 | } | 453 | } |
| 430 | 454 | ||
| 431 | /* Redundant with the generic table tr.header rule above (identical | 455 | table.revisions_table th, |
| 432 | values) -- harmless, kept presumably for explicitness. */ | 456 | table.revisions_table td { |
| 433 | table#revisions tr.header { | 457 | padding: 0.4rem 0.75rem; |
| 434 | height: 20px; | ||
| 435 | text-align: left; | 458 | text-align: left; |
| 436 | } | 459 | } |
| 437 | 460 | ||
| 438 | table#revisions td { | 461 | table.revisions_table thead tr.header, |
| 439 | padding-right: 25px; | 462 | table.revisions_table thead tr.diff_sticky_bar { |
| 463 | background-color: #ffffff; | ||
| 464 | } | ||
| 465 | |||
| 466 | table.revisions_table .diff_sticky_bar td { | ||
| 467 | padding-top: 0.5rem; | ||
| 468 | padding-bottom: 0.5rem; | ||
| 469 | border-bottom: 1px solid #e8e8e8; | ||
| 440 | } | 470 | } |
| 441 | 471 | ||
| 442 | table#revisions td.title { | 472 | #diff_selection_label { |
| 473 | margin-left: 0.75rem; | ||
| 474 | color: #969696; | ||
| 475 | } | ||
| 476 | table.revisions_table td.title { | ||
| 443 | width: 450px; | 477 | width: 450px; |
| 444 | } | 478 | } |
| 445 | 479 | ||
| 446 | table#revisions td.date { | 480 | table.revisions_table td.date { |
| 447 | width: 175px; | 481 | width: 175px; |
| 448 | } | 482 | } |
| 449 | 483 | ||
| 450 | table#revisions tr.header:hover { | 484 | table.revisions_table tr:not(.header):not(.no_hover) { |
| 485 | border-bottom: 1px solid #e8e8e8; | ||
| 486 | } | ||
| 487 | |||
| 488 | table.revisions_table tr.header:hover { | ||
| 451 | background-color: #ffffff; | 489 | background-color: #ffffff; |
| 452 | } | 490 | } |
| 453 | 491 | ||
| 454 | table#revisions tr.no_hover:hover { | 492 | table.revisions_table tr.no_hover:hover { |
| 455 | background-color: #ffffff; | 493 | background-color: #ffffff; |
| 456 | } | 494 | } |
| 457 | 495 | ||
| 458 | table#revisions tr:hover { | 496 | table.revisions_table tr:hover { |
| 459 | background-color: #f1f1f1; | 497 | background-color: #f1f1f1; |
| 460 | } | 498 | } |
| 461 | 499 | ||
