From b677c00df611fdb2a009f3e0910eab4be483bc39 Mon Sep 17 00:00:00 2001 From: Tony Gorez Date: Wed, 20 Nov 2024 22:00:12 +0100 Subject: [PATCH] doc: update readme (#45) Signed-off-by: Tony Gorez --- README.md | 58 ++++++++++++++++++++++++++++-------- logo.png => assets/logo.png | Bin 2 files changed, 46 insertions(+), 12 deletions(-) rename logo.png => assets/logo.png (100%) diff --git a/README.md b/README.md index 6d78b9b..8035832 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

native framework logo

+

native framework logo

native

Build your Desktop application with C++

@@ -36,8 +36,11 @@ Native is a C++ framework designed to streamline the development of native appli ## Getting Started with Native using CMake 1. Code! + +Create these three files at the root of your project. ```cc +// main.cc #include #include #include @@ -55,8 +58,7 @@ public: window.size(1200, 900); window.show(); - // webview.load_html("index.html"); - webview.load_url("https://sourcemeta.com"); + webview.load_html("index.html"); window.add(webview); this->exit(); @@ -72,6 +74,42 @@ private: NATIVE_RUN(App) ``` +```html + + + + + Native Framework + + + +

Welcome to Native

+

This is a simple example to demonstrate loading HTML with CSS styling.

+ + +``` + +```css +/* style.css */ +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100vh; + background-color: #f0f0f0; +} +h1 { + color: #333; +} +p { + color: #666; +} +``` + 2. Configure! ```cmake @@ -105,21 +143,17 @@ native_set_profile( ``` -3. Develop! +3. Build! ```shell -cd build - -cmake .. --config Debug +cmake -S . -B ./build -cmake --build . --config Debug --target native-app-develop +cmake --build ./build ``` -4. Release! +4. Enjoy! -```shell -cmake --build . --config Debug --target native-app-package -``` +The application is available in the `/dist` folder of your current directory. ## Contributing diff --git a/logo.png b/assets/logo.png similarity index 100% rename from logo.png rename to assets/logo.png