Skip to content

Commit 414cac6

Browse files
authored
Add StudioSdkBannerSidebar (#6437)
1 parent a4f3d20 commit 414cac6

File tree

4 files changed

+56
-2
lines changed

4 files changed

+56
-2
lines changed
49.9 KB
Loading
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<Layout>
3-
<CarbonAds slot="sidebar-top" />
3+
<StudioSdkBannerSidebar slot="sidebar-top" />
44
</Layout>
55
</template>
66

@@ -9,13 +9,17 @@
99
// var CarbonAds = require('./CarbonAds.vue').default;
1010
// import Layout from '@vuepress/theme-default/layouts/Layout.vue';
1111
// import CarbonAds from './CarbonAds.vue';
12+
13+
// Check all the default slots:
14+
// https://github.com/vuejs/vuepress/blob/9fb4bb00925d9409e6732118e996411c6a82c85d/packages/%40vuepress/theme-default/layouts/Layout.vue
1215
import Layout from '@parent-theme/layouts/Layout.vue';
1316
import CarbonAds from './CarbonAds.vue';
17+
import StudioSdkBannerSidebar from './StudioSdkBannerSidebar.vue';
1418
1519
export default {
1620
components: {
1721
Layout,
18-
CarbonAds,
22+
StudioSdkBannerSidebar,
1923
},
2024
};
2125
</script>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<template>
2+
<a class="banner-sdk-sidebar" :href="getSdkDocsLink()">
3+
<h2 class="banner-sdk-sidebar__title">Supercharge Your GrapesJS Development 🚀</h2>
4+
<img class="banner-sdk-sidebar__image" :src="$withBase('/studio-banner.jpg')" alt="Studio SDK">
5+
<p class="banner-sdk-sidebar__content">
6+
Studio SDK is the next-level visual builder with advanced features, custom plugins, and seamless integration. Save time and build faster!
7+
</p>
8+
</a>
9+
</template>
10+
11+
<script>
12+
import { getSdkDocsLink } from './utils';
13+
14+
export default {
15+
methods: {
16+
getSdkDocsLink() {
17+
return getSdkDocsLink('sidebar');
18+
}
19+
}
20+
};
21+
</script>
22+
23+
<style>
24+
.banner-sdk-sidebar {
25+
padding: 1rem;
26+
background-color: #f8f8f8;
27+
border-radius: 5px;
28+
color: inherit;
29+
}
30+
.banner-sdk-sidebar__title {
31+
font-size: 0.8rem;
32+
}
33+
.banner-sdk-sidebar__image {
34+
border-radius: 3px;
35+
width: 100%;
36+
max-width: 150px;
37+
float: left;
38+
margin-right: 10px;
39+
}
40+
.banner-sdk-sidebar__content {
41+
font-size: 0.8rem;
42+
}
43+
</style>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export const getSdkUtmParams = (medium = '') => {
2+
return `utm_source=grapesjs-docs&utm_medium=${medium}`;
3+
}
4+
5+
export const getSdkDocsLink = (medium = '') => {
6+
return `https://app.grapesjs.com/docs-sdk/overview/getting-started?${getSdkUtmParams(medium)}`;
7+
}

0 commit comments

Comments
 (0)