You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.0 KiB
Python
32 lines
1.0 KiB
Python
5 months ago
|
from textual.containers import Container
|
||
|
from textual.app import ComposeResult
|
||
|
from textual.widgets import Static, Button
|
||
|
|
||
|
MESSAGE = '''
|
||
|
Be excellent to each other!
|
||
|
|
||
|
Made with :red_heart: by Panki
|
||
|
|
||
|
[@click="app.open_link('https://tty0.social/@panki')"]Mastodon:[/] tty0.social/@panki
|
||
|
[@click="app.open_link('https://git.theresno.cloud/panki/bingo-cli')"]Source:[/] git.theresno.cloud/panki/bingo-cli
|
||
|
|
||
|
Built using [@click="app.open_link('https://textual.textualize.io/')"]Textual[/]
|
||
|
|
||
|
'''
|
||
|
|
||
|
class Sidebar(Container):
|
||
|
'''Class to represent the sidebar'''
|
||
|
|
||
|
def compose(self) -> ComposeResult:
|
||
|
'''Create the widgets that make up the sidebar'''
|
||
|
yield Static('CCC Bingo', classes='title')
|
||
|
yield Static(MESSAGE, classes='message')
|
||
|
self.button = Button('< Back', variant='primary', classes='btn_sidebar')
|
||
|
self.button.disabled = True
|
||
|
yield self.button
|
||
|
|
||
|
def on_button_pressed(self, event: Button.Pressed) -> None:
|
||
|
'''Closes the sidebar'''
|
||
|
self.app.action_toggle_sidebar()
|
||
|
|