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

Update app/templates/article.html

Browse files
Files changed (1) hide show
  1. app/templates/article.html +103 -18
app/templates/article.html CHANGED
@@ -15,7 +15,7 @@
15
 
16
  /* 文章容器样式 */
17
  .article-container {
18
- max-width: 900px;
19
  margin: 0 auto;
20
  background: white;
21
  border-radius: 20px;
@@ -382,28 +382,113 @@
382
 
383
  /* Responsive Design */
384
  @media (max-width: 768px) {
385
- .article-container {
386
- padding: 1.5rem;
387
- border-radius: 12px;
388
- }
 
 
 
 
389
 
390
- .article-title {
391
- font-size: 2rem;
392
- }
 
393
 
394
- .chat-window {
395
- right: 1rem;
396
- bottom: 1rem;
397
- left: 1rem;
398
- width: auto;
399
- height: 500px;
400
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
 
402
- .chat-toggle {
403
- right: 1rem;
404
- bottom: 1rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
405
  }
406
  }
 
407
  </style>
408
  {% endblock %}
409
 
 
15
 
16
  /* 文章容器样式 */
17
  .article-container {
18
+ max-width: 110vh;
19
  margin: 0 auto;
20
  background: white;
21
  border-radius: 20px;
 
382
 
383
  /* Responsive Design */
384
  @media (max-width: 768px) {
385
+ /* 文章区域移动端优化 */
386
+ .article-container {
387
+ max-width: 60vh;
388
+ padding: 1.25rem;
389
+ border-radius: 12px;
390
+ margin: 1rem;
391
+ border-width: 1px;
392
+ }
393
 
394
+ .article-header {
395
+ margin-bottom: 1.5rem;
396
+ padding-bottom: 1rem;
397
+ }
398
 
399
+ .article-title {
400
+ font-size: 1.75rem;
401
+ line-height: 1.4;
402
+ }
403
+
404
+ .article-meta {
405
+ flex-wrap: wrap;
406
+ gap: 1rem;
407
+ }
408
+
409
+ .article-summary {
410
+ margin: 1.5rem 0;
411
+ padding: 1.25rem;
412
+ }
413
+
414
+ /* 聊天窗口移动端优化 */
415
+ .chat-window {
416
+ position: fixed;
417
+ right: 0;
418
+ bottom: 0;
419
+ left: 0;
420
+ width: 100%;
421
+ height: 90vh;
422
+ margin: 0;
423
+ border-radius: 20px 20px 0 0;
424
+ transform-origin: bottom center;
425
+ }
426
+
427
+ .chat-messages {
428
+ padding: 1rem;
429
+ }
430
+
431
+ .chat-message {
432
+ max-width: 90%;
433
+ padding: 0.875rem 1rem;
434
+ font-size: 0.95rem;
435
+ }
436
+
437
+ .chat-message pre {
438
+ margin: 0.5rem 0;
439
+ padding: 0.875rem;
440
+ font-size: 0.85rem;
441
+ }
442
+
443
+ .chat-input-wrapper {
444
+ padding: 0.875rem;
445
+ }
446
+
447
+ .chat-input {
448
+ min-height: 40px;
449
+ padding: 0.625rem 0.875rem;
450
+ font-size: 0.95rem;
451
+ }
452
+
453
+ .chat-send {
454
+ width: 40px;
455
+ height: 40px;
456
+ }
457
+
458
+ .chat-toggle {
459
+ right: 1rem;
460
+ bottom: 1rem;
461
+ width: 48px;
462
+ height: 48px;
463
+ font-size: 1.25rem;
464
+ }
465
 
466
+ /* 触摸设备优化 */
467
+ .chat-message,
468
+ .chat-input,
469
+ .chat-send,
470
+ .chat-toggle {
471
+ touch-action: manipulation;
472
+ -webkit-tap-highlight-color: transparent;
473
+ }
474
+
475
+ /* 提高移动端可读性 */
476
+ .markdown-body {
477
+ font-size: 1rem;
478
+ line-height: 1.6;
479
+ }
480
+
481
+ .markdown-body pre {
482
+ -webkit-overflow-scrolling: touch;
483
+ }
484
+
485
+ /* 优化键盘弹出时的布局 */
486
+ @media (max-height: 600px) {
487
+ .chat-window {
488
+ height: 85vh;
489
  }
490
  }
491
+ }
492
  </style>
493
  {% endblock %}
494