use ratatui::{
buffer::Buffer,
layout::Rect,
style::{Color, Stylize},
widgets::{Block, Padding, Paragraph, Widget},
};
pub struct Logo;
const ASCII_LOGO: &str = r#"
████████╗ █████╗ ████████╗ ██████╗ ██╗ ██╗
╚══██╔══╝██╔══██╗╚══██╔══╝██╔═══██╗██║ ██║
██║ ███████║ ██║ ██║ ██║██║ ██║
██║ ██╔══██║ ██║ ██║ ██║██║ ██║
██║ ██║ ██║ ██║ ╚██████╔╝╚██████╔╝
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝
"#;
impl Logo {
pub fn render(area: Rect, buf: &mut Buffer) {
let block = Block::default().padding(Padding::horizontal(2));
Paragraph::new(ASCII_LOGO)
.fg(Color::Cyan)
.left_aligned()
.block(block)
.centered()
.render(area, buf);
}
}