Keldos commited on
Commit
714e09c
·
1 Parent(s): 875bf5b

feat: 修改切换md渲染图标

Browse files
Files changed (1) hide show
  1. assets/custom.js +2 -2
assets/custom.js CHANGED
@@ -560,5 +560,5 @@ window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", adj
560
  // button svg code
561
  const copyIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></span>';
562
  const copiedIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><polyline points="20 6 9 17 4 12"></polyline></svg></span>';
563
- const mdIcon = '<span><svg version="1.1" viewBox="0 0 16 12" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g transform="translate(.89568 .14467)" fill="currentColor" fill-rule="nonzero"><path d="m3.3444 11.046c0.46893 0 0.90596-0.13231 1.3111-0.39693 0.40513-0.26462 0.75997-0.64154 1.0645-1.1308 0.30456-0.48923 0.54218-1.0726 0.71287-1.7501 0.17069-0.67748 0.25604-1.427 0.25604-2.2485 0-1.099-0.14849-2.0631-0.44548-2.8922-0.29698-0.82913-0.69818-1.4744-1.2036-1.9357-0.5054-0.46133-1.0706-0.69199-1.6955-0.69199-0.62485 0-1.19 0.23066-1.6954 0.69199-0.5054 0.46133-0.90659 1.1066-1.2036 1.9357-0.29698 0.82913-0.44548 1.7932-0.44548 2.8922 0 0.82149 0.085445 1.571 0.25634 2.2485 0.17089 0.67748 0.40851 1.2608 0.71287 1.7501 0.30436 0.48923 0.6592 0.86616 1.0645 1.1308s0.84222 0.39693 1.3107 0.39693zm0-0.95334c-0.42933 0-0.82399-0.1921-1.184-0.5763-0.36-0.3842-0.64801-0.92018-0.86403-1.6079-0.21602-0.68776-0.32403-1.484-0.32403-2.3887 0-0.90004 0.10801-1.6929 0.32403-2.3785 0.21602-0.68561 0.50403-1.2206 0.86403-1.6051 0.36-0.38443 0.75466-0.57876 1.184-0.58299 0.43786 0 0.83773 0.19116 1.1996 0.57347 0.36188 0.38231 0.65085 0.91638 0.8669 1.6022 0.21605 0.68581 0.32408 1.4828 0.32408 2.3909 0 0.90004-0.10803 1.693-0.32408 2.3788-0.21605 0.68584-0.50502 1.2219-0.8669 1.6082-0.36188 0.38631-0.76175 0.58159-1.1996 0.58582zm-1.2514-2.4761c0.50523 0 0.91061-0.1611 1.2161-0.48331 0.30551-0.32221 0.45827-0.74631 0.45827-1.2723 0-0.5217-0.15276-0.94377-0.45827-1.2662s-0.71089-0.48366-1.2161-0.48366c-0.50477 0-0.90991 0.16122-1.2154 0.48366-0.30551 0.32244-0.45827 0.74451-0.45827 1.2662 0 0.526 0.15276 0.9501 0.45827 1.2723 0.30551 0.32221 0.71066 0.48331 1.2154 0.48331zm-0.47607-1.9676c-0.10579-0.013092-0.18831-0.074651-0.24756-0.18468-0.059245-0.11003-0.07637-0.23083-0.051376-0.36241 0.025391-0.13118 0.083776-0.23804 0.17516-0.32056s0.18785-0.1134 0.28941-0.092636c0.11003 0.020762 0.1936 0.085297 0.25073 0.1936 0.057129 0.10831 0.071114 0.22614 0.041954 0.35349-0.022018 0.13158-0.077362 0.23863-0.16603 0.32115s-0.1861 0.1132-0.29229 0.092041zm9.2941 5.397c0.46847 0 0.90528-0.13231 1.3104-0.39693s0.76-0.64154 1.0645-1.1308c0.30452-0.48923 0.54225-1.0726 0.71317-1.7501 0.17092-0.67748 0.25639-1.427 0.25639-2.2485 0-1.099-0.14859-2.0631-0.44577-2.8922-0.29718-0.82913-0.69837-1.4744-1.2036-1.9357-0.5052-0.46133-1.0703-0.69199-1.6952-0.69199-0.62531 0-1.1906 0.23066-1.6958 0.69199-0.5052 0.46133-0.90628 1.1066-1.2032 1.9357-0.29695 0.82913-0.44543 1.7932-0.44543 2.8922 0 0.82149 0.085346 1.571 0.25604 2.2485 0.17069 0.67748 0.40832 1.2608 0.71287 1.7501 0.30456 0.48923 0.6594 0.86616 1.0645 1.1308 0.40513 0.26462 0.84212 0.39693 1.311 0.39693zm0-0.95909c-0.43739 0-0.83597-0.1921-1.1957-0.5763-0.35977-0.3842-0.64768-0.91922-0.86373-1.6051-0.21605-0.68584-0.32408-1.4811-0.32408-2.3858 0-0.90004 0.10803-1.6929 0.32408-2.3785 0.21605-0.68561 0.50396-1.2206 0.86373-1.6051 0.35977-0.38443 0.75835-0.57684 1.1957-0.57724 0.43356 0 0.83034 0.1921 1.1903 0.5763 0.36 0.3842 0.64812 0.91826 0.86437 1.6022s0.32438 1.478 0.32438 2.3823c0 0.90388-0.10812 1.6987-0.32438 2.3845-0.21625 0.68581-0.50437 1.2209-0.86437 1.6054-0.36 0.38443-0.75678 0.57684-1.1903 0.57724zm-1.2629-2.4703c0.50484 0 0.91191-0.1611 1.2212-0.48331 0.30932-0.32221 0.46397-0.74631 0.46397-1.2723 0-0.5217-0.15466-0.94377-0.46397-1.2662s-0.71639-0.48366-1.2212-0.48366c-0.5014 0-0.90676 0.16122-1.2161 0.48366s-0.46397 0.74451-0.46397 1.2662c0 0.526 0.15466 0.9501 0.46397 1.2723 0.30932 0.32221 0.71467 0.48331 1.2161 0.48331zm-0.47032-1.9676c-0.10619-0.016927-0.18891-0.079445-0.24815-0.18755s-0.074254-0.22795-0.045029-0.35954c0.024928-0.13118 0.081181-0.23804 0.16876-0.32056s0.18407-0.1134 0.28946-0.092636c0.11042 0.016927 0.19324 0.080503 0.24845 0.19073 0.055211 0.11022 0.069923 0.22901 0.044136 0.35636-0.025391 0.13158-0.081561 0.23863-0.16851 0.32115-0.08695 0.08252-0.18332 0.1132-0.28912 0.092041z"/></g></g></svg></span>';
564
- const rawIcon = '<span><svg version="1.1" viewBox="0 0 20 9" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g transform="translate(.36664 .76806)" fill="currentColor" fill-rule="nonzero"><path d="m5.0103 7.6388c0.52652 0 1.0205-0.099066 1.4818-0.2972 0.46136-0.19813 0.8667-0.47292 1.216-0.82435s0.62305-0.75785 0.82118-1.2192 0.2972-0.95532 0.2972-1.4818-0.099066-1.0203-0.2972-1.4815c-0.19813-0.4612-0.47186-0.86655-0.82118-1.2161s-0.75466-0.62334-1.216-0.82148c-0.46136-0.19813-0.95531-0.2972-1.4818-0.2972-0.53029 0-1.0261 0.099066-1.4875 0.2972-0.4614 0.19813-0.86674 0.47196-1.216 0.82148-0.34929 0.34952-0.62311 0.75488-0.82148 1.2161-0.19836 0.4612-0.29755 0.95502-0.29755 1.4815s0.099182 1.0204 0.29755 1.4818 0.47219 0.86781 0.82148 1.2192c0.34929 0.35144 0.75463 0.62622 1.216 0.82435 0.4614 0.19813 0.95724 0.2972 1.4875 0.2972zm0-1.1309c-0.49538 0-0.94706-0.12067-1.355-0.36201s-0.73274-0.566-0.97432-0.97397c-0.24157-0.40797-0.36236-0.85988-0.36236-1.3557 0-0.49538 0.12079-0.94611 0.36236-1.3522 0.24157-0.40608 0.56635-0.7298 0.97432-0.97114s0.85964-0.36201 1.355-0.36201c0.49161 0 0.94044 0.12067 1.3465 0.36201 0.40605 0.24134 0.73082 0.566 0.97432 0.97397s0.36524 0.85776 0.36524 1.3494c0 0.49538-0.12175 0.94621-0.36524 1.3525-0.24349 0.40628-0.56826 0.73105-0.97432 0.97432-0.40605 0.24326-0.85488 0.36489-1.3465 0.36489zm9.2987 1.1309c0.52652 0 1.0205-0.099066 1.4818-0.2972 0.46136-0.19813 0.86766-0.47292 1.2189-0.82435s0.62602-0.75785 0.82435-1.2192 0.2975-0.95532 0.2975-1.4818-0.099166-1.0203-0.2975-1.4815c-0.19833-0.4612-0.47312-0.86655-0.82435-1.2161s-0.75754-0.62334-1.2189-0.82148c-0.46136-0.19813-0.95531-0.2972-1.4818-0.2972-0.52606 0-1.0199 0.099066-1.4815 0.2972-0.46159 0.19813-0.86799 0.47196-1.2192 0.82148-0.3512 0.34952-0.62491 0.75488-0.82113 1.2161-0.19622 0.4612-0.29432 0.95502-0.29432 1.4815s0.098108 1.0204 0.29432 1.4818 0.46992 0.86781 0.82113 1.2192c0.3512 0.35144 0.7576 0.62622 1.2192 0.82435 0.46159 0.19813 0.95542 0.2972 1.4815 0.2972zm0-1.1309c-0.49155 0-0.9413-0.12163-1.3493-0.36489-0.40797-0.24326-0.73264-0.56803-0.97402-0.97432-0.24138-0.40628-0.36206-0.85712-0.36206-1.3525 0-0.49161 0.12069-0.9414 0.36206-1.3494 0.24138-0.40797 0.56605-0.73263 0.97402-0.97397 0.40797-0.24134 0.85773-0.36201 1.3493-0.36201 0.49584 0 0.94679 0.12067 1.3528 0.36201 0.40605 0.24134 0.73072 0.56506 0.97402 0.97114 0.24329 0.40608 0.36494 0.85682 0.36494 1.3522 0 0.49584-0.12165 0.94775-0.36494 1.3557-0.24329 0.40797-0.56797 0.73263-0.97402 0.97397-0.40605 0.24134-0.857 0.36201-1.3528 0.36201zm-12.709-3.4895h-1.1406c-0.30621 0-0.45931 0.15519-0.45931 0.46556v0.33157c0 0.3074 0.1531 0.4611 0.45931 0.4611h1.1406v-1.2582zm16.12 1.2582h1.1342c0.30621 0 0.45931-0.1537 0.45931-0.4611v-0.33157c0-0.31037-0.1531-0.46556-0.45931-0.46556h-1.1342v1.2582zm-9.2115-0.19122c0.15644-0.098455 0.33717-0.17253 0.54218-0.22222 0.20501-0.04969 0.40799-0.074535 0.60893-0.074535s0.40403 0.024845 0.60928 0.074535c0.20524 0.04969 0.38585 0.12376 0.54183 0.22222v-1.1725c-0.17635-0.08404-0.36874-0.14401-0.57719-0.17992-0.20845-0.035904-0.39975-0.053856-0.57392-0.053856s-0.36631 0.017952-0.57645 0.053856-0.40169 0.095876-0.57466 0.17992v1.1725z"/></g></g></svg></span>';
 
