Skip to content

Commit c289980

Browse files
committed
Added labels.
1 parent c989ec7 commit c289980

File tree

19 files changed

+79
-11
lines changed

19 files changed

+79
-11
lines changed

.vitepress/config.mts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,29 @@ import {withMermaid} from "vitepress-plugin-mermaid";
33
export default withMermaid({
44
lang: 'en-US',
55
base: '/',
6-
title: "CosmWasm",
6+
title: "CosmWasm Docs",
77
description: "User guide for CosmWasm smart contract developers",
88
head: [['link', {rel: 'icon', href: '/cosmwasm-small.svg'}]],
99
lastUpdated: true,
1010
themeConfig: {
1111
logo: '/cosmwasm-small.svg',
1212
nav: [
13-
{text: 'Welcome', link: '/guide/welcome'},
1413
{
15-
text: 'CosmWasm Core',
16-
items: [
17-
{text: 'Introduction', link: '/guide/cosmwasm-core/introduction'},
18-
{text: 'Installation', link: '/guide/cosmwasm-core/installation'},
19-
{text: 'Entrypoints', link: '/guide/cosmwasm-core/entrypoints/entrypoints'},
20-
{text: 'Architecture', link: '/guide/cosmwasm-core/architecture/architecture'},
21-
{text: 'Conventions', collapsed: true, link: '/guide/cosmwasm-core/conventions/conventions'}
22-
]
14+
text: 'Chapters', items: [
15+
{text: 'Welcome', link: '/guide/welcome'},
16+
{
17+
text: 'CosmWasm Core',
18+
items: [
19+
{text: 'Introduction', link: '/guide/cosmwasm-core/introduction'},
20+
{text: 'Installation', link: '/guide/cosmwasm-core/installation'},
21+
{text: 'Entrypoints', link: '/guide/cosmwasm-core/entrypoints/entrypoints'},
22+
{text: 'Architecture', link: '/guide/cosmwasm-core/architecture/architecture'},
23+
{text: 'Conventions', collapsed: true, link: '/guide/cosmwasm-core/conventions/conventions'}
24+
]
25+
},
26+
{
27+
text: 'Wasmd'
28+
}]
2329
},
2430
],
2531
sidebar: [
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: #7954FF;
18+
border: none;
19+
padding: 0 10px 2px 9px;
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
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+
// register your custom global components
10+
app.component('ChapterLabel', ChapterLabel)
11+
}
712
} satisfies Theme

pages/guide/cosmwasm-core/architecture/actor-model.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[reentrancy issues]: https://ethereum.org/en/developers/docs/smart-contracts/security/#reentrancy
22
[enum dispatch]: ../conventions/enum-dispatch
33
[CEI pattern (Checks, Effects, Interactions)]: https://fravoll.github.io/solidity-patterns/checks_effects_interactions.html
4+
5+
<ChapterLabel label="core"></ChapterLabel>
46

57
# Actor model
68

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
# Architecture
24

35
(TBD)

pages/guide/cosmwasm-core/architecture/gas.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
[inspired by NEAR]: https://docs.near.org/concepts/protocol/gas
55
[#1120]: https://github.com/CosmWasm/cosmwasm/pull/1120
66

7+
<ChapterLabel label="core"></ChapterLabel>
8+
79
# Gas
810

911
Gas is a way to measure computational expense of a smart contract execution, including CPU time and

pages/guide/cosmwasm-core/architecture/transactions.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
# Transactions
24

35
Every contract invocation is wrapped into a transaction. If you know about transactions in SQL

pages/guide/cosmwasm-core/conventions/conventions.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
# Conventions
24

35
Just like with any platform, there are certain conventions on how to write contracts for CosmWasm.

pages/guide/cosmwasm-core/conventions/enum-dispatch.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
# Enum dispatch
24

35
In most production contracts you want to handle multiple message types in a single contract.

pages/guide/cosmwasm-core/conventions/library-feature.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[`cw-plus` contracts]: https://github.com/CosmWasm/cw-plus
22
[`cw4-stake` contract]: https://github.com/CosmWasm/cw-plus/blob/48bec694521655d5b3e688c51e4185f740ea4640/contracts/cw4-stake/Cargo.toml#L22-L24
33

4+
<ChapterLabel label="core"></ChapterLabel>
5+
46
# Library feature
57

68
In the ecosystem, there is the convention to gate the entrypoints of your contract behind a

0 commit comments

Comments
 (0)