Implement the template

This commit is contained in:
Joseph Garrone
2021-03-02 01:05:15 +01:00
parent f92488b80d
commit 292881532a
7 changed files with 364 additions and 216 deletions

View File

@ -0,0 +1,24 @@
export function appendLinkInHead(
props: {
href: string;
}
) {
const { href } = props;
var link = document.createElement("link");
Object.assign(
link,
{
href,
"type": "text/css",
"rel": "stylesheet",
"media": "screen,print"
}
);
document.getElementsByTagName("head")[0].appendChild(link);
}

View File

@ -0,0 +1,22 @@
export function appendScriptInHead(
props: {
src: string;
}
) {
const { src } = props;
var script = document.createElement("script");
Object.assign(
script,
{
src,
"type": "text/javascript",
}
);
document.getElementsByTagName("head")[0].appendChild(script);
}