Feat: documentation, UI/UX

This commit is contained in:
2026-03-01 19:09:52 +01:00
parent ecb559e556
commit db44f9b98e
57 changed files with 1531 additions and 615 deletions

View File

@@ -228,8 +228,8 @@ fn render_content(frame: &mut Frame, app: &App, area: Rect) {
let mut lines = parsed.lines.clone();
// Highlight focused code block with background tint
if let Some(block_idx) = app.ui.help_focused_block {
// Highlight focused code block with background tint and border
let border_lines_inserted = if let Some(block_idx) = app.ui.help_focused_block {
if let Some(block) = parsed.code_blocks.get(block_idx) {
let tint_bg = theme.ui.surface;
for line in lines.iter_mut().take(block.end_line).skip(block.start_line) {
@@ -242,6 +242,31 @@ fn render_content(frame: &mut Frame, app: &App, area: Rect) {
*span = Span::styled(span.content.clone(), style);
}
}
let border = "".repeat(content_width.saturating_sub(1));
let border_line = RLine::from(Span::styled(
format!(" {border}"),
Style::new().fg(theme.ui.accent),
));
lines.insert(block.end_line, border_line.clone());
lines.insert(block.start_line, border_line);
2
} else {
0
}
} else {
0
};
// Insert print output line after the executed code block
if let Some((topic, block_idx, ref output)) = app.ui.help_block_output {
if topic == app.ui.help_topic {
if let Some(block) = parsed.code_blocks.get(block_idx) {
let output_line = RLine::from(vec![
Span::styled("", Style::new().fg(theme.markdown.code_border)),
Span::styled(output.clone(), Style::new().fg(theme.markdown.code)),
]);
lines.insert(block.end_line + border_lines_inserted, output_line);
}
}
}