Skip to content

Commit 7486446

Browse files
committed
Added chapter labels
1 parent ba12ff1 commit 7486446

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<script setup>
2+
defineProps({
3+
label: {
4+
type: String
5+
}
6+
})
7+
</script>
8+
9+
<template>
10+
<span class="chapter-label">{{ label }}</span>
11+
</template>
12+
13+
<style scoped>
14+
.chapter-label {
15+
display: inline-block;
16+
color: white;
17+
background-color: #7954FF;
18+
border: none;
19+
padding: 0 10px 2px 8px;
20+
border-radius: 12px;
21+
user-select: none;
22+
margin-bottom: 20px;
23+
font-size: 0.9em;
24+
}
25+
</style>

.vitepress/theme/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import type { Theme } from 'vitepress'
22
import DefaultTheme from 'vitepress/theme'
3+
import ChapterLabel from './components/ChapterLabel.vue'
34
import './style.css'
45

56
export default {
67
extends: DefaultTheme,
8+
enhanceApp({ app }) {
9+
app.component('ChapterLabel', ChapterLabel)
10+
}
711
} satisfies Theme

pages/guide/cosmwasm-core/introduction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<ChapterLabel label="core"></ChapterLabel>
2+
13
# Introduction
24

35
This chapter will give you an overview over CosmWasm from a contract developer perspective, its

0 commit comments

Comments
 (0)