Internationalization: move guide to en folder and preserve its history. (#494)

* chore: move guide to en folder

* docs: add english as language
This commit is contained in:
Jon Kelley authored and GitHub committed 2022-07-09 12:31:46 -04:00
1 parent 7fdc72726d
commit c97ca7dff6
69 files changed
+4 -1

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
# Terminal UI
You can build a text-based interface that will run in the terminal using Dioxus.
![Hello World screenshot](https://github.com/DioxusLabs/rink/raw/master/examples/example.png)
> Note: this book was written with HTML-based platforms in mind. You might be able to follow along with TUI, but you'll have to adapt a bit.
## Support
TUI support is currently quite experimental. Even the project name will change. But, if you're willing to venture into the realm of the unknown, this guide will get you started.
## Getting Set up
Start by making a new package and adding our TUI feature.
```shell
cargo new --bin demo
cd demo
cargo add dioxus --features tui
```
Then, edit your `main.rs` with the basic template.
```rust
{{#include ../../examples/hello_world_tui.rs}}
```
To run our app:
```shell
cargo run
```
Press "ctrl-c" to close the app. To switch from "ctrl-c" to just "q" to quit you can launch the app with a configuration to disable the default quit and use the root TuiContext to quit on your own.
```rust
{{#include ../../examples/hello_world_tui_no_ctrl_c.rs}}
```
## Notes
- Our TUI package uses flexbox for layout
- 1px is one character lineheight. Your regular CSS px does not translate.
- If your app panics, your terminal is wrecked. This will be fixed eventually.