From 056d2c03306926e1e8ea9ea582a570113d955d6b Mon Sep 17 00:00:00 2001 From: David Haz Date: Sat, 12 Jul 2025 15:28:52 +0300 Subject: [PATCH] Docs Cleanup --- src/App.vue | 6 +- src/components/code/CodeExample.vue | 111 +---- src/components/common/BackToTopButton.vue | 22 +- src/components/common/ContributionSection.vue | 2 - src/components/common/Customize.vue | 1 - src/components/common/PreviewColor.vue | 1 - src/components/common/TabbedLayout.vue | 22 - .../landing/DisplayHeader/DisplayHeader.css | 32 +- .../landing/FeatureCards/FeatureCards.css | 423 +++++++----------- .../landing/FeatureCards/FeatureCards.vue | 119 +---- src/components/landing/Footer/Footer.vue | 7 +- .../landing/StartBuilding/StartBuilding.vue | 1 - src/components/layouts/CategoryLayout.vue | 23 +- src/components/navs/Header.vue | 2 - src/components/navs/Sidebar.vue | 8 - src/css/base.css | 22 +- src/css/category.css | 100 +++++ src/main.ts | 16 +- src/pages/CategoryPage.vue | 7 +- src/pages/LandingPage.vue | 4 - src/utils/utils.ts | 24 + 21 files changed, 365 insertions(+), 588 deletions(-) diff --git a/src/App.vue b/src/App.vue index 29f3a14..28f3a45 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,12 +13,10 @@ import DisplayHeader from '@/components/landing/DisplayHeader/DisplayHeader.vue' const route = useRoute(); +const isCategoryPage = computed(() => /^\/[^/]+\/[^/]+$/.test(route.path)); + const activeItem = computed(() => { if (route.path === '/') return 'home'; return null; }); - -const isCategoryPage = computed(() => { - return /^\/[^/]+\/[^/]+$/.test(route.path); -}); diff --git a/src/components/code/CodeExample.vue b/src/components/code/CodeExample.vue index cc41b9f..d805c26 100644 --- a/src/components/code/CodeExample.vue +++ b/src/components/code/CodeExample.vue @@ -28,10 +28,9 @@ -
+
Nothing here yet! - - +
@@ -47,7 +46,6 @@ const props = defineProps<{ }>(); const skipKeys = ['cli']; - const expandedSections = ref>(new Set()); const codeEntries = computed(() => { @@ -72,102 +70,29 @@ const toggleExpanded = (name: string) => { }; const getDisplayName = (name: string) => { - if (name === 'code') return 'Code'; - if (name === 'cli') return 'CLI Command'; - if (name === 'utility') return 'Utility'; - if (name === 'usage') return 'Usage'; - if (name === 'installation') return 'Installation'; - return name.charAt(0).toUpperCase() + name.slice(1); + const displayNames: Record = { + code: 'Code', + cli: 'CLI Command', + utility: 'Utility', + usage: 'Usage', + installation: 'Installation' + }; + return displayNames[name] || name.charAt(0).toUpperCase() + name.slice(1); }; const getLanguage = (name: string) => { - if (name === 'cli') return 'bash'; - if (name === 'code') return 'html'; - if (name === 'usage') return 'html'; - if (name === 'installation') return 'bash'; - return 'javascript'; + const languageMap: Record = { + cli: 'bash', + code: 'html', + utility: 'typescript', + usage: 'html', + installation: 'bash' + }; + return languageMap[name] || 'typescript'; };