UI overhaul rebase
This commit is contained in:
17
dioxus-free-icons/packages/example/.gitignore
vendored
Normal file
17
dioxus-free-icons/packages/example/.gitignore
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
/target/
|
||||
|
||||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
||||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
||||
Cargo.lock
|
||||
|
||||
# These are backup files generated by rustfmt
|
||||
**/*.rs.bk
|
||||
|
||||
|
||||
# Added by cargo
|
||||
|
||||
/target
|
||||
|
||||
/dist
|
||||
19
dioxus-free-icons/packages/example/Cargo.toml
Normal file
19
dioxus-free-icons/packages/example/Cargo.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "hello-dioxus"
|
||||
version = "0.1.0"
|
||||
authors = ["nissy-dev <nd.12021218@gmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
dioxus = { workspace = true, features = ["launch", "web"] }
|
||||
dioxus-free-icons = { path = "../lib", features = ["font-awesome-brands"] }
|
||||
|
||||
log = "0.4.6"
|
||||
|
||||
# WebAssembly Debug
|
||||
wasm-logger = "0.2.0"
|
||||
console_error_panic_hook = "0.1.7"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
opt-level = 's'
|
||||
42
dioxus-free-icons/packages/example/Dioxus.toml
Normal file
42
dioxus-free-icons/packages/example/Dioxus.toml
Normal file
@@ -0,0 +1,42 @@
|
||||
[application]
|
||||
|
||||
# App (Project) Name
|
||||
name = "hello-dioxus"
|
||||
|
||||
# Dioxus App Default Platform
|
||||
# desktop, web, mobile, ssr
|
||||
default_platform = "web"
|
||||
|
||||
# `build` & `serve` dist path
|
||||
out_dir = "dist"
|
||||
|
||||
# resource (public) file folder
|
||||
asset_dir = "public"
|
||||
|
||||
[web.app]
|
||||
|
||||
# HTML title tag content
|
||||
title = "dioxus | ⛺"
|
||||
|
||||
[web.watcher]
|
||||
|
||||
# when watcher trigger, regenerate the `index.html`
|
||||
reload_html = true
|
||||
|
||||
# which files or dirs will be watcher monitoring
|
||||
watch_path = ["src", "public"]
|
||||
|
||||
# include `assets` in web platform
|
||||
[web.resource]
|
||||
|
||||
# CSS style file
|
||||
style = []
|
||||
|
||||
# Javascript code file
|
||||
script = []
|
||||
|
||||
[web.resource.dev]
|
||||
|
||||
# Javascript code file
|
||||
# serve: [dev-server] only
|
||||
script = []
|
||||
21
dioxus-free-icons/packages/example/LICENSE
Normal file
21
dioxus-free-icons/packages/example/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022-Present Daiki Nishikawa
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
11
dioxus-free-icons/packages/example/README.md
Normal file
11
dioxus-free-icons/packages/example/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Example
|
||||
|
||||
> a template for starting a dioxus project to be used with [dioxus-cli](https://github.com/DioxusLabs/cli)
|
||||
|
||||
## Usage
|
||||
|
||||
#### Start a `dev-server` for the project:
|
||||
|
||||
```
|
||||
dioxus serve
|
||||
```
|
||||
0
dioxus-free-icons/packages/example/public/.gitkeep
Normal file
0
dioxus-free-icons/packages/example/public/.gitkeep
Normal file
28
dioxus-free-icons/packages/example/src/main.rs
Normal file
28
dioxus-free-icons/packages/example/src/main.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
use dioxus_free_icons::icons::fa_brands_icons::FaRust;
|
||||
use dioxus_free_icons::Icon;
|
||||
|
||||
fn main() {
|
||||
// init debug tool for WebAssembly
|
||||
wasm_logger::init(wasm_logger::Config::default());
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
launch(app);
|
||||
}
|
||||
|
||||
fn app() -> Element {
|
||||
rsx! (
|
||||
div {
|
||||
style: "text-align: center;",
|
||||
h1 { "🌗 Dioxus 🚀" }
|
||||
h3 { "Frontend that scales." }
|
||||
p { "Dioxus is a portable, performant, and ergonomic framework for building cross-platform user interfaces in Rust." },
|
||||
Icon {
|
||||
width: 60,
|
||||
height: 60,
|
||||
icon: FaRust,
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user