@@ -55,7 +55,6 @@ def on_mount(self) -> None:
5555class PanthaTerminal (App ):
5656 TITLE = "Pantha Terminal"
5757 SUB_TITLE = "Official Pantha Terminal v1.1.2"
58- CSS_PATH = "app/styles.tcss" # <-- Use a string path relative to main.py
5958
6059 status_text : reactive [str ] = reactive ("Ready" )
6160 NOTES_FILE = user_data_dir () / "notes.json"
@@ -89,12 +88,22 @@ def compose(self) -> ComposeResult:
8988 yield Footer ()
9089
9190 def on_mount (self ) -> None :
91+ # Safely load styles.tcss
92+ css_file = Path (__file__ ).parent / "styles.tcss"
9293 log = self .query_one ("#log" , RichLog )
94+ if css_file .exists ():
95+ try :
96+ with css_file .open ("r" , encoding = "utf-8" ) as f :
97+ self .styles .update (f .read ())
98+ except Exception as e :
99+ log .write (f"[red]Failed to load styles.tcss:[/] { escape (str (e ))} " )
100+ else :
101+ log .write ("[yellow]Warning: styles.tcss not found.[/]" )
102+
93103 log .write ("[bold #ff4dff]Pantha Terminal Online.[/]" )
94104 log .write ("[#b066ff]Type [bold]pantham[/] to awaken the core.[/]" )
95105 self .focus_input ()
96106
97-
98107 # --------------------------------------------------
99108 # INPUT / HOTKEYS
100109 # --------------------------------------------------
@@ -397,8 +406,8 @@ def show_pantha_ascii(self) -> None:
397406 (__) ()__________)⠀⠀⠀⠀⠀
398407"""
399408
400- commands = """
401-
409+ commands = """
410+
402411
403412[#ff4dff]██████╗ █████╗ ███╗ ██╗████████╗██╗ ██╗ █████╗ ███╗ ███╗[/]
404413[#ff4dff]██╔══██╗██╔══██╗████╗ ██║╚══██╔══╝██║ ██║██╔══██╗████╗ ████║[/]
0 commit comments