diff --git a/xian_favor/api.py b/xian_favor/api.py index d851d8c..6752a3e 100644 --- a/xian_favor/api.py +++ b/xian_favor/api.py @@ -1033,6 +1033,25 @@ INDEX_TEMPLATE = ''' .item-card h6 { font-size: 14px; margin-bottom: 2px; } .item-card p { margin-bottom: 2px; } .item-card .text-muted.small { font-size: 12px; } + /* 卡片内容自适应布局 */ + .item-card .card-content { + display: flex; + flex-wrap: wrap; + gap: 8px; + } + .item-card .card-main { + flex: 1; + min-width: 150px; + } + .item-card .card-actions { + display: flex; + align-items: center; + gap: 2px; + flex-wrap: wrap; + } + .item-card .card-actions .btn { + white-space: nowrap; + } .type-text { border-left: 4px solid #17a2b8; } .type-link { border-left: 4px solid #28a745; } .type-column { border-left: 4px solid #6f42c1; } @@ -2007,8 +2026,8 @@ function renderItems(items) { container.innerHTML = items.map(item => `