Skip to content

Commit

Permalink
doc improvements, add example images
Browse files Browse the repository at this point in the history
  • Loading branch information
ccbrown committed Sep 23, 2024
1 parent d6a26a8 commit 0b241c4
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 81 deletions.
13 changes: 13 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,16 @@ dependencies = [
"clippy",
"doc",
]

[tasks.counter-example-svg]
workspace = false
command = "svg-term"
args = [
"--out", "examples/images/counter.svg",
"--window",
"--width", "60",
"--height", "4",
"--no-cursor",
"--command",
"echo '\\033[0;37miocraft\\033[0m % \\033[0;32mcargo\\033[0m run -q --example counter' && timeout 10s cargo run -q --example counter",
]
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn main() {
```

Your UI is composed primarily via the `element!` macro, which allows you to
declare your UI elements in a SwiftUI-like syntax.
declare your UI elements in a React/SwiftUI-like syntax.

`iocraft` provides a few built-in components, such as `Box`, `Text`, and
`TextInput`, but you can also create your own using the `#[component]` macro.
Expand Down Expand Up @@ -72,8 +72,16 @@ fn main() {

## More Examples

There are many [examples here on GitHub](https://github.com/ccbrown/iocraft/tree/main/examples)
which demonstrate various concepts and how to use all of `iocraft`'s features.
There are many [examples on GitHub](https://github.com/ccbrown/iocraft/tree/main/examples) which
demonstrate various concepts such as tables, progress bars, fullscreen apps,
forms, and more!

## Shoutouts

`iocraft` was inspired by [Dioxus](https://github.com/DioxusLabs/dioxus) and
[Ink](https://github.com/vadimdemedes/ink), which you should also check out,
especially if you're building graphical interfaces or interested in using
JavaScript/TypeScript.

## License

Expand Down
1 change: 1 addition & 0 deletions examples/images/counter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/images/form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/images/fullscreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/images/hello-world.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/images/table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 0 additions & 76 deletions packages/iocraft/README.md

This file was deleted.

1 change: 1 addition & 0 deletions packages/iocraft/README.md
11 changes: 9 additions & 2 deletions packages/iocraft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//! ```
//!
//! Your UI is composed primarily via the [`element!`] macro, which allows you to declare your UI
//! elements in a SwiftUI-like syntax.
//! elements in a React/SwiftUI-like syntax.
//!
//! `iocraft` provides a few built-in components in the [`components`] module, such as
//! [`Box`](crate::components::Box), [`Text`](crate::components::Text), and
Expand All @@ -42,7 +42,14 @@
//! ## More Examples
//!
//! There are many [examples on GitHub](https://github.com/ccbrown/iocraft/tree/main/examples)
//! which demonstrate various concepts and how to use all of `iocraft`'s features.
//! which demonstrate various concepts such as tables, progress bars, full screen apps, forms, and
//! more!.
//!
//! ## Shoutouts
//!
//! `iocraft` was inspired by [Dioxus](https://github.com/DioxusLabs/dioxus) and
//! [Ink](https://github.com/vadimdemedes/ink), which you should also check out, especially if
//! you're building graphical interfaces or interested in using JavaScript/TypeScript.
#![warn(missing_docs)]

Expand Down

0 comments on commit 0b241c4

Please sign in to comment.