From 67a10cf8d8df22dd198a2e9c3ee5413631459d4a Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Fri, 27 Jan 2023 21:00:57 +0100 Subject: [PATCH] fix: re-implement sidebar advertisements --- docs/.vuepress/client.ts | 4 + docs/.vuepress/layouts/Layout.vue | 15 ++++ .../{theme => layouts}/components/AdUnit.vue | 0 .../components/BuySellAds.vue | 0 .../layouts/components/CarbonAds.vue | 77 +++++++++++++++++++ .../{theme => layouts}/components/Donate.vue | 0 .../components/DonateLink.vue | 0 .../{theme => layouts}/components/Version.vue | 0 docs/.vuepress/theme/components/CarbonAds.vue | 64 --------------- docs/.vuepress/theme/index.js | 5 -- docs/.vuepress/theme/layouts/Layout.vue | 55 ------------- 11 files changed, 96 insertions(+), 124 deletions(-) create mode 100644 docs/.vuepress/layouts/Layout.vue rename docs/.vuepress/{theme => layouts}/components/AdUnit.vue (100%) rename docs/.vuepress/{theme => layouts}/components/BuySellAds.vue (100%) create mode 100644 docs/.vuepress/layouts/components/CarbonAds.vue rename docs/.vuepress/{theme => layouts}/components/Donate.vue (100%) rename docs/.vuepress/{theme => layouts}/components/DonateLink.vue (100%) rename docs/.vuepress/{theme => layouts}/components/Version.vue (100%) delete mode 100644 docs/.vuepress/theme/components/CarbonAds.vue delete mode 100644 docs/.vuepress/theme/index.js delete mode 100644 docs/.vuepress/theme/layouts/Layout.vue diff --git a/docs/.vuepress/client.ts b/docs/.vuepress/client.ts index 0089c5873..7045fd1f1 100644 --- a/docs/.vuepress/client.ts +++ b/docs/.vuepress/client.ts @@ -1,4 +1,5 @@ import { defineClientConfig } from '@vuepress/client' +import Layout from './layouts/Layout.vue' // @ts-expect-error monaco editor doesn't have types for the workers import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker' @@ -8,6 +9,9 @@ import jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker' import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker' export default defineClientConfig({ + layouts: { + Layout + }, enhance({ router }) { self.MonacoEnvironment = { getWorker(_, label) { diff --git a/docs/.vuepress/layouts/Layout.vue b/docs/.vuepress/layouts/Layout.vue new file mode 100644 index 000000000..aba094800 --- /dev/null +++ b/docs/.vuepress/layouts/Layout.vue @@ -0,0 +1,15 @@ + + + diff --git a/docs/.vuepress/theme/components/AdUnit.vue b/docs/.vuepress/layouts/components/AdUnit.vue similarity index 100% rename from docs/.vuepress/theme/components/AdUnit.vue rename to docs/.vuepress/layouts/components/AdUnit.vue diff --git a/docs/.vuepress/theme/components/BuySellAds.vue b/docs/.vuepress/layouts/components/BuySellAds.vue similarity index 100% rename from docs/.vuepress/theme/components/BuySellAds.vue rename to docs/.vuepress/layouts/components/BuySellAds.vue diff --git a/docs/.vuepress/layouts/components/CarbonAds.vue b/docs/.vuepress/layouts/components/CarbonAds.vue new file mode 100644 index 000000000..96e3c50f7 --- /dev/null +++ b/docs/.vuepress/layouts/components/CarbonAds.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/docs/.vuepress/theme/components/Donate.vue b/docs/.vuepress/layouts/components/Donate.vue similarity index 100% rename from docs/.vuepress/theme/components/Donate.vue rename to docs/.vuepress/layouts/components/Donate.vue diff --git a/docs/.vuepress/theme/components/DonateLink.vue b/docs/.vuepress/layouts/components/DonateLink.vue similarity index 100% rename from docs/.vuepress/theme/components/DonateLink.vue rename to docs/.vuepress/layouts/components/DonateLink.vue diff --git a/docs/.vuepress/theme/components/Version.vue b/docs/.vuepress/layouts/components/Version.vue similarity index 100% rename from docs/.vuepress/theme/components/Version.vue rename to docs/.vuepress/layouts/components/Version.vue diff --git a/docs/.vuepress/theme/components/CarbonAds.vue b/docs/.vuepress/theme/components/CarbonAds.vue deleted file mode 100644 index 21e506b41..000000000 --- a/docs/.vuepress/theme/components/CarbonAds.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - diff --git a/docs/.vuepress/theme/index.js b/docs/.vuepress/theme/index.js deleted file mode 100644 index 3041b51ec..000000000 --- a/docs/.vuepress/theme/index.js +++ /dev/null @@ -1,5 +0,0 @@ -const { path } = require('@vuepress/shared-utils') - -module.exports = (options = {}, context) => ({ - extend: '@vuepress/theme-default' -}) diff --git a/docs/.vuepress/theme/layouts/Layout.vue b/docs/.vuepress/theme/layouts/Layout.vue deleted file mode 100644 index d140e39bf..000000000 --- a/docs/.vuepress/theme/layouts/Layout.vue +++ /dev/null @@ -1,55 +0,0 @@ - - -