fix(postcards): move notes to right side before action buttons in list, use dl grid format in detail page
This commit is contained in:
@@ -135,7 +135,6 @@ code { background: var(--bg); padding: .15rem .4rem; border-radius: 4px; font-si
|
||||
.detail-meta dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; }
|
||||
.detail-meta dt { font-weight: 600; font-size: .78rem; color: var(--text-muted); }
|
||||
.detail-meta dd { font-size: .85rem; }
|
||||
.detail-notes { margin-top: .75rem; padding: .5rem .75rem; background: var(--bg); border-radius: 6px; font-size: .8rem; color: var(--text-muted); white-space: pre-wrap; word-break: break-word; }
|
||||
|
||||
/* Tabs */
|
||||
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1rem; }
|
||||
@@ -216,7 +215,7 @@ code { background: var(--bg); padding: .15rem .4rem; border-radius: 4px; font-si
|
||||
.postcard-row-action { flex-shrink: 0; }
|
||||
.postcard-row-date { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
|
||||
.postcard-row-detail { display: flex; flex-direction: column; gap: 0; font-size: .78rem; color: var(--text-muted); }
|
||||
.postcard-row-notes { font-size: .72rem; color: var(--text-muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.postcard-row-notes { font-size: .72rem; color: var(--text-muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: auto; }
|
||||
.detail-title-row { display: flex; align-items: center; gap: .75rem; }
|
||||
.detail-title-row h1 { margin: 0; }
|
||||
.btn-back { padding: .35rem .6rem; font-size: 1rem; text-decoration: none; }
|
||||
|
||||
@@ -60,10 +60,10 @@
|
||||
<dt>收到时间</dt><dd>{{ postcard.receive_time.strftime('%Y-%m-%d') if postcard.receive_time else '-' }}</dd>
|
||||
{% endif %}
|
||||
<dt>所属 Profile</dt><dd>{{ postcard.profile.nickname }}</dd>
|
||||
</dl>
|
||||
{% if postcard.notes %}
|
||||
<div class="detail-notes">{{ postcard.notes }}</div>
|
||||
<dt>备注</dt><dd>{{ postcard.notes }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
<span>{{ pc.country|flag }} {{ pc.country or '-' }}</span>
|
||||
<span>→ {{ pc.recipient_name or '-' }}</span>
|
||||
</div>
|
||||
{% if pc.notes %}<span class="postcard-row-notes">{{ pc.notes[:50] }}{% if pc.notes|length > 50 %}…{% endif %}</span>{% endif %}
|
||||
<span class="badge badge-{{ pc.status }}">{{ {'sent':'已寄出','delivered':'已送达'}.get(pc.status) }}</span>
|
||||
<span class="postcard-row-date">
|
||||
{% if pc.send_time %}{{ pc.send_time.strftime('%Y-%m-%d') }}寄出{% endif %}
|
||||
{% if pc.arrival_time %}<br>{{ pc.arrival_time.strftime('%Y-%m-%d') }}送达{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% if pc.notes %}<span class="postcard-row-notes">{{ pc.notes[:50] }}{% if pc.notes|length > 50 %}…{% endif %}</span>{% endif %}
|
||||
<div class="postcard-row-action">
|
||||
{% if pc.status == 'sent' %}
|
||||
<form method="post" action="/postcards/{{ pc.id }}/mark-delivered" onclick="event.preventDefault();event.stopPropagation();if(confirm('确认已送达?'))this.submit();">
|
||||
@@ -81,9 +81,9 @@
|
||||
<div class="postcard-row-detail">
|
||||
<span>← {{ pc.sender_name or '-' }}</span>
|
||||
</div>
|
||||
{% if pc.notes %}<span class="postcard-row-notes">{{ pc.notes[:50] }}{% if pc.notes|length > 50 %}…{% endif %}</span>{% endif %}
|
||||
{% if pc.receive_time %}<span class="postcard-row-date">{{ pc.receive_time.strftime('%Y-%m-%d') }}收到</span>{% endif %}
|
||||
</div>
|
||||
{% if pc.notes %}<span class="postcard-row-notes">{{ pc.notes[:50] }}{% if pc.notes|length > 50 %}…{% endif %}</span>{% endif %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user