Skip to content

Commit 6d2a2d6

Browse files
committed
chore: add book callout in official docs
1 parent 1eddda3 commit 6d2a2d6

File tree

5 files changed

+57
-8
lines changed

5 files changed

+57
-8
lines changed

docs/.vitepress/theme/HLM.vue

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<template>
2+
<a class="hlm-callout" href="https://hire.jonasgalvez.com.br/happy-little-monoliths">
3+
<span>The book is out!</span>
4+
<img src="/cover-hlm.png">
5+
</a>
6+
</template>
7+
8+
<script setup>
9+
</script>
10+
11+
<style scoped>
12+
.hlm-callout {
13+
display: block;
14+
margin-right: 2em;
15+
margin-bottom: 3em;
16+
display: flex;
17+
flex-direction: column;
18+
align-items: center;
19+
span {
20+
display: block;
21+
margin-left: 0;
22+
background: #e51784;
23+
border-radius: 50px;
24+
padding: 10px 20px;
25+
color: #fff;
26+
font-weight: bold;
27+
font-size: 14px;
28+
margin-bottom: 1em;
29+
align-self: flex-start;
30+
@media (max-width: 960px) {
31+
align-self: unset;
32+
}
33+
}
34+
img {
35+
border: 3px solid #e51784;
36+
width: 250px;
37+
}
38+
}
39+
</style>

docs/.vitepress/theme/components/VPHero.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { type Ref, inject } from 'vue'
33
import type { DefaultTheme } from 'vitepress/theme'
44
import VPButton from './VPButton.vue'
55
import VPImage from './VPImage.vue'
6+
import HLM from '../HLM.vue'
67
78
export interface HeroAction {
89
theme?: 'brand' | 'alt'
@@ -24,6 +25,7 @@ const heroImageSlotExists = inject('hero-image-slot-exists') as Ref<boolean>
2425
<template>
2526
<div class="VPHero" :class="{ 'has-image': image || heroImageSlotExists }">
2627
<div class="container">
28+
<HLM />
2729
<div class="main">
2830
<slot name="home-hero-info">
2931
<h1 v-if="name" class="name">
@@ -95,6 +97,10 @@ const heroImageSlotExists = inject('hero-image-slot-exists') as Ref<boolean>
9597
order: 2;
9698
flex-grow: 1;
9799
flex-shrink: 0;
100+
padding-top: 2.5em;
101+
@media (max-width: 960px) {
102+
padding-top: unset;
103+
}
98104
}
99105
100106
.VPHero.has-image .container {
@@ -114,7 +120,7 @@ const heroImageSlotExists = inject('hero-image-slot-exists') as Ref<boolean>
114120
}
115121
116122
.VPHero.has-image .main {
117-
max-width: 592px;
123+
max-width: 482px;
118124
}
119125
}
120126

docs/.vitepress/theme/without-fonts.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { h } from 'vue'
2+
13
import './styles/vars.css'
24
import './styles/base.css'
35
import './styles/utils.css'
@@ -25,11 +27,16 @@ export { default as VPTeamPage } from './components/VPTeamPage.vue'
2527
export { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue'
2628
export { default as VPTeamPageSection } from './components/VPTeamPageSection.vue'
2729
export { default as VPTeamMembers } from './components/VPTeamMembers.vue'
30+
import HLM from './HLM.vue'
2831

2932
export { useSidebar } from './composables/sidebar'
3033

3134
const theme: Theme = {
32-
Layout,
35+
Layout() {
36+
return h(Layout, null, {
37+
// 'home-hero-before': () => h(HLM),
38+
})
39+
},
3340
enhanceApp: ({ app }) => {
3441
app.component('Badge', VPBadge)
3542
}

docs/cover-hlm.png

460 KB
Loading

docs/index.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,17 @@ layout: home
55
hero:
66
name: "@fastify/vite"
77
text: "Titans Combined"
8-
tagline: Cleanly and elegantly integrate <b><a href="https://fastify.dev/" target="_blank">Fastify</a></b> and <b><a href="https://vitejs.dev/" target="_blank">Vite</a></b> to create a <b>minimal</b>, <b>low overhead</b>, <b>blazing fast™</b> setup for <b>full stack monoliths</b>.
8+
tagline: Cleanly and elegantly integrate <b><a href="https://fastify.dev/" target="_blank">Fastify</a></b> and <b><a href="https://vitejs.dev/" target="_blank">Vite</a></b> to create a <b>minimal</b>, <b>low overhead</b> setup for <b>full stack monoliths</b>.
99
actions:
1010
- theme: brand
1111
text: Get Started
1212
link: /guide/getting-started
1313
- theme: brand
14-
text: "@fastify/vue"
14+
text: "Vue"
1515
link: /vue/index
1616
- theme: brand
17-
text: "@fastify/react"
17+
text: "React"
1818
link: /react/index
19-
- theme: alt
20-
text: View on GitHub
21-
link: https://github.com/fastify/fastify-vite
2219
image:
2320
src: /fastify-vite.svg
2421
alt: "@fastify/vite"

0 commit comments

Comments
 (0)