103 lines
4.7 KiB
PHP
103 lines
4.7 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="vi">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>@yield('title', 'AI Markdown Demo')</title>
|
|
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet" />
|
|
<link href="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown-light.css" rel="stylesheet" />
|
|
<style>
|
|
body { background: #f8f9fa; }
|
|
.ResultPre {
|
|
max-height: 460px; overflow: auto; white-space: pre-wrap;
|
|
word-break: break-word; font-size: .78rem; background: #f8f9fa;
|
|
}
|
|
/* github-markdown-css handles all preview styling */
|
|
.PreviewPane { max-height: 460px; overflow: auto; padding: 1rem; font-size: .85rem; }
|
|
.drop-zone {
|
|
border: 2px dashed #dee2e6; border-radius: .5rem;
|
|
padding: 3rem 1.5rem; text-align: center; cursor: pointer;
|
|
transition: border-color .2s, background .2s;
|
|
}
|
|
.drop-zone:hover, .drop-zone.drag-over { border-color: #0d6efd; background: #f0f6ff; }
|
|
.FileBrowser { height: 560px; overflow-y: auto; font-size: .82rem; }
|
|
.file-entry {
|
|
display: flex; align-items: center; gap: .4rem;
|
|
padding: .25rem .5rem; border-radius: .3rem; cursor: pointer;
|
|
user-select: none; overflow: visible; position: relative;
|
|
}
|
|
.file-entry > span.text-truncate { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
.file-entry:hover { background: #e9ecef; }
|
|
.file-entry.selected { background: #cfe2ff; color: #084298; font-weight: 500; }
|
|
.file-entry.input-sel { background: #cfe2ff; color: #084298; font-weight: 500; }
|
|
.file-entry.output-sel { background: #d1e7dd; color: #0a3622; }
|
|
.act-active { background: rgba(255,255,255,.2) !important; }
|
|
.tree-actions { display:none; gap:2px; align-items:center; flex-shrink:0; margin-left:auto; }
|
|
.file-entry:hover .tree-actions { display:flex; }
|
|
.btn-tree-act {
|
|
border: none; background: none; padding: 1px 5px; border-radius: 3px;
|
|
font-size: .75rem; cursor: pointer; color: #6c757d; line-height:1.4;
|
|
}
|
|
.btn-tree-act:hover { background: #dee2e6; color: #212529; }
|
|
.btn-set-output:hover { color: #0a3622; background: #d1e7dd; }
|
|
.btn-preview-md:hover { color: #084298; background: #cfe2ff; }
|
|
.path-badge { font-size: .72rem; font-family: monospace; word-break: break-all; color: #6c757d; }
|
|
.indent-1 { padding-left: 1.4rem; }
|
|
.indent-2 { padding-left: 2.6rem; }
|
|
.indent-3 { padding-left: 3.8rem; }
|
|
.indent-4 { padding-left: 5rem; }
|
|
</style>
|
|
@yield('head')
|
|
</head>
|
|
<body>
|
|
|
|
<nav class="navbar navbar-light bg-white border-bottom px-4 py-2 d-flex justify-content-between">
|
|
<div class="d-flex align-items-center gap-3">
|
|
<span class="navbar-brand fw-bold mb-0">
|
|
MarkItDown <span class="text-muted fw-normal">vs</span> Docling
|
|
<span class="text-muted fw-normal">vs</span> Unlimited-OCR
|
|
</span>
|
|
<ul class="nav nav-pills">
|
|
<li class="nav-item">
|
|
<a class="nav-link py-1 px-3 small {{ request()->is('/') ? 'active' : '' }}" href="/">
|
|
<i class="bi bi-upload me-1"></i>Upload File
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link py-1 px-3 small {{ request()->is('email-convert') ? 'active' : '' }}" href="/email-convert">
|
|
<i class="bi bi-envelope me-1"></i>Email Convert
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<span class="badge bg-primary-subtle text-primary">Demo — LLM Input Processing</span>
|
|
</nav>
|
|
|
|
<div class="container-xl py-4">
|
|
@yield('content')
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/styles/github.min.css" />
|
|
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/highlight.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/markdown-it@14/dist/markdown-it.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/dompurify@3/dist/purify.min.js"></script>
|
|
<script>
|
|
const _md = markdownit({
|
|
html: true, linkify: true, typographer: true, breaks: true,
|
|
highlight: (str, lang) => {
|
|
if (lang && hljs.getLanguage(lang)) {
|
|
try { return '<pre class="hljs"><code>' + hljs.highlight(str, { language: lang, ignoreIllegals: true }).value + '</code></pre>' }
|
|
catch {}
|
|
}
|
|
return '<pre class="hljs"><code>' + _md.utils.escapeHtml(str) + '</code></pre>'
|
|
}
|
|
})
|
|
const mdRender = s => DOMPurify.sanitize(_md.render(s || ''), { USE_PROFILES: { html: true } })
|
|
</script>
|
|
@yield('scripts')
|
|
</body>
|
|
</html>
|