feat: online converter

This commit is contained in:
2025-02-15 15:19:03 +01:00
parent 891cb90131
commit 4662ae040d
15 changed files with 3381 additions and 1233 deletions

42
utils/htmlTemplate.ts Normal file
View File

@@ -0,0 +1,42 @@
export function getHtmlContent(content: string): string {
return `
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
padding: 20px;
max-width: 900px;
margin: 0 auto;
background: white;
color: #24292e;
}
pre {
background-color: #f6f8fa;
padding: 16px;
border-radius: 6px;
overflow-x: auto;
}
code {
font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 85%;
}
img {
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}
</style>
</head>
<body>
${content}
</body>
</html>
`;
}