Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitecc24f5

Browse files
committed
docs: update layout
1 parent7e36cc6 commitecc24f5

File tree

7 files changed

+103
-11
lines changed

7 files changed

+103
-11
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<script>
2+
import {h}from'vue';
3+
exportdefault {
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+
consts=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+
returnh('div');
32+
},
33+
};
34+
</script>

‎packages/docs/.vuepress/theme-coreui/src/client/components/Header.vue

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
<template>
2-
<CAlertcolor="light"class="d-flex align-items-baseline justify-content-center rounded-0 border-bottom mb-0">
3-
<spanclass="me-3">
4-
If you like this project and want to help us, please give us a star ⭐️ on Github. ➡️
5-
</span>
6-
<CButtoncolor="dark"component="a"href="https://github.com/coreui/coreui-vue"size="sm"target="_blank"variant="outline"><CIconicon="cib-github" /> Star</CButton>
7-
<spanclass="ms-3">🙏</span>
8-
</CAlert>
92
<CHeaderclass="mb-5 elevation-0 border-bottom"position="sticky">
103
<CHeaderTogglerclass="ms-md-3"@click="$emit('toggle-sidebar')">
114
<CIconicon="cil-menu"size="lg" />

‎packages/docs/.vuepress/theme-coreui/src/client/components/Page.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<divclass="content">
44
<h1>{{ title }}</h1>
55
<pclass="docs-lead fs-4 fw-light">{{ description }}</p>
6-
<divdata-ea-publisher="coreui-io"data-ea-type="image"></div>
6+
<Ads />
77
<Content />
88
</div>
99
</div>
@@ -14,8 +14,13 @@ import { defineComponent } from 'vue'
1414
import {usePageFrontmatter }from'@vuepress/client'
1515
importtype {DefaultThemeNormalPageFrontmatter }from'../../shared'
1616
17+
importAdsfrom'./Ads.vue'
18+
1719
exportdefaultdefineComponent({
1820
name:'Page',
21+
components: {
22+
Ads,
23+
},
1924
setup() {
2025
const frontmatter=usePageFrontmatter<DefaultThemeNormalPageFrontmatter>()
2126
const title=frontmatter.value.title

‎packages/docs/.vuepress/theme-coreui/src/client/layouts/Layout.vue

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
@touchstart="onTouchStart"
66
@touchend="onTouchEnd"
77
>
8-
<Sidebar:visible="isSidebarOpen"@visible-change="(event) => isSidebarOpen = event" />
8+
<Sidebar:visible="isSidebarOpen"@visible-change="(event) =>(isSidebarOpen = event)" />
99
<divclass="wrapper d-flex flex-column min-vh-100">
10-
<Header@toggle-sidebar="toggleSidebar(!isSidebarOpen)"/>
10+
<Header@toggle-sidebar="toggleSidebar(!isSidebarOpen)"/>
1111
<divclass="body flex-grow-1 px-3">
1212
<CContainerlg>
1313
<Homev-if="frontmatter.home" />
@@ -20,6 +20,33 @@
2020
>
2121
<CRow>
2222
<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+
<h3class="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 <ahref="https://coreui.io/pricing/?support=vue">CoreUI PRO</a>,
36+
and get access to PRO components, and dedicated support.
37+
</li>
38+
<li>
39+
<ahref="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+
<ahref="https://github.com/coreui/coreui-vue"target="_blank">Github</a>.
47+
</li>
48+
</ul>
49+
</div>
2350
<Page:key="page.path">
2451
<template #top>
2552
<slotname="page-top" />
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#carbonads {
2+
position:static;
3+
display:block;
4+
max-width:400px;
5+
padding:15px15px15px160px;
6+
margin:2rem0;
7+
overflow:hidden;
8+
@includefont-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+
@includemedia-breakpoint-up(sm) {
19+
@includeborder-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+
}

‎packages/docs/.vuepress/theme-coreui/src/client/styles/_sidebar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.docs-sidebar {
1+
.sidebar.docs-sidebar {
22
--cui-sidebar-bg:#f0f4f7;
33
--cui-sidebar-brand-bg:transparent;
44
--cui-sidebar-brand-color:rgba(44,56,74,0.87);

‎packages/docs/.vuepress/theme-coreui/src/client/styles/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@import'@coreui/coreui/scss/coreui.scss';
22

3+
@import'ads';
34
@import'anchor';
45
@import'demo';
56
@import'footer';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp