Skip to content

Commit 821024b

Browse files
docs: add link to free Vue School course on homepage [skip ci] (#1089)
1 parent 05e87ec commit 821024b

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

packages/docs/.vitepress/theme/Layout.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ export const Layout = defineComponent({
1616
Theme.Layout,
1717
{},
1818
{
19+
'home-hero': ()=>(
20+
h("div", {
21+
class: "vue-school-homepage-link",
22+
}, [
23+
h("a", {
24+
href: "https://vueschool.io/lessons/introduction-to-pinia?friend=vuerouter&utm_source=pinia&utm_medium=link&utm_campaign=homepage",
25+
target:"_blank",
26+
rel:"noopener"
27+
},
28+
[h("span", "Watch Video Introduction")]
29+
)
30+
])
31+
),
1932
'sidebar-top': () =>
2033
h('div', { class: 'sponsors sponsors-top' }, [
2134
h('span', 'Platinum Sponsors'),

packages/docs/.vitepress/theme/custom.css

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,38 @@ code {
211211
width: auto;
212212
max-width: 150px;
213213
}
214+
.vue-school-homepage-link{
215+
text-align: center; margin-top: -40px;
216+
}
217+
.vue-school-homepage-link a{
218+
position: relative;
219+
padding-left: 23px;
220+
}
221+
.vue-school-homepage-link a::before{
222+
content: '';
223+
position: absolute;
224+
display: block;
225+
width: 20px;
226+
height: 20px;
227+
top: calc(50% - 10px);
228+
left: -4px;
229+
border-radius: 50%;
230+
border: 1px solid var(--c-brand);
231+
}
232+
.vue-school-homepage-link a::after{
233+
content: '';
234+
position: absolute;
235+
display: block;
236+
width: 0;
237+
height: 0;
238+
top: calc(50% - 4px);
239+
left: 4px;
240+
border-top: 4px solid transparent;
241+
border-bottom: 4px solid transparent;
242+
border-left: 7px solid var(--c-brand);
243+
}
244+
@media screen and (max-width: 720px){
245+
.vue-school-homepage-link{
246+
text-align: center; margin-top: -20px;
247+
}
248+
}

0 commit comments

Comments
 (0)