Skip to content

Instantly share code, notes, and snippets.

@kristoferjoseph
Created October 15, 2019 18:30
Show Gist options
  • Save kristoferjoseph/99d1d494240f7bac2aec915b2104ddf8 to your computer and use it in GitHub Desktop.
Save kristoferjoseph/99d1d494240f7bac2aec915b2104ddf8 to your computer and use it in GitHub Desktop.
Html template ( outer wrapper )
export default function Layout (props) {
props = props || {}
let title = props.title || ''
let content = props.content || ''
return `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<title>${title}</title>
<style>
body {
font-family: sans-serif;
}
</style>
</head>
<body>
<div id="js-content">
${content}
</div>
</body>
</html>
`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment