Commit graph

3 commits

Author SHA1 Message Date
Benedikt Willi
c9ef5e5c44 Refactor test files to remove unnecessary imports and improve readability
- Removed unused imports from various test files to streamline code.
- Cleaned up whitespace in test cases for better consistency.
- Updated dependency management in `uv.lock` to reflect changes in optional dependencies.
- Ensured all tests maintain functionality while enhancing clarity and organization.
2026-01-12 10:22:34 +01:00
Benedikt Willi
fab66d1528 Implement Jinja2 templates for startpage and error pages
Features:
- Add Jinja2 template engine for page rendering
- Create startpage with Bowser branding and version info
- Create error page templates for 404, 500, and network errors
- Support for about:startpage special URL
- Custom error message support in templates
- Graceful fallback rendering if template fails
- Browser now starts with startpage when no URL provided

Templates:
- assets/pages/startpage.html - Beautiful purple gradient intro page
- assets/pages/error_404.html - Pink gradient 404 error page
- assets/pages/error_500.html - Red gradient 500 error page
- assets/pages/error_network.html - Orange gradient network error page

Code:
- src/templates.py - Template rendering utilities with Jinja2
- Updated main.py to use startpage as default
- Updated Frame.load() to handle about: URLs and render errors with templates
- Added 7 comprehensive template tests

All 62 core tests passing (excluding GTK-dependent tests)
2026-01-09 14:24:01 +01:00
Benedikt Willi
f1e4957e70 Initial commit: Setup Bowser educational web browser
- Added README.md with project description, building instructions, and development milestones.
- Created the project structure with directories for source code, assets, and tests.
- Implemented a basic entry point in main.py with argument parsing and logging configuration.
- Developed preliminary browser orchestration in browser.py, including tab management and navigation.
- Established a GTK-based UI framework in chrome.py, integrating key UI components including the address bar and navigation buttons.
- Incorporated HTTP request handling in http.py, with enhanced logging of requests and responses.
- Added initial assets: logo and images for browser UI.
- Configured dependencies in pyproject.toml for development and runtime environments.
- Initialized version control with uv.lock for dependency management.
2026-01-09 13:31:48 +01:00