diff --git a/src/styles/doc.scss b/src/styles/doc.scss index 1cf76e1af231a52ef3ed25385272cb7d0158bb9c..29de351700669c86e24ae916aa616e44013a03a1 100644 --- a/src/styles/doc.scss +++ b/src/styles/doc.scss @@ -363,24 +363,24 @@ h1:hover .anchor svg, h2:hover .anchor svg, h3:hover .anchor svg, h4:hover .anch overflow-y: auto; padding-right: 60px; } - & pre.language-shell, & pre.language-bash { - &:before { - content: '$'; - } - } + // & pre.language-shell, & pre.language-bash { + // &:before { + // content: '$'; + // } + // } & .pre-copy-btn { cursor: pointer; position: absolute; right: 0px; top: 0; + height: 24px; + background: #3F5165; + border-radius: 0px 0px 0px 4px; + color: #D5DAF1; + line-height: 24px; font-size: 12px; - padding-top: 16px; - width: 50px; + width: 60px; text-align: center; - height: 100%; - color: #a5c5d0; - font-style: italic; - background: #FAF8F6; } & .pre-control-check { position: absolute; @@ -1183,11 +1183,14 @@ h1:hover .anchor svg, h2:hover .anchor svg, h3:hover .anchor svg, h4:hover .anch .markdown-body .highlight pre, .markdown-body pre { - background-color: #FAF8F6 !important; - border-radius: 3px; + background-color: #213851 !important; + border-radius: 0px; line-height: 1.45; overflow: auto; - padding: 16px; + padding: 20px; + &.language-ebnf { + background-color: #f6f8fa !important; + } } .markdown-body pre code { @@ -1424,21 +1427,35 @@ h1:hover .anchor svg, h2:hover .anchor svg, h3:hover .anchor svg, h4:hover .anch } .gatsby-highlight { - pre { - &::before { - padding-right: 0.5rem; - } - - &.shell-root::before { - content: '#'; - } - - &.shell-regular::before { - content: '$'; - } - - &.sql::before { - content: '>'; - } + position: relative; + margin-top: 35px; + &:not([data-language="ebnf+diagram"]):before { + position: absolute; + content: attr(data-language); + bottom: 100%; + left: 0; + padding: 0 15px; + background: #213851; + border-radius: 4px 4px 0px 0px; + color: #FFFFFF; + height: 30px; + line-height: 30px; } + // pre { + // &::before { + // padding-right: 0.5rem; + // } + + // &.shell-root::before { + // content: '#'; + // } + + // &.shell-regular::before { + // content: '$'; + // } + + // &.sql::before { + // content: '>'; + // } + // } } \ No newline at end of file diff --git a/src/styles/global.css b/src/styles/global.css index 56b502bdc692ce325fcc53425a28f4b166270df5..a4c0d61b34b0609bf5a42532cbe9e4f891cc595d 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -81,7 +81,7 @@ li { background-image: url(./images/tools/menu/manager.png); } .w-product-icon-menu.ptk { - background-image: url(./images/tools/menu/ptk.42x42.png); + background-image: url(./images/tools/menu/ptk.png); } .w-product-icon-menu.mdb { background-image: url(./images/tools/menu/mdb.png); @@ -106,7 +106,7 @@ li { background-image: url(./images/tools/mini/manager.png); } .w-product-icon-mini.ptk { - background-image: url(./images/tools/mini/ptk.64x64.png); + background-image: url(./images/tools/mini/ptk.png); } .w-product-icon-mini.mdb { background-image: url(./images/tools/mini/mdb.png); diff --git a/src/styles/images/tools/menu/manager.png b/src/styles/images/tools/menu/manager.png index 3ab6e25a9f58b8a53ac8749b093eb4222468a00c..12778f748a3356186560816deb743e871391b62a 100644 Binary files a/src/styles/images/tools/menu/manager.png and b/src/styles/images/tools/menu/manager.png differ diff --git a/src/styles/images/tools/menu/mdb.png b/src/styles/images/tools/menu/mdb.png index bca317b7976e0cd603f5b9e7160f5506dc7ad099..6d29d163ac47d13dc17c0dce95e0e988b082f8d7 100644 Binary files a/src/styles/images/tools/menu/mdb.png and b/src/styles/images/tools/menu/mdb.png differ diff --git a/src/styles/images/tools/menu/mogha.png b/src/styles/images/tools/menu/mogha.png index c06a353d5d46ce50a5607e3910b5a5932ef38a90..e37c2c874fce16c6e8c12709171e3d1c3abd8b08 100644 Binary files a/src/styles/images/tools/menu/mogha.png and b/src/styles/images/tools/menu/mogha.png differ diff --git a/src/styles/images/tools/menu/mtk.png b/src/styles/images/tools/menu/mtk.png index 43dc9340e9bfb3f53e4f5ebdaf694c66cff186d3..858d909278570ddbb2a08b395ed9a7b375c8c0f7 100644 Binary files a/src/styles/images/tools/menu/mtk.png and b/src/styles/images/tools/menu/mtk.png differ diff --git a/src/styles/images/tools/menu/mvd.png b/src/styles/images/tools/menu/mvd.png index b693b512e1a3dd4455387df3ce0f2d2660cfc411..23a71d1e80dbb6e22ba261f673ff869d0595e78e 100644 Binary files a/src/styles/images/tools/menu/mvd.png and b/src/styles/images/tools/menu/mvd.png differ diff --git a/src/styles/images/tools/menu/ptk.42x42.png b/src/styles/images/tools/menu/ptk.42x42.png deleted file mode 100644 index 2ddb2b1160ce2e2f8328815a087210dd251bba21..0000000000000000000000000000000000000000 Binary files a/src/styles/images/tools/menu/ptk.42x42.png and /dev/null differ diff --git a/src/styles/images/tools/menu/ptk.png b/src/styles/images/tools/menu/ptk.png new file mode 100644 index 0000000000000000000000000000000000000000..68cbd887a11746ebfc52ea163e6b25fe607e16aa Binary files /dev/null and b/src/styles/images/tools/menu/ptk.png differ diff --git a/src/styles/images/tools/menu/sca.png b/src/styles/images/tools/menu/sca.png index 00f5630ded3d8731b997b16c13b61140e89198ec..e423f126c0e2406aac986709546a9c553e8bfd16 100644 Binary files a/src/styles/images/tools/menu/sca.png and b/src/styles/images/tools/menu/sca.png differ diff --git a/src/styles/images/tools/mini/ptk.64x64.png b/src/styles/images/tools/mini/ptk.64x64.png deleted file mode 100644 index b47a6ed2633040dd9ff0ea03348ab48aaf39aee8..0000000000000000000000000000000000000000 Binary files a/src/styles/images/tools/mini/ptk.64x64.png and /dev/null differ diff --git a/src/styles/images/tools/mini/ptk.png b/src/styles/images/tools/mini/ptk.png new file mode 100644 index 0000000000000000000000000000000000000000..ba8719d9f2d64a00f1edfd8d0032d40f86e40995 Binary files /dev/null and b/src/styles/images/tools/mini/ptk.png differ diff --git a/src/styles/images/tools/ptk.png b/src/styles/images/tools/ptk.png index a88274c9da7699a69cdc18c8096369ea450ae410..44a5753a3e16b66ef5ba542387249954bc7650f4 100644 Binary files a/src/styles/images/tools/ptk.png and b/src/styles/images/tools/ptk.png differ diff --git a/src/templates/doc.js b/src/templates/doc.js index 8801d653ec35ca8c7068c2858c287ad6cfbdf9f1..d5bb1253ed1ae511345cb977c898ce3fe2bd1759 100644 --- a/src/templates/doc.js +++ b/src/templates/doc.js @@ -56,7 +56,7 @@ const DocTmptPage = ({ data, pageContext }) => { Copy(i.querySelector('code').innerText); const tipTxt = document.createElement('div'); tipTxt.style.top = (e.pageY - 30) + 'px'; - tipTxt.style.left = (e.pageX - 28) + 'px'; + tipTxt.style.left = (e.pageX - 20) + 'px'; tipTxt.classList.add('animate__animated', 'animate__fadeOutUp', 'pre-copied-tip'); tipTxt.innerHTML = 'Copied'; tipTxt.addEventListener('animationend', () => {