Initial
This commit is contained in:
parent
ba7dcc6941
commit
017f656391
15 changed files with 1243 additions and 2 deletions
6
Example_Website/BeefProj.toml
Normal file
6
Example_Website/BeefProj.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
FileVersion = 1
|
||||
Dependencies = {corlib = "*", Aven = "*"}
|
||||
|
||||
[Project]
|
||||
Name = "Example_Website"
|
||||
StartupObject = "Example_Website.Program"
|
31
Example_Website/src/Index.bf
Normal file
31
Example_Website/src/Index.bf
Normal 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;")
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
17
Example_Website/src/Program.bf
Normal file
17
Example_Website/src/Program.bf
Normal 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();
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue