File size: 18,838 Bytes
ca533c7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 |
/* Reset and base styles */
:root {
--primary-color: #3498db;
--primary-hover: #2980b9;
--text-color: #2c3e50; /* 更深的默认文本颜色 */
--text-content: #1a1a1a; /* 新增:笔记内容的颜色 */
--bg-color: #f9f9f9;
--container-bg: #ffffff;
--border-color: #ddd; /* 修改为更明显的边框颜色 */
--success-color: #2ecc71;
--shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-color);
background: var(--bg-color) url('https://image.ulaara.xyz/file/1729940342977_pFyErOU.png') no-repeat center center fixed;
background-size: cover;
min-height: 100vh;
padding: 20px;
}
/* Container styling */
.container {
max-width: 1200px;
margin: 0 auto;
background: var(--container-bg);
padding: 2rem;
border-radius: 12px;
box-shadow: var(--shadow);
backdrop-filter: blur(10px);
background-color: rgba(255, 255, 255, 0.9); /* 添加半透明背景 */
}
/* 深色模式下的调整 */
@media (prefers-color-scheme: dark) {
.container {
background-color: rgba(45, 45, 45, 0.9); /* 深色模式下的半透明背景 */
}
}
/* Header styling */
h1 {
color: var(--text-color);
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 0.5rem;
}
p {
color: #666;
margin-bottom: 2rem;
}
/* Form elements */
#pasteForm {
display: flex;
flex-direction: column;
gap: 1.5rem;
width: 100%;
}
textarea {
width: 100%;
min-height: 400px;
padding: 1rem;
border: 2px solid var(--border-color);
border-radius: 8px;
font-family: 'Monaco', 'Consolas', monospace;
font-size: 1rem;
line-height: 1.5;
color: var(--text-content);
font-weight: 500; /* 略微加粗 */
resize: vertical;
transition: border-color 0.3s ease;
}
textarea:focus {
outline: none;
border-color: var(--primary-color);
}
/* Options grid */
.options {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
width: 100%;
margin: 1rem 0;
padding: 1rem;
border: 2px solid var(--border-color);
border-radius: 8px;
background: var(--container-bg);
}
.option {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
/* Form controls */
label {
font-weight: 500;
color: var(--text-color);
display: flex;
align-items: center;
gap: 0.5rem;
}
select,
input[type="number"] {
padding: 0.75rem;
border: 2px solid var(--border-color);
border-radius: 6px;
font-size: 1rem;
width: 100%;
background: white;
transition: border-color 0.3s ease;
}
select:focus,
input[type="number"]:focus {
outline: none;
border-color: var(--primary-color);
}
input[type="checkbox"] {
width: 1.2rem;
height: 1.2rem;
border-radius: 4px;
accent-color: var(--primary-color);
}
/* Button container */
.form-actions {
display: flex;
justify-content: flex-end;
width: 100%;
margin-top: 1rem;
}
/* Button styling */
.form-actions button {
background: var(--primary-color);
color: white;
border: none;
padding: 1rem 2rem;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
width: auto;
min-width: 150px;
max-width: 200px;
}
.form-actions button:hover {
background: var(--primary-hover);
transform: translateY(-1px);
}
/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
select,
input[type="number"] {
background: #333;
color: var(--text-color);
border-color: var(--border-color);
}
.options {
background: var(--container-bg);
border-color: var(--border-color);
}
}
/* Mobile adjustments */
@media screen and (max-width: 768px) {
.options {
grid-template-columns: 1fr;
padding: 0.75rem;
}
.form-actions button {
width: 100%;
max-width: none;
}
}
/* Content display */
#content {
background: white;
padding: 2rem;
border-radius: 8px;
border: 2px solid var(--border-color);
margin-top: 1rem;
overflow-x: auto;
color: var(--text-content);
font-weight: 500;
}
pre {
font-family: 'Monaco', 'Consolas', monospace;
white-space: pre-wrap;
word-wrap: break-word;
color: var(--text-content);
font-weight: 500;
}
/* Info section */
.info {
background: #f8f9fa;
padding: 1rem;
border-radius: 6px;
color: #666;
font-size: 0.9rem;
margin-bottom: 1rem;
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
/* Decrypt section */
#decrypt-section {
background: #fff3cd;
color: #856404;
padding: 1rem;
border-radius: 6px;
margin: 1rem 0;
}
#decryption-error {
background: #f8d7da;
color: #721c24;
padding: 1rem;
border-radius: 6px;
margin-top: 1rem;
}
/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
body {
padding: 10px;
}
.container {
padding: 1rem;
}
h1 {
font-size: 2rem;
}
textarea {
min-height: 300px;
}
.options {
grid-template-columns: 1fr;
padding: 0.75rem;
}
button[type="submit"] {
width: 100%;
max-width: none;
}
#content {
padding: 1rem;
}
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
:root {
--bg-color: #1a1a1a;
--container-bg: #2d2d2d;
--text-color: #e0e0e0;
--text-content: #ffffff; /* 深色模式下的内容颜色 */
--border-color: #555; /* 深色模式下更明显的边框颜色 */
--primary-color: #4dabf7;
--primary-hover: #339af0;
}
select, input[type="number"], textarea {
background: #333;
color: var(--text-color);
border-color: var(--border-color);
}
#content {
background: #333;
}
#decrypt-section {
background: #2c2c1d;
color: #ffd700;
}
#decryption-error {
background: #2c1d1d;
color: #ff7070;
}
.info {
background: #333;
color: #999;
}
textarea, #content, pre {
color: var(--text-content);
}
#markdown-content {
color: var(--text-content);
}
.options {
background: var(--container-bg);
border-color: var(--border-color);
}
}
#markdown-content {
color: var(--text-content);
font-weight: 500;
}
/* 编辑器容器 */
.editor-container {
margin-bottom: 1.5rem;
width: 100%;
}
/* Markdown split view */
.split-view {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
width: 100%;
position: relative;
margin-bottom: 1.5rem;
}
.split-view textarea {
min-height: 500px;
height: 500px;
resize: none;
width: 100%;
overflow-y: auto;
}
/* 修改预览窗口的选择器 */
.split-view .markdown-preview {
border: 2px solid var(--border-color);
border-radius: 8px;
padding: 1rem;
overflow-y: auto;
background: var(--container-bg); /* 使用容器背景色 */
height: 500px;
width: 100%;
line-height: 1.5;
font-size: 1rem;
color: var(--text-color); /* 确保文字颜色正确 */
}
/* 深色模式下的预览窗 */
@media (prefers-color-scheme: dark) {
.split-view .markdown-preview {
background: #333;
color: var(--text-color);
}
}
/* 确保滚动条在深色模式下可见 */
.split-view textarea::-webkit-scrollbar,
.split-view .markdown-preview::-webkit-scrollbar {
width: 8px;
background: transparent;
}
.split-view textarea::-webkit-scrollbar-track,
.split-view .markdown-preview::-webkit-scrollbar-track {
background: var(--bg-color);
border-radius: 4px;
}
.split-view textarea::-webkit-scrollbar-thumb,
.split-view .markdown-preview::-webkit-scrollbar-thumb {
background: #888;
border-radius: 4px;
}
.split-view textarea::-webkit-scrollbar-thumb:hover,
.split-view .markdown-preview::-webkit-scrollbar-thumb:hover {
background: #666;
}
/* 修改预览窗口中图片的样 */
.markdown-preview img {
max-width: 80% !important;
height: auto !important;
display: block;
margin: 0.5rem auto; /* 减小图片上下间距 */
max-height: 300px !important; /* 稍微降低最大高度 */
object-fit: contain;
border: 1px solid var(--border-color);
border-radius: 4px;
transition: all 0.3s ease;
}
/* 图片悬停效果 */
.markdown-preview img:hover {
cursor: zoom-in;
opacity: 0.95;
box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
}
/* 移动端的图片样式调整 */
@media screen and (max-width: 768px) {
.markdown-preview img {
max-width: 90% !important; /* 增加到90% */
max-height: 250px !important;
}
}
/* 表单选项区域 */
#pasteForm {
display: flex;
flex-direction: column;
gap: 1.5rem;
width: 100%;
margin-bottom: 2rem;
}
.options {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
width: 100%;
margin: 1rem 0;
padding: 1rem;
border: 2px solid var(--border-color);
border-radius: 8px;
background: var(--container-bg);
}
/* 确按钮区域正确定位 */
.form-actions {
display: flex;
justify-content: flex-end;
width: 100%;
margin-top: 1rem;
}
/* 移动端的图片尺寸 */
@media screen and (max-width: 768px) {
.split-view .preview img {
max-width: 70% !important;
max-height: 150px !important;
}
}
/* 调整图片悬停效果 */
.split-view .preview img:hover {
cursor: pointer;
opacity: 0.9;
}
/* 调整预览窗口中的段落间距 */
.markdown-preview p {
margin: 0 0 1rem 0; /* 减小段落间距 */
line-height: 1.5; /* 确保与textarea一致 */
}
/* 调整预览窗口中的图片布局 */
.markdown-preview img {
max-width: 80% !important;
height: auto !important;
display: block;
margin: 0.5rem auto; /* 减小图片上下间距 */
max-height: 300px !important; /* 稍微降低最大高度 */
object-fit: contain;
border: 1px solid var(--border-color);
border-radius: 4px;
}
/* 调整预览窗口中的标题间距 */
.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
margin: 0.5rem 0; /* 减小标题的上下间距 */
line-height: 1.5;
}
/* 调整预览窗口中的列表间距 */
.markdown-preview ul,
.markdown-preview ol {
margin: 0.5rem 0;
padding-left: 1.5rem;
}
.markdown-preview li {
margin: 0;
line-height: 1.5;
}
/* 调整预览窗口中的代码块间距 */
.markdown-preview pre,
.markdown-preview code {
margin: 0.5rem 0;
line-height: 1.5;
}
/* 调整预览窗口中的引用块间距 */
.markdown-preview blockquote {
margin: 0.5rem 0;
padding: 0.5rem 1rem;
line-height: 1.5;
}
/* 确保表单控件有明显的边框 */
textarea,
select,
input[type="number"] {
border: 2px solid var(--border-color);
background: #ffffff;
}
/* 深色模式下的边框和背景调整 */
@media (prefers-color-scheme: dark) {
:root {
--bg-color: #1a1a1a;
--container-bg: #2d2d2d;
--text-color: #e0e0e0;
--text-content: #ffffff;
--border-color: #555; /* 深色模式下更明显的边框颜色 */
--primary-color: #4dabf7;
--primary-hover: #339af0;
}
textarea,
select,
input[type="number"] {
background: #333;
border-color: var(--border-color);
color: var(--text-color);
}
}
/* 删除滚动提示样式 */
.editor-container::after {
display: none; /* 或直接删除这个样式块 */
}
/* 调整编辑器容器的边距 */
.editor-container {
position: relative;
margin-bottom: 1.5rem; /* 恢复原来的边距 */
}
/* 修改 split-view 相关样式 */
.split-view {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
width: 100%;
position: relative;
margin-bottom: 1.5rem;
}
/* 修改 textarea 和预览窗口的样式 */
.split-view textarea,
.split-view .markdown-preview {
height: 100%; /* 改为相对高度 */
min-height: 500px;
resize: vertical; /* 允许垂直调整大小 */
width: 100%;
overflow-y: auto;
}
/* 添加新的容器样式来同步高度 */
.editor-container {
display: flex;
flex-direction: column;
}
.editor-container.split-view {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
/* 确保预览窗口跟随 textarea 的高度 */
.markdown-preview {
height: 100%;
border: 2px solid var(--border-color);
border-radius: 8px;
padding: 1rem;
overflow-y: auto;
background: var(--container-bg);
line-height: 1.5;
font-size: 1rem;
color: var(--text-color);
}
/* 添加加密内容的样式规则 */
#content #markdown-content img {
max-width: 80% !important;
height: auto !important;
display: block;
margin: 0.5rem auto;
max-height: 300px !important;
object-fit: contain;
border: 1px solid var(--border-color);
border-radius: 4px;
transition: all 0.3s ease;
}
#content #markdown-content {
color: var(--text-content);
font-weight: 500;
line-height: 1.5;
}
/* 确保加密内容的容器样式正确 */
#content {
background: var(--container-bg);
padding: 2rem;
border-radius: 8px;
border: 2px solid var(--border-color);
margin-top: 1rem;
overflow-x: auto;
color: var(--text-content);
font-weight: 500;
width: 100%;
}
/* 修改预览窗口中图片的样式 */
.markdown-preview img,
#content #markdown-content img {
max-width: 100% !important; /* 改为100% */
height: auto !important;
display: block;
margin: 0.5rem auto;
max-height: 600px !important; /* 增加最大高度 */
object-fit: contain;
border: 1px solid var(--border-color);
border-radius: 4px;
transition: all 0.3s ease;
}
/* 移动端的图片样式调整 */
@media screen and (max-width: 768px) {
.markdown-preview img,
#content #markdown-content img {
max-width: 100% !important;
max-height: 400px !important; /* 移动端也适当增加高度 */
}
}
/* 文件分享相关样式 */
.tab-buttons {
display: flex;
gap: 1rem;
margin-bottom: 1rem;
}
.tab-button {
padding: 0.5rem 1rem;
border: 2px solid var(--border-color);
border-radius: 4px;
background: none;
cursor: pointer;
transition: all 0.3s ease;
}
.tab-button.active {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
.file-upload-container {
border: 2px dashed var(--border-color);
padding: 2rem;
text-align: center;
margin-bottom: 1rem;
border-radius: 8px;
transition: border-color 0.3s ease;
}
.file-upload-container:hover {
border-color: var(--primary-color);
}
.file-upload-container input[type="file"] {
margin-bottom: 1rem;
}
.file-info {
margin-top: 1rem;
font-size: 0.9rem;
color: #666;
}
.code-input-container {
display: flex;
gap: 1rem;
margin-top: 2rem;
padding-top: 2rem;
border-top: 1px solid var(--border-color);
}
.code-input-container input {
flex: 1;
padding: 0.75rem;
border: 2px solid var(--border-color);
border-radius: 6px;
font-size: 1rem;
}
.code-input-container button {
padding: 0.75rem 1.5rem;
background: var(--primary-color);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
transition: all 0.3s ease;
}
.code-input-container button:hover {
background: var(--primary-hover);
}
/* 上传进度条样式 */
.upload-progress {
margin-top: 1rem;
width: 100%;
}
.progress-bar {
width: 100%;
height: 20px;
background-color: var(--border-color);
border-radius: 10px;
overflow: hidden;
}
.progress-bar-fill {
height: 100%;
background-color: var(--primary-color);
width: 0;
transition: width 0.3s ease;
}
.progress-text {
text-align: center;
margin-top: 0.5rem;
font-size: 0.9rem;
color: var(--text-color);
}
/* 文件上传容器样式优化 */
.file-upload-container {
border: 2px dashed var(--border-color);
padding: 2rem;
text-align: center;
margin-bottom: 1rem;
border-radius: 8px;
transition: border-color 0.3s ease;
}
.file-upload-container:hover {
border-color: var(--primary-color);
}
.file-upload-container input[type="file"] {
margin-bottom: 1rem;
}
/* 添加加载动画样式 */
.loading-spinner {
width: 40px;
height: 40px;
margin: 20px auto;
border: 4px solid var(--border-color);
border-top: 4px solid var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 添加提取码和分享链接的样式 */
.share-info {
margin: 1.5rem 0;
}
.copy-group {
display: flex;
align-items: center;
gap: 0.5rem;
margin: 0.5rem 0;
padding: 0.5rem;
background: var(--bg-color);
border-radius: 4px;
}
.copy-group label {
font-weight: 500;
color: var(--text-color);
white-space: nowrap;
}
.copy-text {
flex: 1;
padding: 0.5rem;
background: var(--container-bg);
border: 1px solid var(--border-color);
border-radius: 4px;
font-family: monospace;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.copy-btn {
padding: 0.5rem 1rem;
background: var(--primary-color);
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background 0.3s ease;
}
.copy-btn:hover {
background: var(--primary-hover);
}
.close-btn {
margin-top: 1rem;
padding: 0.5rem 1.5rem;
background: var(--border-color);
color: var(--text-color);
border: none;
border-radius: 4px;
cursor: pointer;
transition: background 0.3s ease;
}
.close-btn:hover {
background: #ccc;
}
/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
.copy-group {
background: rgba(255, 255, 255, 0.1);
}
.copy-text {
background: var(--container-bg);
color: var(--text-color);
}
.close-btn {
background: #444;
color: #fff;
}
.close-btn:hover {
background: #555;
}
}
|