forked from EclipseFdn/hugo-solstice-theme
/
footer_js.html
48 lines (42 loc) · 1.41 KB
/
footer_js.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!-- Placed at the end of the document so the pages load faster -->
{{- with .Site.Params.js | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/main.min.js"}}
<script src="{{ . | relURL }}"></script>
{{ end }}
{{- with .Site.Params.hugo_js }}
<script src="{{ . | relURL }}"></script>
{{ end }}
<!-- Read in mustache templates registered in page scratch -->
{{ range $key, $value := (.Page.Scratch.Get "mustache-templates") }}
<script id="{{ $key }}" type="text/html">
{{ readFile $value | safeHTML}}
</script>
{{ end }}
<!-- Initialize any newsroom components on the page -->
<script>
(function($, document) {
{{ range (.Page.Scratch.Get "events-container-ids") }}
$("#{{ . }}").eclipseFdnApi({
type: "filteredEvents"
});
{{ end }}
{{ range (.Page.Scratch.Get "news-container-ids") }}
$("#{{ . }}").eclipseFdnApi({
type: "newsItems"
});
{{ end }}
})(jQuery, document);
</script>
<script>
(function (eclipseFdnAdopters, eclipsefdn_adopters_configs) {
if (
eclipsefdn_adopters_configs.working_group &&
eclipsefdn_adopters_configs.ul_classes
) {
eclipseFdnAdopters.getWGList({
src_root: 'https://api.eclipse.org/adopters',
working_group: eclipsefdn_adopters_configs.working_group,
ul_classes: eclipsefdn_adopters_configs.ul_classes,
});
}
})(eclipseFdnAdopters, eclipsefdn_adopters_configs);
</script>