Compare commits

..

3 commits

Author SHA1 Message Date
fb899e8176 Add border to vote tables on hover 2026-01-13 20:37:32 -06:00
240ff8ba25 Allow vote tables to shrink more 2026-01-13 20:37:19 -06:00
d16a8cb396 Allow vote tables to shrink more 2026-01-14 03:23:13 +01:00
2 changed files with 11 additions and 7 deletions

View file

@ -21,4 +21,8 @@
background-color: <%= v[:color] %> !important;
}
.mj-cell-<%= v[:id] %>:hover {
border-left-width: 1px;
border-right-width: 1px;
}
<% end %>

View file

@ -51,13 +51,13 @@
<table class="table table-borderless">
<tr>
<% (1..c.mj.n).each do |i| %>
<td class="text-center <% unless i == c.mj.majority %>opacity-0<% end %>">↓</td>
<td class="p-0 text-center <% unless i == c.mj.majority %>opacity-0<% end %>">↓</td>
<% end %>
</tr>
<tr>
<% settings.values.reverse.each do |v| %>
<% (1..c.mj.count[v[:id]]).each do |r| %>
<td class="mj-cell-<%= v[:id] %>">&nbsp;</td>
<td class="p-0 mj-cell-<%= v[:id] %>">&nbsp;</td>
<% end %>
<% end %>
</tr>
@ -106,27 +106,27 @@
<table class="table table-borderless">
<tr>
<% (1..a.n).each do |i| %>
<td class="text-center <% unless i == a.majority %>opacity-0<% end %>">↓</td>
<td class="p-0 text-center <% unless i == a.majority %>opacity-0<% end %>">↓</td>
<% end %>
<th class="w-100"></th>
<% (1..b.n).each do |i| %>
<td class="text-center <% unless b.n - i + 1 == b.majority %>opacity-0<% end %>">↓</td>
<td class="p-0 text-center <% unless b.n - i + 1 == b.majority %>opacity-0<% end %>">↓</td>
<% end %>
</tr>
<tr>
<% settings.values.reverse.each do |v| %>
<% (1..a.count[v[:id]]).each do |r| %>
<td class="mj-cell-<%= v[:id] %>">&nbsp;</td>
<td class="p-0 mj-cell-<%= v[:id] %>" title="i">ho&nbsp;</td>
<% end %>
<% end %>
<td class="text-center fw-bold">
<td class="p-0 text-center fw-bold">
<% if a.mj < b.mj %><<% end %>
<% if a.mj > b.mj %>><% end %>
<% if a.mj == b.mj %>=<% end %>
</td>
<% settings.values.each do |v| %>
<% (1..b.count[v[:id]]).each do |r| %>
<td class="mj-cell-<%= v[:id] %>">&nbsp;</td>
<td class="p-0 mj-cell-<%= v[:id] %>">&nbsp;</td>
<% end %>
<% end %>
</tr>