diff --git a/plugins/zzz/daily_note.py b/plugins/zzz/daily_note.py index 58dcbeb..b3abd75 100644 --- a/plugins/zzz/daily_note.py +++ b/plugins/zzz/daily_note.py @@ -2,6 +2,7 @@ from datetime import datetime from typing import Optional, TYPE_CHECKING, List from simnet.errors import DataNotPublic +from simnet.models.zzz.chronicle.notes import ZZZNoteCardSignState from telegram import InlineKeyboardMarkup, InlineKeyboardButton from telegram.constants import ChatAction from telegram.ext import ConversationHandler, filters @@ -53,11 +54,12 @@ class DailyNotePlugin(Plugin): "exp_status": daily_info.vhs_sale.sale_state.name, "current_train_score": daily_info.current_train_score, "max_train_score": daily_info.max_train_score, + "card_sign_status": daily_info.card_sign == ZZZNoteCardSignState.DONE, } render_result = await self.template_service.render( "zzz/daily_note/daily_note.jinja2", render_data, - {"width": 600, "height": 300}, + {"width": 600, "height": 390}, full_page=False, ttl=8 * 60, ) diff --git a/resources/zzz/daily_note/daily_note.css b/resources/zzz/daily_note/daily_note.css index e5fa037..b47fb52 100644 --- a/resources/zzz/daily_note/daily_note.css +++ b/resources/zzz/daily_note/daily_note.css @@ -10,6 +10,7 @@ padding: 0; box-sizing: border-box; user-select: none; + color: white; } body { @@ -23,7 +24,8 @@ body { .container { width: 400px; height: 365px; - background: #f0eae3; + background: url("../../img/home.png"); + background-size: 100% 100%; padding: 8px 16px; } @@ -57,6 +59,7 @@ body { .item { border: 1px solid #dfd8d1; + border-radius: 15px 15px 15px 15px; display: flex; height: 49px; margin-top: 5px; @@ -65,7 +68,7 @@ body { .item .main { display: flex; flex: 1; - background-color: #f5f1eb; + /*background-color: #f5f1eb;*/ position: relative; /* font-weight: bold; */ } @@ -75,8 +78,8 @@ body { height: 100%; position: absolute; left: 0; - background-size: 100% auto; - background-image: url(./items/bg.png); + /*background-size: 100% auto;*/ + /*background-image: url(./items/bg.png);*/ } .item .main .icon { @@ -99,7 +102,7 @@ body { .item .main .info .time { font-size: 12px; /* font-weight: 400; */ - color: #5f5f5d; + color: sandybrown; line-height: 1; } @@ -109,7 +112,7 @@ body { justify-content: center; width: 96px; height: 100%; - background-color: #ece3d8; + /*background-color: #ece3d8;*/ font-size: 16px; color: #504c49; line-height: 55px; @@ -118,4 +121,3 @@ body { .item .right .red { color: #f24e4c; } - diff --git a/resources/zzz/daily_note/daily_note.jinja2 b/resources/zzz/daily_note/daily_note.jinja2 index 1863ec3..9508225 100644 --- a/resources/zzz/daily_note/daily_note.jinja2 +++ b/resources/zzz/daily_note/daily_note.jinja2 @@ -75,6 +75,26 @@ >{{ current_train_score }}/{{ max_train_score }} +