Skip to content

Commit

Permalink
feat: added diff lines styles
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Mar 20, 2024
1 parent 2aae3ee commit bbb9bce
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default async () => {
['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: `${baseUrl}assets/favicons/favicon-16x16.png` }],
['link', { rel: 'manifest', href: `${baseUrl}assets/favicons/site.webmanifest` }],
['link', { rel: 'mask-icon', href: `${baseUrl}asset/favicons/safari-pinned-tab.svg`, color: '#eaaf0c' }],
['link', { rel: 'shortcut icon', href: `${baseUrl}/assets/favicons/favicon.ico` }],
['link', { rel: 'shortcut icon', href: `${baseUrl}assets/favicons/favicon.ico` }],
['meta', { name: 'msapplication-TileColor', content: '#2b5797' }],
['meta', { name: 'theme-color', content: '#ffffff' }],
['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1' }],
Expand Down
23 changes: 21 additions & 2 deletions .vitepress/theme/components/Doc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ const pageName = computed(() =>

<style>
.vp-code-group {
> .tabs {
>.tabs {
--uno: bg-transparent px-16 h-max pt-1 flex gap-16 pb-8;
label {
--uno: ghost-btn mx-0 px-12 py-6 border-b-0 after:hidden h-max lh-[1] rounded-full;
}
input:checked + label {
input:checked+label {
--uno: bg-gradient-blue text-white;
}
}
Expand Down Expand Up @@ -243,6 +243,25 @@ div[class*="language"]:has(.copy + .lang) {
}
}
div[class*="language"] {
code {
--uno: w-[calc(100%+48px)] inline-block mx--24 px-24;
.diff {
--uno: mx--24 px-24 w-[calc(100%+48px)] inline-block;
&.remove {
--uno: bg-red/15 text-red children:text-red before:pr-16 before:content-['-'] before:absolute before:left-8;
}
&.add {
--uno: bg-green/20 text-green children:text-green before:pr-16 before:content-['+'] before:absolute before:left-8;
}
}
}
}
.custom-block {
--uno: my-24 rounded-6 p-24 pb-14 text-16 ring-1.5;
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/theme/components/DocFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ const { hasNext, hasPrev, next, prev } = usePrevNext()
</p>
</div>

<a v-if="hasPrev" :href="prev.link" pill h-max arrow-back text-blue bg="blue-500 hocus:blue-600" transition-colors>
<a v-if="hasPrev" :href="prev.link" pill h-max arrow-back text-blue bg="blue-400 hover:blue-500" transition-colors>
{{ prev.text }}
</a>

<a v-if="hasNext" :href="next.link" justify-self-end pill arrow h-max text-blue bg="blue-500 hocus:blue-600" transition-colors>
<a v-if="hasNext" :href="next.link" justify-self-end pill arrow h-max text-blue bg="blue-400 hover:blue-500" transition-colors>
{{ next.text }}
</a>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/header/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const { navigation } = useData().theme.value
<h2 whitespace-nowrap hidden xs:block>
<span sr-only>Nimiq</span> Developer Center
</h2>
<div absolute top--6 right--12 @click.prevent>
<div absolute top-24 right--16 @click.prevent>
<Environment />
</div>
</a>
Expand Down
10 changes: 2 additions & 8 deletions build/rpc-docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,8 @@ The JSON-RPC specification defines two ways of passing parameters to methods: na
```JSON
{
"jsonrpc": "2.0",
"params": [12, 30], // Correct
...
}

{
"jsonrpc": "2.0",
"params": {"hour": 12, "minutes": 30}, // Incorrect
...
"params": {"hour": 12, "minutes": 30}, // [!code --]
"params": [12, 30], // [!code ++]
}
```

Expand Down

0 comments on commit bbb9bce

Please sign in to comment.