index.css 11 KB

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