popup.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>ReadVox</title>
  6. <style>
  7. * { box-sizing: border-box; }
  8. body {
  9. margin: 0;
  10. font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  11. background: #1e1e2e;
  12. height: 100%;
  13. overflow: hidden;
  14. color: #e0e0e0;
  15. }
  16. .popup-container {
  17. display: flex;
  18. flex-direction: column;
  19. height: 100%;
  20. padding: 5px;
  21. gap: 5px;
  22. }
  23. .popup-header {
  24. display: flex;
  25. align-items: center;
  26. justify-content: space-between;
  27. }
  28. .popup-title {
  29. font-size: 12px;
  30. font-weight: 600;
  31. color: #e0e0e0;
  32. letter-spacing: 0.5px;
  33. }
  34. .close-btn {
  35. width: 18px;
  36. height: 18px;
  37. border: none;
  38. border-radius: 4px;
  39. background: rgba(255,255,255,0.1);
  40. color: #e0e0e0;
  41. font-size: 11px;
  42. cursor: pointer;
  43. display: flex;
  44. align-items: center;
  45. justify-content: center;
  46. line-height: 1;
  47. }
  48. .close-btn:hover { background: rgba(255,255,255,0.2); }
  49. .control-row {
  50. display: flex;
  51. justify-content: center;
  52. gap: 11px;
  53. align-items: center;
  54. }
  55. .icon-btn {
  56. width: 32px;
  57. height: 32px;
  58. border: none;
  59. border-radius: 50%;
  60. color: #fff;
  61. font-size: 13px;
  62. cursor: pointer;
  63. display: flex;
  64. align-items: center;
  65. justify-content: center;
  66. transition: all 0.2s ease;
  67. padding: 0;
  68. box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  69. }
  70. .icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
  71. .play-btn { background: #4285f4; }
  72. .play-btn:hover { background: #3367d6; transform: scale(1.05); }
  73. .stop-btn { background: #2e7d32; }
  74. .stop-btn:hover { background: #1b5e20; transform: scale(1.05); }
  75. .grammar-btn { background: #7c3aed; }
  76. .grammar-btn:hover { background: #6d28d9; transform: scale(1.05); }
  77. .speed-btn { background: #f59e0b; font-size: 10px; }
  78. .speed-btn:hover { background: #d97706; transform: scale(1.05); }
  79. .mode-row {
  80. display: flex;
  81. justify-content: center;
  82. gap: 10px;
  83. }
  84. .mode-btn {
  85. padding: 3px 10px;
  86. height: 23px;
  87. border: 1px solid rgba(255,255,255,0.05);
  88. border-radius: 6px;
  89. background: rgba(255,255,255,0.08);
  90. color: #aaa;
  91. font-size: 11px;
  92. cursor: pointer;
  93. transition: all 0.2s ease;
  94. text-align: center;
  95. }
  96. .mode-btn:hover { background: rgba(255,255,255,0.14); }
  97. .mode-btn.active { background: #4285f4; color: #fff; border-color: transparent; }
  98. .status-text {
  99. text-align: center;
  100. font-size: 11px;
  101. color: #999;
  102. min-height: 22px;
  103. line-height: 1.3;
  104. word-break: break-word;
  105. }
  106. </style>
  107. </head>
  108. <body>
  109. <div class="popup-container">
  110. <div class="popup-header">
  111. <span class="popup-title">ReadVox</span>
  112. <button id="close-btn" class="close-btn" title="关闭">&#x2715;</button>
  113. </div>
  114. <div class="control-row">
  115. <button id="play-btn" class="icon-btn play-btn" title="播放">▶</button>
  116. <button id="stop-btn" class="icon-btn stop-btn" title="停止">⏹</button>
  117. <button id="grammar-btn" class="icon-btn grammar-btn" title="语法高亮">G</button>
  118. <button id="speed-btn" class="icon-btn speed-btn" title="倍速">1x</button>
  119. </div>
  120. <div class="mode-row">
  121. <button id="mode-paragraph" class="mode-btn" data-mode="paragraph">Para</button>
  122. <button id="mode-selection" class="mode-btn" data-mode="selection">Select</button>
  123. <button id="mode-page" class="mode-btn" data-mode="page">Page</button>
  124. </div>
  125. <div class="status-text" id="status">Ready</div>
  126. </div>
  127. <script src="popup.js"></script>
  128. </body>
  129. </html>