feat(ui): add web UI with Jinja2 templates and Gitea themes

- Add Jinja2 templates with data-testid attributes for testing
- Create light/dark themes based on Gitea color scheme
- Add theme switching with localStorage persistence
- Create base CSS, components, and layout styles
- Add mock web routes for UI demonstration
- Register web router and static files in main.py
- Add data-testid requirements to AGENTS.md
- Install jinja2 dependency
This commit is contained in:
2026-05-02 14:45:51 +03:00
parent ca4e8877a5
commit e2802d83f2
18 changed files with 2212 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="ru" data-testid="html-root">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{% block meta_description %}Blog - A modern blogging platform{% endblock %}">
<title data-testid="page-title">{% block title %}Blog{% endblock %}</title>
<link rel="stylesheet" href="/static/css/themes/theme-light.css" data-testid="theme-light-stylesheet">
<link rel="stylesheet" href="/static/css/themes/theme-dark.css" data-testid="theme-dark-stylesheet">
<link rel="stylesheet" href="/static/css/base.css" data-testid="base-stylesheet">
<link rel="stylesheet" href="/static/css/components.css" data-testid="components-stylesheet">
<link rel="stylesheet" href="/static/css/layout.css" data-testid="layout-stylesheet">
{% block extra_css %}{% endblock %}
</head>
<body data-testid="body">
{% include "partials/header.html" %}
<main class="main-wrapper" data-testid="main-content">
<div class="container" data-testid="container">
{% block content %}{% endblock %}
</div>
</main>
{% include "partials/footer.html" %}
<script src="/static/js/theme.js" data-testid="theme-script"></script>
{% block extra_js %}{% endblock %}
</body>
</html>