Feat: continue refactoring
Some checks failed
Deploy Website / deploy (push) Failing after 4m48s

This commit is contained in:
2026-02-01 13:39:25 +01:00
parent dd853b8e1b
commit b47c789612
20 changed files with 766 additions and 581 deletions

View File

@@ -0,0 +1,77 @@
use ratatui::style::{Color, Modifier, Style};
pub trait MarkdownTheme {
fn h1(&self) -> Style;
fn h2(&self) -> Style;
fn h3(&self) -> Style;
fn text(&self) -> Style;
fn code(&self) -> Style;
fn code_border(&self) -> Style;
fn link(&self) -> Style;
fn link_url(&self) -> Style;
fn quote(&self) -> Style;
fn list(&self) -> Style;
fn table_header_bg(&self) -> Color;
fn table_row_even(&self) -> Color;
fn table_row_odd(&self) -> Color;
}
pub struct DefaultTheme;
impl MarkdownTheme for DefaultTheme {
fn h1(&self) -> Style {
Style::new()
.fg(Color::Cyan)
.add_modifier(Modifier::BOLD | Modifier::UNDERLINED)
}
fn h2(&self) -> Style {
Style::new().fg(Color::Blue).add_modifier(Modifier::BOLD)
}
fn h3(&self) -> Style {
Style::new().fg(Color::Magenta).add_modifier(Modifier::BOLD)
}
fn text(&self) -> Style {
Style::new().fg(Color::White)
}
fn code(&self) -> Style {
Style::new().fg(Color::Yellow)
}
fn code_border(&self) -> Style {
Style::new().fg(Color::DarkGray)
}
fn link(&self) -> Style {
Style::new()
.fg(Color::Blue)
.add_modifier(Modifier::UNDERLINED)
}
fn link_url(&self) -> Style {
Style::new().fg(Color::DarkGray)
}
fn quote(&self) -> Style {
Style::new().fg(Color::Gray)
}
fn list(&self) -> Style {
Style::new().fg(Color::White)
}
fn table_header_bg(&self) -> Color {
Color::DarkGray
}
fn table_row_even(&self) -> Color {
Color::Reset
}
fn table_row_odd(&self) -> Color {
Color::Reset
}
}