Skip to content

Commit 9134c0d

Browse files
Merge pull request #12 from webdevnerdstuff/dev
Dev
2 parents 46d397d + a9a282d commit 9134c0d

27 files changed

+1104
-394
lines changed

src/App.vue

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@
66
@updated-drawer="toggleDrawer"
77
/>
88

9-
<!-- ====================================================== Navigation Drawer -->
10-
<v-navigation-drawer
11-
v-model="drawer"
12-
:absolute="drawerOptions.absolute"
13-
:color="drawerOptions.color"
14-
:elevation="drawerOptions.elevation"
15-
>
16-
<MenuComponent :drawerOptions="drawerOptions" />
17-
</v-navigation-drawer>
9+
<!-- ====================================================== Menu -->
10+
<MenuComponent v-model="drawer" />
1811

1912
<!-- ====================================================== Main Container -->
2013
<v-main class="pb-10">
@@ -81,6 +74,11 @@ function toggleDrawer(): void {
8174
</script>
8275

8376
<style lang="scss">
77+
:root {
78+
--list-item-padding-left: 50px;
79+
--list-item-level-3-padding-left: 26px;
80+
}
81+
8482
html {
8583
scroll-behavior: smooth;
8684
scroll-padding-top: 70px;
@@ -106,12 +104,6 @@ a {
106104
}
107105
}
108106
}
109-
110-
code {
111-
&.ic {
112-
background-color: rgb(0 0 0 / 10%) !important;
113-
}
114-
}
115107
}
116108
117109
.top-app-bar {
@@ -159,3 +151,25 @@ a {
159151
margin: 0;
160152
}
161153
</style>
154+
155+
<style lang="scss" scoped>
156+
:deep(pre),
157+
:deep(code) {
158+
&.ic {
159+
background-color: rgb(255 255 255 / 10%) !important;
160+
border-radius: 3px;
161+
font-size: 85%;
162+
font-weight: normal;
163+
padding: 0.2em 0.4em;
164+
}
165+
}
166+
167+
.v-theme--light {
168+
:deep(pre),
169+
:deep(code) {
170+
&.ic {
171+
background-color: rgb(0 0 0 / 10%) !important;
172+
}
173+
}
174+
}
175+
</style>

src/documentation/DocsPage.vue

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -74,24 +74,24 @@
7474
<!-- Usage -->
7575
<Section.UsageSection />
7676

77-
<!-- Components -->
78-
<!-- <Section.Components /> -->
79-
8077
<!-- Props -->
8178
<Section.PropsSection />
8279

80+
<!-- Components -->
81+
<Section.ComponentsSection />
82+
8383
<!-- Validation -->
8484
<Section.ValidationSection />
8585

86-
<!-- Examples -->
87-
<Section.ExampleSection />
88-
8986
<!-- Events -->
9087
<Section.EventsSection />
9188

9289
<!-- Slots -->
9390
<Section.SlotsSection />
9491

92+
<!-- Examples -->
93+
<Section.ExampleSection />
94+
9595
<!-- Playground -->
9696
<Section.PlaygroundSection />
9797

@@ -125,26 +125,4 @@ const componentVersion = ref<string | number>(packageInfo.version);
125125
provide<Docs.GlobalClasses>('classes', classes);
126126
</script>
127127

128-
<style lang="scss" scoped>
129-
:deep(pre),
130-
:deep(code) {
131-
&.ic {
132-
background-color: rgb(255 255 255 / 10%) !important;
133-
border-radius: 3px;
134-
font-size: 85%;
135-
font-weight: normal;
136-
padding: 0.2em 0.4em;
137-
}
138-
}
139-
</style>
140-
141-
<style lang="scss">
142-
.v-theme--light {
143-
pre,
144-
code {
145-
&.ic {
146-
background-color: rgb(0 0 0 / 10%) !important;
147-
}
148-
}
149-
}
150-
</style>
128+
<style lang="scss" scoped></style>

src/documentation/components/AnswersDialog.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
</template>
2828

2929
<script setup lang="ts">
30-
import { inject } from 'vue';
31-
32-
3330
const modelValue = defineModel<boolean>();
3431
const { answers } = defineProps<{ answers: any; }>();
3532

src/documentation/components/ExampleContainer.vue

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<v-window-item value="template">
7272
<v-theme-provider>
7373
<VCodeBlock
74+
:key="codeKey"
7475
:code="code.template"
7576
:highlightjs="codeBlockSettings.plugin === 'highlightjs'"
7677
lang="html"
@@ -83,6 +84,7 @@
8384
<v-window-item value="script">
8485
<v-theme-provider>
8586
<VCodeBlock
87+
:key="codeKey"
8688
:code="code.script"
8789
:highlightjs="codeBlockSettings.plugin === 'highlightjs'"
8890
lang="html"
@@ -110,21 +112,27 @@
110112
</v-col>
111113
</template>
112114

113-
<script setup>
114-
115+
<script setup lang="ts">
115116
const emit = defineEmits(['closePicker']);
116-
const props = defineProps({
117-
code: {
118-
required: true,
119-
type: Object,
120-
},
121-
codeBlockOptions: {
122-
required: true,
123-
type: Object,
124-
},
125-
});
126117
127-
const codeBlockSettings = computed(() => props.codeBlockOptions);
118+
export interface ExampleCode {
119+
desc?: string;
120+
name?: string;
121+
script?: string;
122+
template?: string;
123+
}
124+
125+
const codeBlockSettings = inject<Docs.CodeBlockSettings>('codeBlockSettings')!;
126+
const props = defineProps<{ code: ExampleCode; codeUpdatedAt?: string; updatedCode?: ExampleCode; }>();
127+
128+
const { code, updatedCode } = toRefs(props);
129+
const codeKey = ref('scriptKey');
130+
131+
watch(() => props.codeUpdatedAt, () => {
132+
code.value.script = updatedCode.value?.script;
133+
code.value.template = updatedCode.value?.template;
134+
}, { deep: true });
135+
128136
const hasRendered = ref(true);
129137
const showCode = ref(false);
130138
const template = ref('template');
@@ -135,10 +143,10 @@ function showCodeBlocks() {
135143
}
136144
137145
const getHrefId = computed(() => {
138-
const id = props.code.name?.toLowerCase().replace(/\s+/g, '-');
146+
const id = code.value.name?.toLowerCase().replace(/\s+/g, '-');
139147
140148
return `examples-${id}`;
141-
})
149+
});
142150
143151
</script>
144152

0 commit comments

Comments
 (0)