fix: ProjectDetail sidebar layout - 1/4 collapsible, preview full height

This commit is contained in:
2026-05-25 23:18:19 +08:00
parent 0082ee6379
commit 4fa51004b8
2 changed files with 38 additions and 14 deletions
+7 -7
View File
@@ -34,29 +34,29 @@
</div>
</div>
<!-- Preview content -->
<div class="flex-1 overflow-auto p-6 bg-slate-50/50">
<!-- Preview content -->
<div class="flex-1 overflow-auto p-4 md:p-6 bg-slate-50/50">
<!-- HTML Preview -->
<div v-if="normalizedFileType === 'html'" class="bg-white rounded-2xl shadow-xl overflow-hidden border border-orange-200/30 flex flex-col" style="min-height: 500px;">
<div v-if="normalizedFileType === 'html'" class="bg-white rounded-2xl shadow-xl overflow-hidden border border-orange-200/30 flex flex-col h-full min-h-[500px]">
<iframe
ref="iframeRef"
:srcdoc="content"
class="w-full flex-1"
class="w-full h-full"
sandbox="allow-same-origin"
></iframe>
</div>
<!-- Markdown Preview -->
<div v-else-if="normalizedFileType === 'md'" class="bg-white rounded-2xl shadow-xl p-8 border border-orange-200/30 prose max-w-none prose-orange flex-1 overflow-auto" style="min-height: 500px;">
<div v-else-if="normalizedFileType === 'md'" class="bg-white rounded-2xl shadow-xl p-6 md:p-8 border border-orange-200/30 prose max-w-none prose-orange overflow-auto h-full min-h-[500px]">
<div v-html="renderedMarkdown"></div>
</div>
<!-- PPTX Preview (PDF iframe) -->
<div v-else-if="normalizedFileType === 'pptx'" class="bg-white rounded-2xl shadow-xl overflow-hidden h-full flex flex-col border border-orange-200/30">
<div v-else-if="normalizedFileType === 'pptx'" class="bg-white rounded-2xl shadow-xl overflow-hidden h-full flex flex-col border border-orange-200/30 min-h-[500px]">
<iframe
v-if="pdfUrl"
:src="pdfUrl"
class="w-full flex-1"
class="w-full h-full"
type="application/pdf"
></iframe>
<div v-else class="flex items-center justify-center h-full">