feat: Use BackgroundSize in Preview view

This commit is contained in:
2026-05-21 10:19:51 +10:00
parent 7da0aed466
commit 29a7af4950
+1 -1
View File
@@ -4,7 +4,7 @@
var bgStyle = $"background: {Model.BackgroundColor ?? "#1a1a2e"};"; var bgStyle = $"background: {Model.BackgroundColor ?? "#1a1a2e"};";
if (!string.IsNullOrEmpty(Model.BackgroundImage)) if (!string.IsNullOrEmpty(Model.BackgroundImage))
{ {
bgStyle += $" background-image: url('{Model.BackgroundImage}'); background-size: cover; background-position: center;"; bgStyle += $" background-image: url('{Model.BackgroundImage}'); background-size: {Model.BackgroundSize ?? "cover"}; background-position: center; background-repeat: no-repeat;";
} }
} }
<!DOCTYPE html> <!DOCTYPE html>