43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
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>
|
|
`;
|
|
}
|