This commit is contained in:
Booklordofthedings 2024-10-30 14:03:57 +01:00
parent ba7dcc6941
commit 017f656391
15 changed files with 1243 additions and 2 deletions

View file

@ -0,0 +1,6 @@
FileVersion = 1
Dependencies = {corlib = "*", Aven = "*"}
[Project]
Name = "Example_Website"
StartupObject = "Example_Website.Program"

View file

@ -0,0 +1,31 @@
namespace Example_Website;
using System;
using Aven;
using Aven.HTML;
class Index : Page
{
public this() : base()
{
Title = scope $"Aven - {Aven.Version}";
this.AddInlineStyle("""
body {
margin:0px;
}
""");
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

@ -0,0 +1,17 @@
namespace Example_Website;
using System;
using Aven;
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();
}
}