feat: complete Phase 3 scaffolding (templates, static, Docker, per-app skeletons)
- Per-app skeleton completion: property/client/setting now have services/,
tasks.py, views.py, urls.py, serializers.py, templates/<app>/, tests/
- admin.py added to all 10 apps (per spec §2.108 / §17.3)
- Top-level templates/: base.html, layouts/{app,auth}.html, components/
{topbar,sidebar,pagination,toast,modal,empty-state}.html, errors/
{403,404,500}.html
- static/: css/main.css (Tailwind entry), js/main.js (HTMX toast +
CSRF wiring per §7.4), vendor/.gitkeep
- tailwind.config.js: Primary teal + neutral slate + semantic colors,
Inter font stack, z-60/z-70, shadow-xs, slide-in-right animation per
UI_SYSTEM §2.7/§10.1
- package.json: tailwindcss-only build/watch
- Dockerfile + docker-compose.yml (6 services: web/db/redis/celery/
celery-beat/tailwind) + docker-compose.prod.yml + Makefile
- tests/ root: conftest.py with TenantClient fixture per §720,
integration/{property,client,release}/, e2e/, schemathesis skeleton
- Removed empty apps/tenant/models/ (tenant uses models.py per §17.1)
Validated: manage.py check passes; tree matches spec §2 exactly.
This commit is contained in:
3
templates/components/empty-state.html
Normal file
3
templates/components/empty-state.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="flex flex-col items-center justify-center py-12 text-neutral-500">
|
||||
<p class="text-sm">{% block empty_message %}暂无数据{% endblock %}</p>
|
||||
</div>
|
||||
9
templates/components/modal.html
Normal file
9
templates/components/modal.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<div x-data="{ open: false }"
|
||||
x-show="open"
|
||||
x-cloak
|
||||
class="fixed inset-0 z-50 flex items-center justify-center bg-neutral-900/40">
|
||||
<div class="bg-white rounded-lg shadow-xs max-w-lg w-full p-6"
|
||||
@click.outside="open = false">
|
||||
{% block modal_body %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
3
templates/components/pagination.html
Normal file
3
templates/components/pagination.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<nav class="flex items-center justify-between py-3" aria-label="分页">
|
||||
{% block pagination_body %}{% endblock %}
|
||||
</nav>
|
||||
6
templates/components/sidebar.html
Normal file
6
templates/components/sidebar.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<aside :class="sidebarOpen ? 'w-60' : 'w-16'"
|
||||
class="fixed top-14 left-0 bottom-0 z-20 bg-white border-r border-neutral-200 transition-all">
|
||||
<nav class="flex flex-col p-2 gap-1">
|
||||
{% block sidebar_items %}{% endblock %}
|
||||
</nav>
|
||||
</aside>
|
||||
4
templates/components/toast.html
Normal file
4
templates/components/toast.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<template id="toast-template">
|
||||
<div class="bg-white border border-neutral-200 rounded-lg shadow-xs px-4 py-3 min-w-[280px]"
|
||||
data-toast-type=""></div>
|
||||
</template>
|
||||
15
templates/components/topbar.html
Normal file
15
templates/components/topbar.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<header class="sticky top-0 z-20 bg-primary-800 text-white h-14 flex items-center px-4">
|
||||
<div class="w-[150px] flex items-center">
|
||||
<span class="font-semibold">Fonrey</span>
|
||||
</div>
|
||||
|
||||
<nav class="flex-1 flex items-center gap-1">
|
||||
{% block nav %}{% endblock %}
|
||||
</nav>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<button type="button" aria-label="通知"></button>
|
||||
<button type="button" aria-label="设置"></button>
|
||||
<button type="button" aria-label="账户"></button>
|
||||
</div>
|
||||
</header>
|
||||
Reference in New Issue
Block a user