commit 55f97004b6e58fdc8d3efdf83a237f5481cfe085
parent 0e0d2d66f767c5b4a8f6dc6dafafb154f41417b2
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Mon, 22 Jun 2026 17:49:43 +0530
updated placement
Diffstat:
2 files changed, 43 insertions(+), 6 deletions(-)
diff --git a/docs/.vitepress/theme/components/ArticleAd.vue b/docs/.vitepress/theme/components/ArticleAd.vue
@@ -0,0 +1,37 @@
+<template>
+ <div class="article-ad-container">
+ <span class="ad-label">ADVERTISEMENT</span>
+ <div class="ad-content">
+ <!-- Your A-Ads Iframe -->
+ <iframe
+ data-aa='2445210'
+ src='//ad.a-ads.com/2445210/?size=125x125'
+ style='border:0; padding:0; width:125px; height:125px; overflow:hidden; display:block; margin: 0 auto;'
+ allowtransparency='true'>
+ </iframe>
+ </div>
+ </div>
+</template>
+
+<style scoped>
+.article-ad-container {
+ margin-top: 2rem;
+ padding: 1rem;
+ background: var(--vp-c-bg-elv);
+ border: 1px solid var(--vp-c-divider);
+ border-radius: 12px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+}
+
+.ad-label {
+ font-size: 10px;
+ font-weight: 700;
+ color: var(--vp-c-text-3);
+ letter-spacing: 0.5px;
+ margin-bottom: 8px;
+}
+</style>+
\ No newline at end of file
diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts
@@ -1,9 +1,9 @@
-import { h, Fragment } from 'vue'
+import { h } from 'vue'
import DefaultTheme from 'vitepress/theme'
import type { Theme } from 'vitepress'
import CodePage from './CodePage.vue'
import TermsBanner from './components/TermsBanner.vue'
-import FloatingAd from './components/FloatingAd.vue'
+import FloatingAd from './components/ArticleAd.vue'
import './style.css'
export default {
@@ -11,10 +11,9 @@ export default {
Layout() {
return h(DefaultTheme.Layout, null, {
- 'layout-bottom': () => h(Fragment, [
- h(TermsBanner),
- h(FloatingAd)
- ])
+ 'layout-bottom': () => h(TermsBanner),
+
+ 'doc-after': () => h(FloatingAd)
})
}
} satisfies Theme
\ No newline at end of file