Switch 5x5's help over to the new Markdown viewer

This commit is contained in:
Dave Pearson
2023-02-17 14:27:11 +00:00
parent 3d74f339c8
commit 474209ec93
3 changed files with 3 additions and 9 deletions

View File

@@ -79,10 +79,7 @@ WinnerMessage {
}
Help {
background: $primary;
color: $text;
border: round $primary-lighten-3;
padding: 2;
}
/* five_by_five.css ends here */

View File

@@ -2,8 +2,7 @@
## Introduction
An annoying puzzle for the terminal, built with
[Textual](https://www.textualize.io/).
An annoying puzzle for the terminal, built with [Textual](https://www.textualize.io/).
## Objective

View File

@@ -5,8 +5,6 @@ from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING, cast
from rich.markdown import Markdown
from textual.app import App, ComposeResult
from textual.binding import Binding
from textual.containers import Horizontal
@@ -14,7 +12,7 @@ from textual.css.query import DOMQuery
from textual.reactive import reactive
from textual.screen import Screen
from textual.widget import Widget
from textual.widgets import Button, Footer, Label
from textual.widgets import Button, Footer, Label, Markdown
if TYPE_CHECKING:
from typing_extensions import Final
@@ -32,7 +30,7 @@ class Help(Screen):
Returns:
ComposeResult: The result of composing the help screen.
"""
yield Label(Markdown(Path(__file__).with_suffix(".md").read_text()))
yield Markdown(Path(__file__).with_suffix(".md").read_text())
class WinnerMessage(Label):