Skip to content

Commit d98af6d

Browse files
committed
accounting docs - remove currently unnecessary codes (if required have copy version on folder 'content copy')
1 parent 9426c5c commit d98af6d

File tree

220 files changed

+87
-17908
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+87
-17908
lines changed

app.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
(config.aside.useLevel && config.aside.levelStyle === 'aside') ? 'h-[calc(100vh-3.5rem)] md:top-[61px]' : 'h-[calc(100vh-6rem)] md:top-[101px]',
2222
]"
2323
>
24-
<LayoutAside :is-mobile="false" />
24+
<!-- <LayoutAside :is-mobile="false" /> -->
25+
<LayoutCustomAside :is-mobile="false" />
2526
</aside>
2627
<NuxtPage />
2728
</div>

components/layout/CustomAside.vue

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<template>
2+
<UiScrollArea orientation="vertical" class="relative h-full overflow-hidden py-4 pr-6 text-sm md:pr-4" type="hover">
3+
<LayoutHeaderNavMobile v-if="isMobile" class="mb-5 border-b pb-2" />
4+
<LayoutSearchButton v-if="config.search.inAside" />
5+
6+
<ul v-if="sidebarItems.length" class="flex flex-col gap-1 border-b pb-4">
7+
<li v-for="(group, gIndex) in sidebarItems" :key="gIndex">
8+
<p class="mt-2 mb-1 font-medium text-foreground/70">{{ group.text }}</p>
9+
<ul class="pl-2">
10+
<li v-for="item in group.items" :key="item.link">
11+
<NuxtLinkLocale
12+
:to="item.link"
13+
class="text-foreground/80 hover:bg-muted hover:text-primary flex h-8 items-center gap-2 rounded-md p-2 text-sm"
14+
:class="[
15+
path.startsWith(item.link) && 'bg-muted !text-primary font-medium',
16+
]"
17+
>
18+
{{ item.text }}
19+
</NuxtLinkLocale>
20+
</li>
21+
</ul>
22+
</li>
23+
</ul>
24+
25+
<!-- keep your LayoutAsideTree only if you still want sub-level docs (optional) -->
26+
<LayoutAsideTree
27+
v-if="!sidebarItems.length"
28+
:links="tree"
29+
:level="0"
30+
:class="[(config.aside.useLevel && config.aside.levelStyle === 'aside') ? 'pt-4' : 'pt-1']"
31+
/>
32+
</UiScrollArea>
33+
</template>
34+
35+
36+
<script setup lang="ts">
37+
defineProps<{ isMobile: boolean }>();
38+
39+
const { navDirFromPath } = useContentHelpers();
40+
const config = useConfig();
41+
const { locale, defaultLocale, navigation } = useI18nDocs();
42+
const route = useRoute();
43+
44+
const appConfig = useAppConfig();
45+
46+
const sidebarItems = computed(() => {
47+
const path = route.path;
48+
const sidebarConfig = appConfig.shadcnDocs.sidebar || {};
49+
50+
// Find which config section matches the current route
51+
const key = Object.keys(sidebarConfig).find((k) => path.startsWith(k));
52+
53+
return key ? sidebarConfig[key] : [];
54+
});
55+
56+
const tree = computed(() => {
57+
if (config.value.aside.useLevel) {
58+
const pathParts = route.path.split('/');
59+
const leveledPath = pathParts.splice(0, locale.value === defaultLocale ? 2 : 3).join('/');
60+
const dir = navDirFromPath(leveledPath, navigation.value);
61+
return dir ?? [];
62+
}
63+
return navigation.value;
64+
});
65+
66+
const path = computed(() => route.path);
67+
</script>
68+

types/index.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,23 @@ interface DefaultConfig {
6767
collapseLevel: number;
6868
folderStyle: 'default' | 'tree' | 'group';
6969
};
70+
sidebar: {
71+
[path: string]: Array<{
72+
text: string;
73+
link?: string;
74+
collapsible?: boolean;
75+
collapsed?: boolean;
76+
items?: Array<{
77+
text: string;
78+
link: string;
79+
collapsible?: boolean;
80+
items?: Array<{
81+
text: string;
82+
link: string;
83+
}>;
84+
}>;
85+
}>;
86+
};
7087
main: {
7188
breadCrumb: boolean;
7289
showTitle: boolean;

www/app.config.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,6 @@ export default defineAppConfig({
132132
'/comfortaccounting': [
133133
{
134134
text: 'Comfort Accounting',
135-
collapsible: false,
136-
items: [
137-
{
138-
text: 'Overview',
139-
link: '/comfortaccounting',
140-
},
141-
],
142135
},
143136
{
144137
text: 'Getting Started',

www/content/1.getting-started/1.introduction.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

www/content/1.getting-started/2.installation.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

www/content/1.getting-started/3.writing/1.markdown.md

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)