mirror of
https://github.com/morten-olsen/http.md.git
synced 2026-02-08 00:46:28 +01:00
30 lines
731 B
TypeScript
30 lines
731 B
TypeScript
const wrapBody = (body: string) => {
|
|
return `<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.8.1/github-markdown.min.css" />
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Document</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 0;
|
|
}
|
|
.markdown-body {
|
|
max-width: 800px;
|
|
padding: 20px;
|
|
margin: auto;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<article class="markdown-body">
|
|
${body}
|
|
</article>
|
|
</body>
|
|
</html>`;
|
|
};
|
|
|
|
export { wrapBody };
|