This commit is contained in:
Booklordofthedings 2024-11-28 12:24:54 +01:00
parent c667ce43b8
commit 1fbb94e9a2
13 changed files with 1171 additions and 1150 deletions

View file

@ -8,6 +8,17 @@ using Aven.HTML;
class Index : Page
{
public override void LoadPageContents()
{
this.AddElement(
Div("Content aisjdoasjiodashuihnsduijhnuisdhfsd",
H1("Hello from Aven"),
Raw("Aven is a website generation library, that can be used from"), A("Beef")..SetValue("href", "https://Beeflang.org"), Raw("to generate reuseable html."), Br(),
Raw("By being integrated into a programming language you can freely write your own templating and generation logic"), Br()
)..SetValue("style", "padding: 15px;")
);
}
public this() : base()
{
Title = scope $"Aven - {Aven.Version}";
@ -18,14 +29,6 @@ class Index : Page
}
""");
this.AddElement(
Div("",
H1("Hello from Aven"),
Raw("Aven is a website generation library, that can be used from"), A("Beef")..SetValue("href", "https://Beeflang.org"), Raw("to generate reuseable html."), Br(),
Raw("By being integrated into a programming language you can freely write your own templating and generation logic"), Br()
)..SetValue("style", "padding: 15px;")
);
}
}

View file

@ -8,10 +8,9 @@ class Program
{
public static void Main()
{
Builder b = scope .();
b.OutputDirectory = "../output/";
b.[Friend]_Pages.Add(new .("Index.html"),new Example_Website.Index());
b.Build();
Aven aven = scope .();
aven.Pages.Add(scope Example_Website.Index());
aven.OutputDirectory = "../output/";
aven.Build();
}
}