@crowdin/app-project-module
Version:
Module that generates for you all common endpoints for serving standalone Crowdin App
29 lines (28 loc) • 882 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const html = `
<html>
<head>
<title>[[title]]</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet" />
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div id="redoc-container"></div>
<script src="https://unpkg.com/redoc@^2.5.2/bundles/redoc.standalone.js"> </script>
</body>
<script>
Redoc.init("[[spec-url]]", {}, document.getElementById("redoc-container"));
</script>
</html>`;
function redocHtml(options) {
return html.replace('[[title]]', options.title).replace('[[spec-url]]', options.specUrl);
}
exports.default = redocHtml;