import { isMobile } from '../util/env.js';
/**
* Render github corner
* @param {Object} data URL for the View Source on Github link
* @param {String} cornerExternalLinkTarget value of the target attribute of the link
* @return {String} SVG element as string
*/
export function corner(data, cornerExternalLinkTarget) {
if (!data) {
return '';
}
if (!/\/\//.test(data)) {
data = 'https://github.com/' + data;
}
data = data.replace(/^git\+/, '');
// Double check
cornerExternalLinkTarget = cornerExternalLinkTarget || '_blank';
return /* html */ `
`;
}
/**
* Renders main content
* @param {Object} config Configuration object
* @returns {String} HTML of the main content
*/
export function main(config) {
const { hideSidebar, name } = config;
// const name = config.name ? config.name : '';
const aside = /* html */ hideSidebar
? ''
: `
`;
return /* html */ `
${content.slice(5).trim()}
`; } /** * @deprecated */ export function theme(color) { return /* html */ ``; }