Skip to content

Commit e8a77eb

Browse files
committed
doc: add surelyvue
1 parent 0113abb commit e8a77eb

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

site/src/components/rice/top_rice.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div v-if="show">
33
<template v-if="ads.length">
44
<a-carousel autoplay>
55
<template v-for="ad in ads" :key="ad.href">
@@ -35,6 +35,7 @@ export default {
3535
props: ['isCN', 'isMobile'],
3636
data() {
3737
return {
38+
show: false,
3839
showGoogleAd: location.host.indexOf('antdv.com') > -1,
3940
cnAds: [
4041
{

site/src/components/surelyVue.vue

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<template>
2+
<div :class="cls">
3+
<div class="logo">
4+
<img height="80" src="https://www.surely.cool/surely-vue-logo.png" alt="" />
5+
</div>
6+
<div class="desc">
7+
<div class="title">高性能 Surely Vue</div>
8+
<div class="sub-title">
9+
构建更快的网站
10+
<br />
11+
更快的构建网站
12+
</div>
13+
</div>
14+
</div>
15+
<div class="placeholder"></div>
16+
</template>
17+
<script lang="ts">
18+
import { defineComponent } from 'vue';
19+
import type { PropType } from 'vue';
20+
export default defineComponent({
21+
props: {
22+
type: { type: String as PropType<'x' | 'y'> },
23+
},
24+
setup(props) {
25+
return {
26+
cls: {
27+
wrap: true,
28+
[`wrap-${props.type}`]: true,
29+
},
30+
};
31+
},
32+
});
33+
</script>
34+
<style scoped>
35+
.wrap {
36+
display: flex;
37+
background-color: #f4f8fa;
38+
padding: 10px 30px;
39+
position: absolute;
40+
top: 0;
41+
left: 0;
42+
z-index: 9;
43+
width: 100%;
44+
height: 100px;
45+
overflow: hidden;
46+
}
47+
.placeholder {
48+
height: 100px;
49+
}
50+
.desc {
51+
margin-left: 20px;
52+
overflow: hidden;
53+
}
54+
.title {
55+
font-size: 18px;
56+
}
57+
.sub-title {
58+
opacity: 0.7;
59+
margin-top: 5px;
60+
}
61+
</style>

site/src/layouts/index.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
<a-col :xxl="4" :xl="5" :lg="6" :md="6" :sm="24" :xs="24" class="main-menu">
2525
<a-affix>
2626
<section class="main-menu-inner">
27-
<Sponsors :is-c-n="isZhCN" />
27+
<!-- <Sponsors :is-c-n="isZhCN" /> -->
28+
<div>
29+
<surelyVueVue />
30+
</div>
2831
<Menu :menus="dataSource" :active-menu-item="activeMenuItem" :is-zh-c-n="isZhCN" />
2932
</section>
3033
</a-affix>
@@ -87,6 +90,7 @@ import Sponsors from '../components/rice/sponsors.vue';
8790
import RightBottomAd from '../components/rice/right_bottom_rice.vue';
8891
import { CloseOutlined, MenuOutlined } from '@ant-design/icons-vue';
8992
import ThemeIcon from './ThemeIcon.vue';
93+
import surelyVueVue from '../components/surelyVue.vue';
9094
9195
const rControl = /[\u0000-\u001f]/g;
9296
const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'<>,.?/]+/g;
@@ -105,6 +109,7 @@ export default defineComponent({
105109
CloseOutlined,
106110
MenuOutlined,
107111
ThemeIcon,
112+
surelyVueVue,
108113
},
109114
setup() {
110115
const visible = ref(false);

0 commit comments

Comments
 (0)