2025-2-26-fixed
This commit is contained in:
24
themes/fluid/layout/_partials/comments/waline.ejs
Normal file
24
themes/fluid/layout/_partials/comments/waline.ejs
Normal file
@ -0,0 +1,24 @@
|
||||
<% 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.css') %>')
|
||||
Fluid.utils.createScript('<%= url_join(theme.static_prefix.waline, 'waline.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>
|
||||
<% } %>
|
||||
Reference in New Issue
Block a user