diff --git a/AobaClient/.gitignore b/AobaClient/.gitignore new file mode 100644 index 0000000..80aab8e --- /dev/null +++ b/AobaClient/.gitignore @@ -0,0 +1,7 @@ +# Generated by Cargo +# will have compiled files and executables +/target +.DS_Store + +# These are backup files generated by rustfmt +**/*.rs.bk diff --git a/AobaClient/Cargo.toml b/AobaClient/Cargo.toml new file mode 100644 index 0000000..4959068 --- /dev/null +++ b/AobaClient/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "aoba-client" +version = "0.1.0" +authors = ["Amatsugu "] +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +dioxus = { version = "0.6.0", features = [] } + +[features] +default = ["web"] +web = ["dioxus/web"] +desktop = ["dioxus/desktop"] +mobile = ["dioxus/mobile"] diff --git a/AobaClient/Dioxus.toml b/AobaClient/Dioxus.toml new file mode 100644 index 0000000..8730153 --- /dev/null +++ b/AobaClient/Dioxus.toml @@ -0,0 +1,21 @@ +[application] + +[web.app] + +# HTML title tag content +title = "aoba-client" + +# include `assets` in web platform +[web.resource] + +# Additional CSS style files +style = [] + +# Additional JavaScript files +script = [] + +[web.resource.dev] + +# Javascript code file +# serve: [dev-server] only +script = [] diff --git a/AobaClient/README.md b/AobaClient/README.md new file mode 100644 index 0000000..1e629b6 --- /dev/null +++ b/AobaClient/README.md @@ -0,0 +1,25 @@ +# Development + +Your new bare-bones project includes minimal organization with a single `main.rs` file and a few assets. + +``` +project/ +├─ assets/ # Any assets that are used by the app should be placed here +├─ src/ +│ ├─ main.rs # main.rs is the entry point to your application and currently contains all components for the app +├─ Cargo.toml # The Cargo.toml file defines the dependencies and feature flags for your project +``` + +### Serving Your App + +Run the following command in the root of your project to start developing with the default platform: + +```bash +dx serve +``` + +To run for a different platform, use the `--platform platform` flag. E.g. +```bash +dx serve --platform desktop +``` + diff --git a/AobaClient/assets/favicon.ico b/AobaClient/assets/favicon.ico new file mode 100644 index 0000000..eed0c09 Binary files /dev/null and b/AobaClient/assets/favicon.ico differ diff --git a/AobaClient/assets/header.svg b/AobaClient/assets/header.svg new file mode 100644 index 0000000..59c96f2 --- /dev/null +++ b/AobaClient/assets/header.svg @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/AobaClient/assets/main.css b/AobaClient/assets/main.css new file mode 100644 index 0000000..90c0fc1 --- /dev/null +++ b/AobaClient/assets/main.css @@ -0,0 +1,46 @@ +/* App-wide styling */ +body { + background-color: #0f1116; + color: #ffffff; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + margin: 20px; +} + +#hero { + margin: 0; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +#links { + width: 400px; + text-align: left; + font-size: x-large; + color: white; + display: flex; + flex-direction: column; +} + +#links a { + color: white; + text-decoration: none; + margin-top: 20px; + margin: 10px 0px; + border: white 1px solid; + border-radius: 5px; + padding: 10px; +} + +#links a:hover { + background-color: #1f1f1f; + cursor: pointer; +} + +#header { + max-width: 1200px; +} + + + diff --git a/AobaClient/src/main.rs b/AobaClient/src/main.rs new file mode 100644 index 0000000..4593314 --- /dev/null +++ b/AobaClient/src/main.rs @@ -0,0 +1,37 @@ +use dioxus::prelude::*; + +const FAVICON: Asset = asset!("/assets/favicon.ico"); +const MAIN_CSS: Asset = asset!("/assets/main.css"); +const HEADER_SVG: Asset = asset!("/assets/header.svg"); + +fn main() { + dioxus::launch(App); +} + +#[component] +fn App() -> Element { + rsx! { + document::Link { rel: "icon", href: FAVICON } + document::Link { rel: "stylesheet", href: MAIN_CSS } + Hero {} + + } +} + +#[component] +pub fn Hero() -> Element { + rsx! { + div { + id: "hero", + img { src: HEADER_SVG, id: "header" } + div { id: "links", + a { href: "https://dioxuslabs.com/learn/0.6/", "📚 Learn Dioxus" } + a { href: "https://dioxuslabs.com/awesome", "🚀 Awesome Dioxus" } + a { href: "https://github.com/dioxus-community/", "📡 Community Libraries" } + a { href: "https://github.com/DioxusLabs/sdk", "⚙️ Dioxus Development Kit" } + a { href: "https://marketplace.visualstudio.com/items?itemName=DioxusLabs.dioxus", "💫 VSCode Extension" } + a { href: "https://discord.gg/XgGxMSkvUM", "👋 Community Discord" } + } + } + } +}