index.css 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. @import url("../static/css/bootstrap.min.css");
  2. .row .x-sizes {
  3. margin-right: 20px;
  4. }
  5. .row .x-colors {
  6. margin-right: 20px;
  7. }
  8. #codeSource {
  9. height: 100px;
  10. }
  11. canvas {
  12. border: 1px solid #ddd;
  13. padding: 10px;
  14. }
  15. .x-logo {
  16. position: absolute;
  17. left: -10000px;
  18. top:-10000px;
  19. }
  20. hr.x-hr {
  21. margin: 2px 0;
  22. }
  23. #preview {
  24. padding: 5px;
  25. text-align: center;
  26. }
  27. .panel-heading .x-tips {
  28. font-size:12px;
  29. float: right;
  30. padding-bottom: 2px;
  31. border-bottom: 1px solid #ccc;
  32. cursor: default;
  33. }
  34. .panel-heading .x-tips:hover {
  35. border-bottom-color: #f00;
  36. }
  37. .panel-heading .x-tips i {
  38. color: #f00;
  39. }
  40. #_creset {
  41. font-size:12px;
  42. }
  43. .tips{
  44. color: #666;
  45. margin: 10px 0;
  46. font-size: 13px;
  47. line-height: 1.6;
  48. }
  49. table {
  50. width:100%;
  51. table-layout: fixed;
  52. }
  53. td {
  54. width:50%;
  55. vertical-align: top;
  56. }
  57. /* 现代化的内容区域样式 */
  58. .panel-body.mod-json {
  59. padding: 30px;
  60. background-color: #ffffff;
  61. }
  62. /* 输入区域样式 */
  63. .mod-textarea, #codeSource {
  64. width: 100%;
  65. border: 1px solid #e0e0e0;
  66. border-radius: 8px;
  67. padding: 15px;
  68. font-size: 14px;
  69. line-height: 1.6;
  70. background: #fafafa;
  71. transition: all 0.3s ease;
  72. box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  73. }
  74. .mod-textarea:focus, #codeSource:focus {
  75. background: #ffffff;
  76. border-color: #4a90e2;
  77. box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
  78. outline: none;
  79. }
  80. /* 操作区域样式 */
  81. .row.ui-mt-10 {
  82. background: #f8f9fa;
  83. padding: 20px;
  84. border-radius: 8px;
  85. margin-top: 20px !important;
  86. display: flex;
  87. align-items: center;
  88. flex-wrap: wrap;
  89. gap: 15px;
  90. }
  91. /* 输入框样式 */
  92. #opt_width, #opt_fc {
  93. border: 1px solid #e0e0e0;
  94. border-radius: 6px;
  95. padding: 8px 12px;
  96. font-size: 14px;
  97. background: #ffffff;
  98. transition: all 0.3s ease;
  99. }
  100. #opt_width:focus, #opt_fc:focus {
  101. border-color: #4a90e2;
  102. box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
  103. outline: none;
  104. }
  105. /* 单选框组样式 */
  106. .radio label {
  107. display: inline-flex;
  108. align-items: center;
  109. margin-right: 15px;
  110. font-size: 14px;
  111. color: #333;
  112. cursor: pointer;
  113. }
  114. .radio input[type="radio"] {
  115. margin-right: 4px;
  116. position: relative;
  117. top: -2px;
  118. }
  119. /* Style for the hint text to ensure its alignment */
  120. .hint-text {
  121. font-size: 12px;
  122. color: #666;
  123. display: inline-flex;
  124. align-items: center;
  125. margin-left: 5px;
  126. }
  127. /* If the '图标:' text is outside the label, ensure it's also aligned */
  128. .x-icons {
  129. display: inline-flex;
  130. align-items: center;
  131. }
  132. /* 生成按钮样式 */
  133. .btn-success {
  134. background: #4a90e2;
  135. border: none;
  136. border-radius: 6px;
  137. padding: 10px 20px;
  138. font-size: 14px;
  139. font-weight: 500;
  140. color: #fff;
  141. transition: all 0.3s ease;
  142. box-shadow: 0 2px 4px rgba(74,144,226,0.2);
  143. }
  144. .btn-success:hover {
  145. background: #357abd;
  146. box-shadow: 0 4px 8px rgba(74,144,226,0.3);
  147. transform: translateY(-1px);
  148. }
  149. /* 结果预览区域 */
  150. #preview {
  151. margin-top: 25px;
  152. padding: 25px;
  153. background: #ffffff;
  154. border-radius: 8px;
  155. box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  156. }
  157. /* 解码模式样式 */
  158. td .x-panel {
  159. height: 460px;
  160. background: #ffffff;
  161. border: 2px dashed #e0e0e0;
  162. border-radius: 8px;
  163. padding: 20px;
  164. margin-right: 15px;
  165. transition: all 0.3s ease;
  166. display: flex;
  167. flex-direction: column;
  168. justify-content: center;
  169. align-items: center;
  170. }
  171. td .x-panel:hover {
  172. border-color: #4a90e2;
  173. background: #f8f9fa;
  174. }
  175. td .x-panel .x-tips {
  176. margin-top: 20px;
  177. color: #666;
  178. font-size: 14px;
  179. line-height: 1.6;
  180. }
  181. #upload {
  182. background: #4a90e2;
  183. border-radius: 6px;
  184. padding: 12px 24px;
  185. font-size: 15px;
  186. color: #fff;
  187. text-decoration: none;
  188. transition: all 0.3s ease;
  189. box-shadow: 0 2px 4px rgba(74,144,226,0.2);
  190. }
  191. #upload:hover {
  192. background: #357abd;
  193. box-shadow: 0 4px 8px rgba(74,144,226,0.3);
  194. transform: translateY(-1px);
  195. }
  196. #decodePreview {
  197. max-width: 100%;
  198. max-height: 300px;
  199. margin: 15px 0;
  200. border-radius: 4px;
  201. object-fit: contain;
  202. }
  203. #decodeResult {
  204. height: 460px;
  205. padding: 15px;
  206. background: #fafafa;
  207. border: 1px solid #e0e0e0;
  208. border-radius: 8px;
  209. font-size: 14px;
  210. line-height: 1.6;
  211. resize: none;
  212. transition: all 0.3s ease;
  213. }
  214. #decodeResult:focus {
  215. background: #ffffff;
  216. border-color: #4a90e2;
  217. box-shadow: 0 0 0 2px rgba(74,144,226,0.2);
  218. outline: none;
  219. }
  220. /* 保持原有的顶部导航样式 */
  221. .x-switch {
  222. font-size: 14px;
  223. font-weight: 500;
  224. color: #2563eb;
  225. cursor: pointer;
  226. text-decoration: none;
  227. border: none;
  228. margin-left: 70px;
  229. white-space: nowrap;
  230. margin-right: auto;
  231. padding: 8px 16px;
  232. border-radius: 20px;
  233. background-color: #eff6ff;
  234. transition: all 0.2s ease;
  235. position: relative;
  236. display: inline-flex;
  237. align-items: center;
  238. box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
  239. }
  240. .x-switch::before {
  241. content: '';
  242. display: inline-block;
  243. width: 18px;
  244. height: 18px;
  245. margin-right: 6px;
  246. background: url('../static/img/switch-mode.svg') no-repeat center center;
  247. background-size: contain;
  248. opacity: 0.8;
  249. transition: transform 0.3s ease;
  250. }
  251. .x-switch:hover,.x-donate-link:hover {
  252. background-color: #dbeafe;
  253. color: #1d4ed8;
  254. text-decoration: none;
  255. box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
  256. transform: translateY(-1px);
  257. }
  258. .x-switch:hover::before {
  259. transform: rotate(180deg);
  260. opacity: 1;
  261. }
  262. .x-donate-link {
  263. margin: 0 10px;
  264. font-size: 12px;
  265. font-weight: normal;
  266. }
  267. form {
  268. display: none;
  269. }
  270. /* 三栏布局样式 */
  271. .qr-layout {
  272. display: flex;
  273. gap: 20px;
  274. padding: 20px;
  275. min-height: 500px;
  276. }
  277. .qr-left, .qr-center, .qr-right {
  278. background: #fff;
  279. border-radius: 8px;
  280. padding: 20px;
  281. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  282. }
  283. .qr-left {
  284. flex: 1.5;
  285. display: flex;
  286. flex-direction: column;
  287. background-color: #f8f9fa;
  288. }
  289. .qr-center {
  290. flex: 1;
  291. }
  292. .qr-right {
  293. flex: 1.5;
  294. background-color: #f8f9fa;
  295. }
  296. .section-title {
  297. font-size: 16px;
  298. font-weight: 500;
  299. color: #333;
  300. margin-bottom: 15px;
  301. padding-bottom: 10px;
  302. border-bottom: 1px solid #eee;
  303. display: flex;
  304. justify-content: space-between;
  305. align-items: center;
  306. }
  307. .action-buttons {
  308. display: flex;
  309. gap: 8px;
  310. }
  311. .btn-action {
  312. background-color: #e9ecef;
  313. border: none;
  314. border-radius: 4px;
  315. padding: 4px 10px;
  316. font-size: 12px;
  317. color: #495057;
  318. cursor: pointer;
  319. transition: background-color 0.2s ease;
  320. }
  321. .btn-action:hover {
  322. background-color: #ced4da;
  323. color: #212529;
  324. }
  325. /* Style for successful copy */
  326. .btn-action-success {
  327. background-color: #28a745 !important; /* Green background */
  328. color: #fff !important; /* White text */
  329. }
  330. /* 控制面板样式 */
  331. .control-panel {
  332. display: flex;
  333. flex-direction: column;
  334. gap: 20px;
  335. }
  336. .control-item {
  337. display: flex;
  338. align-items: center;
  339. gap: 10px;
  340. }
  341. .control-item label {
  342. min-width: 50px;
  343. color: #666;
  344. }
  345. /* 输入框样式优化 */
  346. .mod-textarea {
  347. flex: 1;
  348. min-height: 200px;
  349. margin: 0;
  350. resize: none;
  351. }
  352. /* 输入框样式 */
  353. #opt_width, #opt_fc {
  354. flex: 1;
  355. max-width: 120px;
  356. height: 36px;
  357. border: 1px solid #e0e0e0;
  358. border-radius: 6px;
  359. padding: 8px 12px;
  360. font-size: 14px;
  361. background: #ffffff;
  362. transition: all 0.3s ease;
  363. }
  364. /* 按钮容器样式 */
  365. .control-item:last-child {
  366. margin-top: 20px;
  367. justify-content: center;
  368. }
  369. /* 预览区域样式 */
  370. #preview {
  371. display: flex;
  372. justify-content: center;
  373. align-items: center;
  374. min-height: 260px;
  375. background: #fafafa;
  376. border-radius: 6px;
  377. padding: 20px;
  378. }
  379. /* 确保图标选择区域样式正确 */
  380. .x-icons {
  381. display: flex;
  382. align-items: center;
  383. gap: 10px;
  384. flex-wrap: wrap;
  385. }
  386. .radio label {
  387. display: inline-flex;
  388. align-items: center;
  389. gap: 4px;
  390. }
  391. .hint-text {
  392. color: #666;
  393. font-size: 12px;
  394. margin-left: 8px;
  395. }
  396. /* 解码器布局样式 */
  397. .qr-decoder-layout {
  398. display: flex;
  399. gap: 20px;
  400. padding: 20px;
  401. min-height: 500px;
  402. }
  403. .decoder-left, .decoder-right {
  404. flex: 1;
  405. background: #f8f9fa; /* Consistent background */
  406. border-radius: 8px;
  407. padding: 20px;
  408. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  409. display: flex;
  410. flex-direction: column;
  411. }
  412. .decoder-right {
  413. background: #fff; /* Keep right panel white or match left */
  414. }
  415. /* 上传面板样式 */
  416. .upload-panel {
  417. flex: 1;
  418. min-height: 300px;
  419. background: #fff;
  420. border: 2px dashed #e0e0e0;
  421. border-radius: 8px;
  422. padding: 20px;
  423. transition: all 0.3s ease;
  424. display: flex;
  425. flex-direction: column;
  426. justify-content: center;
  427. align-items: center;
  428. text-align: center;
  429. }
  430. .upload-panel:hover {
  431. border-color: #4a90e2;
  432. background: #fdfdfd;
  433. }
  434. .upload-instructions {
  435. margin-top: 20px;
  436. }
  437. .drag-drop-text {
  438. display: block;
  439. margin-top: 10px;
  440. color: #666;
  441. font-size: 14px;
  442. }
  443. /* 上传按钮 (#upload) 使用之前的现代样式 */
  444. #upload {
  445. background: #4a90e2;
  446. border-radius: 6px;
  447. padding: 12px 24px;
  448. font-size: 15px;
  449. color: #fff;
  450. text-decoration: none;
  451. transition: all 0.3s ease;
  452. box-shadow: 0 2px 4px rgba(74,144,226,0.2);
  453. border: none;
  454. display: inline-block;
  455. cursor: pointer;
  456. }
  457. #upload:hover {
  458. background: #357abd;
  459. box-shadow: 0 4px 8px rgba(74,144,226,0.3);
  460. transform: translateY(-1px);
  461. }
  462. /* 预览图片样式 */
  463. #decodePreview {
  464. max-width: 100%;
  465. max-height: 250px;
  466. margin-bottom: 15px;
  467. border-radius: 4px;
  468. object-fit: contain;
  469. }
  470. /* 解码结果文本域 (#decodeResult) 使用之前的 .mod-textarea 样式 */
  471. #decodeResult {
  472. flex: 1;
  473. /* Inherits styles from .mod-textarea */
  474. min-height: 300px; /* Ensure it takes available space */
  475. margin: 0; /* Reset margin */
  476. }
  477. /* 解码提示文字样式 */
  478. .decoder-tips {
  479. margin-top: 15px;
  480. font-size: 13px;
  481. color: #666;
  482. line-height: 1.6;
  483. }
  484. .decoder-tips i {
  485. font-style: normal;
  486. color: #333;
  487. font-weight: 500;
  488. }
  489. /* --- Top Navigation Bar --- */
  490. .panel-heading {
  491. padding: 10px 20px 2px; /* Increased padding for more space */
  492. background-color: #ffffff; /* Keep white or use a very light grey like #f8f9fa */
  493. border-bottom: 1px solid #dee2e6; /* Lighter, softer border color */
  494. }
  495. .panel-title {
  496. font-size: 16px;
  497. font-weight: 600; /* Slightly bolder title */
  498. display: flex;
  499. align-items: center;
  500. color: #212529; /* Darker text color */
  501. }
  502. .title-text-wrapper {
  503. display: inline-block;
  504. white-space: nowrap;
  505. }
  506. .panel-title .x-a-high {
  507. color: #212529; /* Match title color */
  508. text-decoration: none;
  509. display: inline-flex;
  510. align-items: center;
  511. font-weight: 600; /* Match title weight */
  512. }
  513. .panel-title .x-a-high img {
  514. vertical-align: middle;
  515. margin-right: 6px; /* Slightly more space */
  516. height: 18px;
  517. }
  518. /* Style for the mode switch button */
  519. .x-switch {
  520. position: relative;
  521. top: -3px;
  522. font-size: 13px;
  523. color: #007bff; /* Standard blue */
  524. cursor: pointer;
  525. text-decoration: none;
  526. border-bottom: none;
  527. font-weight: 500;
  528. margin-left: 70px;
  529. white-space: nowrap;
  530. margin-right: auto;
  531. padding: 4px 8px; /* Add some padding */
  532. border-radius: 4px; /* Rounded corners */
  533. transition: background-color 0.2s ease, color 0.2s ease; /* Smooth transition */
  534. }
  535. .x-switch:hover {
  536. background-color: #e9ecef; /* Subtle background on hover */
  537. color: #0056b3; /* Darker blue on hover */
  538. text-decoration: none; /* Remove underline on hover */
  539. }
  540. .title-text-wrapper-text {
  541. margin-left: 10px;
  542. position: relative;
  543. top: -4px;
  544. font-weight: normal;
  545. }