index.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. @import url("../static/vendor/codemirror/codemirror.css");
  2. @import url("../static/css/bootstrap.min.css");
  3. @import url("content-script.css");
  4. body {
  5. background-color: #fff;
  6. }
  7. html,body {
  8. padding: 0;
  9. margin: 0;
  10. height:100%;
  11. }
  12. .wp-json {
  13. width:auto;
  14. }
  15. .wp-json .panel-body {
  16. padding: 0;
  17. }
  18. #jfContent_pre {
  19. display: none;
  20. padding: 10px;
  21. }
  22. #errorMsg {
  23. color: #f00;
  24. margin-left: 10px;
  25. float: right;
  26. }
  27. .x-placeholder img{
  28. width: 400px;
  29. opacity: 0.3;
  30. margin: 5px 0 0 -8px;
  31. }
  32. .x-xdemo,a.x-xdemo {
  33. margin-left: 30px;
  34. font-size: 12px;
  35. color: blue;
  36. cursor: pointer;
  37. text-decoration: underline;
  38. }
  39. .x-xdemo:hover {
  40. text-decoration: underline;
  41. color: #f00;
  42. }
  43. .x-donate-link {
  44. line-height: 18px;
  45. }
  46. #errorTips {
  47. border-radius: 4px;
  48. box-shadow: 6px 5px 7px rgba(229, 163, 163, 0.4);
  49. background-color: #ffecf1;
  50. border: 1px solid #dbb2b2;
  51. margin-top:10px;
  52. }
  53. #errorCode .errorEm {
  54. background-color:#ff921b;
  55. }
  56. #errorTarget {
  57. color:#000;
  58. background-color:#fff;
  59. }
  60. #errorCode {
  61. padding:0 10px 10px;
  62. word-break: break-all;
  63. }
  64. #errorCode ol {
  65. padding:0 0 0 3em;
  66. }
  67. #errorCode .x-ph {
  68. color: #f00;
  69. font-weight: bold;
  70. }
  71. #tipsBox {
  72. color:#b4465c;
  73. padding: 6px 0 4px 2em;
  74. background-color: #ffecf1;
  75. }
  76. #errorCode ol li {
  77. padding:4px 7px 0;
  78. list-style-type: decimal;
  79. color:#b4465c;
  80. background-color:#fdf7f7;
  81. }
  82. #errorCode ol li div {
  83. color:#000;
  84. }
  85. .x-error {
  86. color:red;
  87. }
  88. /*layout-up-down:上下布局模式*/
  89. .wp-json.layout-up-down .mod-json .panel-txt {
  90. position: static;
  91. width: 100%;
  92. height: 250px;
  93. margin: 0;
  94. }
  95. .wp-json.layout-up-down .CodeMirror {
  96. height: 250px;
  97. }
  98. .wp-json.layout-up-down .mod-json .rst-item {
  99. margin: 0;
  100. }
  101. .wp-json.layout-up-down .mod-json .x-placeholder {
  102. padding-top: 0;
  103. text-align: left;
  104. }
  105. /* layout-left-right: 左右布局 */
  106. .wp-json.layout-left-right .mod-json .panel-txt {
  107. width: 500px;
  108. height: calc(100% - 10px);
  109. float: left;
  110. }
  111. .wp-json.layout-left-right .mod-json .rst-item {
  112. margin: 0 20px 0 30px;
  113. padding-bottom:20px;
  114. float: left;
  115. width: calc(100% - 520px);
  116. }
  117. .wp-json.layout-left-right .mod-json .x-placeholder {
  118. padding-top: 50px;
  119. text-align: center;
  120. }
  121. .wp-json.layout-left-right .panel-body {
  122. height:calc(100% - 95px);
  123. padding-left: 15px;
  124. }
  125. .wp-json.layout-left-right #jsonSource,
  126. .wp-json.layout-left-right .CodeMirror {
  127. height: calc(100% - 10px);
  128. }
  129. .wp-json.layout-left-right #formattedJson {
  130. padding-top: 2px;
  131. }
  132. .wp-json.layout-left-right #errorTips {
  133. margin-top: 0;
  134. }
  135. html.fh-jf .x-toolbar {
  136. padding-top:5px;
  137. padding-bottom: 5px;
  138. }
  139. html.fh-jf .x-toolbar.x-inpage {
  140. margin:10px 20px;
  141. }
  142. .panel-title>a.x-other-tools {
  143. top: 0px;
  144. }
  145. .panel-heading {
  146. padding:5px 15px;
  147. }
  148. #layoutBar {margin-left:30px}
  149. #btnLeftRight,#btnUpDown{
  150. -webkit-border-radius:2px;-webkit-box-shadow:0px 1px 3px rgba(0,0,0,0.1);
  151. -webkit-user-select:none;background:-webkit-linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5);outline: none;
  152. border:1px solid #aaa;color:#444;font-size:12px;margin-bottom:0px;
  153. position:relative;z-index:10;display:inline-block;
  154. padding: 0 10px;
  155. height: 30px;
  156. text-shadow:1px 1px rgba(255,255,255,0.3)}
  157. #btnUpDown{margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0;border-left:0;}
  158. #btnLeftRight{margin-right:0;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none}
  159. #btnLeftRight:hover,#btnUpDown:hover{-webkit-box-shadow:0px 1px 3px rgba(0,0,0,0.2);
  160. background:#ebebeb -webkit-linear-gradient(#fefefe, #f8f8f8 40%, #e9e9e9);border-color:#999;color:#222}
  161. #btnLeftRight.selected, #btnUpDown.selected{-webkit-box-shadow:inset 0px 1px 5px rgba(0,0,0,0.2);
  162. background:#ebebeb -webkit-linear-gradient(#e4e4e4, #dfdfdf 40%, #dcdcdc);color:#333}
  163. #fh-img-preview {
  164. display: none;
  165. position: absolute !important;
  166. z-index: 2147483647 !important;
  167. pointer-events: none;
  168. border-radius: 4px;
  169. background: #fff;
  170. box-shadow: 0 2px 8px #0002;
  171. padding: 4px;
  172. max-width: 320px;
  173. max-height: 220px;
  174. }
  175. #fh-img-preview img {
  176. max-width: 300px;
  177. max-height: 200px;
  178. display: block;
  179. }
  180. /* JSONPath查询样式 */
  181. .x-jsonpath {
  182. display: inline-flex;
  183. align-items: center;
  184. gap: 5px;
  185. }
  186. /* JSONPath查询结果区域样式 */
  187. .jsonpath-results-section {
  188. margin-top: 15px;
  189. }
  190. .xjf-input {
  191. padding: 3px 8px;
  192. border: 1px solid #ddd;
  193. border-radius: 3px;
  194. font-size: 12px;
  195. width: 250px;
  196. background: white;
  197. color: #333;
  198. }
  199. .xjf-input:focus {
  200. outline: none;
  201. border-color: #007bff;
  202. box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  203. }
  204. .xjf-btn-examples {
  205. background-color: #6c757d !important;
  206. border-color: #6c757d !important;
  207. }
  208. .xjf-btn-examples:hover {
  209. background-color: #5a6268 !important;
  210. border-color: #545b62 !important;
  211. }
  212. /* JSONPath模态框样式 */
  213. .jsonpath-modal {
  214. position: fixed;
  215. top: 0;
  216. left: 0;
  217. width: 100%;
  218. height: 100%;
  219. background-color: rgba(0, 0, 0, 0.5);
  220. display: flex;
  221. justify-content: center;
  222. align-items: center;
  223. z-index: 10000;
  224. }
  225. .jsonpath-modal-content {
  226. background: white;
  227. border-radius: 8px;
  228. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  229. max-width: 85%;
  230. max-height: 80%;
  231. min-width: 800px;
  232. display: flex;
  233. flex-direction: column;
  234. }
  235. .jsonpath-modal-header {
  236. padding: 15px 20px;
  237. border-bottom: 1px solid #dee2e6;
  238. display: flex;
  239. justify-content: space-between;
  240. align-items: center;
  241. background-color: #f8f9fa;
  242. border-radius: 8px 8px 0 0;
  243. gap: 15px;
  244. }
  245. .jsonpath-modal-header h3 {
  246. margin: 0;
  247. font-size: 18px;
  248. color: #333;
  249. flex-shrink: 0;
  250. }
  251. .jsonpath-header-controls {
  252. display: flex;
  253. align-items: center;
  254. gap: 8px;
  255. flex: 1;
  256. max-width: 600px;
  257. }
  258. .jsonpath-header-input {
  259. flex: 1;
  260. min-width: 300px;
  261. padding: 6px 10px !important;
  262. font-size: 13px !important;
  263. border: 1px solid #ced4da !important;
  264. border-radius: 4px !important;
  265. background: white !important;
  266. color: #333 !important;
  267. }
  268. .jsonpath-header-input:focus {
  269. outline: none !important;
  270. border-color: #007bff !important;
  271. box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25) !important;
  272. }
  273. .jsonpath-header-btn {
  274. flex-shrink: 0;
  275. padding: 6px 12px !important;
  276. font-size: 13px !important;
  277. white-space: nowrap;
  278. }
  279. .jsonpath-modal-close {
  280. font-size: 24px;
  281. cursor: pointer;
  282. color: #6c757d;
  283. padding: 0 5px;
  284. user-select: none;
  285. }
  286. .jsonpath-modal-close:hover {
  287. color: #dc3545;
  288. }
  289. .jsonpath-modal-body {
  290. padding: 20px;
  291. overflow-y: auto;
  292. flex: 1;
  293. }
  294. .jsonpath-query-info {
  295. margin-bottom: 15px;
  296. padding: 10px;
  297. background-color: #f8f9fa;
  298. border-radius: 5px;
  299. display: flex;
  300. justify-content: space-between;
  301. align-items: center;
  302. }
  303. .jsonpath-query-info code {
  304. background: #e9ecef;
  305. padding: 2px 6px;
  306. border-radius: 3px;
  307. font-family: 'Courier New', monospace;
  308. color: #495057;
  309. }
  310. .jsonpath-result-count {
  311. color: #6c757d;
  312. font-size: 14px;
  313. }
  314. .jsonpath-result-actions {
  315. margin-bottom: 15px;
  316. display: flex;
  317. gap: 10px;
  318. }
  319. /* 复制按钮状态样式 */
  320. .xjf-btn-copying {
  321. background: #ffc107 !important;
  322. border-color: #ffc107 !important;
  323. color: #212529 !important;
  324. }
  325. .xjf-btn-success {
  326. background: #28a745 !important;
  327. border-color: #28a745 !important;
  328. color: #ffffff !important;
  329. }
  330. .xjf-btn-error {
  331. background: #dc3545 !important;
  332. border-color: #dc3545 !important;
  333. color: #ffffff !important;
  334. }
  335. .xjf-btn:disabled {
  336. opacity: 0.7;
  337. cursor: not-allowed;
  338. }
  339. .jsonpath-results {
  340. border: 1px solid #dee2e6;
  341. border-radius: 5px;
  342. max-height: 400px;
  343. overflow-y: auto;
  344. }
  345. .jsonpath-result-item {
  346. border-bottom: 1px solid #dee2e6;
  347. padding: 10px;
  348. }
  349. .jsonpath-result-item:last-child {
  350. border-bottom: none;
  351. }
  352. .jsonpath-result-path {
  353. margin-bottom: 5px;
  354. font-weight: bold;
  355. color: #495057;
  356. }
  357. .jsonpath-result-path code {
  358. background: #e9ecef;
  359. padding: 2px 6px;
  360. border-radius: 3px;
  361. font-family: 'Courier New', monospace;
  362. color: #6f42c1;
  363. }
  364. .jsonpath-result-value {
  365. background: #f8f9fa;
  366. border: 1px solid #e9ecef;
  367. border-radius: 3px;
  368. padding: 10px;
  369. margin: 0;
  370. font-family: 'Courier New', monospace;
  371. font-size: 12px;
  372. white-space: pre-wrap;
  373. word-wrap: break-word;
  374. max-height: 200px;
  375. overflow-y: auto;
  376. }
  377. .jsonpath-no-results, .jsonpath-error {
  378. text-align: center;
  379. padding: 30px;
  380. color: #6c757d;
  381. }
  382. .jsonpath-error .error-msg {
  383. color: #dc3545;
  384. font-weight: bold;
  385. }
  386. /* JSONPath示例样式 */
  387. .jsonpath-examples {
  388. display: grid;
  389. gap: 10px;
  390. }
  391. .jsonpath-example-item {
  392. padding: 12px;
  393. border: 1px solid #dee2e6;
  394. border-radius: 5px;
  395. cursor: pointer;
  396. transition: all 0.2s ease;
  397. }
  398. .jsonpath-example-item:hover {
  399. background-color: #f8f9fa;
  400. border-color: #007bff;
  401. transform: translateY(-1px);
  402. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  403. }
  404. .jsonpath-example-path {
  405. font-family: 'Courier New', monospace;
  406. font-weight: bold;
  407. color: #6f42c1;
  408. margin-bottom: 5px;
  409. }
  410. .jsonpath-example-desc {
  411. color: #6c757d;
  412. font-size: 14px;
  413. }
  414. /* 深色主题适配 */
  415. body.theme-dark .xjf-input {
  416. background: #3c3c3c;
  417. border-color: #555;
  418. color: #d4d4d4;
  419. }
  420. body.theme-dark .xjf-input:focus {
  421. border-color: #007bff;
  422. box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  423. }
  424. body.theme-dark .jsonpath-modal-content {
  425. background: #2d2d30;
  426. color: #d4d4d4;
  427. }
  428. body.theme-dark .jsonpath-modal-header {
  429. background-color: #383838;
  430. border-color: #444;
  431. }
  432. body.theme-dark .jsonpath-modal-header h3 {
  433. color: #d4d4d4;
  434. }
  435. body.theme-dark .jsonpath-header-input {
  436. background: #3c3c3c !important;
  437. border-color: #555 !important;
  438. color: #d4d4d4 !important;
  439. }
  440. body.theme-dark .jsonpath-header-input:focus {
  441. border-color: #007bff !important;
  442. box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25) !important;
  443. }
  444. body.theme-dark .jsonpath-query-info {
  445. background-color: #383838;
  446. border-color: #444;
  447. }
  448. body.theme-dark .jsonpath-query-info code {
  449. background: #444;
  450. color: #d4d4d4;
  451. }
  452. body.theme-dark .jsonpath-results {
  453. border-color: #444;
  454. }
  455. body.theme-dark .jsonpath-result-item {
  456. border-color: #444;
  457. }
  458. body.theme-dark .jsonpath-result-path {
  459. color: #d4d4d4;
  460. }
  461. body.theme-dark .jsonpath-result-path code {
  462. background: #444;
  463. color: #dcc5ff;
  464. }
  465. body.theme-dark .jsonpath-result-value {
  466. background: #383838;
  467. border-color: #444;
  468. color: #d4d4d4;
  469. }
  470. body.theme-dark .jsonpath-example-item {
  471. border-color: #444;
  472. background: #383838;
  473. }
  474. body.theme-dark .jsonpath-example-item:hover {
  475. background-color: #444;
  476. border-color: #007bff;
  477. }
  478. body.theme-dark .jsonpath-example-path {
  479. color: #dcc5ff;
  480. }
  481. body.theme-dark .jsonpath-example-desc {
  482. color: #888;
  483. }
  484. /* 深色主题下的复制按钮状态样式 */
  485. body.theme-dark .xjf-btn-copying {
  486. background: #ffc107 !important;
  487. border-color: #ffc107 !important;
  488. color: #212529 !important;
  489. }
  490. body.theme-dark .xjf-btn-success {
  491. background: #198754 !important;
  492. border-color: #198754 !important;
  493. color: #ffffff !important;
  494. }
  495. body.theme-dark .xjf-btn-error {
  496. background: #dc3545 !important;
  497. border-color: #dc3545 !important;
  498. color: #ffffff !important;
  499. }