mirror of
https://github.com/we-promise/sure.git
synced 2026-04-24 06:24:04 +00:00
- Stimulus controller on global layout (persists across all pages) - CSS blur effect on .privacy-sensitive elements (8px active, 4px on hover) - localStorage persistence survives page navigations - Toggle button on dashboard with aria-pressed for accessibility - Applied to 28+ views: accounts, budgets, transactions, reports, etc. Fixes: UTF-8 encoding, global controller mount, aria-pressed attribute
13 lines
483 B
Plaintext
13 lines
483 B
Plaintext
<%# locals: (weight:, color:) %>
|
|
|
|
<% effective_weight = weight.presence || 0 %>
|
|
|
|
<div class="w-full flex items-center justify-between gap-2">
|
|
<div class="flex gap-[3px]">
|
|
<% 10.times do |i| %>
|
|
<div class="w-0.5 h-2.5 rounded-lg <%= i < (effective_weight / 10.0).ceil ? "" : "opacity-20" %>" style="background-color: <%= color %>;"></div>
|
|
<% end %>
|
|
</div>
|
|
<p class="text-sm privacy-sensitive"><%= number_to_percentage(effective_weight, precision: 2) %></p>
|
|
</div>
|