readme change
This commit is contained in:
parent
bf5d14e195
commit
35e44b9ae7
5 changed files with 6 additions and 3 deletions
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
This sample demonstrates how to use the HtmlElement class in Crafter.CppDOM.
|
This sample demonstrates how to use the HtmlElement class in Crafter.CppDOM.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Shows how to create and manipulate HTML elements
|
- Shows how to create and manipulate HTML elements
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
This sample demonstrates a simple hello world application using Crafter.CppDOM.
|
This sample demonstrates a simple hello world application using Crafter.CppDOM.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
|
|
|
||||||
BIN
examples/Website/Website.png
Normal file
BIN
examples/Website/Website.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
|
|
@ -22,7 +22,6 @@ HtmlElementView* head = new HtmlElementView("head", R"(
|
||||||
body {
|
body {
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 20px;
|
|
||||||
background-color: #121212;
|
background-color: #121212;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
|
@ -219,7 +218,6 @@ void RenderNotes() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Main function
|
// Main function
|
||||||
int main() {
|
int main() {
|
||||||
FetchNotes();
|
FetchNotes();
|
||||||
|
|
@ -230,7 +228,8 @@ int main() {
|
||||||
std::cout << noteValue << std::endl;
|
std::cout << noteValue << std::endl;
|
||||||
if (!noteValue.empty()) {
|
if (!noteValue.empty()) {
|
||||||
loadingIndicator->SetInnerHTML("<p>Saving note...</p>");
|
loadingIndicator->SetInnerHTML("<p>Saving note...</p>");
|
||||||
Fetch("http://localhost:3000/createNote", noteValue, [¬eValue](std::string content) {
|
Fetch("http://localhost:3000/createNote", noteValue, [noteValue](std::string content) {
|
||||||
|
std::cout << noteValue << std::endl;
|
||||||
notes->push_back({static_cast<std::uint32_t>(std::stoi(content)), noteValue});
|
notes->push_back({static_cast<std::uint32_t>(std::stoi(content)), noteValue});
|
||||||
noteInput->SetValue("");
|
noteInput->SetValue("");
|
||||||
RenderNotes();
|
RenderNotes();
|
||||||
|
|
|
||||||
BIN
hello.png
BIN
hello.png
Binary file not shown.
|
Before Width: | Height: | Size: 126 KiB |
Loading…
Add table
Add a link
Reference in a new issue