-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
Layout.vue
105 lines (98 loc) 路 2.2 KB
/
Layout.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<template>
<div
class="main-container"
:class="{ 'has-top-banner': showTopBanner }"
>
<ParentLayout>
<template #page-top>
<CarbonAds
v-if="$site.themeConfig.carbonAds"
:key="'ca:' + $page.path"
:code="$site.themeConfig.carbonAds.carbon"
:placement="$site.themeConfig.carbonAds.placement"
/>
</template>
<template #page-bottom>
<BuySellAds
v-if="$site.themeConfig.carbonAds"
:key="'bsa:' + $page.path"
:code="$site.themeConfig.carbonAds.custom"
:placement="$site.themeConfig.carbonAds.placement"
/>
</template>
<template #sidebar-bottom>
<div class="sponsors">
<a
href="https://github.com/sponsors/posva"
target="_blank"
rel="noopener"
>Sponsors</a
>
<a
v-for="sponsor in sponsors.gold"
:href="sponsor.href"
:key="sponsor.href"
target="_blank"
rel="noopener"
>
<img :src="sponsor.imgSrcLight" :alt="sponsor.alt" />
</a>
</div>
</template>
</ParentLayout>
</div>
</template>
<script>
import ParentLayout from '@parent-theme/layouts/Layout.vue'
import CarbonAds from './components/CarbonAds.vue'
import BuySellAds from './components/BuySellAds.vue'
import sponsors from '../components/sponsors.json'
export default {
name: 'Layout',
components: {
ParentLayout,
CarbonAds,
BuySellAds
},
data () {
return {
sponsors,
showTopBanner: false
}
}
}
</script>
<style>
@media screen and (max-width: 1300px) {
.content__default::before {
content: '';
/* background-color: red; */
position: relative;
display: block;
/* top: 87px; */
/* right: -12px; */
float: right;
height: 221px;
/* width: 0; */
padding: 0 0 20px 30px;
margin-top: 20px;
margin-right: -24px;
}
}
</style>
<style scoped>
.sponsors {
padding: 0 1.5rem 2rem;
font-size: 0.8rem;
}
.sponsors a {
color: #999;
display: inline;
}
.sponsors img {
max-width: 200px;
max-height: 40px;
display: block;
margin: 1.25rem 0;
}
</style>