keroosha.cybergulag.today/layouts/partials/graph.html

26 lines
799 B
HTML
Raw Normal View History

2021-07-18 16:35:42 +03:00
<script src="https://cdn.jsdelivr.net/npm/d3@6"></script>
<h3>Interactive Graph</h3>
2021-07-18 16:35:42 +03:00
<div id="graph-container"></div>
<style>
:root {
2021-07-18 19:06:36 +03:00
--g-node: var(--secondary);
--g-node-active: var(--primary);
--g-node-inactive: var(--visited);
--g-link: var(--outlinegray);
--g-link-active: #5a7282;
2021-07-18 16:35:42 +03:00
}
</style>
{{ $js := resources.Get "js/graph.js" | resources.Fingerprint "md5" }}
<script src="{{ $js.Permalink }}"></script>
2021-07-18 16:35:42 +03:00
<script>
drawGraph(
{{strings.TrimRight "/" .Page.Permalink}},
{{strings.TrimRight "/" .Site.BaseURL}},
{{$.Site.Data.graphConfig.paths}},
{{$.Site.Data.graphConfig.depth}},
{{$.Site.Data.graphConfig.enableDrag}},
{{$.Site.Data.graphConfig.enableLegend}},
{{$.Site.Data.graphConfig.enableZoom}}
)
</script>