diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 1658a08d..4e9aa601 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -41,10 +41,7 @@ const config = { }, blog: false, theme: { - customCss: [ - require.resolve('./src/css/custom.css'), - require.resolve('./src/css/carbon.css') - ] + customCss: [require.resolve('./src/css/custom.css')] }, gtag: { trackingID: 'G-4RT25NXQ7N', @@ -187,14 +184,7 @@ const config = { apiKey: '34b64ae4fc8d9da43d9a13d9710aaddc', indexName: 'taskfile' } - }), - - scripts: [ - { - src: '/js/carbon.js', - async: true - } - ] + }) }; module.exports = config; diff --git a/docs/sidebars.js b/docs/sidebars.js index 67611d6d..26c852ff 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -13,10 +13,6 @@ const sidebars = { type: 'link', label: 'Chinese | 中国人', href: CHINESE_URL - }, - { - type: 'html', - value: '' } ] }; diff --git a/docs/src/css/carbon.css b/docs/src/css/carbon.css deleted file mode 100644 index 312343e9..00000000 --- a/docs/src/css/carbon.css +++ /dev/null @@ -1,65 +0,0 @@ -#carbonads * { - margin: initial; - padding: initial; -} -#carbonads { - display: flex; - max-width: 330px; - background-color: hsl(0, 0%, 98%); - box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, 0.1); - z-index: 100; -} -#carbonads a { - color: inherit; - text-decoration: none; -} -#carbonads a:hover { - color: inherit; -} -#carbonads span { - position: relative; - display: block; - overflow: hidden; -} -#carbonads .carbon-wrap { - display: flex; -} -#carbonads .carbon-img { - display: block; - margin: 0; - line-height: 1; -} -#carbonads .carbon-img img { - display: block; -} -#carbonads .carbon-text { - font-size: 13px; - padding: 10px; - margin-bottom: 16px; - line-height: 1.5; - text-align: left; -} -#carbonads .carbon-poweredby { - display: block; - padding: 6px 8px; - background: #f1f1f2; - text-align: center; - text-transform: uppercase; - letter-spacing: 0.5px; - font-weight: 600; - font-size: 8px; - line-height: 1; - border-top-left-radius: 3px; - position: absolute; - bottom: 0; - right: 0; -} - -[data-theme='dark'] #carbonads { - background-color: hsl(0, 0%, 35%); - box-shadow: 0 1px 4px 1px hsl(0, 0%, 55%); -} - -[data-theme='dark'] #carbonads .carbon-poweredby { - background-color: hsl(0, 0%, 55%); -} diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 3a62341b..bf314475 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -23,11 +23,6 @@ width: 100%; } -#carbonads { - margin-top: 30px; - margin-right: 10px; -} - .gold-sponsors { display: flex; justify-content: center; diff --git a/docs/static/js/.keep b/docs/static/js/.keep new file mode 100644 index 00000000..e69de29b diff --git a/docs/static/js/carbon.js b/docs/static/js/carbon.js deleted file mode 100644 index f18744a2..00000000 --- a/docs/static/js/carbon.js +++ /dev/null @@ -1,29 +0,0 @@ -(function () { - function attachAd() { - var el = document.createElement('script'); - el.setAttribute('type', 'text/javascript'); - el.setAttribute('id', '_carbonads_js'); - el.setAttribute( - 'src', - '//cdn.carbonads.com/carbon.js?serve=CESI65QJ&placement=taskfiledev' - ); - el.setAttribute('async', 'async'); - - var wrapper = document.getElementById('sidebar-ads'); - wrapper.innerHTML = ''; - wrapper.appendChild(el); - } - - setTimeout(function () { - attachAd(); - - var currentPath = window.location.pathname; - - setInterval(function () { - if (currentPath !== window.location.pathname) { - currentPath = window.location.pathname; - attachAd(); - } - }, 1000); - }, 1000); -})();