fix preview background

This commit is contained in:
Gavin McDonald
2025-08-24 11:24:33 -04:00
parent a981cf98d7
commit e36720c011
3 changed files with 15 additions and 10 deletions

View File

@@ -93,6 +93,15 @@ defmodule LabelmakerWeb.Tools do
~p"/#{label}?#{Map.take(parameters, [:align, :color, :font, :height, :outline, :width])}"
end
def process_preview_background(bg) do
case bg do
"r" -> "bg-[linear-gradient(to_right,_black_33%,_white_67%)]"
"b" -> "bg-[linear-gradient(to_bottom,_black_33%,_white_67%)]"
"c" -> ""
_ -> "bg-[linear-gradient(to_right,_black_33%,_white_67%)]"
end
end
defp process_width("", _parameters), do: ""
# defp process_width("", parameters) do