diff --git a/2023/07/05/zhihu-aac-old/index.html b/2023/07/05/zhihu-aac-old/index.html index 676627c..dc8ab3e 100644 --- a/2023/07/05/zhihu-aac-old/index.html +++ b/2023/07/05/zhihu-aac-old/index.html @@ -25,7 +25,7 @@ - + diff --git a/about/index.html b/about/index.html index 4c7da73..8ab9394 100644 --- a/about/index.html +++ b/about/index.html @@ -24,7 +24,7 @@ - + diff --git a/css/gitalk.css b/css/gitalk.css index a268f1d..d1191ae 100644 --- a/css/gitalk.css +++ b/css/gitalk.css @@ -1,546 +1 @@ -@font-face { - font-family: octicons-link; - src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff'); -} -/* variables */ -/* functions & mixins */ -/* variables - calculated */ -/* styles */ -.gt-container { - -webkit-box-sizing: border-box; - box-sizing: border-box; - font-size: 16px; - /* loader */ - /* error */ - /* initing */ - /* no int */ - /* link */ - /* meta */ - /* popup */ - /* header */ - /* comments */ - /* comment */ -} -.gt-container * { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.gt-container a { - color: #6190e8; -} -.gt-container a:hover { - color: #81a6ed; - border-color: #81a6ed; -} -.gt-container a.is--active { - color: #333; - cursor: default !important; -} -.gt-container a.is--active:hover { - color: #333; -} -.gt-container .hide { - display: none !important; -} -.gt-container .gt-svg { - display: inline-block; - width: 1em; - height: 1em; - vertical-align: sub; -} -.gt-container .gt-svg svg { - width: 100%; - height: 100%; - fill: #6190e8; -} -.gt-container .gt-ico { - display: inline-block; -} -.gt-container .gt-ico-text { - margin-left: 0.3125em; -} -.gt-container .gt-ico-github { - width: 100%; - height: 100%; -} -.gt-container .gt-ico-github .gt-svg { - width: 100%; - height: 100%; -} -.gt-container .gt-ico-github svg { - fill: inherit; -} -.gt-container .gt-spinner { - position: relative; -} -.gt-container .gt-spinner::before { - content: ''; - -webkit-box-sizing: border-box; - box-sizing: border-box; - position: absolute; - top: 3px; - width: 0.75em; - height: 0.75em; - margin-top: -0.1875em; - margin-left: -0.375em; - border-radius: 50%; - border: 1px solid #fff; - border-top-color: #6190e8; - -webkit-animation: gt-kf-rotate 0.6s linear infinite; - animation: gt-kf-rotate 0.6s linear infinite; -} -.gt-container .gt-loader { - position: relative; - border: 1px solid #999; - -webkit-animation: ease gt-kf-rotate 1.5s infinite; - animation: ease gt-kf-rotate 1.5s infinite; - display: inline-block; - font-style: normal; - width: 1.75em; - height: 1.75em; - line-height: 1.75em; - border-radius: 50%; -} -.gt-container .gt-loader:before { - content: ''; - position: absolute; - display: block; - top: 0; - left: 50%; - margin-top: -0.1875em; - margin-left: -0.1875em; - width: 0.375em; - height: 0.375em; - background-color: #999; - border-radius: 50%; -} -.gt-container .gt-avatar { - display: inline-block; - width: 3.125em; - height: 3.125em; -} -@media (max-width: 479px) { - .gt-container .gt-avatar { - width: 2em; - height: 2em; - } -} -.gt-container .gt-avatar img { - width: 100%; - height: auto; - border-radius: 3px; -} -.gt-container .gt-avatar-github { - width: 3em; - height: 3em; -} -@media (max-width: 479px) { - .gt-container .gt-avatar-github { - width: 1.875em; - height: 1.875em; - } -} -.gt-container .gt-btn { - padding: 0.75em 1.25em; - display: inline-block; - line-height: 1; - text-decoration: none; - white-space: nowrap; - cursor: pointer; - border: 1px solid #6190e8; - border-radius: 5px; - background-color: #6190e8; - color: #fff; - outline: none; - font-size: 0.75em; -} -.gt-container .gt-btn-text { - font-weight: 400; -} -.gt-container .gt-btn-loading { - position: relative; - margin-left: 0.5em; - display: inline-block; - width: 0.75em; - height: 1em; - vertical-align: top; -} -.gt-container .gt-btn.is--disable { - cursor: not-allowed; - opacity: 0.5; -} -.gt-container .gt-btn-login { - margin-right: 0; -} -.gt-container .gt-btn-preview { - background-color: #fff; - color: #6190e8; -} -.gt-container .gt-btn-preview:hover { - background-color: #f2f2f2; - border-color: #81a6ed; -} -.gt-container .gt-btn-public:hover { - background-color: #81a6ed; - border-color: #81a6ed; -} -.gt-container .gt-error { - text-align: center; - margin: 0.625em; - color: #ff3860; -} -.gt-container .gt-initing { - padding: 1.25em 0; - text-align: center; -} -.gt-container .gt-initing-text { - margin: 0.625em auto; - font-size: 92%; -} -.gt-container .gt-no-init { - padding: 1.25em 0; - text-align: center; -} -.gt-container .gt-link { - border-bottom: 1px dotted #6190e8; -} -.gt-container .gt-link-counts, -.gt-container .gt-link-project { - text-decoration: none; -} -.gt-container .gt-meta { - margin: 1.25em 0; - padding: 1em 0; - position: relative; - border-bottom: 1px solid #e9e9e9; - font-size: 1em; - position: relative; - z-index: 10; -} -.gt-container .gt-meta:before, -.gt-container .gt-meta:after { - content: " "; - display: table; -} -.gt-container .gt-meta:after { - clear: both; -} -.gt-container .gt-counts { - margin: 0 0.625em 0 0; -} -.gt-container .gt-user { - float: right; - margin: 0; - font-size: 92%; -} -.gt-container .gt-user-pic { - width: 16px; - height: 16px; - vertical-align: top; - margin-right: 0.5em; -} -.gt-container .gt-user-inner { - display: inline-block; - cursor: pointer; -} -.gt-container .gt-user .gt-ico { - margin: 0 0 0 0.3125em; -} -.gt-container .gt-user .gt-ico svg { - fill: inherit; -} -.gt-container .gt-user .is--poping .gt-ico svg { - fill: #6190e8; -} -.gt-container .gt-version { - color: #a1a1a1; - margin-left: 0.375em; -} -.gt-container .gt-copyright { - margin: 0 0.9375em 0.5em; - border-top: 1px solid #e9e9e9; - padding-top: 0.5em; -} -.gt-container .gt-popup { - position: absolute; - right: 0; - top: 2.375em; - background: #fff; - display: inline-block; - border: 1px solid #e9e9e9; - padding: 0.625em 0; - font-size: 0.875em; - letter-spacing: 0.5px; -} -.gt-container .gt-popup .gt-action { - cursor: pointer; - display: block; - margin: 0.5em 0; - padding: 0 1.125em; - position: relative; - text-decoration: none; -} -.gt-container .gt-popup .gt-action.is--active:before { - content: ''; - width: 0.25em; - height: 0.25em; - background: #6190e8; - position: absolute; - left: 0.5em; - top: 0.4375em; -} -.gt-container .gt-header { - position: relative; - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} -.gt-container .gt-header-comment { - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - margin-left: 1.25em; -} -@media (max-width: 479px) { - .gt-container .gt-header-comment { - margin-left: 0.875em; - } -} -.gt-container .gt-header-textarea { - padding: 0.75em; - display: block; - -webkit-box-sizing: border-box; - box-sizing: border-box; - width: 100%; - min-height: 5.125em; - max-height: 15em; - border-radius: 5px; - border: 1px solid rgba(0,0,0,0.1); - font-size: 0.875em; - word-wrap: break-word; - resize: vertical; - background-color: #f6f6f6; - outline: none; - -webkit-transition: all 0.25s ease; - transition: all 0.25s ease; -} -.gt-container .gt-header-textarea:hover { - background-color: #fbfbfb; -} -.gt-container .gt-header-preview { - padding: 0.75em; - border-radius: 5px; - border: 1px solid rgba(0,0,0,0.1); - background-color: #f6f6f6; -} -.gt-container .gt-header-controls { - position: relative; - margin: 0.75em 0 0; -} -.gt-container .gt-header-controls:before, -.gt-container .gt-header-controls:after { - content: " "; - display: table; -} -.gt-container .gt-header-controls:after { - clear: both; -} -@media (max-width: 479px) { - .gt-container .gt-header-controls { - margin: 0; - } -} -.gt-container .gt-header-controls-tip { - font-size: 0.875em; - color: #6190e8; - text-decoration: none; - vertical-align: sub; -} -@media (max-width: 479px) { - .gt-container .gt-header-controls-tip { - display: none; - } -} -.gt-container .gt-header-controls .gt-btn { - float: right; - margin-left: 1.25em; -} -@media (max-width: 479px) { - .gt-container .gt-header-controls .gt-btn { - float: none; - width: 100%; - margin: 0.75em 0 0; - } -} -.gt-container:after { - content: ''; - position: fixed; - bottom: 100%; - left: 0; - right: 0; - top: 0; - opacity: 0; -} -.gt-container.gt-input-focused { - position: relative; -} -.gt-container.gt-input-focused:after { - content: ''; - position: fixed; - bottom: 0%; - left: 0; - right: 0; - top: 0; - background: #000; - opacity: 0.6; - -webkit-transition: opacity 0.3s, bottom 0s; - transition: opacity 0.3s, bottom 0s; - z-index: 9999; -} -.gt-container.gt-input-focused .gt-header-comment { - z-index: 10000; -} -.gt-container .gt-comments { - padding-top: 1.25em; -} -.gt-container .gt-comments-null { - text-align: center; -} -.gt-container .gt-comments-controls { - margin: 1.25em 0; - text-align: center; -} -.gt-container .gt-comment { - position: relative; - padding: 0.625em 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} -.gt-container .gt-comment-content { - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - margin-left: 1.25em; - padding: 0.75em 1em; - background-color: #f9f9f9; - overflow: auto; - -webkit-transition: all ease 0.25s; - transition: all ease 0.25s; -} -.gt-container .gt-comment-content:hover { - -webkit-box-shadow: 0 0.625em 3.75em 0 #f4f4f4; - box-shadow: 0 0.625em 3.75em 0 #f4f4f4; -} -@media (max-width: 479px) { - .gt-container .gt-comment-content { - margin-left: 0.875em; - padding: 0.625em 0.75em; - } -} -.gt-container .gt-comment-header { - margin-bottom: 0.5em; - font-size: 0.875em; - position: relative; -} -.gt-container .gt-comment-block-1 { - float: right; - height: 1.375em; - width: 2em; -} -.gt-container .gt-comment-block-2 { - float: right; - height: 1.375em; - width: 4em; -} -.gt-container .gt-comment-username { - font-weight: 500; - color: #6190e8; - text-decoration: none; -} -.gt-container .gt-comment-username:hover { - text-decoration: underline; -} -.gt-container .gt-comment-text { - margin-left: 0.5em; - color: #a1a1a1; -} -.gt-container .gt-comment-date { - margin-left: 0.5em; - color: #a1a1a1; -} -.gt-container .gt-comment-like, -.gt-container .gt-comment-edit, -.gt-container .gt-comment-reply { - position: absolute; - height: 1.375em; -} -.gt-container .gt-comment-like:hover, -.gt-container .gt-comment-edit:hover, -.gt-container .gt-comment-reply:hover { - cursor: pointer; -} -.gt-container .gt-comment-like { - top: 0; - right: 2em; -} -.gt-container .gt-comment-edit, -.gt-container .gt-comment-reply { - top: 0; - right: 0; -} -.gt-container .gt-comment-body { - color: #333 !important; -} -.gt-container .gt-comment-body .email-hidden-toggle a { - display: inline-block; - height: 12px; - padding: 0 9px; - font-size: 12px; - font-weight: 600; - line-height: 6px; - color: #444d56; - text-decoration: none; - vertical-align: middle; - background: #dfe2e5; - border-radius: 1px; -} -.gt-container .gt-comment-body .email-hidden-toggle a:hover { - background-color: #c6cbd1; -} -.gt-container .gt-comment-body .email-hidden-reply { - display: none; - white-space: pre-wrap; -} -.gt-container .gt-comment-body .email-hidden-reply .email-signature-reply { - padding: 0 15px; - margin: 15px 0; - color: #586069; - border-left: 4px solid #dfe2e5; -} -.gt-container .gt-comment-body .email-hidden-reply.expanded { - display: block; -} -.gt-container .gt-comment-admin .gt-comment-content { - background-color: #f6f9fe; -} -@-webkit-keyframes gt-kf-rotate { - 0% { - -webkit-transform: rotate(0); - transform: rotate(0); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes gt-kf-rotate { - 0% { - -webkit-transform: rotate(0); - transform: rotate(0); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} +@font-face{font-family:octicons-link;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff')}.gt-container{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:16px}.gt-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.gt-container a{color:#6190e8}.gt-container a:hover{color:#81a6ed;border-color:#81a6ed}.gt-container a.is--active{color:#333;cursor:default!important}.gt-container a.is--active:hover{color:#333}.gt-container .hide{display:none!important}.gt-container .gt-svg{display:inline-block;width:1em;height:1em;vertical-align:sub}.gt-container .gt-svg svg{width:100%;height:100%;fill:#6190e8}.gt-container .gt-ico{display:inline-block}.gt-container .gt-ico-text{margin-left:.3125em}.gt-container .gt-ico-github{width:100%;height:100%}.gt-container .gt-ico-github .gt-svg{width:100%;height:100%}.gt-container .gt-ico-github svg{fill:inherit}.gt-container .gt-spinner{position:relative}.gt-container .gt-spinner::before{content:'';-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:3px;width:.75em;height:.75em;margin-top:-.1875em;margin-left:-.375em;border-radius:50%;border:1px solid #fff;border-top-color:#6190e8;-webkit-animation:gt-kf-rotate .6s linear infinite;animation:gt-kf-rotate .6s linear infinite}.gt-container .gt-loader{position:relative;border:1px solid #999;-webkit-animation:ease gt-kf-rotate 1.5s infinite;animation:ease gt-kf-rotate 1.5s infinite;display:inline-block;font-style:normal;width:1.75em;height:1.75em;line-height:1.75em;border-radius:50%}.gt-container .gt-loader:before{content:'';position:absolute;display:block;top:0;left:50%;margin-top:-.1875em;margin-left:-.1875em;width:.375em;height:.375em;background-color:#999;border-radius:50%}.gt-container .gt-avatar{display:inline-block;width:3.125em;height:3.125em}@media (max-width:479px){.gt-container .gt-avatar{width:2em;height:2em}}.gt-container .gt-avatar img{width:100%;height:auto;border-radius:3px}.gt-container .gt-avatar-github{width:3em;height:3em}@media (max-width:479px){.gt-container .gt-avatar-github{width:1.875em;height:1.875em}}.gt-container .gt-btn{padding:.75em 1.25em;display:inline-block;line-height:1;text-decoration:none;white-space:nowrap;cursor:pointer;border:1px solid #6190e8;border-radius:5px;background-color:#6190e8;color:#fff;outline:0;font-size:.75em}.gt-container .gt-btn-text{font-weight:400}.gt-container .gt-btn-loading{position:relative;margin-left:.5em;display:inline-block;width:.75em;height:1em;vertical-align:top}.gt-container .gt-btn.is--disable{cursor:not-allowed;opacity:.5}.gt-container .gt-btn-login{margin-right:0}.gt-container .gt-btn-preview{background-color:#fff;color:#6190e8}.gt-container .gt-btn-preview:hover{background-color:#f2f2f2;border-color:#81a6ed}.gt-container .gt-btn-public:hover{background-color:#81a6ed;border-color:#81a6ed}.gt-container .gt-error{text-align:center;margin:.625em;color:#ff3860}.gt-container .gt-initing{padding:1.25em 0;text-align:center}.gt-container .gt-initing-text{margin:.625em auto;font-size:92%}.gt-container .gt-no-init{padding:1.25em 0;text-align:center}.gt-container .gt-link{border-bottom:1px dotted #6190e8}.gt-container .gt-link-counts,.gt-container .gt-link-project{text-decoration:none}.gt-container .gt-meta{margin:1.25em 0;padding:1em 0;position:relative;border-bottom:1px solid #e9e9e9;font-size:1em;position:relative;z-index:10}.gt-container .gt-meta:after,.gt-container .gt-meta:before{content:" ";display:table}.gt-container .gt-meta:after{clear:both}.gt-container .gt-counts{margin:0 .625em 0 0}.gt-container .gt-user{float:right;margin:0;font-size:92%}.gt-container .gt-user-pic{width:16px;height:16px;vertical-align:top;margin-right:.5em}.gt-container .gt-user-inner{display:inline-block;cursor:pointer}.gt-container .gt-user .gt-ico{margin:0 0 0 .3125em}.gt-container .gt-user .gt-ico svg{fill:inherit}.gt-container .gt-user .is--poping .gt-ico svg{fill:#6190e8}.gt-container .gt-version{color:#a1a1a1;margin-left:.375em}.gt-container .gt-copyright{margin:0 .9375em .5em;border-top:1px solid #e9e9e9;padding-top:.5em}.gt-container .gt-popup{position:absolute;right:0;top:2.375em;background:#fff;display:inline-block;border:1px solid #e9e9e9;padding:.625em 0;font-size:.875em;letter-spacing:.5px}.gt-container .gt-popup .gt-action{cursor:pointer;display:block;margin:.5em 0;padding:0 1.125em;position:relative;text-decoration:none}.gt-container .gt-popup .gt-action.is--active:before{content:'';width:.25em;height:.25em;background:#6190e8;position:absolute;left:.5em;top:.4375em}.gt-container .gt-header{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex}.gt-container .gt-header-comment{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-left:1.25em}@media (max-width:479px){.gt-container .gt-header-comment{margin-left:.875em}}.gt-container .gt-header-textarea{padding:.75em;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;min-height:5.125em;max-height:15em;border-radius:5px;border:1px solid rgba(0,0,0,.1);font-size:.875em;word-wrap:break-word;resize:vertical;background-color:#f6f6f6;outline:0;-webkit-transition:all .25s ease;transition:all .25s ease}.gt-container .gt-header-textarea:hover{background-color:#fbfbfb}.gt-container .gt-header-preview{padding:.75em;border-radius:5px;border:1px solid rgba(0,0,0,.1);background-color:#f6f6f6}.gt-container .gt-header-controls{position:relative;margin:.75em 0 0}.gt-container .gt-header-controls:after,.gt-container .gt-header-controls:before{content:" ";display:table}.gt-container .gt-header-controls:after{clear:both}@media (max-width:479px){.gt-container .gt-header-controls{margin:0}}.gt-container .gt-header-controls-tip{font-size:.875em;color:#6190e8;text-decoration:none;vertical-align:sub}@media (max-width:479px){.gt-container .gt-header-controls-tip{display:none}}.gt-container .gt-header-controls .gt-btn{float:right;margin-left:1.25em}@media (max-width:479px){.gt-container .gt-header-controls .gt-btn{float:none;width:100%;margin:.75em 0 0}}.gt-container:after{content:'';position:fixed;bottom:100%;left:0;right:0;top:0;opacity:0}.gt-container.gt-input-focused{position:relative}.gt-container.gt-input-focused:after{content:'';position:fixed;bottom:0;left:0;right:0;top:0;background:#000;opacity:.6;-webkit-transition:opacity .3s,bottom 0s;transition:opacity .3s,bottom 0s;z-index:9999}.gt-container.gt-input-focused .gt-header-comment{z-index:10000}.gt-container .gt-comments{padding-top:1.25em}.gt-container .gt-comments-null{text-align:center}.gt-container .gt-comments-controls{margin:1.25em 0;text-align:center}.gt-container .gt-comment{position:relative;padding:.625em 0;display:-webkit-box;display:-ms-flexbox;display:flex}.gt-container .gt-comment-content{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-left:1.25em;padding:.75em 1em;background-color:#f9f9f9;overflow:auto;-webkit-transition:all ease .25s;transition:all ease .25s}.gt-container .gt-comment-content:hover{-webkit-box-shadow:0 .625em 3.75em 0 #f4f4f4;box-shadow:0 .625em 3.75em 0 #f4f4f4}@media (max-width:479px){.gt-container .gt-comment-content{margin-left:.875em;padding:.625em .75em}}.gt-container .gt-comment-header{margin-bottom:.5em;font-size:.875em;position:relative}.gt-container .gt-comment-block-1{float:right;height:1.375em;width:2em}.gt-container .gt-comment-block-2{float:right;height:1.375em;width:4em}.gt-container .gt-comment-username{font-weight:500;color:#6190e8;text-decoration:none}.gt-container .gt-comment-username:hover{text-decoration:underline}.gt-container .gt-comment-text{margin-left:.5em;color:#a1a1a1}.gt-container .gt-comment-date{margin-left:.5em;color:#a1a1a1}.gt-container .gt-comment-edit,.gt-container .gt-comment-like,.gt-container .gt-comment-reply{position:absolute;height:1.375em}.gt-container .gt-comment-edit:hover,.gt-container .gt-comment-like:hover,.gt-container .gt-comment-reply:hover{cursor:pointer}.gt-container .gt-comment-like{top:0;right:2em}.gt-container .gt-comment-edit,.gt-container .gt-comment-reply{top:0;right:0}.gt-container .gt-comment-body{color:#333!important}.gt-container .gt-comment-body .email-hidden-toggle a{display:inline-block;height:12px;padding:0 9px;font-size:12px;font-weight:600;line-height:6px;color:#444d56;text-decoration:none;vertical-align:middle;background:#dfe2e5;border-radius:1px}.gt-container .gt-comment-body .email-hidden-toggle a:hover{background-color:#c6cbd1}.gt-container .gt-comment-body .email-hidden-reply{display:none;white-space:pre-wrap}.gt-container .gt-comment-body .email-hidden-reply .email-signature-reply{padding:0 15px;margin:15px 0;color:#586069;border-left:4px solid #dfe2e5}.gt-container .gt-comment-body .email-hidden-reply.expanded{display:block}.gt-container .gt-comment-admin .gt-comment-content{background-color:#f6f9fe}@-webkit-keyframes gt-kf-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes gt-kf-rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} \ No newline at end of file diff --git a/css/highlight-dark.css b/css/highlight-dark.css index 9cae4a7..9ed546b 100644 --- a/css/highlight-dark.css +++ b/css/highlight-dark.css @@ -1 +1 @@ -pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#ddd;background:#303030}.hljs-keyword,.hljs-link,.hljs-literal,.hljs-section,.hljs-selector-tag{color:#fff}.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-name,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#d88}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#979797}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-title,.hljs-type{font-weight:700}.hljs-emphasis{font-style:italic} +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#ddd;background:#303030}.hljs-keyword,.hljs-link,.hljs-literal,.hljs-section,.hljs-selector-tag{color:#fff}.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-name,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#d88}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#979797}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-title,.hljs-type{font-weight:700}.hljs-emphasis{font-style:italic} \ No newline at end of file diff --git a/css/highlight.css b/css/highlight.css index 96af284..275239a 100644 --- a/css/highlight.css +++ b/css/highlight.css @@ -7,4 +7,4 @@ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5p Outdated base version: https://github.com/primer/github-syntax-light Current colors taken from GitHub's CSS -*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0} +*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#005cc5}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-code,.hljs-comment,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0} \ No newline at end of file diff --git a/css/main.css b/css/main.css index 1df74cd..11ebdd3 100644 --- a/css/main.css +++ b/css/main.css @@ -1,2175 +1 @@ -.anchorjs-link { - text-decoration: none !important; - transition: opacity 0.2s ease-in-out; -} -.markdown-body h1:hover > .anchorjs-link, -h2:hover > .anchorjs-link, -h3:hover > .anchorjs-link, -h4:hover > .anchorjs-link, -h5:hover > .anchorjs-link, -h6:hover > .anchorjs-link { - opacity: 1; -} -.banner { - height: 100%; - position: relative; - overflow: hidden; - cursor: default; -} -.banner .mask { - position: absolute; - width: 100%; - height: 100%; - background-color: rgba(0,0,0,0.3); -} -.banner[parallax="true"] { - will-change: transform; - -webkit-transform-style: preserve-3d; - -webkit-backface-visibility: hidden; - transition: transform 0.05s ease-out; -} -@media (max-width: 100vh) { - .header-inner { - max-height: 100vw; - } - #board { - margin-top: -1rem !important; - } -} -@media (max-width: 79.99vh) { - .scroll-down-bar { - display: none; - } -} -#board { - position: relative; - margin-top: -2rem; - padding: 3rem 0; - background-color: var(--board-bg-color); - transition: background-color 0.2s ease-in-out; - border-radius: 0.5rem; - z-index: 3; - -webkit-box-shadow: 0 12px 15px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19); - box-shadow: 0 12px 15px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19); -} -.code-widget { - display: inline-block; - background-color: transparent; - font-size: 0.75rem; - line-height: 1; - font-weight: bold; - padding: 0.3rem 0.1rem 0.1rem 0.1rem; - position: absolute; - right: 0.45rem; - top: 0.15rem; - z-index: 1; -} -.code-widget-light { - color: #999; -} -.code-widget-dark { - color: #bababa; -} -.copy-btn { - cursor: pointer; - user-select: none; - -webkit-appearance: none; - outline: none; -} -.copy-btn > i { - font-size: 0.75rem !important; - font-weight: 400; - margin-right: 0.15rem; - opacity: 0; - transition: opacity 0.2s ease-in-out; -} -.markdown-body pre:hover > .copy-btn > i { - opacity: 0.9; -} -.markdown-body pre:hover > .copy-btn, -.markdown-body pre:not(:hover) > .copy-btn { - outline: none; -} -.license-box { - background-color: rgba(27,31,35,0.05); - transition: background-color 0.2s ease-in-out; - border-radius: 4px; - font-size: 0.9rem; - overflow: hidden; - padding: 1.25rem; - position: relative; - z-index: 1; -} -.license-box .license-icon { - position: absolute; - top: 50%; - left: 100%; -} -.license-box .license-icon::after { - content: "\e8e4"; - font-size: 12.5rem; - line-height: 1; - opacity: 0.1; - position: relative; - left: -0.85em; - bottom: 0.5em; - z-index: -1; -} -.license-box .license-title { - margin-bottom: 1rem; -} -.license-box .license-title div:nth-child(1) { - line-height: 1.2; - margin-bottom: 0.25rem; -} -.license-box .license-title div:nth-child(2) { - color: var(--sec-text-color); - font-size: 0.8rem; -} -.license-box .license-meta { - align-items: center; - display: flex; - flex-wrap: wrap; - justify-content: flex-start; -} -.license-box .license-meta .license-meta-item { - align-items: center; - justify-content: center; - margin-right: 1.5rem; -} -.license-box .license-meta .license-meta-item div:nth-child(1) { - color: var(--sec-text-color); - font-size: 0.8rem; - font-weight: normal; -} -.license-box .license-meta .license-meta-item i.iconfont { - font-size: 1rem; -} -@media (max-width: 575px) and (min-width: 425px) { - .license-box .license-meta .license-meta-item { - display: flex; - justify-content: flex-start; - flex-wrap: wrap; - font-size: 0.8rem; - flex: 0 0 50%; - max-width: 50%; - margin-right: 0; - } - .license-box .license-meta .license-meta-item div:nth-child(1) { - margin-right: 0.5rem; - } - .license-box .license-meta .license-meta-date { - order: -1; - } -} -@media (max-width: 424px) { - .license-box::after { - top: -65px; - } - .license-box .license-meta { - flex-direction: column; - align-items: flex-start; - } - .license-box .license-meta .license-meta-item { - display: flex; - flex-wrap: wrap; - font-size: 0.8rem; - } - .license-box .license-meta .license-meta-item div:nth-child(1) { - margin-right: 0.5rem; - } -} -.footer-inner { - padding: 3rem 0 1rem 0; - text-align: center; -} -.footer-inner > div:not(:first-child) { - margin: 0.25rem 0; - font-size: 0.85rem; -} -.footer-inner .statistics { - display: flex; - flex-direction: row; - justify-content: center; -} -.footer-inner .statistics > span { - flex: 1; - margin: 0 0.25rem; -} -.footer-inner .statistics > *:nth-last-child(2):first-child { - text-align: right; -} -.footer-inner .statistics > *:nth-last-child(2):first-child ~ * { - text-align: left; -} -.footer-inner .beian { - display: flex; - flex-direction: row; - justify-content: center; -} -.footer-inner .beian > * { - margin: 0 0.25rem; -} -.footer-inner .beian-police { - position: relative; - overflow: hidden; - display: inline-flex; - align-items: center; - justify-content: left; -} -.footer-inner .beian-police img { - margin-right: 3px; - width: 1rem; - height: 1rem; - margin-bottom: 0.1rem; -} -@media (max-width: 424px) { - .footer-inner .statistics { - flex-direction: column; - } - .footer-inner .statistics > *:nth-last-child(2):first-child { - text-align: center; - } - .footer-inner .statistics > *:nth-last-child(2):first-child ~ * { - text-align: center; - } - .footer-inner .beian { - flex-direction: column; - } - .footer-inner .beian .beian-police { - justify-content: center; - } - .footer-inner .beian > *:nth-last-child(2):first-child { - text-align: center; - } - .footer-inner .beian > *:nth-last-child(2):first-child ~ * { - text-align: center; - } -} -sup > a::before, -.footnote-text::before { - display: block; - content: ""; - margin-top: -5rem; - height: 5rem; - width: 1px; - visibility: hidden; -} -sup > a::before, -.footnote-text::before { - display: inline-block; -} -.footnote-item::before { - display: block; - content: ""; - margin-top: -5rem; - height: 5rem; - width: 1px; - visibility: hidden; -} -.footnote-list ol { - list-style-type: none; - counter-reset: sectioncounter; - padding-left: 0.5rem; - font-size: 0.95rem; -} -.footnote-list ol li:before { - font-family: "Helvetica Neue", monospace, "Monaco"; - content: "[" counter(sectioncounter) "]"; - counter-increment: sectioncounter; -} -.footnote-list ol li+li { - margin-top: 0.5rem; -} -.footnote-text { - padding-left: 0.5em; -} -.navbar { - background-color: transparent; - font-size: 0.875rem; - box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12); - -webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12); -} -.navbar .navbar-brand { - color: var(--navbar-text-color); -} -.navbar .navbar-toggler .animated-icon span { - background-color: var(--navbar-text-color); -} -.navbar .nav-item .nav-link { - display: block; - color: var(--navbar-text-color); - transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out; -} -.navbar .nav-item .nav-link:hover { - color: var(--link-hover-color); -} -.navbar .nav-item .nav-link:focus { - color: var(--navbar-text-color); -} -.navbar .nav-item .nav-link i { - font-size: 0.875rem; -} -.navbar .nav-item .nav-link i:only-child { - margin: 0 0.2rem; -} -.navbar .navbar-toggler { - border-width: 0; - outline: 0; -} -.navbar.scrolling-navbar { - will-change: background, padding; - -webkit-transition: background 0.5s ease-in-out, padding 0.5s ease-in-out; - transition: background 0.5s ease-in-out, padding 0.5s ease-in-out; -} -@media (min-width: 600px) { - .navbar.scrolling-navbar { - padding-top: 12px; - padding-bottom: 12px; - } - .navbar.scrolling-navbar .navbar-nav > li { - -webkit-transition-duration: 1s; - transition-duration: 1s; - } -} -.navbar.scrolling-navbar.top-nav-collapse { - padding-top: 5px; - padding-bottom: 5px; -} -.navbar .dropdown-menu { - font-size: 0.875rem; - color: var(--navbar-text-color); - background-color: rgba(0,0,0,0.3); - border: none; - min-width: 8rem; - -webkit-transition: background 0.5s ease-in-out, padding 0.5s ease-in-out; - transition: background 0.5s ease-in-out, padding 0.5s ease-in-out; -} -@media (max-width: 991.98px) { - .navbar .dropdown-menu { - text-align: center; - } -} -.navbar .dropdown-item { - color: var(--navbar-text-color); -} -.navbar .dropdown-item:hover, -.navbar .dropdown-item:focus { - color: var(--link-hover-color); - background-color: rgba(0,0,0,0.1); -} -@media (min-width: 992px) { - .navbar .dropdown:hover > .dropdown-menu { - display: block; - } - .navbar .dropdown > .dropdown-toggle:active { - pointer-events: none; - } - .navbar .dropdown-menu { - top: 95%; - } -} -.navbar .animated-icon { - width: 30px; - height: 20px; - position: relative; - margin: 0; - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - -webkit-transition: 0.5s ease-in-out; - -moz-transition: 0.5s ease-in-out; - -o-transition: 0.5s ease-in-out; - transition: 0.5s ease-in-out; - cursor: pointer; -} -.navbar .animated-icon span { - display: block; - position: absolute; - height: 3px; - width: 100%; - border-radius: 9px; - opacity: 1; - left: 0; - -webkit-transform: rotate(0deg); - -moz-transform: rotate(0deg); - -o-transform: rotate(0deg); - transform: rotate(0deg); - -webkit-transition: 0.25s ease-in-out; - -moz-transition: 0.25s ease-in-out; - -o-transition: 0.25s ease-in-out; - transition: 0.25s ease-in-out; - background: #fff; -} -.navbar .animated-icon span:nth-child(1) { - top: 0; -} -.navbar .animated-icon span:nth-child(2) { - top: 10px; -} -.navbar .animated-icon span:nth-child(3) { - top: 20px; -} -.navbar .animated-icon.open span:nth-child(1) { - top: 11px; - -webkit-transform: rotate(135deg); - -moz-transform: rotate(135deg); - -o-transform: rotate(135deg); - transform: rotate(135deg); -} -.navbar .animated-icon.open span:nth-child(2) { - opacity: 0; - left: -60px; -} -.navbar .animated-icon.open span:nth-child(3) { - top: 11px; - -webkit-transform: rotate(-135deg); - -moz-transform: rotate(-135deg); - -o-transform: rotate(-135deg); - transform: rotate(-135deg); -} -.navbar .dropdown-collapse, -.top-nav-collapse, -.navbar-col-show { - background-color: var(--navbar-bg-color); -} -@media (max-width: 767px) { - .navbar { - font-size: 1rem; - line-height: 2.5rem; - } -} -.banner-text { - color: var(--subtitle-color); - max-width: calc(960px - 6rem); - width: 80%; - overflow-wrap: break-word; -} -.banner-text .typed-cursor { - margin: 0 0.2rem; -} -@media (max-width: 767px) { - #subtitle, - .typed-cursor { - font-size: 1.5rem; - } -} -@media (max-width: 575px) { - .banner-text { - font-size: 0.9rem; - } - #subtitle, - .typed-cursor { - font-size: 1.35rem; - } -} -.modal-dialog .modal-content { - background-color: var(--board-bg-color); - border: 0; - border-radius: 0.125rem; - -webkit-box-shadow: 0 5px 11px 0 rgba(0,0,0,0.18), 0 4px 15px 0 rgba(0,0,0,0.15); - box-shadow: 0 5px 11px 0 rgba(0,0,0,0.18), 0 4px 15px 0 rgba(0,0,0,0.15); -} -.modal-dialog .modal-content .modal-header { - border-bottom-color: var(--line-color); - transition: border-bottom-color 0.2s ease-in-out; -} -.close { - color: var(--text-color); -} -.close:hover { - color: var(--link-hover-color); -} -.close:focus { - outline: 0; -} -.modal-dialog .modal-content .modal-header { - border-top-left-radius: 0.125rem; - border-top-right-radius: 0.125rem; - border-bottom: 1px solid #dee2e6; -} -.md-form { - position: relative; - margin-top: 1.5rem; - margin-bottom: 1.5rem; -} -.md-form input[type] { - -webkit-box-sizing: content-box; - box-sizing: content-box; - background-color: transparent; - border: none; - border-bottom: 1px solid #ced4da; - border-radius: 0; - outline: none; - -webkit-box-shadow: none; - box-shadow: none; - transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out; -} -.md-form input[type]:focus:not([readonly]) { - border-bottom: 1px solid #4285f4; - -webkit-box-shadow: 0 1px 0 0 #4285f4; - box-shadow: 0 1px 0 0 #4285f4; -} -.md-form input[type]:focus:not([readonly]) + label { - color: #4285f4; -} -.md-form input[type].valid, -.md-form input[type]:focus.valid { - border-bottom: 1px solid #00c851; - -webkit-box-shadow: 0 1px 0 0 #00c851; - box-shadow: 0 1px 0 0 #00c851; -} -.md-form input[type].valid + label, -.md-form input[type]:focus.valid + label { - color: #00c851; -} -.md-form input[type].invalid, -.md-form input[type]:focus.invalid { - border-bottom: 1px solid #f44336; - -webkit-box-shadow: 0 1px 0 0 #f44336; - box-shadow: 0 1px 0 0 #f44336; -} -.md-form input[type].invalid + label, -.md-form input[type]:focus.invalid + label { - color: #f44336; -} -.md-form input[type].validate { - margin-bottom: 2.5rem; -} -.md-form input[type].form-control { - height: auto; - padding: 0.6rem 0 0.4rem 0; - margin: 0 0 0.5rem 0; - color: var(--text-color); - background-color: transparent; - border-radius: 0; -} -.md-form label { - font-size: 0.8rem; - position: absolute; - top: -1rem; - left: 0; - color: #757575; - cursor: text; - transition: color 0.2s ease-out; -} -.modal-open[style] { - padding-right: 0 !important; - overflow: auto; -} -.modal-open[style] #navbar[style] { - padding-right: 1rem !important; -} -#nprogress .bar { - height: 3px !important; - background-color: #29d !important; -} -#nprogress .peg { - box-shadow: 0 0 14px #29d, 0 0 8px #29d !important; -} -@media (max-width: 575px) { - #nprogress .bar { - display: none; - } -} -.noscript-warning { - background-color: #f55; - color: #fff; - font-family: sans-serif; - font-size: 1rem; - font-weight: bold; - position: fixed; - left: 0; - bottom: 0; - text-align: center; - width: 100%; - z-index: 99; -} -.pagination { - margin-top: 3rem; - justify-content: center; -} -.pagination .space { - align-self: flex-end; -} -.pagination .page-number, -.pagination .current, -.pagination .extend { - outline: 0; - border: 0; - background-color: transparent; - font-size: 0.9rem; - padding: 0.5rem 0.75rem; - line-height: 1.25; - border-radius: 0.125rem; -} -.pagination .page-number { - margin: 0 0.05rem; -} -.pagination .page-number:hover, -.pagination .current { - transition: background-color 0.2s ease-in-out; - background-color: var(--link-hover-bg-color); -} -.qr-trigger { - cursor: pointer; - position: relative; -} -.qr-trigger:hover .qr-img { - display: block; - transition: all 0.3s; -} -.qr-img { - max-width: 12rem; - position: absolute; - right: -5.25rem; - z-index: 99; - display: none; - border-radius: 0.2rem; - background-color: transparent; - box-shadow: 0 0 20px -5px rgba(158,158,158,0.2); -} -.scroll-down-bar { - position: absolute; - width: 100%; - height: 6rem; - text-align: center; - cursor: pointer; - bottom: 0; -} -.scroll-down-bar i.iconfont { - font-size: 2rem; - font-weight: bold; - display: inline-block; - position: relative; - padding-top: 2rem; - color: var(--subtitle-color); - transform: translateZ(0); - animation: scroll-down 1.5s infinite; -} -#scroll-top-button { - position: fixed; - z-index: 99; - background: var(--board-bg-color); - transition: background-color 0.2s ease-in-out, bottom 0.3s ease; - border-radius: 4px; - min-width: 40px; - min-height: 40px; - bottom: -60px; - outline: none; - display: flex; - display: -webkit-flex; - align-items: center; - box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12); -} -#scroll-top-button i { - font-size: 32px; - margin: auto; - color: var(--sec-text-color); -} -#scroll-top-button:hover i, -#scroll-top-button:active i { - animation-name: scroll-top; - animation-duration: 1s; - animation-delay: 0.1s; - animation-timing-function: ease-in-out; - animation-iteration-count: infinite; - animation-fill-mode: forwards; - animation-direction: alternate; -} -#local-search-result .search-list-title { - border-left: 3px solid #0d47a1; -} -#local-search-result .search-list-content { - padding: 0 1.25rem; -} -#local-search-result .search-word { - color: #ff4500; -} -#toc { - visibility: hidden; -} -.toc-header { - margin-bottom: 0.5rem; - font-weight: bold; - line-height: 1.2; -} -.toc-header, -.toc-header > i { - font-size: 1.25rem; -} -.toc-body { - max-height: 75vh; - overflow-y: auto; - overflow: -moz-scrollbars-none; - -ms-overflow-style: none; -} -.toc-body ol { - list-style: none; - padding-inline-start: 1rem; -} -.toc-body::-webkit-scrollbar { - display: none; -} -.tocbot-list { - position: relative; -} -.tocbot-list ol { - list-style: none; - padding-left: 1rem; -} -.tocbot-list a { - font-size: 0.95rem; -} -.tocbot-link { - color: var(--text-color); -} -.tocbot-active-link { - font-weight: bold; - color: var(--link-hover-color); -} -.tocbot-is-collapsed { - max-height: 0; -} -.tocbot-is-collapsible { - overflow: hidden; - transition: all 0.3s ease-in-out; -} -.toc-list-item { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.toc-list-item.is-active-li::before { - height: 1rem; - margin: 0.25rem 0; - visibility: visible; -} -.toc-list-item::before { - width: 0.15rem; - height: 0.2rem; - position: absolute; - left: 0.25rem; - content: ""; - border-radius: 2px; - margin: 0.65rem 0; - background: var(--link-hover-color); - visibility: hidden; - transition: height 0.1s ease-in-out, margin 0.1s ease-in-out, visibility 0.1s ease-in-out; -} -.sidebar { - position: -webkit-sticky; - position: sticky; - top: 2rem; - padding: 3rem 0; -} -html { - font-size: 16px; - letter-spacing: 0.02em; -} -html, -body { - height: 100%; - font-family: var(--font-family-sans-serif); - overflow-wrap: break-word; -} -body { - transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out; - background-color: var(--body-bg-color); - color: var(--text-color); - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -body a { - color: var(--text-color); - text-decoration: none; - cursor: pointer; - transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out; -} -body a:hover { - color: var(--link-hover-color); - text-decoration: none; - transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out; -} -code { - color: inherit; -} -table { - font-size: inherit; - color: var(--post-text-color); -} -img[lazyload] { - object-fit: cover; -} -*[align="left"] { - text-align: left; -} -*[align="center"] { - text-align: center; -} -*[align="right"] { - text-align: right; -} -::-webkit-scrollbar { - width: 6px; - height: 6px; -} -::-webkit-scrollbar-thumb { - background-color: var(--scrollbar-color); - border-radius: 6px; -} -::-webkit-scrollbar-thumb:hover { - background-color: var(--scrollbar-hover-color); -} -::-webkit-scrollbar-corner { - background-color: transparent; -} -label { - margin-bottom: 0; -} -i.iconfont { - font-size: 1em; - line-height: 1; -} -:root { - --color-mode: "light"; - --body-bg-color: #eee; - --board-bg-color: #fff; - --text-color: #3c4858; - --sec-text-color: #718096; - --post-text-color: #2c3e50; - --post-heading-color: #1a202c; - --post-link-color: #0366d6; - --link-hover-color: #30a9de; - --link-hover-bg-color: #f8f9fa; - --line-color: #eaecef; - --navbar-bg-color: #2f4154; - --navbar-text-color: #fff; - --subtitle-color: #fff; - --scrollbar-color: #c4c6c9; - --scrollbar-hover-color: #a6a6a6; - --button-bg-color: transparent; - --button-hover-bg-color: #f2f3f5; - --highlight-bg-color: #f6f8fa; - --inlinecode-bg-color: rgba(175,184,193,0.2); -} -@media (prefers-color-scheme: dark) { - :root { - --color-mode: "dark"; - } - :root:not([data-user-color-scheme]) { - --body-bg-color: #181c27; - --board-bg-color: #252d38; - --text-color: #c4c6c9; - --sec-text-color: #a7a9ad; - --post-text-color: #c4c6c9; - --post-heading-color: #c4c6c9; - --post-link-color: #1589e9; - --link-hover-color: #30a9de; - --link-hover-bg-color: #364151; - --line-color: #435266; - --navbar-bg-color: #1f3144; - --navbar-text-color: #d0d0d0; - --subtitle-color: #d0d0d0; - --scrollbar-color: #687582; - --scrollbar-hover-color: #9da8b3; - --button-bg-color: transparent; - --button-hover-bg-color: #46647e; - --highlight-bg-color: #303030; - --inlinecode-bg-color: rgba(99,110,123,0.4); - } - :root:not([data-user-color-scheme]) img { - -webkit-filter: brightness(0.9); - filter: brightness(0.9); - transition: filter 0.2s ease-in-out; - } - :root:not([data-user-color-scheme]) .license-box { - background-color: rgba(62,75,94,0.35); - transition: background-color 0.2s ease-in-out; - } - :root:not([data-user-color-scheme]) .gt-comment-admin .gt-comment-content { - background-color: transparent; - transition: background-color 0.2s ease-in-out; - } -} -@media not print { - [data-user-color-scheme="dark"] { - --body-bg-color: #181c27; - --board-bg-color: #252d38; - --text-color: #c4c6c9; - --sec-text-color: #a7a9ad; - --post-text-color: #c4c6c9; - --post-heading-color: #c4c6c9; - --post-link-color: #1589e9; - --link-hover-color: #30a9de; - --link-hover-bg-color: #364151; - --line-color: #435266; - --navbar-bg-color: #1f3144; - --navbar-text-color: #d0d0d0; - --subtitle-color: #d0d0d0; - --scrollbar-color: #687582; - --scrollbar-hover-color: #9da8b3; - --button-bg-color: transparent; - --button-hover-bg-color: #46647e; - --highlight-bg-color: #303030; - --inlinecode-bg-color: rgba(99,110,123,0.4); - } - [data-user-color-scheme="dark"] img { - -webkit-filter: brightness(0.9); - filter: brightness(0.9); - transition: filter 0.2s ease-in-out; - } - [data-user-color-scheme="dark"] .license-box { - background-color: rgba(62,75,94,0.35); - transition: background-color 0.2s ease-in-out; - } - [data-user-color-scheme="dark"] .gt-comment-admin .gt-comment-content { - background-color: transparent; - transition: background-color 0.2s ease-in-out; - } -} -@media print { - :root { - --color-mode: "light"; - } -} -.fade-in-up { - -webkit-animation-name: fade-in-up; - animation-name: fade-in-up; -} -.hidden-mobile { - display: block; -} -.visible-mobile { - display: none; -} -@media (max-width: 575px) { - .hidden-mobile { - display: none; - } - .visible-mobile { - display: block; - } -} -.nomargin-x { - margin-left: 0 !important; - margin-right: 0 !important; -} -.nopadding-x { - padding-left: 0 !important; - padding-right: 0 !important; -} -@media (max-width: 767px) { - .nopadding-x-md { - padding-left: 0 !important; - padding-right: 0 !important; - } -} -.flex-center { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - height: 100%; -} -.hover-with-bg { - display: inline-block; - line-height: 1; -} -.hover-with-bg:hover { - background-color: var(--link-hover-bg-color); - transition-duration: 0.2s; - transition-timing-function: ease-in-out; - border-radius: 0.2rem; -} -@-moz-keyframes fade-in-up { - from { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@-webkit-keyframes fade-in-up { - from { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@-o-keyframes fade-in-up { - from { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@keyframes fade-in-up { - from { - opacity: 0; - -webkit-transform: translate3d(0, 100%, 0); - transform: translate3d(0, 100%, 0); - } - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@-moz-keyframes scroll-down { - 0% { - opacity: 0.8; - top: 0; - } - 50% { - opacity: 0.4; - top: -1em; - } - 100% { - opacity: 0.8; - top: 0; - } -} -@-webkit-keyframes scroll-down { - 0% { - opacity: 0.8; - top: 0; - } - 50% { - opacity: 0.4; - top: -1em; - } - 100% { - opacity: 0.8; - top: 0; - } -} -@-o-keyframes scroll-down { - 0% { - opacity: 0.8; - top: 0; - } - 50% { - opacity: 0.4; - top: -1em; - } - 100% { - opacity: 0.8; - top: 0; - } -} -@keyframes scroll-down { - 0% { - opacity: 0.8; - top: 0; - } - 50% { - opacity: 0.4; - top: -1em; - } - 100% { - opacity: 0.8; - top: 0; - } -} -@-moz-keyframes scroll-top { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - 50% { - -webkit-transform: translateY(-0.35rem); - transform: translateY(-0.35rem); - } - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } -} -@-webkit-keyframes scroll-top { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - 50% { - -webkit-transform: translateY(-0.35rem); - transform: translateY(-0.35rem); - } - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } -} -@-o-keyframes scroll-top { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - 50% { - -webkit-transform: translateY(-0.35rem); - transform: translateY(-0.35rem); - } - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } -} -@keyframes scroll-top { - 0% { - -webkit-transform: translateY(0); - transform: translateY(0); - } - 50% { - -webkit-transform: translateY(-0.35rem); - transform: translateY(-0.35rem); - } - 100% { - -webkit-transform: translateY(0); - transform: translateY(0); - } -} -@media print { - header, - footer, - .side-col, - #scroll-top-button, - .post-prevnext, - #comments { - display: none !important; - } - .markdown-body a:not([href^='#']):not([href^='javascript:']):not(.print-no-link)::after { - content: ' (' attr(href) ')'; - font-size: 0.8rem; - color: var(--post-text-color); - opacity: 0.8; - } - .markdown-body > h1, - .markdown-body h2 { - border-bottom-color: transparent !important; - } - .markdown-body > h1, - .markdown-body h2, - .markdown-body h3, - .markdown-body h4, - .markdown-body h5, - .markdown-body h6 { - margin-top: 1.25em !important; - margin-bottom: 0.25em !important; - } - .markdown-body [data-anchorjs-icon]::after { - display: none; - } - .markdown-body figure.highlight table, - .markdown-body figure.highlight tbody, - .markdown-body figure.highlight tr, - .markdown-body figure.highlight td.code, - .markdown-body figure.highlight td.code pre { - width: 100% !important; - display: block !important; - } - .markdown-body figure.highlight pre > code { - white-space: pre-wrap; - } - .markdown-body figure.highlight .gutter, - .markdown-body figure.highlight .code-widget { - display: none !important; - } - .post-metas a { - text-decoration: none; - } -} -@media not print { - #seo-header { - display: none; - } -} -.index-card { - margin-bottom: 2.5rem; -} -.index-img img { - display: block; - width: 100%; - height: 10rem; - object-fit: cover; - box-shadow: 0 5px 11px 0 rgba(0,0,0,0.18), 0 4px 15px 0 rgba(0,0,0,0.15); - border-radius: 0.25rem; - background-color: transparent; -} -.index-info { - display: flex; - flex-direction: column; - justify-content: space-between; - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} -.index-header { - color: var(--text-color); - font-size: 1.5rem; - font-weight: bold; - line-height: 1.4; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - margin-bottom: 0.25rem; -} -.index-header .index-pin { - color: var(--text-color); - font-size: 1.5rem; - margin-right: 0.15rem; -} -.index-btm { - color: var(--sec-text-color); -} -.index-btm a { - color: var(--sec-text-color); -} -.index-excerpt { - color: var(--sec-text-color); - margin: 0.5rem 0 0.5rem 0; - height: calc(1.4rem * 3); - overflow: hidden; - display: flex; -} -.index-excerpt > div { - width: 100%; - line-height: 1.4rem; - word-break: break-word; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 3; -} -.index-excerpt__noimg { - height: auto; - max-height: calc(1.4rem * 3); -} -@media (max-width: 767px) { - .index-info { - padding-top: 1.25rem; - } - .index-header { - font-size: 1.25rem; - white-space: normal; - overflow: hidden; - word-break: break-word; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - } - .index-header .index-pin { - font-size: 1.25rem; - } -} -#valine.v[data-class=v] .status-bar, -#valine.v[data-class=v] .veditor, -#valine.v[data-class=v] .vinput, -#valine.v[data-class=v] .vbtn, -#valine.v[data-class=v] p, -#valine.v[data-class=v] pre code { - color: var(--text-color); -} -#valine.v[data-class=v] .vinput::placeholder { - color: var(--sec-text-color); -} -#valine.v[data-class=v] .vicon { - fill: var(--text-color); -} -.gt-container .gt-comment-content:hover { - -webkit-box-shadow: none; - box-shadow: none; -} -.gt-container .gt-comment-body { - color: var(--text-color) !important; - transition: color 0.2s ease-in-out; -} -#remark-km423lmfdslkm34-back { - z-index: 1030; -} -#remark-km423lmfdslkm34-node { - z-index: 1031; -} -.markdown-body .highlight pre, -.markdown-body pre { - padding: 1.45rem 1rem; -} -.markdown-body pre code.hljs { - padding: 0; -} -.markdown-body pre[class*="language-"] { - padding-top: 1.45rem; - padding-bottom: 1.45rem; - padding-right: 1rem; - line-height: 1.5; - margin-bottom: 1rem; -} -.markdown-body .code-wrapper { - position: relative; - border-radius: 4px; - margin-bottom: 1rem; -} -.markdown-body .hljs, -.markdown-body .highlight pre, -.markdown-body .code-wrapper pre, -.markdown-body figure.highlight td.gutter { - transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out; - background-color: var(--highlight-bg-color); -} -pre[class*=language-].line-numbers { - position: initial; -} -figure { - margin: 1rem 0; -} -figure.highlight { - position: relative; -} -figure.highlight table { - border: 0; - margin: 0; - width: auto; - border-radius: 4px; -} -figure.highlight td { - border: 0; - padding: 0; -} -figure.highlight tr { - border: 0; -} -figure.highlight td.code { - width: 100%; -} -figure.highlight td.gutter { - display: table-cell; - position: -webkit-sticky; - position: sticky; - left: 0; - z-index: 1; -} -figure.highlight td.gutter pre { - text-align: right; - padding: 0 0.75rem; - border-radius: initial; - border-right: 1px solid #999; -} -figure.highlight td.gutter pre span.line { - color: #999; -} -figure.highlight td.code > pre { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.markdown-body { - font-size: 1rem; - line-height: 1.6; - font-family: var(--font-family-sans-serif); - margin-bottom: 2rem; - color: var(--post-text-color); -} -.markdown-body > h1, -.markdown-body h2 { - border-bottom-color: var(--line-color); -} -.markdown-body > h1, -.markdown-body h2, -.markdown-body h3, -.markdown-body h4, -.markdown-body h5, -.markdown-body h6 { - color: var(--post-heading-color); - transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out; - font-weight: bold; - margin-bottom: 0.75em; - margin-top: 2em; -} -.markdown-body > h1::before, -.markdown-body h2::before, -.markdown-body h3::before, -.markdown-body h4::before, -.markdown-body h5::before, -.markdown-body h6::before { - display: block; - content: ""; - margin-top: -5rem; - height: 5rem; - width: 1px; - visibility: hidden; -} -.markdown-body > h1:focus, -.markdown-body h2:focus, -.markdown-body h3:focus, -.markdown-body h4:focus, -.markdown-body h5:focus, -.markdown-body h6:focus { - outline: none; -} -.markdown-body a { - color: var(--post-link-color); -} -.markdown-body strong { - font-weight: bold; -} -.markdown-body code { - tab-size: 4; - background-color: var(--inlinecode-bg-color); - transition: background-color 0.2s ease-in-out; -} -.markdown-body table tr { - background-color: var(--board-bg-color); - transition: background-color 0.2s ease-in-out; -} -.markdown-body table tr:nth-child(2n) { - background-color: var(--board-bg-color); - transition: background-color 0.2s ease-in-out; -} -.markdown-body table th, -.markdown-body table td { - border-color: var(--line-color); - transition: border-color 0.2s ease-in-out; -} -.markdown-body pre { - font-size: 85% !important; -} -.markdown-body pre .mermaid { - text-align: center; -} -.markdown-body pre .mermaid > svg { - min-width: 100%; -} -.markdown-body p > img, -.markdown-body p > a > img, -.markdown-body figure > img, -.markdown-body figure > a > img { - max-width: 90%; - margin: 1.5rem auto; - display: block; - box-shadow: 0 5px 11px 0 rgba(0,0,0,0.18), 0 4px 15px 0 rgba(0,0,0,0.15); - border-radius: 4px; - background-color: transparent; -} -.markdown-body blockquote { - color: var(--sec-text-color); -} -.markdown-body details { - cursor: pointer; -} -.markdown-body details summary { - outline: none; -} -hr, -.markdown-body hr { - background-color: initial; - border-top: 1px solid var(--line-color); - transition: border-top-color 0.2s ease-in-out; -} -.markdown-body hr { - height: 0; - margin: 2rem 0; -} -.markdown-body figcaption.image-caption { - font-size: 0.8rem; - color: var(--post-text-color); - opacity: 0.65; - line-height: 1; - margin: -0.75rem auto 2rem; - text-align: center; -} -.markdown-body figcaption:not(.image-caption) { - display: none; -} -.post-content, -post-custom { - box-sizing: border-box; - padding-left: 10%; - padding-right: 10%; -} -@media (max-width: 767px) { - .post-content, - post-custom { - padding-left: 2rem; - padding-right: 2rem; - } -} -@media (max-width: 424px) { - .post-content, - post-custom { - padding-left: 1rem; - padding-right: 1rem; - } - .anchorjs-link-left { - opacity: 0 !important; - } -} -.page-content strong, -.post-content strong { - font-weight: bold; -} -.page-content > *:first-child, -.post-content > *:first-child { - margin-top: 0; -} -.page-content img, -.post-content img { - object-fit: cover; - max-width: 100%; -} -@media (max-width: 767px) { - .page-content, - .post-content { - overflow-x: hidden; - } -} -.post-metas { - display: flex; - flex-wrap: wrap; - font-size: 0.9rem; -} -.post-meta > *:not(.hover-with-bg) { - margin-right: 0.2rem; -} -.post-prevnext { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - font-size: 0.9rem; - margin-left: -0.35rem; - margin-right: -0.35rem; -} -.post-prevnext .post-prev, -.post-prevnext .post-next { - display: flex; - padding-left: 0; - padding-right: 0; -} -.post-prevnext .post-prev i, -.post-prevnext .post-next i { - font-size: 1.5rem; -} -.post-prevnext .post-prev a, -.post-prevnext .post-next a { - display: flex; - align-items: center; -} -.post-prevnext .post-prev .hidden-mobile, -.post-prevnext .post-next .hidden-mobile { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - text-overflow: ellipsis; - overflow: hidden; -} -@media (max-width: 575px) { - .post-prevnext .post-prev .hidden-mobile, - .post-prevnext .post-next .hidden-mobile { - display: none; - } -} -.post-prevnext .post-prev:hover i, -.post-prevnext .post-prev:active i, -.post-prevnext .post-next:hover i, -.post-prevnext .post-next:active i { - -webkit-animation-duration: 1s; - animation-duration: 1s; - -webkit-animation-delay: 0.1s; - animation-delay: 0.1s; - -webkit-animation-timing-function: ease-in-out; - animation-timing-function: ease-in-out; - -webkit-animation-iteration-count: infinite; - animation-iteration-count: infinite; - -webkit-animation-fill-mode: forwards; - animation-fill-mode: forwards; - -webkit-animation-direction: alternate; - animation-direction: alternate; -} -.post-prevnext .post-prev:hover i, -.post-prevnext .post-prev:active i { - -webkit-animation-name: post-prev-anim; - animation-name: post-prev-anim; -} -.post-prevnext .post-next:hover i, -.post-prevnext .post-next:active i { - -webkit-animation-name: post-next-anim; - animation-name: post-next-anim; -} -.post-prevnext .post-next { - justify-content: flex-end; -} -.post-prevnext .fa-chevron-left { - margin-right: 0.5rem; -} -.post-prevnext .fa-chevron-right { - margin-left: 0.5rem; -} -#seo-header { - color: var(--post-heading-color); - font-weight: bold; - margin-top: 0.5em; - margin-bottom: 0.75em; - border-bottom-color: var(--line-color); - border-bottom-style: solid; - border-bottom-width: 2px; - line-height: 1.5; -} -.custom, -#comments { - margin-top: 2rem; -} -#comments noscript { - display: block; - text-align: center; - padding: 2rem 0; -} -.visitors { - font-size: 0.8em; - padding: 0.45rem; - float: right; -} -a.fancybox:hover { - text-decoration: none; -} -mjx-container, -.mjx-container { - overflow-x: auto; - overflow-y: hidden !important; - padding: 0.5em 0; -} -mjx-container:focus, -.mjx-container:focus, -mjx-container svg:focus, -.mjx-container svg:focus { - outline: none; -} -.mjx-char { - line-height: 1; -} -.katex-block { - overflow-x: auto; -} -.katex, -.mjx-mrow { - white-space: pre-wrap !important; -} -.footnote-ref [class*=hint--][aria-label]:after { - max-width: 12rem; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -@-moz-keyframes post-prev-anim { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 50% { - -webkit-transform: translateX(-0.35rem); - transform: translateX(-0.35rem); - } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} -@-webkit-keyframes post-prev-anim { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 50% { - -webkit-transform: translateX(-0.35rem); - transform: translateX(-0.35rem); - } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} -@-o-keyframes post-prev-anim { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 50% { - -webkit-transform: translateX(-0.35rem); - transform: translateX(-0.35rem); - } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} -@keyframes post-prev-anim { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 50% { - -webkit-transform: translateX(-0.35rem); - transform: translateX(-0.35rem); - } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} -@-moz-keyframes post-next-anim { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 50% { - -webkit-transform: translateX(0.35rem); - transform: translateX(0.35rem); - } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} -@-webkit-keyframes post-next-anim { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 50% { - -webkit-transform: translateX(0.35rem); - transform: translateX(0.35rem); - } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} -@-o-keyframes post-next-anim { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 50% { - -webkit-transform: translateX(0.35rem); - transform: translateX(0.35rem); - } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} -@keyframes post-next-anim { - 0% { - -webkit-transform: translateX(0); - transform: translateX(0); - } - 50% { - -webkit-transform: translateX(0.35rem); - transform: translateX(0.35rem); - } - 100% { - -webkit-transform: translateX(0); - transform: translateX(0); - } -} -.note { - padding: 0.75rem; - border-left: 0.35rem solid; - border-radius: 0.25rem; - margin: 1.5rem 0; - color: var(--text-color); - transition: color 0.2s ease-in-out; - font-size: 0.9rem; -} -.note a { - color: var(--text-color); - transition: color 0.2s ease-in-out; -} -.note *:last-child { - margin-bottom: 0; -} -.note-primary { - background-color: rgba(183,160,224,0.25); - border-color: #6f42c1; -} -.note-secondary, -note-default { - background-color: rgba(187,187,187,0.25); - border-color: #777; -} -.note-success { - background-color: rgba(174,220,174,0.25); - border-color: #5cb85c; -} -.note-danger { - background-color: rgba(236,169,167,0.25); - border-color: #d9534f; -} -.note-warning { - background-color: rgba(248,214,166,0.25); - border-color: #f0ad4e; -} -.note-info { - background-color: rgba(160,197,228,0.25); - border-color: #428bca; -} -.note-light { - background-color: rgba(254,254,254,0.25); - border-color: #0f0f0f; -} -.label { - display: inline; - border-radius: 3px; - font-size: 85%; - margin: 0; - padding: 0.2em 0.4em; - color: var(--text-color); - transition: color 0.2s ease-in-out; -} -.label-default { - background: rgba(187,187,187,0.25); -} -.label-primary { - background: rgba(183,160,224,0.25); -} -.label-info { - background: rgba(160,197,228,0.25); -} -.label-success { - background: rgba(174,220,174,0.25); -} -.label-warning { - background: rgba(248,214,166,0.25); -} -.label-danger { - background: rgba(236,169,167,0.25); -} -.markdown-body .btn { - border: 1px solid var(--line-color); - background-color: var(--button-bg-color); - color: var(--text-color); - transition: color 0.2s ease-in-out, background 0.2s ease-in-out, border-color 0.2s ease-in-out; - border-radius: 0.25rem; - display: inline-block; - font-size: 0.875em; - line-height: 2; - padding: 0 0.75rem; - margin-bottom: 1rem; -} -.markdown-body .btn:hover { - background-color: var(--button-hover-bg-color); - text-decoration: none; -} -.group-image-container { - margin: 1.5rem auto; -} -.group-image-container img { - margin: 0 auto; - border-radius: 3px; - background-color: transparent; - box-shadow: 0 3px 9px 0 rgba(0,0,0,0.15), 0 3px 9px 0 rgba(0,0,0,0.15); -} -.group-image-row { - margin-bottom: 0.5rem; - display: flex; - justify-content: center; -} -.group-image-wrap { - flex: 1; - display: flex; - justify-content: center; -} -.group-image-wrap:not(:last-child) { - margin-right: 0.25rem; -} -input[type=checkbox] { - margin: 0 0.2em 0.2em 0; - vertical-align: middle; -} -.list-group a ~ p.h5 { - margin-top: 1rem; -} -.list-group-item { - display: flex; - background-color: transparent; - border: 0; -} -.list-group-item time { - flex: 0 0 5rem; -} -.list-group-item .list-group-item-title { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -@media (max-width: 575px) { - .list-group-item { - font-size: 0.95rem; - padding: 0.5rem 0.75rem; - } - .list-group-item time { - flex: 0 0 4rem; - } -} -.list-group-item-action { - color: var(--text-color); -} -.list-group-item-action:focus, -.list-group-item-action:hover { - color: var(--link-hover-color); - background-color: var(--link-hover-bg-color); -} -.about-avatar { - position: relative; - margin: -8rem auto 1rem; - width: 10rem; - height: 10rem; - z-index: 3; -} -.about-avatar img { - width: 100%; - height: 100%; - border-radius: 50%; - background-color: transparent; - object-fit: cover; - box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12); -} -.about-info > div { - margin-bottom: 0.5rem; -} -.about-name { - font-size: 1.75rem; - font-weight: bold; -} -.about-intro { - font-size: 1rem; -} -.about-icons > a:not(:last-child) { - margin-right: 0.5rem; -} -.about-icons > a > i { - font-size: 1.5rem; -} -.category-bar .category-list { - max-height: 85vh; - overflow-y: auto; - overflow-x: hidden; -} -.category-bar .category-list::-webkit-scrollbar { - display: none; -} -.category-bar .category-list > .category-sub > a { - font-weight: bold; - font-size: 1.2rem; -} -.category-bar .category-list .category-item-action i { - margin: 0; -} -.category-bar .category-list .category-subitem.list-group-item { - padding-left: 0.5rem; - padding-right: 0; -} -.category-bar .category-list .category-collapse .category-post-list { - margin-top: 0.25rem; - margin-bottom: 0.5rem; -} -.category-bar .category-list .category-collapse .category-post { - font-size: 0.9rem; - line-height: 1.75; -} -.category-bar .category-list .category-item-action:hover { - background-color: initial; -} -.category-bar .list-group-item { - padding: 0; -} -.category-bar .list-group-item.active { - color: var(--link-hover-color); - background-color: initial; - font-weight: bold; - font-family: "iconfont"; - font-style: normal; - -webkit-font-smoothing: antialiased; -} -.category-bar .list-group-item.active::before { - content: "\e61f"; - font-weight: initial; - margin-right: 0.25rem; -} -.category-bar .list-group-count { - margin-left: 0.2rem; - margin-right: 0.2rem; - font-size: 0.9em; -} -.category-bar .list-group-item-action:focus, -.category-bar .list-group-item-action:hover { - background-color: initial; -} -.category-chains { - display: flex; - flex-wrap: wrap; -} -.category-chains > *:not(:last-child) { - margin-right: 1em; -} -.category:not(:last-child) { - margin-bottom: 1rem; -} -.category .category-item, -.category .category-subitem { - font-weight: bold; - display: flex; - align-items: center; -} -.category .category-item { - font-size: 1.25rem; -} -.category .category-subitem { - font-size: 1.1rem; -} -.category .category-collapse { - padding-left: 1.25rem; - width: 100%; -} -.category .category-count { - font-size: 0.9rem; - font-weight: initial; - min-width: 1.3em; - line-height: 1.3em; - display: flex; - align-items: center; -} -.category .category-count i { - padding-right: 0.25rem; -} -.category .category-count span { - width: 2rem; -} -.category .category-post { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.category .category-item-action:not(.collapsed) > i { - transform: rotate(90deg); - transform-origin: center center; -} -.category .category-item-action i { - transition: transform 0.3s ease-out; - display: inline-block; - margin-left: 0.25rem; -} -.category .category-item-action .category:hover { - z-index: 1; - color: var(--link-hover-color); - text-decoration: none; - background-color: var(--link-hover-bg-color); -} -.category .row { - margin-left: 0; - margin-right: 0; -} -.tagcloud { - padding: 1rem 5%; -} -.tagcloud a { - display: inline-block; - padding: 0.5rem; -} -.tagcloud a:hover { - color: var(--link-hover-color) !important; -} -.links .card { - box-shadow: none; - min-width: 33%; - background-color: transparent; - border: 0; -} -.links .card-body { - margin: 1rem 0; - padding: 1rem; - border-radius: 0.3rem; - display: block; - width: 100%; - height: 100%; -} -.links .card-body:hover .link-avatar { - transform: scale(1.1); -} -.links .card-content { - display: flex; - flex-wrap: nowrap; - width: 100%; - height: 3.5rem; -} -.link-avatar { - flex: none; - width: 3rem; - height: 3rem; - margin-right: 0.75rem; - object-fit: cover; - transition-duration: 0.2s; - transition-timing-function: ease-in-out; -} -.link-avatar img { - width: 100%; - height: 100%; - border-radius: 50%; - background-color: transparent; - object-fit: cover; -} -.link-text { - flex: 1; - display: grid; - flex-direction: column; - line-height: 1.5; -} -.link-title { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - color: var(--text-color); - font-weight: bold; -} -.link-intro { - max-height: 2rem; - font-size: 0.85rem; - line-height: 1.2; - color: var(--sec-text-color); - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; - text-overflow: ellipsis; - overflow: hidden; -} -@media (max-width: 767px) { - .links { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - } - .links .card { - padding-left: 2rem; - padding-right: 2rem; - } -} -@media (min-width: 768px) { - .link-text:only-child { - margin-left: 1rem; - } -} +.anchorjs-link{text-decoration:none!important;transition:opacity .2s ease-in-out}.markdown-body h1:hover>.anchorjs-link,h2:hover>.anchorjs-link,h3:hover>.anchorjs-link,h4:hover>.anchorjs-link,h5:hover>.anchorjs-link,h6:hover>.anchorjs-link{opacity:1}.banner{height:100%;position:relative;overflow:hidden;cursor:default}.banner .mask{position:absolute;width:100%;height:100%;background-color:rgba(0,0,0,.3)}.banner[parallax=true]{will-change:transform;-webkit-transform-style:preserve-3d;-webkit-backface-visibility:hidden;transition:transform 50ms ease-out}@media (max-width:100vh){.header-inner{max-height:100vw}#board{margin-top:-1rem!important}}@media (max-width:79.99vh){.scroll-down-bar{display:none}}#board{position:relative;margin-top:-2rem;padding:3rem 0;background-color:var(--board-bg-color);transition:background-color .2s ease-in-out;border-radius:.5rem;z-index:3;-webkit-box-shadow:0 12px 15px 0 rgba(0,0,0,.24),0 17px 50px 0 rgba(0,0,0,.19);box-shadow:0 12px 15px 0 rgba(0,0,0,.24),0 17px 50px 0 rgba(0,0,0,.19)}.code-widget{display:inline-block;background-color:transparent;font-size:.75rem;line-height:1;font-weight:700;padding:.3rem .1rem .1rem .1rem;position:absolute;right:.45rem;top:.15rem;z-index:1}.code-widget-light{color:#999}.code-widget-dark{color:#bababa}.copy-btn{cursor:pointer;user-select:none;-webkit-appearance:none;outline:0}.copy-btn>i{font-size:.75rem!important;font-weight:400;margin-right:.15rem;opacity:0;transition:opacity .2s ease-in-out}.markdown-body pre:hover>.copy-btn>i{opacity:.9}.markdown-body pre:hover>.copy-btn,.markdown-body pre:not(:hover)>.copy-btn{outline:0}.license-box{background-color:rgba(27,31,35,.05);transition:background-color .2s ease-in-out;border-radius:4px;font-size:.9rem;overflow:hidden;padding:1.25rem;position:relative;z-index:1}.license-box .license-icon{position:absolute;top:50%;left:100%}.license-box .license-icon::after{content:"\e8e4";font-size:12.5rem;line-height:1;opacity:.1;position:relative;left:-.85em;bottom:.5em;z-index:-1}.license-box .license-title{margin-bottom:1rem}.license-box .license-title div:first-child{line-height:1.2;margin-bottom:.25rem}.license-box .license-title div:nth-child(2){color:var(--sec-text-color);font-size:.8rem}.license-box .license-meta{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.license-box .license-meta .license-meta-item{align-items:center;justify-content:center;margin-right:1.5rem}.license-box .license-meta .license-meta-item div:first-child{color:var(--sec-text-color);font-size:.8rem;font-weight:400}.license-box .license-meta .license-meta-item i.iconfont{font-size:1rem}@media (max-width:575px) and (min-width:425px){.license-box .license-meta .license-meta-item{display:flex;justify-content:flex-start;flex-wrap:wrap;font-size:.8rem;flex:0 0 50%;max-width:50%;margin-right:0}.license-box .license-meta .license-meta-item div:first-child{margin-right:.5rem}.license-box .license-meta .license-meta-date{order:-1}}@media (max-width:424px){.license-box::after{top:-65px}.license-box .license-meta{flex-direction:column;align-items:flex-start}.license-box .license-meta .license-meta-item{display:flex;flex-wrap:wrap;font-size:.8rem}.license-box .license-meta .license-meta-item div:first-child{margin-right:.5rem}}.footer-inner{padding:3rem 0 1rem 0;text-align:center}.footer-inner>div:not(:first-child){margin:.25rem 0;font-size:.85rem}.footer-inner .statistics{display:flex;flex-direction:row;justify-content:center}.footer-inner .statistics>span{flex:1;margin:0 .25rem}.footer-inner .statistics>:nth-last-child(2):first-child{text-align:right}.footer-inner .statistics>:nth-last-child(2):first-child~*{text-align:left}.footer-inner .beian{display:flex;flex-direction:row;justify-content:center}.footer-inner .beian>*{margin:0 .25rem}.footer-inner .beian-police{position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:left}.footer-inner .beian-police img{margin-right:3px;width:1rem;height:1rem;margin-bottom:.1rem}@media (max-width:424px){.footer-inner .statistics{flex-direction:column}.footer-inner .statistics>:nth-last-child(2):first-child{text-align:center}.footer-inner .statistics>:nth-last-child(2):first-child~*{text-align:center}.footer-inner .beian{flex-direction:column}.footer-inner .beian .beian-police{justify-content:center}.footer-inner .beian>:nth-last-child(2):first-child{text-align:center}.footer-inner .beian>:nth-last-child(2):first-child~*{text-align:center}}.footnote-text::before,sup>a::before{display:block;content:"";margin-top:-5rem;height:5rem;width:1px;visibility:hidden}.footnote-text::before,sup>a::before{display:inline-block}.footnote-item::before{display:block;content:"";margin-top:-5rem;height:5rem;width:1px;visibility:hidden}.footnote-list ol{list-style-type:none;counter-reset:sectioncounter;padding-left:.5rem;font-size:.95rem}.footnote-list ol li:before{font-family:"Helvetica Neue",monospace,Monaco;content:"[" counter(sectioncounter) "]";counter-increment:sectioncounter}.footnote-list ol li+li{margin-top:.5rem}.footnote-text{padding-left:.5em}.navbar{background-color:transparent;font-size:.875rem;box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12)}.navbar .navbar-brand{color:var(--navbar-text-color)}.navbar .navbar-toggler .animated-icon span{background-color:var(--navbar-text-color)}.navbar .nav-item .nav-link{display:block;color:var(--navbar-text-color);transition:color .2s ease-in-out,background-color .2s ease-in-out}.navbar .nav-item .nav-link:hover{color:var(--link-hover-color)}.navbar .nav-item .nav-link:focus{color:var(--navbar-text-color)}.navbar .nav-item .nav-link i{font-size:.875rem}.navbar .nav-item .nav-link i:only-child{margin:0 .2rem}.navbar .navbar-toggler{border-width:0;outline:0}.navbar.scrolling-navbar{will-change:background,padding;-webkit-transition:background .5s ease-in-out,padding .5s ease-in-out;transition:background .5s ease-in-out,padding .5s ease-in-out}@media (min-width:600px){.navbar.scrolling-navbar{padding-top:12px;padding-bottom:12px}.navbar.scrolling-navbar .navbar-nav>li{-webkit-transition-duration:1s;transition-duration:1s}}.navbar.scrolling-navbar.top-nav-collapse{padding-top:5px;padding-bottom:5px}.navbar .dropdown-menu{font-size:.875rem;color:var(--navbar-text-color);background-color:rgba(0,0,0,.3);border:none;min-width:8rem;-webkit-transition:background .5s ease-in-out,padding .5s ease-in-out;transition:background .5s ease-in-out,padding .5s ease-in-out}@media (max-width:991.98px){.navbar .dropdown-menu{text-align:center}}.navbar .dropdown-item{color:var(--navbar-text-color)}.navbar .dropdown-item:focus,.navbar .dropdown-item:hover{color:var(--link-hover-color);background-color:rgba(0,0,0,.1)}@media (min-width:992px){.navbar .dropdown:hover>.dropdown-menu{display:block}.navbar .dropdown>.dropdown-toggle:active{pointer-events:none}.navbar .dropdown-menu{top:95%}}.navbar .animated-icon{width:30px;height:20px;position:relative;margin:0;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.navbar .animated-icon span{display:block;position:absolute;height:3px;width:100%;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out;background:#fff}.navbar .animated-icon span:first-child{top:0}.navbar .animated-icon span:nth-child(2){top:10px}.navbar .animated-icon span:nth-child(3){top:20px}.navbar .animated-icon.open span:first-child{top:11px;-webkit-transform:rotate(135deg);-moz-transform:rotate(135deg);-o-transform:rotate(135deg);transform:rotate(135deg)}.navbar .animated-icon.open span:nth-child(2){opacity:0;left:-60px}.navbar .animated-icon.open span:nth-child(3){top:11px;-webkit-transform:rotate(-135deg);-moz-transform:rotate(-135deg);-o-transform:rotate(-135deg);transform:rotate(-135deg)}.navbar .dropdown-collapse,.navbar-col-show,.top-nav-collapse{background-color:var(--navbar-bg-color)}@media (max-width:767px){.navbar{font-size:1rem;line-height:2.5rem}}.banner-text{color:var(--subtitle-color);max-width:calc(960px - 6rem);width:80%;overflow-wrap:break-word}.banner-text .typed-cursor{margin:0 .2rem}@media (max-width:767px){#subtitle,.typed-cursor{font-size:1.5rem}}@media (max-width:575px){.banner-text{font-size:.9rem}#subtitle,.typed-cursor{font-size:1.35rem}}.modal-dialog .modal-content{background-color:var(--board-bg-color);border:0;border-radius:.125rem;-webkit-box-shadow:0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15);box-shadow:0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15)}.modal-dialog .modal-content .modal-header{border-bottom-color:var(--line-color);transition:border-bottom-color .2s ease-in-out}.close{color:var(--text-color)}.close:hover{color:var(--link-hover-color)}.close:focus{outline:0}.modal-dialog .modal-content .modal-header{border-top-left-radius:.125rem;border-top-right-radius:.125rem;border-bottom:1px solid #dee2e6}.md-form{position:relative;margin-top:1.5rem;margin-bottom:1.5rem}.md-form input[type]{-webkit-box-sizing:content-box;box-sizing:content-box;background-color:transparent;border:none;border-bottom:1px solid #ced4da;border-radius:0;outline:0;-webkit-box-shadow:none;box-shadow:none;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}.md-form input[type]:focus:not([readonly]){border-bottom:1px solid #4285f4;-webkit-box-shadow:0 1px 0 0 #4285f4;box-shadow:0 1px 0 0 #4285f4}.md-form input[type]:focus:not([readonly])+label{color:#4285f4}.md-form input[type].valid,.md-form input[type]:focus.valid{border-bottom:1px solid #00c851;-webkit-box-shadow:0 1px 0 0 #00c851;box-shadow:0 1px 0 0 #00c851}.md-form input[type].valid+label,.md-form input[type]:focus.valid+label{color:#00c851}.md-form input[type].invalid,.md-form input[type]:focus.invalid{border-bottom:1px solid #f44336;-webkit-box-shadow:0 1px 0 0 #f44336;box-shadow:0 1px 0 0 #f44336}.md-form input[type].invalid+label,.md-form input[type]:focus.invalid+label{color:#f44336}.md-form input[type].validate{margin-bottom:2.5rem}.md-form input[type].form-control{height:auto;padding:.6rem 0 .4rem 0;margin:0 0 .5rem 0;color:var(--text-color);background-color:transparent;border-radius:0}.md-form label{font-size:.8rem;position:absolute;top:-1rem;left:0;color:#757575;cursor:text;transition:color .2s ease-out}.modal-open[style]{padding-right:0!important;overflow:auto}.modal-open[style] #navbar[style]{padding-right:1rem!important}#nprogress .bar{height:3px!important;background-color:#29d!important}#nprogress .peg{box-shadow:0 0 14px #29d,0 0 8px #29d!important}@media (max-width:575px){#nprogress .bar{display:none}}.noscript-warning{background-color:#f55;color:#fff;font-family:sans-serif;font-size:1rem;font-weight:700;position:fixed;left:0;bottom:0;text-align:center;width:100%;z-index:99}.pagination{margin-top:3rem;justify-content:center}.pagination .space{align-self:flex-end}.pagination .current,.pagination .extend,.pagination .page-number{outline:0;border:0;background-color:transparent;font-size:.9rem;padding:.5rem .75rem;line-height:1.25;border-radius:.125rem}.pagination .page-number{margin:0 .05rem}.pagination .current,.pagination .page-number:hover{transition:background-color .2s ease-in-out;background-color:var(--link-hover-bg-color)}.qr-trigger{cursor:pointer;position:relative}.qr-trigger:hover .qr-img{display:block;transition:all .3s}.qr-img{max-width:12rem;position:absolute;right:-5.25rem;z-index:99;display:none;border-radius:.2rem;background-color:transparent;box-shadow:0 0 20px -5px rgba(158,158,158,.2)}.scroll-down-bar{position:absolute;width:100%;height:6rem;text-align:center;cursor:pointer;bottom:0}.scroll-down-bar i.iconfont{font-size:2rem;font-weight:700;display:inline-block;position:relative;padding-top:2rem;color:var(--subtitle-color);transform:translateZ(0);animation:scroll-down 1.5s infinite}#scroll-top-button{position:fixed;z-index:99;background:var(--board-bg-color);transition:background-color .2s ease-in-out,bottom .3s ease;border-radius:4px;min-width:40px;min-height:40px;bottom:-60px;outline:0;display:flex;display:-webkit-flex;align-items:center;box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12)}#scroll-top-button i{font-size:32px;margin:auto;color:var(--sec-text-color)}#scroll-top-button:active i,#scroll-top-button:hover i{animation-name:scroll-top;animation-duration:1s;animation-delay:.1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-fill-mode:forwards;animation-direction:alternate}#local-search-result .search-list-title{border-left:3px solid #0d47a1}#local-search-result .search-list-content{padding:0 1.25rem}#local-search-result .search-word{color:#ff4500}#toc{visibility:hidden}.toc-header{margin-bottom:.5rem;font-weight:700;line-height:1.2}.toc-header,.toc-header>i{font-size:1.25rem}.toc-body{max-height:75vh;overflow-y:auto;overflow:-moz-scrollbars-none;-ms-overflow-style:none}.toc-body ol{list-style:none;padding-inline-start:1rem}.toc-body::-webkit-scrollbar{display:none}.tocbot-list{position:relative}.tocbot-list ol{list-style:none;padding-left:1rem}.tocbot-list a{font-size:.95rem}.tocbot-link{color:var(--text-color)}.tocbot-active-link{font-weight:700;color:var(--link-hover-color)}.tocbot-is-collapsed{max-height:0}.tocbot-is-collapsible{overflow:hidden;transition:all .3s ease-in-out}.toc-list-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toc-list-item.is-active-li::before{height:1rem;margin:.25rem 0;visibility:visible}.toc-list-item::before{width:.15rem;height:.2rem;position:absolute;left:.25rem;content:"";border-radius:2px;margin:.65rem 0;background:var(--link-hover-color);visibility:hidden;transition:height .1s ease-in-out,margin .1s ease-in-out,visibility .1s ease-in-out}.sidebar{position:-webkit-sticky;position:sticky;top:2rem;padding:3rem 0}html{font-size:16px;letter-spacing:.02em}body,html{height:100%;font-family:var(--font-family-sans-serif);overflow-wrap:break-word}body{transition:color .2s ease-in-out,background-color .2s ease-in-out;background-color:var(--body-bg-color);color:var(--text-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body a{color:var(--text-color);text-decoration:none;cursor:pointer;transition:color .2s ease-in-out,background-color .2s ease-in-out}body a:hover{color:var(--link-hover-color);text-decoration:none;transition:color .2s ease-in-out,background-color .2s ease-in-out}code{color:inherit}table{font-size:inherit;color:var(--post-text-color)}img[lazyload]{object-fit:cover}[align=left]{text-align:left}[align=center]{text-align:center}[align=right]{text-align:right}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color);border-radius:6px}::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-hover-color)}::-webkit-scrollbar-corner{background-color:transparent}label{margin-bottom:0}i.iconfont{font-size:1em;line-height:1}:root{--color-mode:"light";--body-bg-color:#eee;--board-bg-color:#fff;--text-color:#3c4858;--sec-text-color:#718096;--post-text-color:#2c3e50;--post-heading-color:#1a202c;--post-link-color:#0366d6;--link-hover-color:#30a9de;--link-hover-bg-color:#f8f9fa;--line-color:#eaecef;--navbar-bg-color:#2f4154;--navbar-text-color:#fff;--subtitle-color:#fff;--scrollbar-color:#c4c6c9;--scrollbar-hover-color:#a6a6a6;--button-bg-color:transparent;--button-hover-bg-color:#f2f3f5;--highlight-bg-color:#f6f8fa;--inlinecode-bg-color:rgba(175,184,193,0.2)}@media (prefers-color-scheme:dark){:root{--color-mode:"dark"}:root:not([data-user-color-scheme]){--body-bg-color:#181c27;--board-bg-color:#252d38;--text-color:#c4c6c9;--sec-text-color:#a7a9ad;--post-text-color:#c4c6c9;--post-heading-color:#c4c6c9;--post-link-color:#1589e9;--link-hover-color:#30a9de;--link-hover-bg-color:#364151;--line-color:#435266;--navbar-bg-color:#1f3144;--navbar-text-color:#d0d0d0;--subtitle-color:#d0d0d0;--scrollbar-color:#687582;--scrollbar-hover-color:#9da8b3;--button-bg-color:transparent;--button-hover-bg-color:#46647e;--highlight-bg-color:#303030;--inlinecode-bg-color:rgba(99,110,123,0.4)}:root:not([data-user-color-scheme]) img{-webkit-filter:brightness(0.9);filter:brightness(.9);transition:filter .2s ease-in-out}:root:not([data-user-color-scheme]) .license-box{background-color:rgba(62,75,94,.35);transition:background-color .2s ease-in-out}:root:not([data-user-color-scheme]) .gt-comment-admin .gt-comment-content{background-color:transparent;transition:background-color .2s ease-in-out}}@media not print{[data-user-color-scheme=dark]{--body-bg-color:#181c27;--board-bg-color:#252d38;--text-color:#c4c6c9;--sec-text-color:#a7a9ad;--post-text-color:#c4c6c9;--post-heading-color:#c4c6c9;--post-link-color:#1589e9;--link-hover-color:#30a9de;--link-hover-bg-color:#364151;--line-color:#435266;--navbar-bg-color:#1f3144;--navbar-text-color:#d0d0d0;--subtitle-color:#d0d0d0;--scrollbar-color:#687582;--scrollbar-hover-color:#9da8b3;--button-bg-color:transparent;--button-hover-bg-color:#46647e;--highlight-bg-color:#303030;--inlinecode-bg-color:rgba(99,110,123,0.4)}[data-user-color-scheme=dark] img{-webkit-filter:brightness(0.9);filter:brightness(.9);transition:filter .2s ease-in-out}[data-user-color-scheme=dark] .license-box{background-color:rgba(62,75,94,.35);transition:background-color .2s ease-in-out}[data-user-color-scheme=dark] .gt-comment-admin .gt-comment-content{background-color:transparent;transition:background-color .2s ease-in-out}}@media print{:root{--color-mode:"light"}}.fade-in-up{-webkit-animation-name:fade-in-up;animation-name:fade-in-up}.hidden-mobile{display:block}.visible-mobile{display:none}@media (max-width:575px){.hidden-mobile{display:none}.visible-mobile{display:block}}.nomargin-x{margin-left:0!important;margin-right:0!important}.nopadding-x{padding-left:0!important;padding-right:0!important}@media (max-width:767px){.nopadding-x-md{padding-left:0!important;padding-right:0!important}}.flex-center{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%}.hover-with-bg{display:inline-block;line-height:1}.hover-with-bg:hover{background-color:var(--link-hover-bg-color);transition-duration:.2s;transition-timing-function:ease-in-out;border-radius:.2rem}@-moz-keyframes fade-in-up{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-webkit-keyframes fade-in-up{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-o-keyframes fade-in-up{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fade-in-up{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@-moz-keyframes scroll-down{0%{opacity:.8;top:0}50%{opacity:.4;top:-1em}100%{opacity:.8;top:0}}@-webkit-keyframes scroll-down{0%{opacity:.8;top:0}50%{opacity:.4;top:-1em}100%{opacity:.8;top:0}}@-o-keyframes scroll-down{0%{opacity:.8;top:0}50%{opacity:.4;top:-1em}100%{opacity:.8;top:0}}@keyframes scroll-down{0%{opacity:.8;top:0}50%{opacity:.4;top:-1em}100%{opacity:.8;top:0}}@-moz-keyframes scroll-top{0%{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-.35rem);transform:translateY(-.35rem)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes scroll-top{0%{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-.35rem);transform:translateY(-.35rem)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@-o-keyframes scroll-top{0%{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-.35rem);transform:translateY(-.35rem)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes scroll-top{0%{-webkit-transform:translateY(0);transform:translateY(0)}50%{-webkit-transform:translateY(-.35rem);transform:translateY(-.35rem)}100%{-webkit-transform:translateY(0);transform:translateY(0)}}@media print{#comments,#scroll-top-button,.post-prevnext,.side-col,footer,header{display:none!important}.markdown-body a:not([href^='#']):not([href^='javascript:']):not(.print-no-link)::after{content:' (' attr(href) ')';font-size:.8rem;color:var(--post-text-color);opacity:.8}.markdown-body h2,.markdown-body>h1{border-bottom-color:transparent!important}.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6,.markdown-body>h1{margin-top:1.25em!important;margin-bottom:.25em!important}.markdown-body [data-anchorjs-icon]::after{display:none}.markdown-body figure.highlight table,.markdown-body figure.highlight tbody,.markdown-body figure.highlight td.code,.markdown-body figure.highlight td.code pre,.markdown-body figure.highlight tr{width:100%!important;display:block!important}.markdown-body figure.highlight pre>code{white-space:pre-wrap}.markdown-body figure.highlight .code-widget,.markdown-body figure.highlight .gutter{display:none!important}.post-metas a{text-decoration:none}}@media not print{#seo-header{display:none}}.index-card{margin-bottom:2.5rem}.index-img img{display:block;width:100%;height:10rem;object-fit:cover;box-shadow:0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15);border-radius:.25rem;background-color:transparent}.index-info{display:flex;flex-direction:column;justify-content:space-between;padding-top:.5rem;padding-bottom:.5rem}.index-header{color:var(--text-color);font-size:1.5rem;font-weight:700;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:.25rem}.index-header .index-pin{color:var(--text-color);font-size:1.5rem;margin-right:.15rem}.index-btm{color:var(--sec-text-color)}.index-btm a{color:var(--sec-text-color)}.index-excerpt{color:var(--sec-text-color);margin:.5rem 0 .5rem 0;height:calc(1.4rem * 3);overflow:hidden;display:flex}.index-excerpt>div{width:100%;line-height:1.4rem;word-break:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.index-excerpt__noimg{height:auto;max-height:calc(1.4rem * 3)}@media (max-width:767px){.index-info{padding-top:1.25rem}.index-header{font-size:1.25rem;white-space:normal;overflow:hidden;word-break:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.index-header .index-pin{font-size:1.25rem}}#valine.v[data-class=v] .status-bar,#valine.v[data-class=v] .vbtn,#valine.v[data-class=v] .veditor,#valine.v[data-class=v] .vinput,#valine.v[data-class=v] p,#valine.v[data-class=v] pre code{color:var(--text-color)}#valine.v[data-class=v] .vinput::placeholder{color:var(--sec-text-color)}#valine.v[data-class=v] .vicon{fill:var(--text-color)}.gt-container .gt-comment-content:hover{-webkit-box-shadow:none;box-shadow:none}.gt-container .gt-comment-body{color:var(--text-color)!important;transition:color .2s ease-in-out}#remark-km423lmfdslkm34-back{z-index:1030}#remark-km423lmfdslkm34-node{z-index:1031}.markdown-body .highlight pre,.markdown-body pre{padding:1.45rem 1rem}.markdown-body pre code.hljs{padding:0}.markdown-body pre[class*=language-]{padding-top:1.45rem;padding-bottom:1.45rem;padding-right:1rem;line-height:1.5;margin-bottom:1rem}.markdown-body .code-wrapper{position:relative;border-radius:4px;margin-bottom:1rem}.markdown-body .code-wrapper pre,.markdown-body .highlight pre,.markdown-body .hljs,.markdown-body figure.highlight td.gutter{transition:color .2s ease-in-out,background-color .2s ease-in-out;background-color:var(--highlight-bg-color)}pre[class*=language-].line-numbers{position:initial}figure{margin:1rem 0}figure.highlight{position:relative}figure.highlight table{border:0;margin:0;width:auto;border-radius:4px}figure.highlight td{border:0;padding:0}figure.highlight tr{border:0}figure.highlight td.code{width:100%}figure.highlight td.gutter{display:table-cell;position:-webkit-sticky;position:sticky;left:0;z-index:1}figure.highlight td.gutter pre{text-align:right;padding:0 .75rem;border-radius:initial;border-right:1px solid #999}figure.highlight td.gutter pre span.line{color:#999}figure.highlight td.code>pre{border-top-left-radius:0;border-bottom-left-radius:0}.markdown-body{font-size:1rem;line-height:1.6;font-family:var(--font-family-sans-serif);margin-bottom:2rem;color:var(--post-text-color)}.markdown-body h2,.markdown-body>h1{border-bottom-color:var(--line-color)}.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6,.markdown-body>h1{color:var(--post-heading-color);transition:color .2s ease-in-out,border-bottom-color .2s ease-in-out;font-weight:700;margin-bottom:.75em;margin-top:2em}.markdown-body h2::before,.markdown-body h3::before,.markdown-body h4::before,.markdown-body h5::before,.markdown-body h6::before,.markdown-body>h1::before{display:block;content:"";margin-top:-5rem;height:5rem;width:1px;visibility:hidden}.markdown-body h2:focus,.markdown-body h3:focus,.markdown-body h4:focus,.markdown-body h5:focus,.markdown-body h6:focus,.markdown-body>h1:focus{outline:0}.markdown-body a{color:var(--post-link-color)}.markdown-body strong{font-weight:700}.markdown-body code{tab-size:4;background-color:var(--inlinecode-bg-color);transition:background-color .2s ease-in-out}.markdown-body table tr{background-color:var(--board-bg-color);transition:background-color .2s ease-in-out}.markdown-body table tr:nth-child(2n){background-color:var(--board-bg-color);transition:background-color .2s ease-in-out}.markdown-body table td,.markdown-body table th{border-color:var(--line-color);transition:border-color .2s ease-in-out}.markdown-body pre{font-size:85%!important}.markdown-body pre .mermaid{text-align:center}.markdown-body pre .mermaid>svg{min-width:100%}.markdown-body figure>a>img,.markdown-body figure>img,.markdown-body p>a>img,.markdown-body p>img{max-width:90%;margin:1.5rem auto;display:block;box-shadow:0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15);border-radius:4px;background-color:transparent}.markdown-body blockquote{color:var(--sec-text-color)}.markdown-body details{cursor:pointer}.markdown-body details summary{outline:0}.markdown-body hr,hr{background-color:initial;border-top:1px solid var(--line-color);transition:border-top-color .2s ease-in-out}.markdown-body hr{height:0;margin:2rem 0}.markdown-body figcaption.image-caption{font-size:.8rem;color:var(--post-text-color);opacity:.65;line-height:1;margin:-.75rem auto 2rem;text-align:center}.markdown-body figcaption:not(.image-caption){display:none}.post-content,post-custom{box-sizing:border-box;padding-left:10%;padding-right:10%}@media (max-width:767px){.post-content,post-custom{padding-left:2rem;padding-right:2rem}}@media (max-width:424px){.post-content,post-custom{padding-left:1rem;padding-right:1rem}.anchorjs-link-left{opacity:0!important}}.page-content strong,.post-content strong{font-weight:700}.page-content>:first-child,.post-content>:first-child{margin-top:0}.page-content img,.post-content img{object-fit:cover;max-width:100%}@media (max-width:767px){.page-content,.post-content{overflow-x:hidden}}.post-metas{display:flex;flex-wrap:wrap;font-size:.9rem}.post-meta>:not(.hover-with-bg){margin-right:.2rem}.post-prevnext{display:flex;flex-wrap:wrap;justify-content:space-between;font-size:.9rem;margin-left:-.35rem;margin-right:-.35rem}.post-prevnext .post-next,.post-prevnext .post-prev{display:flex;padding-left:0;padding-right:0}.post-prevnext .post-next i,.post-prevnext .post-prev i{font-size:1.5rem}.post-prevnext .post-next a,.post-prevnext .post-prev a{display:flex;align-items:center}.post-prevnext .post-next .hidden-mobile,.post-prevnext .post-prev .hidden-mobile{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis;overflow:hidden}@media (max-width:575px){.post-prevnext .post-next .hidden-mobile,.post-prevnext .post-prev .hidden-mobile{display:none}}.post-prevnext .post-next:active i,.post-prevnext .post-next:hover i,.post-prevnext .post-prev:active i,.post-prevnext .post-prev:hover i{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-delay:.1s;animation-delay:.1s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-direction:alternate;animation-direction:alternate}.post-prevnext .post-prev:active i,.post-prevnext .post-prev:hover i{-webkit-animation-name:post-prev-anim;animation-name:post-prev-anim}.post-prevnext .post-next:active i,.post-prevnext .post-next:hover i{-webkit-animation-name:post-next-anim;animation-name:post-next-anim}.post-prevnext .post-next{justify-content:flex-end}.post-prevnext .fa-chevron-left{margin-right:.5rem}.post-prevnext .fa-chevron-right{margin-left:.5rem}#seo-header{color:var(--post-heading-color);font-weight:700;margin-top:.5em;margin-bottom:.75em;border-bottom-color:var(--line-color);border-bottom-style:solid;border-bottom-width:2px;line-height:1.5}#comments,.custom{margin-top:2rem}#comments noscript{display:block;text-align:center;padding:2rem 0}.visitors{font-size:.8em;padding:.45rem;float:right}a.fancybox:hover{text-decoration:none}.mjx-container,mjx-container{overflow-x:auto;overflow-y:hidden!important;padding:.5em 0}.mjx-container svg:focus,.mjx-container:focus,mjx-container svg:focus,mjx-container:focus{outline:0}.mjx-char{line-height:1}.katex-block{overflow-x:auto}.katex,.mjx-mrow{white-space:pre-wrap!important}.footnote-ref [class*=hint--][aria-label]:after{max-width:12rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@-moz-keyframes post-prev-anim{0%{-webkit-transform:translateX(0);transform:translateX(0)}50%{-webkit-transform:translateX(-.35rem);transform:translateX(-.35rem)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes post-prev-anim{0%{-webkit-transform:translateX(0);transform:translateX(0)}50%{-webkit-transform:translateX(-.35rem);transform:translateX(-.35rem)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@-o-keyframes post-prev-anim{0%{-webkit-transform:translateX(0);transform:translateX(0)}50%{-webkit-transform:translateX(-.35rem);transform:translateX(-.35rem)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes post-prev-anim{0%{-webkit-transform:translateX(0);transform:translateX(0)}50%{-webkit-transform:translateX(-.35rem);transform:translateX(-.35rem)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@-moz-keyframes post-next-anim{0%{-webkit-transform:translateX(0);transform:translateX(0)}50%{-webkit-transform:translateX(.35rem);transform:translateX(.35rem)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes post-next-anim{0%{-webkit-transform:translateX(0);transform:translateX(0)}50%{-webkit-transform:translateX(.35rem);transform:translateX(.35rem)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@-o-keyframes post-next-anim{0%{-webkit-transform:translateX(0);transform:translateX(0)}50%{-webkit-transform:translateX(.35rem);transform:translateX(.35rem)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes post-next-anim{0%{-webkit-transform:translateX(0);transform:translateX(0)}50%{-webkit-transform:translateX(.35rem);transform:translateX(.35rem)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.note{padding:.75rem;border-left:.35rem solid;border-radius:.25rem;margin:1.5rem 0;color:var(--text-color);transition:color .2s ease-in-out;font-size:.9rem}.note a{color:var(--text-color);transition:color .2s ease-in-out}.note :last-child{margin-bottom:0}.note-primary{background-color:rgba(183,160,224,.25);border-color:#6f42c1}.note-secondary,note-default{background-color:rgba(187,187,187,.25);border-color:#777}.note-success{background-color:rgba(174,220,174,.25);border-color:#5cb85c}.note-danger{background-color:rgba(236,169,167,.25);border-color:#d9534f}.note-warning{background-color:rgba(248,214,166,.25);border-color:#f0ad4e}.note-info{background-color:rgba(160,197,228,.25);border-color:#428bca}.note-light{background-color:rgba(254,254,254,.25);border-color:#0f0f0f}.label{display:inline;border-radius:3px;font-size:85%;margin:0;padding:.2em .4em;color:var(--text-color);transition:color .2s ease-in-out}.label-default{background:rgba(187,187,187,.25)}.label-primary{background:rgba(183,160,224,.25)}.label-info{background:rgba(160,197,228,.25)}.label-success{background:rgba(174,220,174,.25)}.label-warning{background:rgba(248,214,166,.25)}.label-danger{background:rgba(236,169,167,.25)}.markdown-body .btn{border:1px solid var(--line-color);background-color:var(--button-bg-color);color:var(--text-color);transition:color .2s ease-in-out,background .2s ease-in-out,border-color .2s ease-in-out;border-radius:.25rem;display:inline-block;font-size:.875em;line-height:2;padding:0 .75rem;margin-bottom:1rem}.markdown-body .btn:hover{background-color:var(--button-hover-bg-color);text-decoration:none}.group-image-container{margin:1.5rem auto}.group-image-container img{margin:0 auto;border-radius:3px;background-color:transparent;box-shadow:0 3px 9px 0 rgba(0,0,0,.15),0 3px 9px 0 rgba(0,0,0,.15)}.group-image-row{margin-bottom:.5rem;display:flex;justify-content:center}.group-image-wrap{flex:1;display:flex;justify-content:center}.group-image-wrap:not(:last-child){margin-right:.25rem}input[type=checkbox]{margin:0 .2em .2em 0;vertical-align:middle}.list-group a~p.h5{margin-top:1rem}.list-group-item{display:flex;background-color:transparent;border:0}.list-group-item time{flex:0 0 5rem}.list-group-item .list-group-item-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media (max-width:575px){.list-group-item{font-size:.95rem;padding:.5rem .75rem}.list-group-item time{flex:0 0 4rem}}.list-group-item-action{color:var(--text-color)}.list-group-item-action:focus,.list-group-item-action:hover{color:var(--link-hover-color);background-color:var(--link-hover-bg-color)}.about-avatar{position:relative;margin:-8rem auto 1rem;width:10rem;height:10rem;z-index:3}.about-avatar img{width:100%;height:100%;border-radius:50%;background-color:transparent;object-fit:cover;box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12)}.about-info>div{margin-bottom:.5rem}.about-name{font-size:1.75rem;font-weight:700}.about-intro{font-size:1rem}.about-icons>a:not(:last-child){margin-right:.5rem}.about-icons>a>i{font-size:1.5rem}.category-bar .category-list{max-height:85vh;overflow-y:auto;overflow-x:hidden}.category-bar .category-list::-webkit-scrollbar{display:none}.category-bar .category-list>.category-sub>a{font-weight:700;font-size:1.2rem}.category-bar .category-list .category-item-action i{margin:0}.category-bar .category-list .category-subitem.list-group-item{padding-left:.5rem;padding-right:0}.category-bar .category-list .category-collapse .category-post-list{margin-top:.25rem;margin-bottom:.5rem}.category-bar .category-list .category-collapse .category-post{font-size:.9rem;line-height:1.75}.category-bar .category-list .category-item-action:hover{background-color:initial}.category-bar .list-group-item{padding:0}.category-bar .list-group-item.active{color:var(--link-hover-color);background-color:initial;font-weight:700;font-family:iconfont;font-style:normal;-webkit-font-smoothing:antialiased}.category-bar .list-group-item.active::before{content:"\e61f";font-weight:initial;margin-right:.25rem}.category-bar .list-group-count{margin-left:.2rem;margin-right:.2rem;font-size:.9em}.category-bar .list-group-item-action:focus,.category-bar .list-group-item-action:hover{background-color:initial}.category-chains{display:flex;flex-wrap:wrap}.category-chains>:not(:last-child){margin-right:1em}.category:not(:last-child){margin-bottom:1rem}.category .category-item,.category .category-subitem{font-weight:700;display:flex;align-items:center}.category .category-item{font-size:1.25rem}.category .category-subitem{font-size:1.1rem}.category .category-collapse{padding-left:1.25rem;width:100%}.category .category-count{font-size:.9rem;font-weight:initial;min-width:1.3em;line-height:1.3em;display:flex;align-items:center}.category .category-count i{padding-right:.25rem}.category .category-count span{width:2rem}.category .category-post{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.category .category-item-action:not(.collapsed)>i{transform:rotate(90deg);transform-origin:center center}.category .category-item-action i{transition:transform .3s ease-out;display:inline-block;margin-left:.25rem}.category .category-item-action .category:hover{z-index:1;color:var(--link-hover-color);text-decoration:none;background-color:var(--link-hover-bg-color)}.category .row{margin-left:0;margin-right:0}.tagcloud{padding:1rem 5%}.tagcloud a{display:inline-block;padding:.5rem}.tagcloud a:hover{color:var(--link-hover-color)!important}.links .card{box-shadow:none;min-width:33%;background-color:transparent;border:0}.links .card-body{margin:1rem 0;padding:1rem;border-radius:.3rem;display:block;width:100%;height:100%}.links .card-body:hover .link-avatar{transform:scale(1.1)}.links .card-content{display:flex;flex-wrap:nowrap;width:100%;height:3.5rem}.link-avatar{flex:none;width:3rem;height:3rem;margin-right:.75rem;object-fit:cover;transition-duration:.2s;transition-timing-function:ease-in-out}.link-avatar img{width:100%;height:100%;border-radius:50%;background-color:transparent;object-fit:cover}.link-text{flex:1;display:grid;flex-direction:column;line-height:1.5}.link-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-color);font-weight:700}.link-intro{max-height:2rem;font-size:.85rem;line-height:1.2;color:var(--sec-text-color);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-overflow:ellipsis;overflow:hidden}@media (max-width:767px){.links{display:flex;flex-direction:column;justify-content:center;align-items:center}.links .card{padding-left:2rem;padding-right:2rem}}@media (min-width:768px){.link-text:only-child{margin-left:1rem}} \ No newline at end of file diff --git a/js/boot.js b/js/boot.js index 26c3a1a..82566ec 100644 --- a/js/boot.js +++ b/js/boot.js @@ -1,22 +1 @@ -/* global Fluid */ - -Fluid.boot = {}; - -Fluid.boot.registerEvents = function() { - Fluid.events.billboard(); - Fluid.events.registerNavbarEvent(); - Fluid.events.registerParallaxEvent(); - Fluid.events.registerScrollDownArrowEvent(); - Fluid.events.registerScrollTopArrowEvent(); - Fluid.events.registerImageLoadedEvent(); -}; - -Fluid.boot.refresh = function() { - Fluid.plugins.fancyBox(); - Fluid.plugins.codeWidget(); - Fluid.events.refresh(); -}; - -document.addEventListener('DOMContentLoaded', function() { - Fluid.boot.registerEvents(); -}); +Fluid.boot={},Fluid.boot.registerEvents=function(){Fluid.events.billboard(),Fluid.events.registerNavbarEvent(),Fluid.events.registerParallaxEvent(),Fluid.events.registerScrollDownArrowEvent(),Fluid.events.registerScrollTopArrowEvent(),Fluid.events.registerImageLoadedEvent()},Fluid.boot.refresh=function(){Fluid.plugins.fancyBox(),Fluid.plugins.codeWidget(),Fluid.events.refresh()},document.addEventListener("DOMContentLoaded",(function(){Fluid.boot.registerEvents()})); \ No newline at end of file diff --git a/js/color-schema.js b/js/color-schema.js index 93924ca..4260aaa 100644 --- a/js/color-schema.js +++ b/js/color-schema.js @@ -1,279 +1 @@ -/* global Fluid */ - -/** - * Modified from https://blog.skk.moe/post/hello-darkmode-my-old-friend/ - */ -(function(window, document) { - var rootElement = document.documentElement; - var colorSchemaStorageKey = 'Fluid_Color_Scheme'; - var colorSchemaMediaQueryKey = '--color-mode'; - var userColorSchemaAttributeName = 'data-user-color-scheme'; - var defaultColorSchemaAttributeName = 'data-default-color-scheme'; - var colorToggleButtonSelector = '#color-toggle-btn'; - var colorToggleIconSelector = '#color-toggle-icon'; - - function setLS(k, v) { - try { - localStorage.setItem(k, v); - } catch (e) {} - } - - function removeLS(k) { - try { - localStorage.removeItem(k); - } catch (e) {} - } - - function getLS(k) { - try { - return localStorage.getItem(k); - } catch (e) { - return null; - } - } - - function getSchemaFromHTML() { - var res = rootElement.getAttribute(defaultColorSchemaAttributeName); - if (typeof res === 'string') { - return res.replace(/["'\s]/g, ''); - } - return null; - } - - function getSchemaFromCSSMediaQuery() { - var res = getComputedStyle(rootElement).getPropertyValue( - colorSchemaMediaQueryKey - ); - if (typeof res === 'string') { - return res.replace(/["'\s]/g, ''); - } - return null; - } - - function resetSchemaAttributeAndLS() { - rootElement.setAttribute(userColorSchemaAttributeName, getDefaultColorSchema()); - removeLS(colorSchemaStorageKey); - } - - var validColorSchemaKeys = { - dark : true, - light: true - }; - - function getDefaultColorSchema() { - // 取默认字段的值 - var schema = getSchemaFromHTML(); - // 如果明确指定了 schema 则返回 - if (validColorSchemaKeys[schema]) { - return schema; - } - // 默认优先按 prefers-color-scheme - schema = getSchemaFromCSSMediaQuery(); - if (validColorSchemaKeys[schema]) { - return schema; - } - // 否则按本地时间是否大于 18 点或凌晨 0 ~ 6 点 - var hours = new Date().getHours(); - if (hours >= 18 || (hours >= 0 && hours <= 6)) { - return 'dark'; - } - return 'light'; - } - - function applyCustomColorSchemaSettings(schema) { - // 接受从「开关」处传来的模式,或者从 localStorage 读取,否则按默认设置值 - var current = schema || getLS(colorSchemaStorageKey) || getDefaultColorSchema(); - - if (current === getDefaultColorSchema()) { - // 当用户切换的显示模式和默认模式相同时,则恢复为自动模式 - resetSchemaAttributeAndLS(); - } else if (validColorSchemaKeys[current]) { - rootElement.setAttribute( - userColorSchemaAttributeName, - current - ); - } else { - // 特殊情况重置 - resetSchemaAttributeAndLS(); - return; - } - - // 根据当前模式设置图标 - setButtonIcon(current); - - // 设置代码高亮 - setHighlightCSS(current); - - // 设置其他应用 - setApplications(current); - } - - var invertColorSchemaObj = { - dark : 'light', - light: 'dark' - }; - - function getIconClass(scheme) { - return 'icon-' + scheme; - } - - function toggleCustomColorSchema() { - var currentSetting = getLS(colorSchemaStorageKey); - - if (validColorSchemaKeys[currentSetting]) { - // 从 localStorage 中读取模式,并取相反的模式 - currentSetting = invertColorSchemaObj[currentSetting]; - } else if (currentSetting === null) { - // 当 localStorage 中没有相关值,或者 localStorage 抛了 Error - // 先按照按钮的状态进行切换 - var iconElement = document.querySelector(colorToggleIconSelector); - if (iconElement) { - currentSetting = iconElement.getAttribute('data'); - } - if (!iconElement || !validColorSchemaKeys[currentSetting]) { - // 当 localStorage 中没有相关值,或者 localStorage 抛了 Error,则读取默认值并切换到相反的模式 - currentSetting = invertColorSchemaObj[getSchemaFromCSSMediaQuery()]; - } - } else { - return; - } - // 将相反的模式写入 localStorage - setLS(colorSchemaStorageKey, currentSetting); - - return currentSetting; - } - - function setButtonIcon(schema) { - if (validColorSchemaKeys[schema]) { - // 切换图标 - var icon = getIconClass('dark'); - if (schema) { - icon = getIconClass(schema); - } - var iconElement = document.querySelector(colorToggleIconSelector); - if (iconElement) { - iconElement.setAttribute( - 'class', - 'iconfont ' + icon - ); - iconElement.setAttribute( - 'data', - invertColorSchemaObj[schema] - ); - } else { - // 如果图标不存在则说明图标还没加载出来,等到页面全部加载再尝试切换 - Fluid.utils.waitElementLoaded(colorToggleIconSelector, function() { - var iconElement = document.querySelector(colorToggleIconSelector); - if (iconElement) { - iconElement.setAttribute( - 'class', - 'iconfont ' + icon - ); - iconElement.setAttribute( - 'data', - invertColorSchemaObj[schema] - ); - } - }); - } - if (document.documentElement.getAttribute('data-user-color-scheme')) { - var color = getComputedStyle(document.documentElement).getPropertyValue('--navbar-bg-color').trim() - document.querySelector('meta[name="theme-color"]').setAttribute('content', color) - } - } - } - - function setHighlightCSS(schema) { - // 启用对应的代码高亮的样式 - var lightCss = document.getElementById('highlight-css'); - var darkCss = document.getElementById('highlight-css-dark'); - if (schema === 'dark') { - if (darkCss) { - darkCss.removeAttribute('disabled'); - } - if (lightCss) { - lightCss.setAttribute('disabled', ''); - } - } else { - if (lightCss) { - lightCss.removeAttribute('disabled'); - } - if (darkCss) { - darkCss.setAttribute('disabled', ''); - } - } - - setTimeout(function() { - // 设置代码块组件样式 - document.querySelectorAll('.markdown-body pre').forEach((pre) => { - var cls = Fluid.utils.getBackgroundLightness(pre) >= 0 ? 'code-widget-light' : 'code-widget-dark'; - var widget = pre.querySelector('.code-widget-light, .code-widget-dark'); - if (widget) { - widget.classList.remove('code-widget-light', 'code-widget-dark'); - widget.classList.add(cls); - } - }); - }, 200); - } - - function setApplications(schema) { - // 设置 remark42 评论主题 - if (window.REMARK42) { - window.REMARK42.changeTheme(schema); - } - - // 设置 cusdis 评论主题 - if (window.CUSDIS) { - window.CUSDIS.setTheme(schema); - } - - // 设置 utterances 评论主题 - var utterances = document.querySelector('.utterances-frame'); - if (utterances) { - var utterancesTheme = schema === 'dark' ? window.UtterancesThemeDark : window.UtterancesThemeLight; - const message = { - type : 'set-theme', - theme: utterancesTheme - }; - utterances.contentWindow.postMessage(message, 'https://utteranc.es'); - } - - // 设置 giscus 评论主题 - var giscus = document.querySelector('iframe.giscus-frame'); - if (giscus) { - var giscusTheme = schema === 'dark' ? window.GiscusThemeDark : window.GiscusThemeLight; - const message = { - setConfig: { - theme: giscusTheme, - } - }; - giscus.contentWindow.postMessage({ 'giscus': message }, 'https://giscus.app'); - } - } - - // 当页面加载时,将显示模式设置为 localStorage 中自定义的值(如果有的话) - applyCustomColorSchemaSettings(); - - Fluid.utils.waitElementLoaded(colorToggleIconSelector, function() { - applyCustomColorSchemaSettings(); - var button = document.querySelector(colorToggleButtonSelector); - if (button) { - // 当用户点击切换按钮时,获得新的显示模式、写入 localStorage、并在页面上生效 - button.addEventListener('click', function() { - applyCustomColorSchemaSettings(toggleCustomColorSchema()); - }); - var icon = document.querySelector(colorToggleIconSelector); - if (icon) { - // 光标悬停在按钮上时,切换图标 - button.addEventListener('mouseenter', function() { - var current = icon.getAttribute('data'); - icon.classList.replace(getIconClass(invertColorSchemaObj[current]), getIconClass(current)); - }); - button.addEventListener('mouseleave', function() { - var current = icon.getAttribute('data'); - icon.classList.replace(getIconClass(current), getIconClass(invertColorSchemaObj[current])); - }); - } - } - }); -})(window, document); +!function(e,t){var r=t.documentElement,i="Fluid_Color_Scheme",a="--color-mode",o="data-user-color-scheme",n="data-default-color-scheme",c="#color-toggle-icon";function u(e){try{return localStorage.getItem(e)}catch(t){return null}}function s(){var e=getComputedStyle(r).getPropertyValue(a);return"string"==typeof e?e.replace(/["'\s]/g,""):null}function l(){r.setAttribute(o,g()),function(e){try{localStorage.removeItem(e)}catch(t){}}(i)}var d={dark:!0,light:!0};function g(){var e,t="string"==typeof(e=r.getAttribute(n))?e.replace(/["'\s]/g,""):null;if(d[t])return t;if(t=s(),d[t])return t;var i=(new Date).getHours();return i>=18||i>=0&&i<=6?"dark":"light"}function m(a){var n=a||u(i)||g();if(n===g())l();else{if(!d[n])return void l();r.setAttribute(o,n)}!function(e){if(d[e]){var r=h("dark");e&&(r=h(e));var i=t.querySelector(c);if(i?(i.setAttribute("class","iconfont "+r),i.setAttribute("data",f[e])):Fluid.utils.waitElementLoaded(c,(function(){var i=t.querySelector(c);i&&(i.setAttribute("class","iconfont "+r),i.setAttribute("data",f[e]))})),t.documentElement.getAttribute("data-user-color-scheme")){var a=getComputedStyle(t.documentElement).getPropertyValue("--navbar-bg-color").trim();t.querySelector('meta[name="theme-color"]').setAttribute("content",a)}}}(n),function(e){var r=t.getElementById("highlight-css"),i=t.getElementById("highlight-css-dark");"dark"===e?(i&&i.removeAttribute("disabled"),r&&r.setAttribute("disabled","")):(r&&r.removeAttribute("disabled"),i&&i.setAttribute("disabled",""));setTimeout((function(){t.querySelectorAll(".markdown-body pre").forEach((e=>{var t=Fluid.utils.getBackgroundLightness(e)>=0?"code-widget-light":"code-widget-dark",r=e.querySelector(".code-widget-light, .code-widget-dark");r&&(r.classList.remove("code-widget-light","code-widget-dark"),r.classList.add(t))}))}),200)}(n),function(r){e.REMARK42&&e.REMARK42.changeTheme(r);e.CUSDIS&&e.CUSDIS.setTheme(r);var i=t.querySelector(".utterances-frame");if(i){const t={type:"set-theme",theme:"dark"===r?e.UtterancesThemeDark:e.UtterancesThemeLight};i.contentWindow.postMessage(t,"https://utteranc.es")}var a=t.querySelector("iframe.giscus-frame");if(a){const t={setConfig:{theme:"dark"===r?e.GiscusThemeDark:e.GiscusThemeLight}};a.contentWindow.postMessage({giscus:t},"https://giscus.app")}}(n)}var f={dark:"light",light:"dark"};function h(e){return"icon-"+e}function v(){var e=u(i);if(d[e])e=f[e];else{if(null!==e)return;var r=t.querySelector(c);r&&(e=r.getAttribute("data")),r&&d[e]||(e=f[s()])}return function(e,t){try{localStorage.setItem(e,t)}catch(r){}}(i,e),e}m(),Fluid.utils.waitElementLoaded(c,(function(){m();var e=t.querySelector("#color-toggle-btn");if(e){e.addEventListener("click",(function(){m(v())}));var r=t.querySelector(c);r&&(e.addEventListener("mouseenter",(function(){var e=r.getAttribute("data");r.classList.replace(h(f[e]),h(e))})),e.addEventListener("mouseleave",(function(){var e=r.getAttribute("data");r.classList.replace(h(e),h(f[e]))})))}}))}(window,document); \ No newline at end of file diff --git a/js/events.js b/js/events.js index 149eadc..06f69f2 100644 --- a/js/events.js +++ b/js/events.js @@ -1,184 +1 @@ -/* global Fluid */ - -HTMLElement.prototype.wrap = function(wrapper) { - this.parentNode.insertBefore(wrapper, this); - this.parentNode.removeChild(this); - wrapper.appendChild(this); -}; - -Fluid.events = { - - registerNavbarEvent: function() { - var navbar = jQuery('#navbar'); - if (navbar.length === 0) { - return; - } - var submenu = jQuery('#navbar .dropdown-menu'); - if (navbar.offset().top > 0) { - navbar.removeClass('navbar-dark'); - submenu.removeClass('navbar-dark'); - } - Fluid.utils.listenScroll(function() { - navbar[navbar.offset().top > 50 ? 'addClass' : 'removeClass']('top-nav-collapse'); - submenu[navbar.offset().top > 50 ? 'addClass' : 'removeClass']('dropdown-collapse'); - if (navbar.offset().top > 0) { - navbar.removeClass('navbar-dark'); - submenu.removeClass('navbar-dark'); - } else { - navbar.addClass('navbar-dark'); - submenu.removeClass('navbar-dark'); - } - }); - jQuery('#navbar-toggler-btn').on('click', function() { - jQuery('.animated-icon').toggleClass('open'); - jQuery('#navbar').toggleClass('navbar-col-show'); - }); - }, - - registerParallaxEvent: function() { - var ph = jQuery('#banner[parallax="true"]'); - if (ph.length === 0) { - return; - } - var board = jQuery('#board'); - if (board.length === 0) { - return; - } - var parallax = function() { - var pxv = jQuery(window).scrollTop() / 5; - var offset = parseInt(board.css('margin-top'), 10); - var max = 96 + offset; - if (pxv > max) { - pxv = max; - } - ph.css({ - transform: 'translate3d(0,' + pxv + 'px,0)' - }); - var sideCol = jQuery('.side-col'); - if (sideCol) { - sideCol.css({ - 'padding-top': pxv + 'px' - }); - } - }; - Fluid.utils.listenScroll(parallax); - }, - - registerScrollDownArrowEvent: function() { - var scrollbar = jQuery('.scroll-down-bar'); - if (scrollbar.length === 0) { - return; - } - scrollbar.on('click', function() { - Fluid.utils.scrollToElement('#board', -jQuery('#navbar').height()); - }); - }, - - registerScrollTopArrowEvent: function() { - var topArrow = jQuery('#scroll-top-button'); - if (topArrow.length === 0) { - return; - } - var board = jQuery('#board'); - if (board.length === 0) { - return; - } - var posDisplay = false; - var scrollDisplay = false; - // Position - var setTopArrowPos = function() { - var boardRight = board[0].getClientRects()[0].right; - var bodyWidth = document.body.offsetWidth; - var right = bodyWidth - boardRight; - posDisplay = right >= 50; - topArrow.css({ - 'bottom': posDisplay && scrollDisplay ? '20px' : '-60px', - 'right' : right - 64 + 'px' - }); - }; - setTopArrowPos(); - jQuery(window).resize(setTopArrowPos); - // Display - var headerHeight = board.offset().top; - Fluid.utils.listenScroll(function() { - var scrollHeight = document.body.scrollTop + document.documentElement.scrollTop; - scrollDisplay = scrollHeight >= headerHeight; - topArrow.css({ - 'bottom': posDisplay && scrollDisplay ? '20px' : '-60px' - }); - }); - // Click - topArrow.on('click', function() { - jQuery('body,html').animate({ - scrollTop: 0, - easing : 'swing' - }); - }); - }, - - registerImageLoadedEvent: function() { - if (!('NProgress' in window)) { return; } - - var bg = document.getElementById('banner'); - if (bg) { - var src = bg.style.backgroundImage; - var url = src.match(/\((.*?)\)/)[1].replace(/(['"])/g, ''); - var img = new Image(); - img.onload = function() { - window.NProgress && window.NProgress.inc(0.2); - }; - img.src = url; - if (img.complete) { img.onload(); } - } - - var notLazyImages = jQuery('main img:not([lazyload])'); - var total = notLazyImages.length; - for (const img of notLazyImages) { - const old = img.onload; - img.onload = function() { - old && old(); - window.NProgress && window.NProgress.inc(0.5 / total); - }; - if (img.complete) { img.onload(); } - } - }, - - registerRefreshCallback: function(callback) { - if (!Array.isArray(Fluid.events._refreshCallbacks)) { - Fluid.events._refreshCallbacks = []; - } - Fluid.events._refreshCallbacks.push(callback); - }, - - refresh: function() { - if (Array.isArray(Fluid.events._refreshCallbacks)) { - for (var callback of Fluid.events._refreshCallbacks) { - if (callback instanceof Function) { - callback(); - } - } - } - }, - - billboard: function() { - if (!('console' in window)) { - return; - } - // eslint-disable-next-line no-console - console.log(` ------------------------------------------------- -| | -| ________ __ _ __ | -| |_ __ |[ | (_) | ] | -| | |_ \\_| | | __ _ __ .--.| | | -| | _| | |[ | | | [ |/ /'\`\\' | | -| _| |_ | | | \\_/ |, | || \\__/ | | -| |_____| [___]'.__.'_/[___]'.__.;__] | -| | -| Powered by Hexo x Fluid | -| GitHub: https://git.io/JqpVD | -| | ------------------------------------------------- - `); - } -}; +HTMLElement.prototype.wrap=function(e){this.parentNode.insertBefore(e,this),this.parentNode.removeChild(this),e.appendChild(this)},Fluid.events={registerNavbarEvent:function(){var e=jQuery("#navbar");if(0!==e.length){var n=jQuery("#navbar .dropdown-menu");e.offset().top>0&&(e.removeClass("navbar-dark"),n.removeClass("navbar-dark")),Fluid.utils.listenScroll((function(){e[e.offset().top>50?"addClass":"removeClass"]("top-nav-collapse"),n[e.offset().top>50?"addClass":"removeClass"]("dropdown-collapse"),e.offset().top>0?(e.removeClass("navbar-dark"),n.removeClass("navbar-dark")):(e.addClass("navbar-dark"),n.removeClass("navbar-dark"))})),jQuery("#navbar-toggler-btn").on("click",(function(){jQuery(".animated-icon").toggleClass("open"),jQuery("#navbar").toggleClass("navbar-col-show")}))}},registerParallaxEvent:function(){var e=jQuery('#banner[parallax="true"]');if(0!==e.length){var n=jQuery("#board");if(0!==n.length){Fluid.utils.listenScroll((function(){var r=jQuery(window).scrollTop()/5,o=96+parseInt(n.css("margin-top"),10);r>o&&(r=o),e.css({transform:"translate3d(0,"+r+"px,0)"});var a=jQuery(".side-col");a&&a.css({"padding-top":r+"px"})}))}}},registerScrollDownArrowEvent:function(){var e=jQuery(".scroll-down-bar");0!==e.length&&e.on("click",(function(){Fluid.utils.scrollToElement("#board",-jQuery("#navbar").height())}))},registerScrollTopArrowEvent:function(){var e=jQuery("#scroll-top-button");if(0!==e.length){var n=jQuery("#board");if(0!==n.length){var r=!1,o=!1,a=function(){var a=n[0].getClientRects()[0].right,t=document.body.offsetWidth-a;r=t>=50,e.css({bottom:r&&o?"20px":"-60px",right:t-64+"px"})};a(),jQuery(window).resize(a);var t=n.offset().top;Fluid.utils.listenScroll((function(){var n=document.body.scrollTop+document.documentElement.scrollTop;o=n>=t,e.css({bottom:r&&o?"20px":"-60px"})})),e.on("click",(function(){jQuery("body,html").animate({scrollTop:0,easing:"swing"})}))}}},registerImageLoadedEvent:function(){if("NProgress"in window){var e=document.getElementById("banner");if(e){var n=e.style.backgroundImage.match(/\((.*?)\)/)[1].replace(/(['"])/g,""),r=new Image;r.onload=function(){window.NProgress&&window.NProgress.inc(.2)},r.src=n,r.complete&&r.onload()}var o=jQuery("main img:not([lazyload])"),a=o.length;for(const e of o){const n=e.onload;e.onload=function(){n&&n(),window.NProgress&&window.NProgress.inc(.5/a)},e.complete&&e.onload()}}},registerRefreshCallback:function(e){Array.isArray(Fluid.events._refreshCallbacks)||(Fluid.events._refreshCallbacks=[]),Fluid.events._refreshCallbacks.push(e)},refresh:function(){if(Array.isArray(Fluid.events._refreshCallbacks))for(var e of Fluid.events._refreshCallbacks)e instanceof Function&&e()},billboard:function(){"console"in window&&console.log("\n------------------------------------------------\n| |\n| ________ __ _ __ |\n| |_ __ |[ | (_) | ] |\n| | |_ \\_| | | __ _ __ .--.| | |\n| | _| | |[ | | | [ |/ /'`\\' | |\n| _| |_ | | | \\_/ |, | || \\__/ | |\n| |_____| [___]'.__.'_/[___]'.__.;__] |\n| |\n| Powered by Hexo x Fluid |\n| GitHub: https://git.io/JqpVD |\n| |\n------------------------------------------------\n ")}}; \ No newline at end of file diff --git a/js/img-lazyload.js b/js/img-lazyload.js index c0c8e4e..9948ecd 100644 --- a/js/img-lazyload.js +++ b/js/img-lazyload.js @@ -1,10 +1 @@ -/* global Fluid, CONFIG */ - -(function(window, document) { - for (const each of document.querySelectorAll('img[lazyload]')) { - Fluid.utils.waitElementVisible(each, function() { - each.removeAttribute('srcset'); - each.removeAttribute('lazyload'); - }, CONFIG.lazyload.offset_factor); - } -})(window, document); +!function(t,e){for(const o of e.querySelectorAll("img[lazyload]"))Fluid.utils.waitElementVisible(o,(function(){o.removeAttribute("srcset"),o.removeAttribute("lazyload")}),CONFIG.lazyload.offset_factor)}(window,document); \ No newline at end of file diff --git a/js/leancloud.js b/js/leancloud.js index ab901ce..5d6a1d9 100644 --- a/js/leancloud.js +++ b/js/leancloud.js @@ -1,192 +1 @@ -/* global CONFIG */ -// eslint-disable-next-line no-console - -(function(window, document) { - // 查询存储的记录 - function getRecord(Counter, target) { - return new Promise(function(resolve, reject) { - Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ target }))) - .then(resp => resp.json()) - .then(({ results, code, error }) => { - if (code === 401) { - throw error; - } - if (results && results.length > 0) { - var record = results[0]; - resolve(record); - } else { - Counter('post', '/classes/Counter', { target, time: 0 }) - .then(resp => resp.json()) - .then((record, error) => { - if (error) { - throw error; - } - resolve(record); - }).catch(error => { - console.error('Failed to create: ', error); - reject(error); - }); - } - }).catch((error) => { - console.error('LeanCloud Counter Error: ', error); - reject(error); - }); - }); - } - - // 发起自增请求 - function increment(Counter, incrArr) { - return new Promise(function(resolve, reject) { - Counter('post', '/batch', { - 'requests': incrArr - }).then((res) => { - res = res.json(); - if (res.error) { - throw res.error; - } - resolve(res); - }).catch((error) => { - console.error('Failed to save visitor count: ', error); - reject(error); - }); - }); - } - - // 构建自增请求体 - function buildIncrement(objectId) { - return { - 'method': 'PUT', - 'path' : `/1.1/classes/Counter/${objectId}`, - 'body' : { - 'time': { - '__op' : 'Increment', - 'amount': 1 - } - } - }; - } - - // 校验是否为有效的 Host - function validHost() { - if (CONFIG.web_analytics.leancloud.ignore_local) { - var hostname = window.location.hostname; - if (hostname === 'localhost' || hostname === '127.0.0.1') { - return false; - } - } - return true; - } - - // 校验是否为有效的 UV - function validUV() { - var key = 'LeanCloud_UV_Flag'; - var flag = localStorage.getItem(key); - if (flag) { - // 距离标记小于 24 小时则不计为 UV - if (new Date().getTime() - parseInt(flag, 10) <= 86400000) { - return false; - } - } - localStorage.setItem(key, new Date().getTime().toString()); - return true; - } - - function addCount(Counter) { - var enableIncr = CONFIG.web_analytics.enable && !Fluid.ctx.dnt && validHost(); - var getterArr = []; - var incrArr = []; - - // 请求 PV 并自增 - var pvCtn = document.querySelector('#leancloud-site-pv-container'); - if (pvCtn) { - var pvGetter = getRecord(Counter, 'site-pv').then((record) => { - enableIncr && incrArr.push(buildIncrement(record.objectId)); - var ele = document.querySelector('#leancloud-site-pv'); - if (ele) { - ele.innerText = (record.time || 0) + (enableIncr ? 1 : 0); - pvCtn.style.display = 'inline'; - } - }); - getterArr.push(pvGetter); - } - - // 请求 UV 并自增 - var uvCtn = document.querySelector('#leancloud-site-uv-container'); - if (uvCtn) { - var uvGetter = getRecord(Counter, 'site-uv').then((record) => { - var incrUV = validUV() && enableIncr; - incrUV && incrArr.push(buildIncrement(record.objectId)); - var ele = document.querySelector('#leancloud-site-uv'); - if (ele) { - ele.innerText = (record.time || 0) + (incrUV ? 1 : 0); - uvCtn.style.display = 'inline'; - } - }); - getterArr.push(uvGetter); - } - - // 如果有页面浏览数节点,则请求浏览数并自增 - var viewCtn = document.querySelector('#leancloud-page-views-container'); - if (viewCtn) { - var path = eval(CONFIG.web_analytics.leancloud.path || 'window.location.pathname'); - var target = decodeURI(path.replace(/\/*(index.html)?$/, '/')); - var viewGetter = getRecord(Counter, target).then((record) => { - enableIncr && incrArr.push(buildIncrement(record.objectId)); - var ele = document.querySelector('#leancloud-page-views'); - if (ele) { - ele.innerText = (record.time || 0) + (enableIncr ? 1 : 0); - viewCtn.style.display = 'inline'; - } - }); - getterArr.push(viewGetter); - } - - // 如果启动计数自增,批量发起自增请求 - if (enableIncr) { - Promise.all(getterArr).then(() => { - incrArr.length > 0 && increment(Counter, incrArr); - }); - } - } - - var appId = CONFIG.web_analytics.leancloud.app_id; - var appKey = CONFIG.web_analytics.leancloud.app_key; - var serverUrl = CONFIG.web_analytics.leancloud.server_url; - - if (!appId) { - throw new Error('LeanCloud appId is empty'); - } - if (!appKey) { - throw new Error('LeanCloud appKey is empty'); - } - - function fetchData(api_server) { - var Counter = (method, url, data) => { - return fetch(`${api_server}/1.1${url}`, { - method, - headers: { - 'X-LC-Id' : appId, - 'X-LC-Key' : appKey, - 'Content-Type': 'application/json' - }, - body: JSON.stringify(data) - }); - }; - - addCount(Counter); - } - - var apiServer = serverUrl || `https://${appId.slice(0, 8).toLowerCase()}.api.lncldglobal.com`; - - if (apiServer) { - fetchData(apiServer); - } else { - fetch('https://app-router.leancloud.cn/2/route?appId=' + appId) - .then(resp => resp.json()) - .then((data) => { - if (data.api_server) { - fetchData('https://' + data.api_server); - } - }); - } -})(window, document); +(function(window,document){function getRecord(e,t){return new Promise((function(r,n){e("get","/classes/Counter?where="+encodeURIComponent(JSON.stringify({target:t}))).then((e=>e.json())).then((({results:a,code:o,error:i})=>{if(401===o)throw i;if(a&&a.length>0){var c=a[0];r(c)}else e("post","/classes/Counter",{target:t,time:0}).then((e=>e.json())).then(((e,t)=>{if(t)throw t;r(e)})).catch((e=>{console.error("Failed to create: ",e),n(e)}))})).catch((e=>{console.error("LeanCloud Counter Error: ",e),n(e)}))}))}function increment(e,t){return new Promise((function(r,n){e("post","/batch",{requests:t}).then((e=>{if((e=e.json()).error)throw e.error;r(e)})).catch((e=>{console.error("Failed to save visitor count: ",e),n(e)}))}))}function buildIncrement(e){return{method:"PUT",path:`/1.1/classes/Counter/${e}`,body:{time:{__op:"Increment",amount:1}}}}function validHost(){if(CONFIG.web_analytics.leancloud.ignore_local){var e=window.location.hostname;if("localhost"===e||"127.0.0.1"===e)return!1}return!0}function validUV(){var e="LeanCloud_UV_Flag",t=localStorage.getItem(e);return!(t&&(new Date).getTime()-parseInt(t,10)<=864e5)&&(localStorage.setItem(e,(new Date).getTime().toString()),!0)}function addCount(Counter){var enableIncr=CONFIG.web_analytics.enable&&!Fluid.ctx.dnt&&validHost(),getterArr=[],incrArr=[],pvCtn=document.querySelector("#leancloud-site-pv-container");if(pvCtn){var pvGetter=getRecord(Counter,"site-pv").then((e=>{enableIncr&&incrArr.push(buildIncrement(e.objectId));var t=document.querySelector("#leancloud-site-pv");t&&(t.innerText=(e.time||0)+(enableIncr?1:0),pvCtn.style.display="inline")}));getterArr.push(pvGetter)}var uvCtn=document.querySelector("#leancloud-site-uv-container");if(uvCtn){var uvGetter=getRecord(Counter,"site-uv").then((e=>{var t=validUV()&&enableIncr;t&&incrArr.push(buildIncrement(e.objectId));var r=document.querySelector("#leancloud-site-uv");r&&(r.innerText=(e.time||0)+(t?1:0),uvCtn.style.display="inline")}));getterArr.push(uvGetter)}var viewCtn=document.querySelector("#leancloud-page-views-container");if(viewCtn){var path=eval(CONFIG.web_analytics.leancloud.path||"window.location.pathname"),target=decodeURI(path.replace(/\/*(index.html)?$/,"/")),viewGetter=getRecord(Counter,target).then((e=>{enableIncr&&incrArr.push(buildIncrement(e.objectId));var t=document.querySelector("#leancloud-page-views");t&&(t.innerText=(e.time||0)+(enableIncr?1:0),viewCtn.style.display="inline")}));getterArr.push(viewGetter)}enableIncr&&Promise.all(getterArr).then((()=>{incrArr.length>0&&increment(Counter,incrArr)}))}var appId=CONFIG.web_analytics.leancloud.app_id,appKey=CONFIG.web_analytics.leancloud.app_key,serverUrl=CONFIG.web_analytics.leancloud.server_url;if(!appId)throw new Error("LeanCloud appId is empty");if(!appKey)throw new Error("LeanCloud appKey is empty");function fetchData(e){addCount(((t,r,n)=>fetch(`${e}/1.1${r}`,{method:t,headers:{"X-LC-Id":appId,"X-LC-Key":appKey,"Content-Type":"application/json"},body:JSON.stringify(n)})))}var apiServer=serverUrl||`https://${appId.slice(0,8).toLowerCase()}.api.lncldglobal.com`;apiServer?fetchData(apiServer):fetch("https://app-router.leancloud.cn/2/route?appId="+appId).then((e=>e.json())).then((e=>{e.api_server&&fetchData("https://"+e.api_server)}))})(window,document); \ No newline at end of file diff --git a/js/local-search.js b/js/local-search.js index 0784a80..567523a 100644 --- a/js/local-search.js +++ b/js/local-search.js @@ -1,159 +1 @@ -/* global CONFIG */ - -(function() { - // Modified from [hexo-generator-search](https://github.com/wzpan/hexo-generator-search) - function localSearchFunc(path, searchSelector, resultSelector) { - 'use strict'; - // 0x00. environment initialization - var $input = jQuery(searchSelector); - var $result = jQuery(resultSelector); - - if ($input.length === 0) { - // eslint-disable-next-line no-console - throw Error('No element selected by the searchSelector'); - } - if ($result.length === 0) { - // eslint-disable-next-line no-console - throw Error('No element selected by the resultSelector'); - } - - if ($result.attr('class').indexOf('list-group-item') === -1) { - $result.html('
Loading...

Loading...
'); - } - - jQuery.ajax({ - // 0x01. load xml file - url : path, - dataType: 'xml', - success : function(xmlResponse) { - // 0x02. parse xml file - var dataList = jQuery('entry', xmlResponse).map(function() { - return { - title : jQuery('title', this).text(), - content: jQuery('content', this).text(), - url : jQuery('url', this).text() - }; - }).get(); - - if ($result.html().indexOf('list-group-item') === -1) { - $result.html(''); - } - - $input.on('input', function() { - // 0x03. parse query to keywords list - var content = $input.val(); - var resultHTML = ''; - var keywords = content.trim().toLowerCase().split(/[\s-]+/); - $result.html(''); - if (content.trim().length <= 0) { - return $input.removeClass('invalid').removeClass('valid'); - } - // 0x04. perform local searching - dataList.forEach(function(data) { - var isMatch = true; - if (!data.title || data.title.trim() === '') { - data.title = 'Untitled'; - } - var orig_data_title = data.title.trim(); - var data_title = orig_data_title.toLowerCase(); - var orig_data_content = data.content.trim().replace(/<[^>]+>/g, ''); - var data_content = orig_data_content.toLowerCase(); - var data_url = data.url; - var index_title = -1; - var index_content = -1; - var first_occur = -1; - // Skip matching when content is included in search and content is empty - if (CONFIG.include_content_in_search && data_content === '') { - isMatch = false; - } else { - keywords.forEach(function (keyword, i) { - index_title = data_title.indexOf(keyword); - index_content = data_content.indexOf(keyword); - - if (index_title < 0 && index_content < 0) { - isMatch = false; - } else { - if (index_content < 0) { - index_content = 0; - } - if (i === 0) { - first_occur = index_content; - } - } - }); - } - // 0x05. show search results - if (isMatch) { - resultHTML += '' + orig_data_title + ''; - var content = orig_data_content; - if (first_occur >= 0) { - // cut out 100 characters - var start = first_occur - 20; - var end = first_occur + 80; - - if (start < 0) { - start = 0; - } - - if (start === 0) { - end = 100; - } - - if (end > content.length) { - end = content.length; - } - - var match_content = content.substring(start, end); - - // highlight all keywords - keywords.forEach(function(keyword) { - var regS = new RegExp(keyword, 'gi'); - match_content = match_content.replace(regS, '' + keyword + ''); - }); - - resultHTML += '

' + match_content + '...

'; - } - } - }); - if (resultHTML.indexOf('list-group-item') === -1) { - return $input.addClass('invalid').removeClass('valid'); - } - $input.addClass('valid').removeClass('invalid'); - $result.html(resultHTML); - }); - } - }); - } - - function localSearchReset(searchSelector, resultSelector) { - 'use strict'; - var $input = jQuery(searchSelector); - var $result = jQuery(resultSelector); - - if ($input.length === 0) { - // eslint-disable-next-line no-console - throw Error('No element selected by the searchSelector'); - } - if ($result.length === 0) { - // eslint-disable-next-line no-console - throw Error('No element selected by the resultSelector'); - } - - $input.val('').removeClass('invalid').removeClass('valid'); - $result.html(''); - } - - var modal = jQuery('#modalSearch'); - var searchSelector = '#local-search-input'; - var resultSelector = '#local-search-result'; - modal.on('show.bs.modal', function() { - var path = CONFIG.search_path || '/local-search.xml'; - localSearchFunc(path, searchSelector, resultSelector); - }); - modal.on('shown.bs.modal', function() { - jQuery('#local-search-input').focus(); - }); - modal.on('hidden.bs.modal', function() { - localSearchReset(searchSelector, resultSelector); - }); -})(); +!function(){var e=jQuery("#modalSearch"),t="#local-search-input",r="#local-search-result";e.on("show.bs.modal",(function(){!function(e,t,r){"use strict";var l=jQuery(t),s=jQuery(r);if(0===l.length)throw Error("No element selected by the searchSelector");if(0===s.length)throw Error("No element selected by the resultSelector");-1===s.attr("class").indexOf("list-group-item")&&s.html('
Loading...

Loading...
'),jQuery.ajax({url:e,dataType:"xml",success:function(e){var t=jQuery("entry",e).map((function(){return{title:jQuery("title",this).text(),content:jQuery("content",this).text(),url:jQuery("url",this).text()}})).get();-1===s.html().indexOf("list-group-item")&&s.html(""),l.on("input",(function(){var e=l.val(),r="",a=e.trim().toLowerCase().split(/[\s-]+/);return s.html(""),e.trim().length<=0?l.removeClass("invalid").removeClass("valid"):(t.forEach((function(e){var t=!0;e.title&&""!==e.title.trim()||(e.title="Untitled");var l=e.title.trim(),s=l.toLowerCase(),i=e.content.trim().replace(/<[^>]+>/g,""),n=i.toLowerCase(),o=e.url,c=-1,u=-1,h=-1;if(CONFIG.include_content_in_search&&""===n?t=!1:a.forEach((function(e,r){c=s.indexOf(e),u=n.indexOf(e),c<0&&u<0?t=!1:(u<0&&(u=0),0===r&&(h=u))})),t){r+=""+l+"";var d=i;if(h>=0){var m=h-20,v=h+80;m<0&&(m=0),0===m&&(v=100),v>d.length&&(v=d.length);var f=d.substring(m,v);a.forEach((function(e){var t=new RegExp(e,"gi");f=f.replace(t,''+e+"")})),r+="

"+f+"...

"}}})),-1===r.indexOf("list-group-item")?l.addClass("invalid").removeClass("valid"):(l.addClass("valid").removeClass("invalid"),void s.html(r)))}))}})}(CONFIG.search_path||"/local-search.xml",t,r)})),e.on("shown.bs.modal",(function(){jQuery("#local-search-input").focus()})),e.on("hidden.bs.modal",(function(){!function(e,t){"use strict";var r=jQuery(e),l=jQuery(t);if(0===r.length)throw Error("No element selected by the searchSelector");if(0===l.length)throw Error("No element selected by the resultSelector");r.val("").removeClass("invalid").removeClass("valid"),l.html("")}(t,r)}))}(); \ No newline at end of file diff --git a/js/plugins.js b/js/plugins.js index 2a364b0..56391f0 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -1,164 +1 @@ -/* global Fluid, CONFIG */ - -HTMLElement.prototype.wrap = function(wrapper) { - this.parentNode.insertBefore(wrapper, this); - this.parentNode.removeChild(this); - wrapper.appendChild(this); -}; - -Fluid.plugins = { - - typing: function(text) { - if (!('Typed' in window)) { return; } - - var typed = new window.Typed('#subtitle', { - strings: [ - ' ', - text - ], - cursorChar: CONFIG.typing.cursorChar, - typeSpeed : CONFIG.typing.typeSpeed, - loop : CONFIG.typing.loop - }); - typed.stop(); - var subtitle = document.getElementById('subtitle'); - if (subtitle) { - subtitle.innerText = ''; - } - jQuery(document).ready(function() { - typed.start(); - }); - }, - - fancyBox: function(selector) { - if (!CONFIG.image_zoom.enable || !('fancybox' in jQuery)) { return; } - - jQuery(selector || '.markdown-body :not(a) > img, .markdown-body > img').each(function() { - var $image = jQuery(this); - var imageUrl = $image.attr('data-src') || $image.attr('src') || ''; - if (CONFIG.image_zoom.img_url_replace) { - var rep = CONFIG.image_zoom.img_url_replace; - var r1 = rep[0] || ''; - var r2 = rep[1] || ''; - if (r1) { - if (/^re:/.test(r1)) { - r1 = r1.replace(/^re:/, ''); - var reg = new RegExp(r1, 'gi'); - imageUrl = imageUrl.replace(reg, r2); - } else { - imageUrl = imageUrl.replace(r1, r2); - } - } - } - var $imageWrap = $image.wrap(` - ` - ).parent('a'); - if ($imageWrap.length !== 0) { - if ($image.is('.group-image-container img')) { - $imageWrap.attr('data-fancybox', 'group').attr('rel', 'group'); - } else { - $imageWrap.attr('data-fancybox', 'default').attr('rel', 'default'); - } - - var imageTitle = $image.attr('title') || $image.attr('alt'); - if (imageTitle) { - $imageWrap.attr('title', imageTitle).attr('data-caption', imageTitle); - } - } - }); - - jQuery.fancybox.defaults.hash = false; - jQuery('.fancybox').fancybox({ - loop : true, - helpers: { - overlay: { - locked: false - } - } - }); - }, - - imageCaption: function(selector) { - if (!CONFIG.image_caption.enable) { return; } - - jQuery(selector || `.markdown-body > p > img, .markdown-body > figure > img, - .markdown-body > p > a.fancybox, .markdown-body > figure > a.fancybox`).each(function() { - var $target = jQuery(this); - var $figcaption = $target.next('figcaption'); - if ($figcaption.length !== 0) { - $figcaption.addClass('image-caption'); - } else { - var imageTitle = $target.attr('title') || $target.attr('alt'); - if (imageTitle) { - $target.after(``); - } - } - }); - }, - - codeWidget() { - var enableLang = CONFIG.code_language.enable && CONFIG.code_language.default; - var enableCopy = CONFIG.copy_btn && 'ClipboardJS' in window; - if (!enableLang && !enableCopy) { - return; - } - - function getBgClass(ele) { - return Fluid.utils.getBackgroundLightness(ele) >= 0 ? 'code-widget-light' : 'code-widget-dark'; - } - - var copyTmpl = ''; - copyTmpl += '
'; - copyTmpl += 'LANG'; - copyTmpl += '
'; - jQuery('.markdown-body pre').each(function() { - var $pre = jQuery(this); - if ($pre.find('code.mermaid').length > 0) { - return; - } - if ($pre.find('span.line').length > 0) { - return; - } - - var lang = ''; - - if (enableLang) { - lang = CONFIG.code_language.default; - if ($pre[0].children.length > 0 && $pre[0].children[0].classList.length >= 2 && $pre.children().hasClass('hljs')) { - lang = $pre[0].children[0].classList[1]; - } else if ($pre[0].getAttribute('data-language')) { - lang = $pre[0].getAttribute('data-language'); - } else if ($pre.parent().hasClass('sourceCode') && $pre[0].children.length > 0 && $pre[0].children[0].classList.length >= 2) { - lang = $pre[0].children[0].classList[1]; - $pre.parent().addClass('code-wrapper'); - } else if ($pre.parent().hasClass('markdown-body') && $pre[0].classList.length === 0) { - $pre.wrap('
'); - } - lang = lang.toUpperCase().replace('NONE', CONFIG.code_language.default); - } - $pre.append(copyTmpl.replace('LANG', lang).replace('code-widget">', - getBgClass($pre[0]) + (enableCopy ? ' code-widget copy-btn" data-clipboard-snippet>' : ' code-widget">'))); - - if (enableCopy) { - var clipboard = new ClipboardJS('.copy-btn', { - target: function(trigger) { - var nodes = trigger.parentNode.childNodes; - for (var i = 0; i < nodes.length; i++) { - if (nodes[i].tagName === 'CODE') { - return nodes[i]; - } - } - } - }); - clipboard.on('success', function(e) { - e.clearSelection(); - e.trigger.innerHTML = e.trigger.innerHTML.replace('icon-copy', 'icon-success'); - setTimeout(function() { - e.trigger.innerHTML = e.trigger.innerHTML.replace('icon-success', 'icon-copy'); - }, 2000); - }); - } - }); - } -}; +HTMLElement.prototype.wrap=function(e){this.parentNode.insertBefore(e,this),this.parentNode.removeChild(this),e.appendChild(this)},Fluid.plugins={typing:function(e){if("Typed"in window){var a=new window.Typed("#subtitle",{strings:[" ",e],cursorChar:CONFIG.typing.cursorChar,typeSpeed:CONFIG.typing.typeSpeed,loop:CONFIG.typing.loop});a.stop();var t=document.getElementById("subtitle");t&&(t.innerText=""),jQuery(document).ready((function(){a.start()}))}},fancyBox:function(e){CONFIG.image_zoom.enable&&"fancybox"in jQuery&&(jQuery(e||".markdown-body :not(a) > img, .markdown-body > img").each((function(){var e=jQuery(this),a=e.attr("data-src")||e.attr("src")||"";if(CONFIG.image_zoom.img_url_replace){var t=CONFIG.image_zoom.img_url_replace,i=t[0]||"",n=t[1]||"";if(i)if(/^re:/.test(i)){i=i.replace(/^re:/,"");var r=new RegExp(i,"gi");a=a.replace(r,n)}else a=a.replace(i,n)}var o=e.wrap(`\n `).parent("a");if(0!==o.length){e.is(".group-image-container img")?o.attr("data-fancybox","group").attr("rel","group"):o.attr("data-fancybox","default").attr("rel","default");var c=e.attr("title")||e.attr("alt");c&&o.attr("title",c).attr("data-caption",c)}})),jQuery.fancybox.defaults.hash=!1,jQuery(".fancybox").fancybox({loop:!0,helpers:{overlay:{locked:!1}}}))},imageCaption:function(e){CONFIG.image_caption.enable&&jQuery(e||".markdown-body > p > img, .markdown-body > figure > img,\n .markdown-body > p > a.fancybox, .markdown-body > figure > a.fancybox").each((function(){var e=jQuery(this),a=e.next("figcaption");if(0!==a.length)a.addClass("image-caption");else{var t=e.attr("title")||e.attr("alt");t&&e.after(``)}}))},codeWidget(){var e=CONFIG.code_language.enable&&CONFIG.code_language.default,a=CONFIG.copy_btn&&"ClipboardJS"in window;if(e||a){var t="";t+='
',t+="LANG",t+="
",jQuery(".markdown-body pre").each((function(){var i=jQuery(this);if(!(i.find("code.mermaid").length>0||i.find("span.line").length>0)){var n,r="";if(e&&(r=CONFIG.code_language.default,i[0].children.length>0&&i[0].children[0].classList.length>=2&&i.children().hasClass("hljs")?r=i[0].children[0].classList[1]:i[0].getAttribute("data-language")?r=i[0].getAttribute("data-language"):i.parent().hasClass("sourceCode")&&i[0].children.length>0&&i[0].children[0].classList.length>=2?(r=i[0].children[0].classList[1],i.parent().addClass("code-wrapper")):i.parent().hasClass("markdown-body")&&0===i[0].classList.length&&i.wrap('
'),r=r.toUpperCase().replace("NONE",CONFIG.code_language.default)),i.append(t.replace("LANG",r).replace('code-widget">',(n=i[0],(Fluid.utils.getBackgroundLightness(n)>=0?"code-widget-light":"code-widget-dark")+(a?' code-widget copy-btn" data-clipboard-snippet>':' code-widget">')))),a)new ClipboardJS(".copy-btn",{target:function(e){for(var a=e.parentNode.childNodes,t=0;t= 0 ? offsetFactor : 0; - var rect = element.getBoundingClientRect(); - const viewportHeight = window.innerHeight || document.documentElement.clientHeight; - return ( - (rect.top >= 0 && rect.top <= viewportHeight * (1 + offsetFactor) + rect.height / 2) || - (rect.bottom >= 0 && rect.bottom <= viewportHeight * (1 + offsetFactor) + rect.height / 2) - ); - }, - - waitElementVisible: function(selectorOrElement, callback, offsetFactor) { - var runningOnBrowser = typeof window !== 'undefined'; - var isBot = (runningOnBrowser && !('onscroll' in window)) - || (typeof navigator !== 'undefined' && /(gle|ing|ro|msn)bot|crawl|spider|yand|duckgo/i.test(navigator.userAgent)); - if (!runningOnBrowser || isBot) { - return; - } - - offsetFactor = offsetFactor && offsetFactor >= 0 ? offsetFactor : 0; - - function waitInViewport(element) { - Fluid.utils.listenDOMLoaded(function() { - if (Fluid.utils.elementVisible(element, offsetFactor)) { - callback(); - return; - } - if ('IntersectionObserver' in window) { - var io = new IntersectionObserver(function(entries, ob) { - if (entries[0].isIntersecting) { - callback(); - ob.disconnect(); - } - }, { - threshold : [0], - rootMargin: (window.innerHeight || document.documentElement.clientHeight) * offsetFactor + 'px' - }); - io.observe(element); - } else { - var wrapper = Fluid.utils.listenScroll(function() { - if (Fluid.utils.elementVisible(element, offsetFactor)) { - Fluid.utils.unlistenScroll(wrapper); - callback(); - } - }); - } - }); - } - - if (typeof selectorOrElement === 'string') { - this.waitElementLoaded(selectorOrElement, function(element) { - waitInViewport(element); - }); - } else { - waitInViewport(selectorOrElement); - } - }, - - waitElementLoaded: function(selector, callback) { - var runningOnBrowser = typeof window !== 'undefined'; - var isBot = (runningOnBrowser && !('onscroll' in window)) - || (typeof navigator !== 'undefined' && /(gle|ing|ro|msn)bot|crawl|spider|yand|duckgo/i.test(navigator.userAgent)); - if (!runningOnBrowser || isBot) { - return; - } - - if ('MutationObserver' in window) { - var mo = new MutationObserver(function(records, ob) { - var ele = document.querySelector(selector); - if (ele) { - callback(ele); - ob.disconnect(); - } - }); - mo.observe(document, { childList: true, subtree: true }); - } else { - Fluid.utils.listenDOMLoaded(function() { - var waitLoop = function() { - var ele = document.querySelector(selector); - if (ele) { - callback(ele); - } else { - setTimeout(waitLoop, 100); - } - }; - waitLoop(); - }); - } - }, - - createScript: function(url, onload) { - var s = document.createElement('script'); - s.setAttribute('src', url); - s.setAttribute('type', 'text/javascript'); - s.setAttribute('charset', 'UTF-8'); - s.async = false; - if (typeof onload === 'function') { - if (window.attachEvent) { - s.onreadystatechange = function() { - var e = s.readyState; - if (e === 'loaded' || e === 'complete') { - s.onreadystatechange = null; - onload(); - } - }; - } else { - s.onload = onload; - } - } - var ss = document.getElementsByTagName('script'); - var e = ss.length > 0 ? ss[ss.length - 1] : document.head || document.documentElement; - e.parentNode.insertBefore(s, e.nextSibling); - }, - - createCssLink: function(url) { - var l = document.createElement('link'); - l.setAttribute('rel', 'stylesheet'); - l.setAttribute('type', 'text/css'); - l.setAttribute('href', url); - var e = document.getElementsByTagName('link')[0] - || document.getElementsByTagName('head')[0] - || document.head || document.documentElement; - e.parentNode.insertBefore(l, e); - }, - - loadComments: function(selector, loadFunc) { - var ele = document.querySelector('#comments[lazyload]'); - if (ele) { - var callback = function() { - loadFunc(); - ele.removeAttribute('lazyload'); - }; - Fluid.utils.waitElementVisible(selector, callback, CONFIG.lazyload.offset_factor); - } else { - loadFunc(); - } - }, - - getBackgroundLightness(selectorOrElement) { - var ele = selectorOrElement; - if (typeof selectorOrElement === 'string') { - ele = document.querySelector(selectorOrElement); - } - var view = ele.ownerDocument.defaultView; - if (!view) { - view = window; - } - var rgbArr = view.getComputedStyle(ele).backgroundColor.replace(/rgba*\(/, '').replace(')', '').split(/,\s*/); - if (rgbArr.length < 3) { - return 0; - } - var colorCast = (0.213 * rgbArr[0]) + (0.715 * rgbArr[1]) + (0.072 * rgbArr[2]); - return colorCast === 0 || colorCast > 255 / 2 ? 1 : -1; - }, - - retry(handler, interval, times) { - if (times <= 0) { - return; - } - var next = function() { - if (--times >= 0 && !handler()) { - setTimeout(next, interval); - } - }; - setTimeout(next, interval); - } - -}; - -/** - * Handles debouncing of events via requestAnimationFrame - * @see http://www.html5rocks.com/en/tutorials/speed/animations/ - * @param {Function} callback The callback to handle whichever event - */ -function Debouncer(callback) { - this.callback = callback; - this.ticking = false; -} - -Debouncer.prototype = { - constructor: Debouncer, - - /** - * dispatches the event to the supplied callback - * @private - */ - update: function() { - this.callback && this.callback(); - this.ticking = false; - }, - - /** - * ensures events don't get stacked - * @private - */ - requestTick: function() { - if (!this.ticking) { - requestAnimationFrame(this.rafCallback || (this.rafCallback = this.update.bind(this))); - this.ticking = true; - } - }, - - /** - * Attach this as the event listeners - */ - handleEvent: function() { - this.requestTick(); - } -}; +function e(e){this.callback=e,this.ticking=!1}window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,Fluid.utils={listenScroll:function(t){var n=new e(t);return window.addEventListener("scroll",n,!1),n.handleEvent(),n},unlistenScroll:function(e){window.removeEventListener("scroll",e)},listenDOMLoaded(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",(function(){e()}))},scrollToElement:function(e,t){var n=jQuery(e).offset();n&&jQuery("html,body").animate({scrollTop:n.top+(t||0),easing:"swing"})},elementVisible:function(e,t){t=t&&t>=0?t:0;var n=e.getBoundingClientRect();const i=window.innerHeight||document.documentElement.clientHeight;return n.top>=0&&n.top<=i*(1+t)+n.height/2||n.bottom>=0&&n.bottom<=i*(1+t)+n.height/2},waitElementVisible:function(e,t,n){var i="undefined"!=typeof window,o=i&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro|msn)bot|crawl|spider|yand|duckgo/i.test(navigator.userAgent);function r(e){Fluid.utils.listenDOMLoaded((function(){if(Fluid.utils.elementVisible(e,n))t();else if("IntersectionObserver"in window)new IntersectionObserver((function(e,n){e[0].isIntersecting&&(t(),n.disconnect())}),{threshold:[0],rootMargin:(window.innerHeight||document.documentElement.clientHeight)*n+"px"}).observe(e);else var i=Fluid.utils.listenScroll((function(){Fluid.utils.elementVisible(e,n)&&(Fluid.utils.unlistenScroll(i),t())}))}))}i&&!o&&(n=n&&n>=0?n:0,"string"==typeof e?this.waitElementLoaded(e,(function(e){r(e)})):r(e))},waitElementLoaded:function(e,t){var n="undefined"!=typeof window,i=n&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro|msn)bot|crawl|spider|yand|duckgo/i.test(navigator.userAgent);n&&!i&&("MutationObserver"in window?new MutationObserver((function(n,i){var o=document.querySelector(e);o&&(t(o),i.disconnect())})).observe(document,{childList:!0,subtree:!0}):Fluid.utils.listenDOMLoaded((function(){var n=function(){var i=document.querySelector(e);i?t(i):setTimeout(n,100)};n()})))},createScript:function(e,t){var n=document.createElement("script");n.setAttribute("src",e),n.setAttribute("type","text/javascript"),n.setAttribute("charset","UTF-8"),n.async=!1,"function"==typeof t&&(window.attachEvent?n.onreadystatechange=function(){var e=n.readyState;"loaded"!==e&&"complete"!==e||(n.onreadystatechange=null,t())}:n.onload=t);var i=document.getElementsByTagName("script"),o=i.length>0?i[i.length-1]:document.head||document.documentElement;o.parentNode.insertBefore(n,o.nextSibling)},createCssLink:function(e){var t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",e);var n=document.getElementsByTagName("link")[0]||document.getElementsByTagName("head")[0]||document.head||document.documentElement;n.parentNode.insertBefore(t,n)},loadComments:function(e,t){var n=document.querySelector("#comments[lazyload]");if(n){Fluid.utils.waitElementVisible(e,(function(){t(),n.removeAttribute("lazyload")}),CONFIG.lazyload.offset_factor)}else t()},getBackgroundLightness(e){var t=e;"string"==typeof e&&(t=document.querySelector(e));var n=t.ownerDocument.defaultView;n||(n=window);var i=n.getComputedStyle(t).backgroundColor.replace(/rgba*\(/,"").replace(")","").split(/,\s*/);if(i.length<3)return 0;var o=.213*i[0]+.715*i[1]+.072*i[2];return 0===o||o>127.5?1:-1},retry(e,t,n){if(!(n<=0)){var i=function(){--n>=0&&!e()&&setTimeout(i,t)};setTimeout(i,t)}}},e.prototype={constructor:e,update:function(){this.callback&&this.callback(),this.ticking=!1},requestTick:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)},handleEvent:function(){this.requestTick()}}; \ No newline at end of file