mistpe commited on
Commit
fb74d7c
·
verified ·
1 Parent(s): eaab80c

Update app/templates/article.html

Browse files
Files changed (1) hide show
  1. app/templates/article.html +24 -52
app/templates/article.html CHANGED
@@ -5,6 +5,14 @@
5
  {% block extra_css %}
6
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css">
7
  <style>
 
 
 
 
 
 
 
 
8
  /* 文章容器样式 */
9
  .article-container {
10
  max-width: 900px;
@@ -78,36 +86,36 @@
78
  color: var(--text-dark);
79
  }
80
 
81
- .article-content .markdown-body {
82
  font-size: 1.1rem;
83
  }
84
 
85
- .article-content .markdown-body h1,
86
- .article-content .markdown-body h2,
87
- .article-content .markdown-body h3 {
88
  color: var(--primary-blue);
89
  margin-top: 2em;
90
  margin-bottom: 1em;
91
  font-weight: 600;
92
  }
93
 
94
- .article-content .markdown-body p {
95
  margin-bottom: 1.5em;
96
  }
97
 
98
- .article-content .markdown-body a {
99
  color: var(--primary-blue);
100
  text-decoration: none;
101
  border-bottom: 1px dashed var(--light-blue);
102
  transition: all 0.3s;
103
  }
104
 
105
- .article-content .markdown-body a:hover {
106
  border-bottom-style: solid;
107
  color: var(--soft-purple);
108
  }
109
 
110
- .article-content .markdown-body code {
111
  background: #F8FAFC;
112
  padding: 0.2em 0.4em;
113
  border-radius: 4px;
@@ -115,7 +123,7 @@
115
  color: var(--primary-blue);
116
  }
117
 
118
- .article-content .markdown-body pre {
119
  background: #F8FAFC;
120
  border-radius: 12px;
121
  padding: 1rem;
@@ -123,13 +131,13 @@
123
  border: 1px solid var(--light-blue);
124
  }
125
 
126
- .article-content .markdown-body pre code {
127
  background: none;
128
  padding: 0;
129
  color: inherit;
130
  }
131
 
132
- .article-content .markdown-body blockquote {
133
  border-left: 4px solid var(--light-blue);
134
  padding: 0.5rem 0 0.5rem 1rem;
135
  margin: 1.5rem 0;
@@ -137,7 +145,7 @@
137
  background: #F8FAFC;
138
  }
139
 
140
- .article-content .markdown-body img {
141
  max-width: 100%;
142
  border-radius: 12px;
143
  margin: 1.5rem 0;
@@ -185,7 +193,7 @@
185
  transform-origin: bottom right;
186
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
187
  z-index: 999;
188
- border: 1px solid var(--light-blue);
189
  }
190
 
191
  .chat-window.active {
@@ -235,7 +243,6 @@
235
  display: flex;
236
  flex-direction: column;
237
  gap: 1rem;
238
- width: 100%;
239
  background: #f8f9fa;
240
  }
241
 
@@ -268,13 +275,13 @@
268
  .chat-message p {
269
  margin: 0;
270
  margin-bottom: 0.75rem;
271
- white-space: pre-wrap;
272
  }
273
 
274
  .chat-message p:last-child {
275
  margin-bottom: 0;
276
  }
277
 
 
278
  .chat-message pre {
279
  background: #f1f5f9;
280
  border-radius: 8px;
@@ -302,22 +309,6 @@
302
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
303
  }
304
 
305
- .chat-message img {
306
- max-width: 100%;
307
- height: auto;
308
- border-radius: 8px;
309
- margin: 0.75rem 0;
310
- }
311
-
312
- .chat-message blockquote {
313
- border-left: 3px solid var(--light-blue);
314
- margin: 0.75rem 0;
315
- padding: 0.5rem 0 0.5rem 1rem;
316
- color: #64748b;
317
- background: #f8fafc;
318
- border-radius: 4px;
319
- }
320
-
321
  .chat-message .katex-display {
322
  margin: 0.75rem 0;
323
  overflow-x: auto;
@@ -328,25 +319,6 @@
328
  font-size: 1.1em;
329
  }
330
 
