* words * how to * Apply suggestions from code review Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com> --------- Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
27 lines
523 B
Python
27 lines
523 B
Python
from textual.app import App, ComposeResult
|
|
from textual.screen import Screen
|
|
from textual.widgets import Placeholder
|
|
|
|
|
|
class Header(Placeholder): # (1)!
|
|
pass
|
|
|
|
|
|
class Footer(Placeholder): # (2)!
|
|
pass
|
|
|
|
|
|
class TweetScreen(Screen):
|
|
def compose(self) -> ComposeResult:
|
|
yield Header(id="Header") # (3)!
|
|
yield Footer(id="Footer") # (4)!
|
|
|
|
|
|
class LayoutApp(App):
|
|
def on_mount(self) -> None:
|
|
self.push_screen(TweetScreen())
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app = LayoutApp()
|
|
app.run()
|