-
Notifications
You must be signed in to change notification settings - Fork 1
/
artalk.njk
37 lines (31 loc) · 869 Bytes
/
artalk.njk
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
{{ next_data('artalk', config.artalk, {
el: '#comments',
pageKey: url_for(page.path) | replace(r/index\.html$/, ''),
pageTitle: page.title
}) }}
<link rel="stylesheet" href="{{ config.artalk.cssUrl }}">
<style>.artalk{width:initial;}</style>
<script{{ pjax }} type="text/javascript">
;(function() {
if (CONFIG.page.comments) {
NexT.utils.loadComments(CONFIG.artalk.el)
.then(() => NexT.utils.getScript(CONFIG.artalk.jsUrl, {
condition: window.Artalk
}))
.then(() => {
Artalk.init(CONFIG.artalk);
});
} else {
NexT.utils.getScript(CONFIG.artalk.jsUrl, {
condition: window.Artalk
}).then(() => {
Artalk.loadCountWidget({
server: CONFIG.artalk.server,
site: CONFIG.artalk.site,
pvEl: '#ArtalkPV',
countEl: '#ArtalkCount',
});
})
}
})();
</script>