331
- .chat-message table {
332
- border-collapse: collapse;
333
- width: 100%;
334
- margin: 0.75rem 0;
335
- overflow-x: auto;
336
- display: block;
337
- }
338
-
339
- .chat-message table th,
340
- .chat-message table td {
341
- padding: 0.5rem 0.75rem;
342
- border: 1px solid var(--light-blue);
343
- }
344
-
345
- .chat-message table th {
346
- background: #f8fafc;
347
- font-weight: 600;
348
- }
349
-
350
  .chat-input-container {
351
  padding: 1.25rem;
352
  border-top: 1px solid var(--light-blue);
@@ -396,7 +368,7 @@
396
  transform: translateY(-2px);
397
  }
398
 
399
- /* 动画 */
400
  @keyframes messageSlide {
401
  from {
402
  opacity: 0;
@@ -408,7 +380,7 @@
408
  }
409
  }
410
 
411
- /* 响应式设计 */
412
  @media (max-width: 768px) {
413
  .article-container {
414
  padding: 1.5rem;
 
5
  {% block extra_css %}
6
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css">
7
  <style>
8
+ :root {
9
+ --primary-blue: #4A90E2;
10
+ --light-blue: #63C2DE;
11
+ --soft-purple: #9B59B6;
12
+ --text-dark: #2C3E50;
13
+ --warm-cream: #FFF9E6;
14
+ }
15
+
16
  /* 文章容器样式 */
17
  .article-container {
18
  max-width: 900px;
 
86
  color: var(--text-dark);
87
  }
88
 
89
+ .markdown-body {
90
  font-size: 1.1rem;
91
  }
92
 
93
+ .markdown-body h1,
94
+ .markdown-body h2,
95
+ .markdown-body h3 {
96
  color: var(--primary-blue);
97
  margin-top: 2em;
98
  margin-bottom: 1em;
99
  font-weight: 600;
100
  }
101
 
102
+ .markdown-body p {
103
  margin-bottom: 1.5em;
104
  }
105
 
106
+ .markdown-body a {
107
  color: var(--primary-blue);
108
  text-decoration: none;
109
  border-bottom: 1px dashed var(--light-blue);
110
  transition: all 0.3s;
111
  }
112
 
113
+ .markdown-body a:hover {
114
  border-bottom-style: solid;
115
  color: var(--soft-purple);
116
  }
117
 
118
+ .markdown-body code {
119
  background: #F8FAFC;
120
  padding: 0.2em 0.4em;
121
  border-radius: 4px;
 
123
  color: var(--primary-blue);
124
  }
125
 
126
+ .markdown-body pre {
127
  background: #F8FAFC;
128
  border-radius: 12px;
129
  padding: 1rem;
 
131
  border: 1px solid var(--light-blue);
132
  }
133
 
134
+ .markdown-body pre code {
135
  background: none;
136
  padding: 0;
137
  color: inherit;
138
  }
139
 
140
+ .markdown-body blockquote {
141
  border-left: 4px solid var(--light-blue);
142
  padding: 0.5rem 0 0.5rem 1rem;
143
  margin: 1.5rem 0;
 
145
  background: #F8FAFC;
146
  }
147
 
148
+ .markdown-body img {
149
  max-width: 100%;
150
  border-radius: 12px;
151
  margin: 1.5rem 0;
 
193
  transform-origin: bottom right;
194
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
195
  z-index: 999;
196
+ border: 2px solid var(--light-blue);
197
  }
198
 
199
  .chat-window.active {
 
243
  display: flex;
244
  flex-direction: column;
245
  gap: 1rem;
 
246
  background: #f8f9fa;
247
  }
248
 
 
275
  .chat-message p {
276
  margin: 0;
277
  margin-bottom: 0.75rem;
 
278
  }
279
 
280
  .chat-message p:last-child {
281
  margin-bottom: 0;
282
  }
283
 
284
+ /* Chat Message Content Styling */
285
  .chat-message pre {
286
  background: #f1f5f9;
287
  border-radius: 8px;
 
309
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
310
  }
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  .chat-message .katex-display {
313
  margin: 0.75rem 0;
314
  overflow-x: auto;
 
319
  font-size: 1.1em;
320
  }
321
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  .chat-input-container {
323
  padding: 1.25rem;
324
  border-top: 1px solid var(--light-blue);
 
368
  transform: translateY(-2px);
369
  }
370
 
371
+ /* Animations */
372
  @keyframes messageSlide {
373
  from {
374
  opacity: 0;
 
380
  }
381
  }
382
 
383
+ /* Responsive Design */
384
  @media (max-width: 768px) {
385
  .article-container {
386
  padding: 1.5rem;