Display header with clock.
| 70 | |
| 71 | |
| 72 | class Header: |
| 73 | """Display header with clock.""" |
| 74 | |
| 75 | def __rich__(self) -> Panel: |
| 76 | grid = Table.grid(expand=True) |
| 77 | grid.add_column(justify="center", ratio=1) |
| 78 | grid.add_column(justify="right") |
| 79 | grid.add_row( |
| 80 | "[b]Rich[/b] Layout application", |
| 81 | datetime.now().ctime().replace(":", "[blink]:[/]"), |
| 82 | ) |
| 83 | return Panel(grid, style="white on blue") |
| 84 | |
| 85 | |
| 86 | def make_syntax() -> Syntax: |