Skip to content

Commit eb362b9

Browse files
committed
Added all labels.
1 parent 868b4db commit eb362b9

File tree

19 files changed

+71
-9
lines changed

19 files changed

+71
-9
lines changed

.vitepress/theme/components/ChapterLabel.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
defineProps({
33
label: {
44
type: String,
5-
default: 'CosmWasm Docs',
5+
default: 'chapter',
66
},
77
bgColor: {
88
type: String,
@@ -12,11 +12,11 @@ defineProps({
1212
</script>
1313

1414
<template>
15-
<span class="chapter-label" :style="{backgroundColor: bgColor}">{{ label }}</span>
15+
<span class="label" :style="{backgroundColor: bgColor}">{{ label }}</span>
1616
</template>
1717

1818
<style scoped>
19-
.chapter-label {
19+
.label {
2020
display: inline-block;
2121
color: white;
2222
border: none;
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<script setup>
2+
defineProps({
3+
chapter: {
4+
type: String,
5+
default: 'chapter',
6+
},
7+
section: {
8+
type: String,
9+
default: 'section',
10+
},
11+
bgChapter: {
12+
type: String,
13+
default: 'var(--bg-medium-blue)'
14+
},
15+
bgSection: {
16+
type: String,
17+
default: 'var(--bg-persian-pink)'
18+
}
19+
})
20+
</script>
21+
22+
<template>
23+
<span class="label" :style="{backgroundColor: bgChapter}">{{ chapter }}</span>
24+
<span class="label" :style="{backgroundColor: bgSection}">{{ section }}</span>
25+
</template>
26+
27+
<style scoped>
28+
.label {
29+
display: inline-block;
30+
color: white;
31+
border: none;
32+
padding: 2px 10px 2px 8px;
33+
border-radius: 12px;
34+
user-select: none;
35+
margin: 0 4px 20px 0;
36+
font-size: 0.9em;
37+
}
38+
</style>

.vitepress/theme/index.ts

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

67
export default {
78
extends: DefaultTheme,
89
enhanceApp({ app }) {
910
app.component('ChapterLabel', ChapterLabel)
11+
app.component('SectionLabel', SectionLabel)
1012
}
1113
} 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+
<SectionLabel chapter="core" section="architecture"></SectionLabel>
46

57
# Actor model
68

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<SectionLabel chapter="core" section="architecture"></SectionLabel>
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+
<SectionLabel chapter="core" section="architecture"></SectionLabel>
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+
<SectionLabel chapter="core" section="architecture"></SectionLabel>
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+
<SectionLabel chapter="core" section="conventions"></SectionLabel>
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+
<SectionLabel chapter="core" section="conventions"></SectionLabel>
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+
<SectionLabel chapter="core" section="conventions"></SectionLabel>
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)