2
0
Fork 0
ff/themes/custom/layout/layout.ejs

50 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<%- partial("_partial/head") %>
<body>
<%- partial("_partial/header") %>
<main class="main">
<%- body %>
<%- partial("_partial/arrow") %>
</main>
<%- partial("_partial/aside") %>
<%- partial("_partial/toolbar") %>
<!-- partial("_partial/search") -->
<%- partial("_partial/particles") %>
<%- js("https://cdn.jsdelivr.net/gh/meethigher/cdn@9.0/js/jquery.min.js") %>
<%- js("https://cdn.jsdelivr.net/gh/meethigher/cdn@9.0/js/particles.min.js") %>
<%- js("https://cdn.jsdelivr.net/gh/meethigher/cdn@9.0/js/app.js") %>
<%- js("https://cdn.jsdelivr.net/gh/meethigher/cdn@11/js/layer/layer.js") %>
<%- js("js/meethigher.js") %>
<%- js("js/toolbar.js") %>
<%- js("js/svg-pan-zoom.min.js") %>
<% if (theme.graphviz.enable) { %>
<script src='https://cdnjs.cloudflare.com/ajax/libs/viz.js/1.7.1/viz.js'></script>
<script>
String.prototype.replaceAll = function(search, replacement) {
var target = this;
return target.split(search).join(replacement);
};
let vizObjects = document.querySelectorAll('.graphviz');
for (let item of vizObjects) {
let svg = undefined;
try {
//svg = Viz(item.textContent.replaceAll('', '--'), 'svg');
svg = Viz(item.textContent, 'svg');
var panZoomTiger = svgPanZoom(svg, {
controlIconsEnabled: true,
fit: true,
center: true,
});
} catch(e) {
//svg = `<pre class="error">${e}</pre>`;
console.log("got "+e);
}
item.outerHTML = svg;
}
</script>
<% } %>
</body>
</html>