hexo/node_modules/hexo-theme-fluid/layout/_partials/comments/waline.ejs

25 lines
928 B
Plaintext
Raw Permalink Normal View History

2024-05-09 16:35:20 +08:00
<% if (theme.waline.serverURL) { %>
<div id="waline"></div>
<script type="text/javascript">
Fluid.utils.loadComments('#waline', function() {
Fluid.utils.createCssLink('<%= url_join(theme.static_prefix.waline, 'waline.min.css') %>')
Fluid.utils.createScript('<%= url_join(theme.static_prefix.waline, 'waline.min.js') %>', function() {
var options = Object.assign(
<%- JSON.stringify(theme.waline || {}) %>,
{
el: '#waline',
path: <%= theme.waline.path %>
}
)
Waline.init(options);
Fluid.utils.waitElementVisible('#waline .vcontent', () => {
var imgSelector = '#waline .vcontent img:not(.vemoji)';
Fluid.plugins.imageCaption(imgSelector);
Fluid.plugins.fancyBox(imgSelector);
})
});
});
</script>
<noscript>Please enable JavaScript to view the comments</noscript>
<% } %>