From d87ecdb2f723764ac2517d3e01f35aadce83ae9d Mon Sep 17 00:00:00 2001 From: 24c02 <163450896+24c02@users.noreply.github.com> Date: Wed, 3 Dec 2025 02:39:57 -0500 Subject: [PATCH] less ugly checkboxes --- app/frontend/stylesheets/backend.scss | 2 ++ app/helpers/backend/application_helper.rb | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/frontend/stylesheets/backend.scss b/app/frontend/stylesheets/backend.scss index 332e2e3..6902a28 100644 --- a/app/frontend/stylesheets/backend.scss +++ b/app/frontend/stylesheets/backend.scss @@ -22,6 +22,8 @@ body { + --checkbox-true: #1cdd00; + --checkbox-false: #ec0606; max-width: 120ch; padding-top: 3ch; padding-left: 2ch; diff --git a/app/helpers/backend/application_helper.rb b/app/helpers/backend/application_helper.rb index 2c40757..e51af1e 100644 --- a/app/helpers/backend/application_helper.rb +++ b/app/helpers/backend/application_helper.rb @@ -1,6 +1,8 @@ module Backend::ApplicationHelper def render_checkbox(value) - content_tag(:span, style: "color: var(--checkbox-#{value ? "true" : "false"})") { value ? inline_icon("checkbox", size: 16) : inline_icon("cancel", size: 16) } + symbol = value ? "☑" : "☐" + color = "var(--checkbox-#{value ? "true" : "false"})" + content_tag(:span, symbol, style: "color: #{color}; font-size: 1.3em") end def super_admin_tool(class_name: "", element: "div", **options, &block)