feat: use imported report illustrations
This commit is contained in:
parent
9ade515fa9
commit
b538e2f8cb
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB |
BIN
daily_report/static/report-illust-bath.png
Normal file
BIN
daily_report/static/report-illust-bath.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 931 KiB |
BIN
daily_report/static/report-illust-bed.png
Normal file
BIN
daily_report/static/report-illust-bed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 MiB |
BIN
daily_report/static/report-illust-work.png
Normal file
BIN
daily_report/static/report-illust-work.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 969 KiB |
@ -21,13 +21,13 @@ p { color: #5b6472; }
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
.submit-hero {
|
.submit-hero {
|
||||||
min-height: 178px;
|
min-height: 220px;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(0, 1fr) 230px;
|
grid-template-columns: minmax(0, 1fr) 330px;
|
||||||
gap: 20px;
|
gap: 24px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
padding: 24px 28px;
|
padding: 22px 24px 22px 28px;
|
||||||
border: 1px solid #f3d49a;
|
border: 1px solid #f3d49a;
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
background:
|
background:
|
||||||
@ -55,11 +55,39 @@ p { color: #5b6472; }
|
|||||||
max-width: 420px;
|
max-width: 420px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.submit-hero-image {
|
.submit-hero-art {
|
||||||
width: 230px;
|
position: relative;
|
||||||
max-width: 100%;
|
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;
|
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 {
|
form.panel, .history-panel, .previous-plan {
|
||||||
box-shadow: 0 14px 34px rgba(39, 45, 58, 0.06);
|
box-shadow: 0 14px 34px rgba(39, 45, 58, 0.06);
|
||||||
@ -231,8 +259,17 @@ pre {
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
.submit-hero-image {
|
.submit-hero-art {
|
||||||
width: 180px;
|
width: min(330px, 100%);
|
||||||
|
min-height: 180px;
|
||||||
justify-self: center;
|
justify-self: center;
|
||||||
}
|
}
|
||||||
|
.hero-art-main {
|
||||||
|
width: 190px;
|
||||||
|
height: 190px;
|
||||||
|
}
|
||||||
|
.hero-art-small {
|
||||||
|
width: 76px;
|
||||||
|
height: 76px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,7 +66,11 @@ def submit_page(current_date: str, session: dict[str, str] | None = None) -> byt
|
|||||||
<h1>每日工作汇报</h1>
|
<h1>每日工作汇报</h1>
|
||||||
<p>把今天的进展、明天的计划和需要协助的地方简单记下来。</p>
|
<p>把今天的进展、明天的计划和需要协助的地方简单记下来。</p>
|
||||||
</div>
|
</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>
|
</section>
|
||||||
<form id="report-form" class="panel">
|
<form id="report-form" class="panel">
|
||||||
{identity_html}
|
{identity_html}
|
||||||
|
|||||||
@ -66,7 +66,9 @@ class WebTest(unittest.TestCase):
|
|||||||
status, submit = get(f"{base_url}/submit")
|
status, submit = get(f"{base_url}/submit")
|
||||||
self.assertEqual(status, 200)
|
self.assertEqual(status, 200)
|
||||||
self.assertIn("每日工作汇报", submit)
|
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("今日状态", submit)
|
||||||
self.assertIn('data-list="today_done"', submit)
|
self.assertIn('data-list="today_done"', submit)
|
||||||
self.assertIn('data-add-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.assertEqual(status, 200)
|
||||||
self.assertIn("日报浏览", manager)
|
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.status, 200)
|
||||||
self.assertEqual(response.headers["content-type"], "image/png")
|
self.assertEqual(response.headers["content-type"], "image/png")
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user