Update README.md

This commit is contained in:
Booklordofthedings 2024-12-06 18:54:16 +01:00
parent 59662f20e6
commit dc8a4e434d

View file

@ -1,3 +1,56 @@
# Quil
# Aven
Aven is an incredibly easy to use html page generator.
It achieves this by embedding html in Beef function calls, so that you can define your website layout in Beef while using all of the normal programming language features that Beef provides.
This results in naturally easy templating
Write static websites dynamically
```cs
class Program
{
public static void Main()
{
Aven aven = scope .();
aven.CopyToOutput("../favicon.ico", "favicon.ico");
aven.Register(.Owning(new Index()));
aven.Build();
}
}
class Index : Template
{
public this()
{
Title = "An Aven website";
OutputFile = "Index.html";
this.Styles = """
body {
background-color:#89c5bb;
font-family: sans-serif;
font-size: 1.2rem;
}
""";
}
public override void Head(System.String buffer)
{
buffer.Append("<link rel=\"icon\" href=\"favicon.ico\"/>");
}
public override void Body(HTML body)
{
body.Children.Add(Empty(
H1("Aven"),
Hr(),
"Build static websites dynamically using Aven",
Ul(
Li("Fast"),
Li("Easily extendable"),
Li("Leverage the power of a normal programming language instead of just templating")
),
Br(),
A("Aven Repository")..SetValue("href", "https://code.booklordofthe.dev/Booklordofthedings/Aven")
));
}
}
```