index.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. body {
  2. background-color: #f8f9fb;
  3. font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  4. margin: 0;
  5. padding: 0;
  6. color: #2c3e50;
  7. }
  8. .wrapper {
  9. margin: 0 auto;
  10. padding: 0;
  11. min-height: 100vh;
  12. background: #f8f9fb;
  13. display: flex;
  14. flex-direction: column;
  15. }
  16. .main-navbar {
  17. display: flex;
  18. justify-content: space-between;
  19. align-items: center;
  20. background: #fff;
  21. border-bottom: 1px solid #e5e5e5;
  22. padding: 12px 30px;
  23. box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  24. }
  25. .navbar-brand .brand-link {
  26. display: flex;
  27. align-items: center;
  28. text-decoration: none;
  29. }
  30. .navbar-brand img {
  31. width: 24px;
  32. height: 24px;
  33. margin-right: 10px;
  34. }
  35. .brand-text {
  36. font-size: 20px;
  37. font-weight: bold;
  38. color: #333;
  39. margin-right: 10px;
  40. }
  41. .brand-subtitle {
  42. font-size: 14px;
  43. color: #667790;
  44. padding-left: 10px;
  45. border-left: 1px solid #e0e0e0;
  46. }
  47. .navbar-actions {
  48. display: flex;
  49. align-items: center;
  50. }
  51. .nav-item {
  52. margin-left: 20px;
  53. color: #e74c3c;
  54. font-size: 16px;
  55. text-decoration: none;
  56. cursor: pointer;
  57. transition: all 0.2s;
  58. }
  59. .nav-item:hover {
  60. color: #c0392b;
  61. }
  62. .nav-item .nav-icon {
  63. font-style: normal;
  64. margin-right: 6px;
  65. }
  66. /* 主容器样式 */
  67. .main-container {
  68. width: 98%;
  69. margin: 20px auto;
  70. display: flex;
  71. flex-direction: column;
  72. gap: 20px;
  73. }
  74. /* 工具头部样式 */
  75. .tool-header {
  76. display: flex;
  77. align-items: center;
  78. padding: 15px 20px;
  79. background: linear-gradient(135deg, #3498db, #2980b9);
  80. border-radius: 10px;
  81. box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  82. margin-bottom: 10px;
  83. color: white;
  84. }
  85. .tool-icon {
  86. font-size: 32px;
  87. background: rgba(255, 255, 255, 0.2);
  88. width: 60px;
  89. height: 60px;
  90. border-radius: 50%;
  91. display: flex;
  92. align-items: center;
  93. justify-content: center;
  94. margin-right: 20px;
  95. box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.1);
  96. }
  97. .tool-title {
  98. flex-grow: 1;
  99. }
  100. .tool-title h1 {
  101. margin: 0 0 5px 0;
  102. font-size: 24px;
  103. font-weight: 600;
  104. }
  105. .tool-title p {
  106. margin: 0;
  107. font-size: 14px;
  108. opacity: 0.9;
  109. }
  110. /* 面板样式 */
  111. /* 操作区域样式 */
  112. .operation-zone {
  113. margin-bottom: 20px;
  114. }
  115. .input-flex-row {
  116. display: flex;
  117. flex-direction: row;
  118. align-items: center;
  119. gap: 10px;
  120. flex-wrap: wrap;
  121. margin-bottom: 15px;
  122. }
  123. .input-flex-row > * {
  124. margin-bottom: 0 !important;
  125. }
  126. .input-section label {
  127. font-weight: 600;
  128. color: #2c3e50;
  129. display: flex;
  130. align-items: center;
  131. gap: 6px;
  132. }
  133. .input-section label i {
  134. color: #3498db;
  135. }
  136. /* 文件输入样式 */
  137. .file-input-wrapper {
  138. position: relative;
  139. overflow: hidden;
  140. }
  141. .file-input-wrapper input[type="file"] {
  142. padding: 8px 12px;
  143. border: 1px solid #d1d9e6;
  144. border-radius: 6px;
  145. background: #f7fafd;
  146. font-size: 14px;
  147. color: #2c3e50;
  148. transition: all 0.3s;
  149. box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  150. }
  151. .file-input-wrapper input[type="file"]:hover,
  152. .file-input-wrapper input[type="file"]:focus {
  153. border: 1px solid #3498db;
  154. background: #f0f7ff;
  155. box-shadow: 0 3px 10px rgba(52, 152, 219, 0.1);
  156. }
  157. /* 示例区域样式 */
  158. .example-section {
  159. display: flex;
  160. align-items: center;
  161. background: #f6f9fe;
  162. border-radius: 6px;
  163. padding: 8px 15px;
  164. box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  165. border-left: 3px solid #3498db;
  166. }
  167. .example-section span {
  168. color: #667790;
  169. display: flex;
  170. align-items: center;
  171. gap: 6px;
  172. }
  173. .example-section span i {
  174. color: #f39c12;
  175. }
  176. .example-btn {
  177. display: inline-block;
  178. background: #ecf5fe;
  179. color: #3498db;
  180. border: 1px solid #c4e1ff;
  181. margin-right: 4px;
  182. font-size: 13px;
  183. border-radius: 5px;
  184. padding: 5px 12px;
  185. transition: all 0.2s;
  186. font-weight: 500;
  187. text-decoration: none;
  188. cursor: pointer;
  189. line-height: 1.6;
  190. }
  191. .example-btn:last-child {
  192. margin-right: 0;
  193. }
  194. .example-btn:hover, .example-btn:focus {
  195. background: #d9ebfd;
  196. color: #2980b9;
  197. border-color: #3498db;
  198. transform: translateY(-1px);
  199. box-shadow: 0 2px 5px rgba(52, 152, 219, 0.15);
  200. text-decoration: none;
  201. }
  202. /* 按钮区域样式 */
  203. .action-zone {
  204. display: flex;
  205. align-items: center;
  206. margin: 20px 0;
  207. }
  208. .btn {
  209. padding: 9px 18px;
  210. font-size: 14px;
  211. border-radius: 6px;
  212. cursor: pointer;
  213. font-weight: 600;
  214. display: inline-flex;
  215. align-items: center;
  216. gap: 6px;
  217. transition: all 0.2s;
  218. }
  219. .btn-primary {
  220. background: linear-gradient(135deg, #3498db, #2980b9);
  221. color: #fff;
  222. border: none;
  223. box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
  224. }
  225. .btn-primary:hover {
  226. background: linear-gradient(135deg, #2980b9, #2573a7);
  227. transform: translateY(-1px);
  228. box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
  229. }
  230. .btn-outline {
  231. background: transparent;
  232. color: #3498db;
  233. border: 1px solid #3498db;
  234. }
  235. .btn-outline:hover {
  236. background: #f0f7ff;
  237. box-shadow: 0 2px 5px rgba(52, 152, 219, 0.15);
  238. }
  239. .btn-secondary {
  240. background: #ecf5fe;
  241. color: #3498db;
  242. border: 1px solid #c4e1ff;
  243. font-size: 13px;
  244. border-radius: 5px;
  245. padding: 5px 12px;
  246. transition: all 0.2s;
  247. font-weight: 500;
  248. cursor: pointer;
  249. text-decoration: none;
  250. line-height: 1.6;
  251. }
  252. .btn-secondary:hover, .btn-secondary:focus {
  253. background: #d9ebfd;
  254. color: #2980b9;
  255. border-color: #3498db;
  256. transform: translateY(-1px);
  257. box-shadow: 0 2px 5px rgba(52, 152, 219, 0.15);
  258. text-decoration: none;
  259. }
  260. /* 输出区域样式 */
  261. .output-section {
  262. border-top: 1px solid #eaeef3;
  263. padding-top: 20px;
  264. }
  265. .output-header {
  266. display: flex;
  267. justify-content: space-between;
  268. align-items: center;
  269. margin-bottom: 10px;
  270. }
  271. .output-header label {
  272. font-weight: 600;
  273. color: #2c3e50;
  274. display: flex;
  275. align-items: center;
  276. gap: 6px;
  277. }
  278. .output-header label i {
  279. color: #16a085;
  280. }
  281. /* 粘贴输入框样式 */
  282. #pasteInput,#jsonOutput {
  283. font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  284. font-size: 12px;
  285. padding: 10px;
  286. border-radius: 6px;
  287. border: 1px solid #d1d9e6;
  288. background: #f8fafc;
  289. resize: vertical;
  290. transition: all 0.3s;
  291. box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  292. }
  293. #pasteInput:focus,#jsonOutput:focus {
  294. border-color: #3498db;
  295. box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
  296. outline: none;
  297. }
  298. /* 错误信息样式 */
  299. #errorMsg {
  300. color: #e74c3c;
  301. font-size: 14px;
  302. margin-left: 20px;
  303. font-weight: 500;
  304. }
  305. /* 页脚样式 */
  306. .tool-footer {
  307. margin-top: 10px;
  308. padding: 15px 20px;
  309. background: #fff;
  310. border-radius: 10px;
  311. box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  312. border: 1px solid #eaeef3;
  313. }
  314. .footer-info {
  315. display: flex;
  316. flex-direction: column;
  317. gap: 8px;
  318. }
  319. .footer-info p {
  320. margin: 0;
  321. color: #667790;
  322. font-size: 14px;
  323. display: flex;
  324. align-items: center;
  325. gap: 8px;
  326. }
  327. .footer-info p i {
  328. color: #3498db;
  329. }
  330. .footer-info p:last-child i {
  331. color: #27ae60;
  332. }
  333. /* 响应式调整 */
  334. @media (max-width: 900px) {
  335. .main-container {
  336. width: 95%;
  337. }
  338. .input-flex-row {
  339. flex-direction: column;
  340. align-items: flex-start;
  341. }
  342. .input-flex-row > * {
  343. margin: 8px 0 !important;
  344. width: 100%;
  345. }
  346. #pasteInput {
  347. width: 100% !important;
  348. max-width: 100% !important;
  349. margin-left: 0 !important;
  350. }
  351. .example-section {
  352. margin: 10px 0 !important;
  353. }
  354. }
  355. /* Flex主面板布局 */
  356. .excel2json-flex-panel {
  357. display: flex;
  358. flex-direction: row;
  359. gap: 32px;
  360. min-height: 420px;
  361. align-items: stretch;
  362. }
  363. .input-zone, .output-zone {
  364. flex: 1;
  365. display: flex;
  366. flex-direction: column;
  367. height: 100%;
  368. background: #fff;
  369. border-radius: 10px;
  370. box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  371. border: 1px solid #eaeef3;
  372. overflow: hidden;
  373. padding: 10px;
  374. border-radius: 10px;
  375. }
  376. .input-zone {
  377. width: 700px;
  378. }
  379. .output-zone {
  380. }
  381. .input-ops {
  382. margin-bottom: 12px;
  383. }
  384. .input-ops-row {
  385. display: flex;
  386. flex-wrap: wrap;
  387. gap: 10px;
  388. align-items: center;
  389. position: relative;
  390. }
  391. .input-ops-row .btn,
  392. .input-ops-row .convert-btn {
  393. margin-right: 0;
  394. }
  395. .input-label {
  396. white-space: nowrap;
  397. font-weight: 600;
  398. margin-right: 8px;
  399. }
  400. .example-section {
  401. display: flex;
  402. align-items: center;
  403. margin-right: 8px;
  404. }
  405. .example-label {
  406. font-size: 14px;
  407. color: #888;
  408. margin-right: 10px;
  409. display: flex;
  410. align-items: center;
  411. gap: 6px;
  412. }
  413. .example-btn:not(:last-child) {
  414. margin-right: 4px;
  415. }
  416. .convert-btn {
  417. min-width: 140px;
  418. }
  419. .btn-group {
  420. float: right;
  421. }
  422. .btn-group .btn {
  423. margin-right: 10px;
  424. }
  425. .error-msg {
  426. color: #e74c3c;
  427. margin-left: 0;
  428. display: block;
  429. margin-top: 8px;
  430. font-size: 14px;
  431. }
  432. .input-textarea,.output-textarea {
  433. flex: 1;
  434. min-height: 500px;
  435. max-height: 800px;
  436. font-size: 15px;
  437. font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  438. padding: 10px;
  439. border-radius: 6px;
  440. border: 1px solid #d1d9e6;
  441. background: #f8fafc;
  442. resize: vertical;
  443. transition: all 0.3s;
  444. box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  445. }
  446. .input-textarea:focus {
  447. border-color: #3498db;
  448. box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
  449. outline: none;
  450. }
  451. .output-header-block {
  452. display: block;
  453. justify-content: space-between;
  454. margin-bottom: 18px;
  455. }
  456. .copy-btn {
  457. float: right;
  458. }
  459. .output-textarea {
  460. }
  461. .output-textarea:focus {
  462. border-color: #16a085;
  463. box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
  464. outline: none;
  465. }
  466. /* 工具市场按钮样式(保持不变) */
  467. .panel-title>a.x-other-tools {
  468. margin: 1px 0 0;
  469. font-size: 13px;
  470. cursor: pointer;
  471. text-decoration: none;
  472. -webkit-user-select: none;
  473. user-select: none;
  474. color: #333;
  475. float: right;
  476. background-color: #f5f8ff;
  477. padding: 5px 10px;
  478. border-radius: 15px;
  479. border: 1px solid #d0d9ff;
  480. transition: all 0.3s ease;
  481. display: flex;
  482. align-items: center;
  483. position: relative;
  484. top: 0px;
  485. right: -16px;
  486. }
  487. .panel-title>a.x-other-tools .icon-plus-circle {
  488. display: inline-block;
  489. width: 16px;
  490. height: 16px;
  491. background: url(/static/img/plus-circle.svg) no-repeat center center;
  492. background-size: contain;
  493. margin-right: 5px;
  494. }
  495. .panel-title>a.x-other-tools .tool-market-badge {
  496. display: inline-block;
  497. background-color: #4d89fe;
  498. color: white;
  499. padding: 2px 6px;
  500. border-radius: 10px;
  501. margin-left: 5px;
  502. font-size: 12px;
  503. font-weight: bold;
  504. }
  505. .panel-title>a.x-other-tools:hover {
  506. color: #333;
  507. background-color: #e6edff;
  508. box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  509. transform: translateY(-1px);
  510. }
  511. /* 保持原有的顶部导航样式 */
  512. .x-donate-link {
  513. float: right;
  514. line-height: 18px;
  515. color: #2563eb;
  516. cursor: pointer;
  517. text-decoration: none;
  518. border: none;
  519. white-space: nowrap;
  520. margin-right: auto;
  521. border-radius: 20px;
  522. background-color: #eff6ff;
  523. transition: all 0.2s ease;
  524. position: relative;
  525. display: inline-flex;
  526. align-items: center;
  527. box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
  528. position: absolute;
  529. right: 230px;
  530. top: 14px;
  531. padding: 4px 12px;
  532. margin: 0 10px;
  533. font-size: 12px;
  534. font-weight: normal;
  535. }
  536. .x-donate-link:hover {
  537. background-color: #dbeafe;
  538. color: #1d4ed8;
  539. text-decoration: none;
  540. box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
  541. transform: translateY(-1px);
  542. }
  543. .x-donate-link>a {
  544. color: #333;
  545. text-decoration: none;
  546. }
  547. .x-donate-link>a:hover {
  548. color: #f00;
  549. }
  550. /* SQL按钮大气时尚样式 */
  551. #convertSqlBtn {
  552. background: linear-gradient(90deg, #ff9800 0%, #ff5722 100%);
  553. color: #fff;
  554. border: none;
  555. border-radius: 8px;
  556. font-weight: bold;
  557. box-shadow: 0 4px 16px rgba(255,152,0,0.10), 0 1.5px 4px rgba(0,0,0,0.08);
  558. padding: 8px 22px;
  559. font-size: 16px;
  560. letter-spacing: 1px;
  561. transition: all 0.18s cubic-bezier(.4,0,.2,1);
  562. outline: none;
  563. position: relative;
  564. }
  565. #convertSqlBtn:hover, #convertSqlBtn:focus {
  566. background: linear-gradient(90deg, #ff5722 0%, #ff9800 100%);
  567. color: #fff;
  568. box-shadow: 0 6px 24px rgba(255,87,34,0.18), 0 2px 8px rgba(0,0,0,0.10);
  569. transform: translateY(-2px) scale(1.04);
  570. }
  571. #convertSqlBtn:active {
  572. transform: scale(0.98);
  573. box-shadow: 0 2px 8px rgba(255,152,0,0.10);
  574. }
  575. /* 适配深色模式 */
  576. @media (prefers-color-scheme: dark) {
  577. #convertSqlBtn {
  578. background: linear-gradient(90deg, #ffb74d 0%, #ff7043 100%);
  579. color: #222;
  580. box-shadow: 0 4px 16px rgba(255,183,77,0.10), 0 1.5px 4px rgba(0,0,0,0.18);
  581. }
  582. #convertSqlBtn:hover, #convertSqlBtn:focus {
  583. background: linear-gradient(90deg, #ff7043 0%, #ffb74d 100%);
  584. color: #222;
  585. }
  586. }