diff --git a/app/services/ai_rewriter.py b/app/services/ai_rewriter.py index ea48a77..18dd5f8 100644 --- a/app/services/ai_rewriter.py +++ b/app/services/ai_rewriter.py @@ -63,11 +63,11 @@ SYSTEM_PROMPT_TEMPLATE = """ REWRITE_SCHEMA_HINT_TEMPLATE = """ 请输出 JSON(勿包在 ``` 里),例如: -{ +{{ "title": "短标题,点明主题", "summary": "一句话到两句话摘要", "body_markdown": "第一段内容…\\n\\n第二段…\\n\\n第三段…\\n\\n第四段…\\n\\n第五段…" -} +}} body_markdown 写法: - 使用 **4~6 段**:每段若干完整句子,段之间 **\\n\\n**(空一行); diff --git a/app/static/style.css b/app/static/style.css index c47f415..b2c65e0 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -327,17 +327,34 @@ label { margin-top: 4px; } +.target-chars-inline { + display: flex; + align-items: center; + gap: 8px; + min-width: 0; +} + +.target-chars-inline #targetBodyChars { + width: 110px; + flex: 0 0 110px; +} + .target-chars-quick { display: flex; - gap: 8px; - margin-top: 8px; - flex-wrap: wrap; + gap: 6px; + margin-top: 0; + flex-wrap: nowrap; + max-width: 100%; + min-width: 0; + overflow-x: auto; + overflow-y: hidden; + scrollbar-width: thin; } .target-char-chip { width: auto; margin-top: 0; - padding: 4px 10px; + padding: 4px 8px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; @@ -345,6 +362,7 @@ label { font-size: 12px; font-weight: 700; line-height: 1.5; + flex: 0 0 auto; } .target-char-chip:hover { @@ -357,6 +375,10 @@ label { color: var(--accent-2); } +.target-chars-block { + width: 100%; +} + .meta { color: var(--muted); font-size: 12px; @@ -428,6 +450,24 @@ button:disabled { opacity: 0.65; } +/* 覆盖全局 button 宽度,确保快捷字数按钮始终横向紧凑排列 */ +.target-chars-quick { + display: flex; + flex-wrap: nowrap; + align-items: center; +} + +.target-chars-quick .target-char-chip, +button.target-char-chip { + width: auto; + min-width: 56px; + margin-top: 0; + flex: 0 0 auto; + display: inline-flex; + align-items: center; + justify-content: center; +} + .actions { display: grid; grid-template-columns: 1fr 1fr; diff --git a/app/templates/index.html b/app/templates/index.html index 11fa99c..2d9df86 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -5,7 +5,7 @@ {{ app_name }} - +
@@ -91,18 +91,21 @@ - - -
+ + +
+
- -
- - - - +
+ +
+ + + + +
@@ -156,6 +159,6 @@ - +