Initial commit
This commit is contained in:
commit
2798e9567e
11 changed files with 363 additions and 0 deletions
17
sample/main.cpp
Normal file
17
sample/main.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import Crafter.Web;
|
||||
using namespace Crafter::Web;
|
||||
|
||||
int main() {
|
||||
HtmlElement root("div", "", {}, {
|
||||
HtmlElement("h1", "HELLO FROM C++"),
|
||||
HtmlElement("h1", "blue text", {{"color","blue"}}),
|
||||
HtmlElement("h1", "", {{"display","flex"}, {"justify-content","space-between"}}, {
|
||||
HtmlElement("div", "c++"),
|
||||
HtmlElement("div", "webdev"),
|
||||
HtmlElement("div", "is"),
|
||||
HtmlElement("div", "awesome")
|
||||
}),
|
||||
HtmlElement("img", "", {}, {}, {{"src","https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/ISO_C%2B%2B_Logo.svg/1822px-ISO_C%2B%2B_Logo.svg.png"},{"width","200"}}),
|
||||
});
|
||||
root.RenderAsRoot();
|
||||
}
|
||||
22
sample/project.json
Normal file
22
sample/project.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "sample-project",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "debug",
|
||||
"standard": "c++26",
|
||||
"source_files": ["main"],
|
||||
"module_files": [],
|
||||
"build_dir": "./build",
|
||||
"output_dir": "./bin",
|
||||
"optimization_level": "0",
|
||||
"target": "wasm32-unknown-wasi",
|
||||
"type": "executable",
|
||||
"dependencies": [
|
||||
{
|
||||
"path":"../project.json",
|
||||
"configuration":"debug"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue