fix: загрузка pptxgenjs при старте
This commit is contained in:
parent
91ef13bc5b
commit
316894059c
13
index.html
13
index.html
@ -4,6 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Routing Engine Juniper — Полное руководство</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/pptxgenjs@3.12.0/dist/pptxgen.min.js"></script>
|
||||
<style>
|
||||
* { margin: 0; box-sizing: border-box; }
|
||||
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; background: #0f1218; color: #f4f4f5; }
|
||||
@ -167,18 +168,6 @@ document.addEventListener("keydown", function (e) {
|
||||
if (e.key === "ArrowLeft") go(-1);
|
||||
});
|
||||
function downloadPptx() {
|
||||
if (typeof PptxGenJS !== 'undefined') {
|
||||
createPptx();
|
||||
return;
|
||||
}
|
||||
var script = document.createElement('script');
|
||||
script.src = 'https://cdn.jsdelivr.net/npm/pptxgenjs@3.12.0/dist/pptxgen.min.js';
|
||||
script.onload = function() {
|
||||
createPptx();
|
||||
};
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
function createPptx() {
|
||||
var p = new PptxGenJS();
|
||||
p.defineLayout({ name: "W", width: 13.33, height: 7.5 });
|
||||
p.layout = "W";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user