-
-
Notifications
You must be signed in to change notification settings - Fork 5k
/
Copy pathLayout.vue
130 lines (117 loc) · 2.64 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<template>
<div class="main-container">
<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-top>
<div class="sponsors sponsors-top">
<span>Platinum Sponsors</span>
<a
v-for="sponsor in sponsors.platinum"
:href="sponsor.href"
:key="sponsor.href"
target="_blank"
rel="noopener"
>
<img :src="sponsor.imgSrcLight" :alt="sponsor.alt" />
</a>
</div>
</template>
<template #sidebar-bottom>
<div class="sponsors">
<span>Sponsors</span>
<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
}
}
}
</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;
}
}
img {
max-width: 100%;
}
</style>
<style scoped>
.sponsors {
margin: 0 0 1rem 1.35rem;
}
.sponsors-top {
margin-top: 1rem;
/* workaround padding in vitepress */
margin-bottom: -2rem;
}
.sponsors > span {
/* margin: 1.25rem 0; */
display: block;
color: #999;
font-size: 0.8rem;
}
.sponsors a:last-child {
margin-bottom: 20px;
}
.sponsors a:first-child {
margin-top: 18px;
}
.sponsors a {
margin-top: 10px;
width: 125px;
display: block;
}
</style>