diff --git a/BeefProj.toml b/BeefProj.toml index b7e655e..bd772f0 100644 --- a/BeefProj.toml +++ b/BeefProj.toml @@ -5,3 +5,6 @@ Dependencies = {corlib = "*", Aven = {Git = "https://code.booklordofthe.dev/Book Name = "aven-ly" TargetType = "BeefLib" StartupObject = "aven_ly.Program" + +[Configs.Debug.Win64] +PreBuildCmds = ["CopyToDependents(\"$(ProjectDir)/Setup/ly-design\")"] diff --git a/src/Components.bf b/src/Components.bf new file mode 100644 index 0000000..d78fe01 --- /dev/null +++ b/src/Components.bf @@ -0,0 +1,72 @@ +namespace aven_ly; + +using System; +using Aven; + +static +{ + + public static HTML LybBox(params Span children) + { + var toReturn = new HTML(params children); + toReturn.Name = .("div"); + toReturn.AddClass("lyb-box"); + return toReturn; + } + + public static HTML LybText(params Span children) + { + var toReturn = new HTML(params children); + toReturn.Name = .("p"); + toReturn.AddClass("lyb-text"); + return toReturn; + } + + public static HTML LybLink(params Span children) + { + var toReturn = new HTML(params children); + toReturn.Name = .("a"); + toReturn.AddClass("lyb-link"); + return toReturn; + } + + public static HTML LybHeader1(params Span children) + { + var toReturn = new HTML(params children); + toReturn.Name = .("h1"); + toReturn.AddClass("lyb-h1 lyb-h"); + return toReturn; + } + + public static HTML LybHeader2(params Span children) + { + var toReturn = new HTML(params children); + toReturn.Name = .("h2"); + toReturn.AddClass("lyb-h2 lyb-h"); + return toReturn; + } + + public static HTML LybHeader3(params Span children) + { + var toReturn = new HTML(params children); + toReturn.Name = .("h3"); + toReturn.AddClass("lyb-h3 lyb-h"); + return toReturn; + } + + public static HTML LybHeader4(params Span children) + { + var toReturn = new HTML(params children); + toReturn.Name = .("h4"); + toReturn.AddClass("lyb-h4 lyb-h"); + return toReturn; + } + + public static HTML LybInfobox(params Span children) + { + var toReturn = new HTML(params children); + toReturn.Name = .("p"); + toReturn.AddClass("lyb-info"); + return toReturn; + } +} \ No newline at end of file diff --git a/src/LyTemplate.bf b/src/LyTemplate.bf new file mode 100644 index 0000000..47d2c35 --- /dev/null +++ b/src/LyTemplate.bf @@ -0,0 +1,26 @@ +namespace aven_ly; + +using Aven; + +/* + A template override that creates a ly page template +*/ + +class LyTemplate : Template +{ + public override void Head(System.String buffer) + { + base.Head(buffer); + + buffer.Append(" \n"); + } + + public override void Body(HTML body) + { + body.AddClass("lyb-body"); + } +} \ No newline at end of file