Skip to content

Commit

Permalink
feat: added code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Mar 20, 2024
1 parent bfb7aaa commit 76466d0
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .vitepress/theme/components/Doc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,32 @@ const pageName = computed(() =>
</style>

<style>
.vp-code-group {
> .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 {
--uno: bg-gradient-blue text-white;
}
}
>.blocks>[class*="language"] {
.lang {
--uno: op0;
}
pre {
--uno: mt-0;
}
}
}
div[class*="language"]:has(.copy + .lang) {
--uno: relative text-neutral-900;
Expand All @@ -193,8 +219,9 @@ div[class*="language"]:has(.copy + .lang) {
&.copied {
--uno: w-unset bg-green;
&::after {
--uno: text-white i-nimiq:check;
--uno: text-white i-nimiq:check text-12;
}
&::before {
Expand Down

0 comments on commit 76466d0

Please sign in to comment.