init
This commit is contained in:
commit
4be274d9e2
39 changed files with 2548 additions and 0 deletions
18
learn_sql_model/tui/app.css
Normal file
18
learn_sql_model/tui/app.css
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
Screen {
|
||||
align: center middle;
|
||||
layers: main footer;
|
||||
}
|
||||
|
||||
Sidebar {
|
||||
height: 100vh;
|
||||
width: auto;
|
||||
min-width: 20;
|
||||
background: $secondary-background-darken-2;
|
||||
dock: left;
|
||||
margin-right: 1;
|
||||
layer: main;
|
||||
}
|
||||
|
||||
Footer {
|
||||
layer: footer;
|
||||
}
|
||||
56
learn_sql_model/tui/app.py
Normal file
56
learn_sql_model/tui/app.py
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# config["tui"] = {}
|
||||
# config["tui"]["bindings"] = {}
|
||||
|
||||
|
||||
# class Sidebar(Static):
|
||||
# def compose(self) -> ComposeResult:
|
||||
# yield Container(
|
||||
# Static("sidebar"),
|
||||
# id="sidebar",
|
||||
# )
|
||||
|
||||
|
||||
# class Tui(App):
|
||||
# """A Textual app to manage requests."""
|
||||
|
||||
# CSS_PATH = Path("__file__").parent / "app.css"
|
||||
# BINDINGS = [tuple(b.values()) for b in config["tui"]["bindings"]]
|
||||
|
||||
# def compose(self) -> ComposeResult:
|
||||
# """Create child widgets for the app."""
|
||||
# yield Container(Static("hello world"))
|
||||
# yield Footer()
|
||||
|
||||
# def action_toggle_dark(self) -> None:
|
||||
# """An action to toggle dark mode."""
|
||||
# self.dark = not self.dark
|
||||
|
||||
# def action_toggle_sidebar(self):
|
||||
# try:
|
||||
# self.query_one("PromptSidebar").remove()
|
||||
# except NoMatches:
|
||||
# self.mount(Sidebar())
|
||||
|
||||
|
||||
def run_app():
|
||||
...
|
||||
|
||||
|
||||
# import os
|
||||
# import sys
|
||||
|
||||
# from textual.features import parse_features
|
||||
|
||||
# dev = "--dev" in sys.argv
|
||||
# features = set(parse_features(os.environ.get("TEXTUAL", "")))
|
||||
# if dev:
|
||||
# features.add("debug")
|
||||
# features.add("devtools")
|
||||
|
||||
# os.environ["TEXTUAL"] = ",".join(sorted(features))
|
||||
# app = Tui()
|
||||
# app.run()
|
||||
|
||||
|
||||
# if __name__ == "__main__":
|
||||
# run_app()
|
||||
Loading…
Add table
Add a link
Reference in a new issue