Docs Cleanup

This commit is contained in:
David Haz
2025-07-12 15:28:52 +03:00
parent 62cdbc2dba
commit 056d2c0330
21 changed files with 365 additions and 588 deletions

View File

@@ -28,10 +28,9 @@
</div>
</div>
<div v-if="!snippet" class="no-code">
<div v-else class="no-code">
<span>Nothing here yet!</span>
<i class="pi pi-face-sad"></i>
<i class="pi pi-face-sad" />
</div>
</div>
</div>
@@ -47,7 +46,6 @@ const props = defineProps<{
}>();
const skipKeys = ['cli'];
const expandedSections = ref<Set<string>>(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<string, string> = {
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<string, string> = {
cli: 'bash',
code: 'html',
utility: 'typescript',
usage: 'html',
installation: 'bash'
};
return languageMap[name] || 'typescript';
};
</script>
<style scoped>
.code-example {
margin: 1.2rem 0;
}
.code-section {
margin-bottom: 2rem;
}
.code-container {
position: relative;
margin-bottom: 1.2rem;
}
.code-wrapper {
position: relative;
overflow: hidden;
border: 1px solid #142216;
border-radius: 15px;
}
.code-wrapper.collapsed {
max-height: 600px;
}
.code-block {
overflow: hidden;
border: none;
border-radius: 15px;
}
.fade-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 60%;
background: linear-gradient(to bottom, transparent, #0b0b0b);
pointer-events: none;
z-index: 1;
}
.expand-button {
position: absolute;
bottom: 0.75rem;
right: 0.75rem;
padding: 0.5rem 1rem;
border-radius: 12px;
height: 2.5rem;
font-size: 14px;
font-weight: 500;
background-color: #0b0b0b;
border: 1px solid #142216;
color: white;
cursor: pointer;
z-index: 2;
transition: background-color 0.3s ease;
}
.expand-button:hover {
background-color: #111;
}
.expand-button:active {
background-color: #111;
}
.no-code {
display: flex;
align-items: center;
gap: 0.5rem;
color: #a1a1aa;
font-style: italic;
padding: 2rem;
background: #0b0b0b;
border: 1px solid #142216;
border-radius: 15px;
}
:deep(.v-code-block) {
background: #0b0b0b;
border-radius: 15px;