Skip to content

Commit ccd5d64

Browse files
committed
update site add sponsor
1 parent 5dc6ad7 commit ccd5d64

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

site/components/sponsors.vue

+33-1
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,50 @@
1111
target="_blank"
1212
>
1313
<img
14-
width="34"
14+
height="51"
1515
src="https://cdn.tipe.io/tipe/tipe-cat-no-text.svg"
1616
alt="tipe"
1717
>
1818
</a>
1919
</li>
20+
<li
21+
v-if="isEffective(effectiveTime.bmatch)"
22+
class="sponsorsItem"
23+
>
24+
<a
25+
href="https://www.bmatch.tech/?ref=ant-design-vue"
26+
target="_blank"
27+
>
28+
<img
29+
height="61"
30+
src="https://cdn.nlark.com/yuque/0/2019/png/87084/1552279877057-assets/web-upload/48a6ba91-6750-478c-956f-57aedb632fe5.png"
31+
alt="bmatch"
32+
>
33+
</a>
34+
</li>
2035
</ul>
2136
</div>
2237
</div>
2338
</template>
2439
<script>
40+
import moment from 'moment';
2541
export default {
2642
props: ['title'],
43+
data() {
44+
return {
45+
top: 50,
46+
effectiveTime : {
47+
bmatch: {
48+
start: '2019-03-11',
49+
end: '2019-06-11',
50+
},
51+
},
52+
};
53+
},
54+
methods: {
55+
isEffective({start, end}){
56+
return moment().isBetween(start, end);
57+
},
58+
},
2759
};
2860
</script>

site/index.less

+9-2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@
120120
display: none;
121121
}
122122
}
123+
.snd-ad{
124+
padding-bottom: 10px;
125+
}
123126
.sponsorsWrap {
124127
padding-left: 40px;
125128
position: relative;
@@ -130,11 +133,15 @@
130133
}
131134
ul {
132135
overflow: hidden;
133-
margin-top: 5px;
136+
margin-top: 15px;
137+
li {
138+
position: relative;
139+
}
134140
}
135141
.sponsorsItem {
136142
display: inline-block;
137-
margin-right: 8px;
143+
margin-right: 10px;
144+
height: 51px;
138145
}
139146
}
140147
#nav {

0 commit comments

Comments
 (0)