Clean up and improve items-table styling

Closes #9
This commit is contained in:
2026-03-25 18:42:24 +01:00
parent 33004f62bd
commit d893e59293
13 changed files with 109 additions and 150 deletions

View File

@@ -1,13 +1,13 @@
<%= tabular_form_with model: Measurement.new, id: :measurement_form,
class: 'topside-area vflex centered',
class: 'topside-area flex vertical center',
html: {onkeydown: 'formProcessKey(event)'} do |form| %>
<table class="items-table centered">
<table class="items-table center">
<tbody id="readouts">
<%= tabular_fields_for @measurement do |form| %>
<tr class="italic">
<td class="hexpand hmin50"><%= t '.taken_at_html' %></td>
<td colspan="3" class="number">
<td colspan="3" class="ralign">
<%= form.datetime_field :taken_at, required: true %>
</td>
</tr>
@@ -16,7 +16,7 @@
</table>
<%# TODO: right-click selection; unnecessary with hierarchical tags? %>
<details id="quantity_select" class="centered hexpand" open
<details id="quantity_select" class="center hexpand" open
onkeydown="detailsProcessKey(event)">
<summary autofocus>
<!-- TODO: Set content with CSS when span empty to avoid duplication -->
@@ -30,7 +30,7 @@
<ul><%= quantities_check_boxes(@quantities) %></ul>
</details>
<div class="hflex reverse">
<div class="flex reverse">
<%= form.button id: :create_measurement_button, disabled: true -%>
<%= image_link_to t(:cancel), "close-outline", measurements_path, name: :cancel,
class: 'dangerous', onclick: render_turbo_stream('form_close') %>