560
  // button svg code
561
  const copyIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></span>';
562
  const copiedIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><polyline points="20 6 9 17 4 12"></polyline></svg></span>';
563
+ const mdIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="1" viewBox="0 0 14 18" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><g transform-origin="center" transform="scale(0.85)"><path d="M1.5,0 L12.5,0 C13.3284271,-1.52179594e-16 14,0.671572875 14,1.5 L14,16.5 C14,17.3284271 13.3284271,18 12.5,18 L1.5,18 C0.671572875,18 1.01453063e-16,17.3284271 0,16.5 L0,1.5 C-1.01453063e-16,0.671572875 0.671572875,1.52179594e-16 1.5,0 Z" stroke-width="1.8"></path><line x1="3.5" y1="3.5" x2="10.5" y2="3.5"></line><line x1="3.5" y1="6.5" x2="8" y2="6.5"></line></g><path d="M4,9 L10,9 C10.5522847,9 11,9.44771525 11,10 L11,13.5 C11,14.0522847 10.5522847,14.5 10,14.5 L4,14.5 C3.44771525,14.5 3,14.0522847 3,13.5 L3,10 C3,9.44771525 3.44771525,9 4,9 Z" stroke="none" fill="currentColor"></path></svg></span>';
564
+ const rawIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="1.8" viewBox="0 0 18 14" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><g transform-origin="center" transform="scale(0.85)"><polyline points="4 3 0 7 4 11"></polyline><polyline points="14 3 18 7 14 11"></polyline><line x1="12" y1="0" x2="6" y2="14"></line></g></svg></span>';