index.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  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. align-items: center;
  387. gap: 18px;
  388. flex-wrap: wrap;
  389. width: 100%;
  390. }
  391. .input-label {
  392. white-space: nowrap;
  393. font-weight: 600;
  394. margin-right: 8px;
  395. }
  396. .example-section {
  397. display: flex;
  398. align-items: center;
  399. margin-right: 8px;
  400. }
  401. .example-label {
  402. font-size: 14px;
  403. color: #888;
  404. margin-right: 10px;
  405. display: flex;
  406. align-items: center;
  407. gap: 6px;
  408. }
  409. .example-btn:not(:last-child) {
  410. margin-right: 4px;
  411. }
  412. .convert-btn {
  413. margin-left: auto;
  414. min-width: 140px;
  415. }
  416. .error-msg {
  417. color: #e74c3c;
  418. margin-left: 0;
  419. display: block;
  420. margin-top: 8px;
  421. font-size: 14px;
  422. }
  423. .input-textarea,.output-textarea {
  424. flex: 1;
  425. min-height: 500px;
  426. max-height: 800px;
  427. font-size: 15px;
  428. font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  429. padding: 10px;
  430. border-radius: 6px;
  431. border: 1px solid #d1d9e6;
  432. background: #f8fafc;
  433. resize: vertical;
  434. transition: all 0.3s;
  435. box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  436. }
  437. .input-textarea:focus {
  438. border-color: #3498db;
  439. box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
  440. outline: none;
  441. }
  442. .output-header-block {
  443. display: block;
  444. justify-content: space-between;
  445. margin-bottom: 18px;
  446. }
  447. .copy-btn {
  448. float: right;
  449. }
  450. .output-textarea {
  451. }
  452. .output-textarea:focus {
  453. border-color: #16a085;
  454. box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
  455. outline: none;
  456. }
  457. /* 工具市场按钮样式(保持不变) */
  458. .panel-title>a.x-other-tools {
  459. margin: 1px 0 0;
  460. font-size: 13px;
  461. cursor: pointer;
  462. text-decoration: none;
  463. -webkit-user-select: none;
  464. user-select: none;
  465. color: #333;
  466. float: right;
  467. background-color: #f5f8ff;
  468. padding: 5px 10px;
  469. border-radius: 15px;
  470. border: 1px solid #d0d9ff;
  471. transition: all 0.3s ease;
  472. display: flex;
  473. align-items: center;
  474. position: relative;
  475. top: 0px;
  476. right: -16px;
  477. }
  478. .panel-title>a.x-other-tools .icon-plus-circle {
  479. display: inline-block;
  480. width: 16px;
  481. height: 16px;
  482. background: url(/static/img/plus-circle.svg) no-repeat center center;
  483. background-size: contain;
  484. margin-right: 5px;
  485. }
  486. .panel-title>a.x-other-tools .tool-market-badge {
  487. display: inline-block;
  488. background-color: #4d89fe;
  489. color: white;
  490. padding: 2px 6px;
  491. border-radius: 10px;
  492. margin-left: 5px;
  493. font-size: 12px;
  494. font-weight: bold;
  495. }
  496. .panel-title>a.x-other-tools:hover {
  497. color: #333;
  498. background-color: #e6edff;
  499. box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  500. transform: translateY(-1px);
  501. }
  502. /* 保持原有的顶部导航样式 */
  503. .x-donate-link {
  504. float: right;
  505. line-height: 18px;
  506. color: #2563eb;
  507. cursor: pointer;
  508. text-decoration: none;
  509. border: none;
  510. white-space: nowrap;
  511. margin-right: auto;
  512. border-radius: 20px;
  513. background-color: #eff6ff;
  514. transition: all 0.2s ease;
  515. position: relative;
  516. display: inline-flex;
  517. align-items: center;
  518. box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
  519. position: absolute;
  520. right: 230px;
  521. top: 14px;
  522. padding: 4px 12px;
  523. margin: 0 10px;
  524. font-size: 12px;
  525. font-weight: normal;
  526. }
  527. .x-donate-link:hover {
  528. background-color: #dbeafe;
  529. color: #1d4ed8;
  530. text-decoration: none;
  531. box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
  532. transform: translateY(-1px);
  533. }
  534. .x-donate-link>a {
  535. color: #333;
  536. text-decoration: none;
  537. }
  538. .x-donate-link>a:hover {
  539. color: #f00;
  540. }