Skip to content

Commit 12c40af

Browse files
Update docs
1 parent 6d1e9d0 commit 12c40af

File tree

5 files changed

+63
-3
lines changed

5 files changed

+63
-3
lines changed

src/documentation/components/MenuComponent.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,15 @@ function smoothScroll() {
9393
font-size: .9em;
9494
padding-left: calc(var(--indent-padding) - 10px) !important;
9595
96+
:deep(.v-list-item__spacer) {
97+
display: none;
98+
}
99+
96100
:deep(.v-icon) {
97101
font-size: 1em !important;
98102
margin-right: 1em !important;
99103
}
100104
}
105+
106+
// .v-list-group__items {}
101107
</style>

src/documentation/components/examples/ExampleContainer.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<template>
22
<v-col
33
v-if="code.name"
4+
:id="`${getHrefId}`"
45
class="v-col-12 offset-lg-2 offset-xl-1 v-col-sm-12 v-col-lg-8 v-col-xl-10 mb-0 pb-0"
56
>
6-
<h3 class="text-info mb-1">{{ code.name }}</h3>
7+
<h3 class="text-info mb-1"><a
8+
class="text-info"
9+
:href="`#${getHrefId}`"
10+
>{{ code.name }}</a></h3>
711
</v-col>
812

913
<v-col
@@ -130,6 +134,12 @@ function showCodeBlocks() {
130134
emit('closePicker', showCode.value);
131135
}
132136
137+
const getHrefId = computed(() => {
138+
const id = props.code.name?.toLowerCase().replace(/\s+/g, '-');
139+
140+
return `examples-${id}`;
141+
})
142+
133143
</script>
134144
135145
<style lang="scss">

src/documentation/components/examples/TF/OffsetExample.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const scriptCode = `\<script setup\>
3535
defineExpose({
3636
exampleCode: {
3737
desc: 'Using the <code class="ic">card-offset-x</code> & <code class="ic">card-offset-y</code> prop to offset the color picker card.',
38+
name: 'Card Offset Props',
3839
script: scriptCode,
3940
template: templateCode,
4041
}

src/documentation/sections/ExampleSection.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,14 @@
6161
</ExampleContainer>
6262

6363
<!-- ================================================== Pip Examples -->
64-
<v-col :class="h2Classes">
65-
<h2 class="text-secondary">Pip Examples</h2>
64+
<v-col
65+
id="examples-pips"
66+
:class="h2Classes"
67+
>
68+
<h2><a
69+
class="text-secondary"
70+
href="#examples-pips"
71+
>Pip Examples</a></h2>
6672
</v-col>
6773

6874
<ExampleContainer

src/stores/menu.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,43 @@ export const useMenuStore = defineStore('menu', () => {
7979
{
8080
href: '#examples',
8181
icon: 'mdi:mdi-code-json',
82+
items: [
83+
{
84+
href: '#examples',
85+
icon: 'mdi:mdi-code-json',
86+
title: 'Basic',
87+
},
88+
{
89+
href: '#examples-icon-hover-color-prop',
90+
icon: 'mdi:mdi-code-json',
91+
title: 'Icon Hover Color Prop',
92+
},
93+
{
94+
href: '#examples-readonly-input-prop',
95+
icon: 'mdi:mdi-code-json',
96+
title: 'Readonly Input Prop',
97+
},
98+
{
99+
href: '#examples-readonly-prop',
100+
icon: 'mdi:mdi-code-json',
101+
title: 'Readonly Prop',
102+
},
103+
{
104+
href: '#examples-icon-props',
105+
icon: 'mdi:mdi-code-json',
106+
title: 'Icon Props',
107+
},
108+
{
109+
href: '#examples-card-offset-props',
110+
icon: 'mdi:mdi-code-json',
111+
title: 'Card Offset Props',
112+
},
113+
{
114+
href: '#examples-pips',
115+
icon: 'mdi:mdi-circle',
116+
title: 'Pips',
117+
},
118+
],
82119
title: 'Examples',
83120
},
84121
{

0 commit comments

Comments
 (0)