diff --git a/web/css/19-edit-proposal.css b/web/css/19-edit-proposal.css index f49ddb5..62c843d 100644 --- a/web/css/19-edit-proposal.css +++ b/web/css/19-edit-proposal.css @@ -30,18 +30,6 @@ font-weight: 700; } -/* --- section band: a full-width ink chip used as a section header ------ */ -.section-band { - background: var(--ink); - color: var(--cream-fixed); - border: 2px solid var(--ink); - padding: 8px 12px; - font: 700 11px/1.2 var(--mono); - letter-spacing: 1px; - text-transform: uppercase; - margin: 0 0 12px; -} - /* --- proposal detail: field diff panel ---------------------------------- */ .proposal-diff-panel { display: flex; diff --git a/web/src/at_record_web/pages/edit_proposal.gleam b/web/src/at_record_web/pages/edit_proposal.gleam index 63bc60c..527aec1 100644 --- a/web/src/at_record_web/pages/edit_proposal.gleam +++ b/web/src/at_record_web/pages/edit_proposal.gleam @@ -11,6 +11,7 @@ import at_record_web/pages/edit_inbox import at_record_web/route import at_record_web/ui/controls as ctl import at_record_web/ui/covers as cov +import at_record_web/ui/record_detail as rd import gleam/int import gleam/list import gleam/option.{type Option, None, Some} @@ -99,23 +100,21 @@ fn field_diff_panel(p: EditProposal) -> Element(Msg) { True -> list.append(rows, [hidden_note(hidden)]) False -> rows } - html.div([], [ - section_band("PROPOSED CHANGES", changed, tracked_field_count), + html.div([attr.class("layer-section")], [ + rd.layer_band( + field_diff_label(changed, tracked_field_count), + element.none(), + ), html.div([attr.class("card proposal-diff-panel")], panel_rows), ]) } -fn section_band(label: String, n: Int, m: Int) -> Element(Msg) { - html.p([attr.class("section-band")], [ - text( - label - <> " · " - <> int.to_string(n) - <> " OF " - <> int.to_string(m) - <> " FIELDS", - ), - ]) +fn field_diff_label(n: Int, m: Int) -> String { + "PROPOSED CHANGES · " + <> int.to_string(n) + <> " OF " + <> int.to_string(m) + <> " FIELDS" } fn hidden_note(hidden: Int) -> Element(Msg) { diff --git a/web/src/at_record_web/pages/pressing.gleam b/web/src/at_record_web/pages/pressing.gleam index 699dd3f..19e2ca1 100644 --- a/web/src/at_record_web/pages/pressing.gleam +++ b/web/src/at_record_web/pages/pressing.gleam @@ -12,7 +12,6 @@ import at_record_web/pages/browse import at_record_web/route import at_record_web/ui/controls as ctl import at_record_web/ui/covers as cov -import at_record_web/ui/forms as frm import at_record_web/ui/record_detail as rd import gleam/int import gleam/option @@ -32,7 +31,7 @@ fn loaded_state(model: Model, row: BrowseRelease) -> Element(Msg) { html.div([attr.class("page-scroll")], [ hero(row), html.div([attr.class("detail-body")], [ - frm.section_label("THE PRESSING · SHARED CATALOG"), + rd.layer_band("THE PRESSING · SHARED CATALOG", element.none()), detail_rows(row), via_line(row), stat_chips(row),