feat: Implement Sprint 8 - Portfolio website expansion (MVP)
New pages: - Home: Redesigned with hero, impact stats, featured project - About: 6-section professional narrative - Projects: Hub with 4 project cards and status badges - Resume: Inline display with download placeholders - Contact: Form UI (disabled) with contact info - Blog: Markdown-based system with frontmatter support Infrastructure: - Blog system with markdown loader (python-frontmatter, markdown, pygments) - Sidebar callback for active state highlighting on navigation - Separated navigation into main pages and projects/dashboards groups Closes #36, #37, #38, #39, #40, #41, #42, #43 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""Application-level callbacks for the portfolio app."""
|
||||
|
||||
from . import theme
|
||||
from . import sidebar, theme
|
||||
|
||||
__all__ = ["theme"]
|
||||
__all__ = ["sidebar", "theme"]
|
||||
|
||||
25
portfolio_app/callbacks/sidebar.py
Normal file
25
portfolio_app/callbacks/sidebar.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""Sidebar navigation callbacks for active state updates."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
from dash import Input, Output, callback
|
||||
|
||||
from portfolio_app.components.sidebar import create_sidebar_content
|
||||
|
||||
|
||||
@callback( # type: ignore[misc]
|
||||
Output("floating-sidebar", "children"),
|
||||
Input("url", "pathname"),
|
||||
prevent_initial_call=False,
|
||||
)
|
||||
def update_sidebar_active_state(pathname: str) -> list[Any]:
|
||||
"""Update sidebar to highlight the current page.
|
||||
|
||||
Args:
|
||||
pathname: Current URL pathname from dcc.Location.
|
||||
|
||||
Returns:
|
||||
Updated sidebar content with correct active state.
|
||||
"""
|
||||
current_path = pathname or "/"
|
||||
return create_sidebar_content(current_path=current_path)
|
||||
Reference in New Issue
Block a user