use crate::example::Example;
use crate::theme_colors;
use revue::prelude::*;
use revue::widget::{CodeEditor, Language, Markdown};
pub fn examples() -> Vec<Example> {
let (primary, _success, _warning, _error, info, muted, text, _) = theme_colors();
vec for more.
"#,
))
.child(Text::new(""))
.child(Text::new("• Headers and lists").fg(muted))
.child(Text::new("• Code blocks").fg(muted))
.child(Text::new("• Links and quotes").fg(muted)),
),
),
Example::new(
"Diagram",
"ASCII art diagrams with boxes and arrows",
Border::rounded().title(" Diagram ").child(
vstack()
.gap(1)
.child(Text::new("ASCII diagram:").fg(primary))
.child(Text::new(""))
.child(Text::new("+--------+ +--------+").fg(text))
.child(Text::new("| Client | -------> | Server |").fg(text))
.child(Text::new("+--------+ Request +--------+").fg(text))
.child(Text::new(" ^ |").fg(muted))
.child(Text::new(" +---- Response ---+").fg(muted))
.child(Text::new(""))
.child(Text::new("• ASCII art diagrams").fg(muted))
.child(Text::new("• Boxes and arrows").fg(muted))
.child(Text::new("• Flow visualization").fg(muted)),
),
),
Example::new(
"Syntax Highlight",
"Supported programming languages for syntax highlighting",
Border::rounded().title(" Syntax Highlight ").child(
vstack()
.gap(1)
.child(Text::new("Supported languages:").fg(primary))
.child(Text::new("• Rust").fg(text))
.child(Text::new("• Python").fg(text))
.child(Text::new("• JavaScript/TypeScript").fg(text))
.child(Text::new("• Go").fg(text))
.child(Text::new("• C/C++").fg(text))
.child(Text::new("• JSON/YAML/TOML").fg(text))
.child(Text::new("• SQL").fg(text))
.child(Text::new("• Shell/Bash").fg(text))
.child(Text::new(""))
.child(Text::new("Custom themes available").fg(muted)),
),
),
]
}