File tree 7 files changed +103
-11
lines changed
packages/docs/.vuepress/theme-coreui/src/client
7 files changed +103
-11
lines changed Original file line number Diff line number Diff line change
1
+ <script >
2
+ import {h } from ' vue' ;
3
+ export default {
4
+ props: {},
5
+ watch: {
6
+ ' $route' (to, from) {
7
+ if (
8
+ to .path !== from .path
9
+ // Only reload if the ad has been loaded
10
+ // otherwise it's possible that the script is appended but
11
+ // the ads are not loaded yet. This would result in duplicated ads.
12
+ && this .$el .querySelector (' #carbonads' )
13
+ ) {
14
+ this .$el .innerHTML = ' ' ;
15
+ this .load ();
16
+ }
17
+ },
18
+ },
19
+ mounted () {
20
+ this .load ();
21
+ },
22
+ methods: {
23
+ load () {
24
+ const s = document .createElement (' script' );
25
+ s .id = ' _carbonads_js' ;
26
+ s .src = ` //cdn.carbonads.com/carbon.js?serve=CEAICKJY&placement=coreuiio` ;
27
+ this .$el .appendChild (s);
28
+ },
29
+ },
30
+ render () {
31
+ return h (' div' );
32
+ },
33
+ };
34
+ </script >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <CAlert color =" light" class =" d-flex align-items-baseline justify-content-center rounded-0 border-bottom mb-0" >
3
- <span class =" me-3" >
4
- If you like this project and want to help us, please give us a star ⭐️ on Github. ➡️
5
- </span >
6
- <CButton color =" dark" component =" a" href =" https://github.com/coreui/coreui-vue" size =" sm" target =" _blank" variant =" outline" ><CIcon icon =" cib-github" /> Star</CButton >
7
- <span class =" ms-3" >🙏</span >
8
- </CAlert >
9
2
<CHeader class =" mb-5 elevation-0 border-bottom" position =" sticky" >
10
3
<CHeaderToggler class =" ms-md-3" @click =" $emit('toggle-sidebar')" >
11
4
<CIcon icon =" cil-menu" size =" lg" />
Original file line number Diff line number Diff line change 3
3
<div class =" content" >
4
4
<h1 >{{ title }}</h1 >
5
5
<p class =" docs-lead fs-4 fw-light" >{{ description }}</p >
6
- <div data-ea-publisher = " coreui-io " data-ea-type = " image " ></ div >
6
+ <Ads / >
7
7
<Content />
8
8
</div >
9
9
</div >
@@ -14,8 +14,13 @@ import { defineComponent } from 'vue'
14
14
import { usePageFrontmatter } from ' @vuepress/client'
15
15
import type { DefaultThemeNormalPageFrontmatter } from ' ../../shared'
16
16
17
+ import Ads from ' ./Ads.vue'
18
+
17
19
export default defineComponent ({
18
20
name: ' Page' ,
21
+ components: {
22
+ Ads ,
23
+ },
19
24
setup() {
20
25
const frontmatter = usePageFrontmatter <DefaultThemeNormalPageFrontmatter >()
21
26
const title = frontmatter .value .title
Original file line number Diff line number Diff line change 5
5
@touchstart =" onTouchStart"
6
6
@touchend =" onTouchEnd"
7
7
>
8
- <Sidebar :visible =" isSidebarOpen" @visible-change =" (event) => isSidebarOpen = event" />
8
+ <Sidebar :visible =" isSidebarOpen" @visible-change =" (event) => ( isSidebarOpen = event) " />
9
9
<div class =" wrapper d-flex flex-column min-vh-100" >
10
- <Header @toggle-sidebar =" toggleSidebar(!isSidebarOpen)" />
10
+ <Header @toggle-sidebar =" toggleSidebar(!isSidebarOpen)" />
11
11
<div class =" body flex-grow-1 px-3" >
12
12
<CContainer lg >
13
13
<Home v-if =" frontmatter.home" />
20
20
>
21
21
<CRow >
22
22
<CCol :lg =" 9" >
23
+ <div
24
+ class =" bg-info bg-opacity-10 border-start border-start-5 border-start-info p-4 pb-3 mb-5"
25
+ >
26
+ <h3 class =" mb-4" >Support CoreUI Development</h3 >
27
+ <p >
28
+ CoreUI is an MIT-licensed open source project and is completely free to use.
29
+ However, the amount of effort needed to maintain and develop new features for
30
+ the project is not sustainable without proper financial backing.
31
+ </p >
32
+ <p >You can support our Open Source software development in the following ways:</p >
33
+ <ul >
34
+ <li >
35
+ Buy the <a href =" https://coreui.io/pricing/?support=vue" >CoreUI PRO</a >,
36
+ and get access to PRO components, and dedicated support.
37
+ </li >
38
+ <li >
39
+ <a href =" https://opencollective.com/coreui" target =" _blank"
40
+ >Became a sponsor</a
41
+ >, and get your logo on BACKERS.md/README.md files or each site of this
42
+ documentation
43
+ </li >
44
+ <li >
45
+ Give us a star ⭐️ on
46
+ <a href =" https://github.com/coreui/coreui-vue" target =" _blank" >Github</a >.
47
+ </li >
48
+ </ul >
49
+ </div >
23
50
<Page :key =" page.path" >
24
51
<template #top >
25
52
<slot name =" page-top" />
Original file line number Diff line number Diff line change
1
+ #carbonads {
2
+ position : static ;
3
+ display : block ;
4
+ max-width : 400px ;
5
+ padding : 15px 15px 15px 160px ;
6
+ margin : 2rem 0 ;
7
+ overflow : hidden ;
8
+ @include font-size (.8125rem );
9
+ line-height : 1.4 ;
10
+ text-align : left ;
11
+ background-color : $gray-100 ;
12
+
13
+ a {
14
+ color : $gray-800 ;
15
+ text-decoration : none ;
16
+ }
17
+
18
+ @include media-breakpoint-up (sm) {
19
+ @include border-radius (.5rem );
20
+ }
21
+ }
22
+
23
+ .carbon-img {
24
+ float : left ;
25
+ margin-left : -145px ;
26
+ }
27
+
28
+ .carbon-poweredby {
29
+ display : block ;
30
+ margin-top : .75rem ;
31
+ color : $gray-700 !important ;
32
+ }
Original file line number Diff line number Diff line change 1
- .docs-sidebar {
1
+ .sidebar. docs-sidebar {
2
2
--cui-sidebar-bg : #f0f4f7 ;
3
3
--cui-sidebar-brand-bg : transparent ;
4
4
--cui-sidebar-brand-color : rgba (44 ,56 ,74 ,0.87 );
Original file line number Diff line number Diff line change 1
1
@import ' @coreui/coreui/scss/coreui.scss' ;
2
2
3
+ @import ' ads' ;
3
4
@import ' anchor' ;
4
5
@import ' demo' ;
5
6
@import ' footer' ;
You can’t perform that action at this time.
0 commit comments