ds5678 86118b6adf Update packages and refactor HtmlExtensions methods
Updated NUnit3TestAdapter to 5.0.0 in multiple test projects.
Updated AssetRipper.Text.SourceGeneration to 1.2.2 in several projects.
Updated AssetRipper.Text.Html to 2.1.0 in AssetRipper.GUI.Web.csproj.
Updated Moq to 4.20.72 in AssetRipper.Tests.csproj.
Removed MaybeWithChecked, MaybeWithDisabled, MaybeSelected methods from HtmlExtensions.cs.
Replaced MaybeSelected with MaybeWithSelected in SettingsPage.cs.
2025-02-09 13:31:48 -08:00

22 lines
503 B
C#

using AssetRipper.GUI.Web.Paths;
namespace AssetRipper.GUI.Web.Pages;
internal static class HtmlExtensions
{
public static A WithNewTabAttributes(this A element)
{
return element.WithTarget("_blank").WithRel("noopener noreferrer");
}
public static Div WithTextCenter(this Div element)
{
return element.WithClass("text-center");
}
public static Pre WithDynamicTextContent(this Pre element, string url)
{
return element.WithCustomAttribute("dynamic-text-content", url.ToHtml());
}
}