feat: use imported report illustrations

This commit is contained in:
Codex 2026-05-07 23:55:07 +08:00
parent 9ade515fa9
commit b538e2f8cb
7 changed files with 56 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 KiB

View File

@ -21,13 +21,13 @@ p { color: #5b6472; }
padding: 16px;
}
.submit-hero {
min-height: 178px;
min-height: 220px;
display: grid;
grid-template-columns: minmax(0, 1fr) 230px;
gap: 20px;
grid-template-columns: minmax(0, 1fr) 330px;
gap: 24px;
align-items: center;
margin-bottom: 18px;
padding: 24px 28px;
padding: 22px 24px 22px 28px;
border: 1px solid #f3d49a;
border-radius: 18px;
background:
@ -55,11 +55,39 @@ p { color: #5b6472; }
max-width: 420px;
margin: 0;
}
.submit-hero-image {
width: 230px;
max-width: 100%;
.submit-hero-art {
position: relative;
min-height: 178px;
}
.submit-hero-art img {
display: block;
object-fit: contain;
background: rgba(255, 255, 255, 0.72);
border: 1px solid rgba(255, 255, 255, 0.88);
box-shadow: 0 12px 24px rgba(31, 41, 55, 0.12);
}
.hero-art-main {
width: 218px;
height: 218px;
margin-left: auto;
justify-self: end;
filter: drop-shadow(0 12px 16px rgba(31, 41, 55, 0.14));
border-radius: 24px;
}
.hero-art-small {
position: absolute;
width: 92px;
height: 92px;
border-radius: 20px;
}
.hero-art-bed {
left: 16px;
top: 12px;
transform: rotate(-6deg);
}
.hero-art-bath {
left: 44px;
bottom: 4px;
transform: rotate(5deg);
}
form.panel, .history-panel, .previous-plan {
box-shadow: 0 14px 34px rgba(39, 45, 58, 0.06);
@ -231,8 +259,17 @@ pre {
grid-template-columns: 1fr;
padding: 20px;
}
.submit-hero-image {
width: 180px;
.submit-hero-art {
width: min(330px, 100%);
min-height: 180px;
justify-self: center;
}
.hero-art-main {
width: 190px;
height: 190px;
}
.hero-art-small {
width: 76px;
height: 76px;
}
}

View File

@ -66,7 +66,11 @@ def submit_page(current_date: str, session: dict[str, str] | None = None) -> byt
<h1>每日工作汇报</h1>
<p>把今天的进展明天的计划和需要协助的地方简单记下来</p>
</div>
<img src="/static/report-hero.png" alt="" class="submit-hero-image">
<div class="submit-hero-art" aria-hidden="true">
<img src="/static/report-illust-work.png" alt="" class="hero-art-main">
<img src="/static/report-illust-bed.png" alt="" class="hero-art-small hero-art-bed">
<img src="/static/report-illust-bath.png" alt="" class="hero-art-small hero-art-bath">
</div>
</section>
<form id="report-form" class="panel">
{identity_html}

View File

@ -66,7 +66,9 @@ class WebTest(unittest.TestCase):
status, submit = get(f"{base_url}/submit")
self.assertEqual(status, 200)
self.assertIn("每日工作汇报", submit)
self.assertIn("/static/report-hero.png", submit)
self.assertIn("/static/report-illust-work.png", submit)
self.assertIn("/static/report-illust-bed.png", submit)
self.assertIn("/static/report-illust-bath.png", submit)
self.assertIn("今日状态", submit)
self.assertIn('data-list="today_done"', submit)
self.assertIn('data-add-list="today_done"', submit)
@ -87,7 +89,7 @@ class WebTest(unittest.TestCase):
self.assertEqual(status, 200)
self.assertIn("日报浏览", manager)
with urllib.request.urlopen(f"{base_url}/static/report-hero.png", timeout=5) as response:
with urllib.request.urlopen(f"{base_url}/static/report-illust-work.png", timeout=5) as response:
self.assertEqual(response.status, 200)
self.assertEqual(response.headers["content-type"], "image/png")
finally: