First commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using Tesses.WebServer;
|
||||
using Scriban;
|
||||
using System.Web;
|
||||
|
||||
namespace Tesses.YouTubeDownloader2025Companion
|
||||
{
|
||||
public class PageLink(string title, string icon, string url,string badge="") {
|
||||
public string Title => HttpUtility.HtmlEncode(title);
|
||||
public string Icon => HttpUtility.HtmlEncode(icon);
|
||||
public string Url => HttpUtility.HtmlAttributeEncode(url);
|
||||
|
||||
public string Badge => HttpUtility.HtmlEncode(badge);
|
||||
}
|
||||
public static partial class Components {
|
||||
private static ReloadingScript shell = new ReloadingScript("wwwroot/components/shell.sbnhtml");
|
||||
public static string Shell(string title, string body, IEnumerable<PageLink> pages)
|
||||
{
|
||||
return shell.Render(new {
|
||||
Title = System.Web.HttpUtility.HtmlEncode(title),
|
||||
Body = body,
|
||||
Pages = pages
|
||||
});
|
||||
}
|
||||
|
||||
internal static string Shell(string v1, string v2, object defaultLinks)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user