2025-2-26-fixed
This commit is contained in:
25
themes/fluid/layout/_partials/comments/twikoo.ejs
Normal file
25
themes/fluid/layout/_partials/comments/twikoo.ejs
Normal file
@ -0,0 +1,25 @@
|
||||
<% if (theme.twikoo && theme.twikoo.envId) { %>
|
||||
<div id="twikoo"></div>
|
||||
<script type="text/javascript">
|
||||
Fluid.utils.loadComments('#comments', function() {
|
||||
Fluid.utils.createScript('<%= url_join(theme.static_prefix.twikoo, 'twikoo.all.min.js') %>', function() {
|
||||
var options = Object.assign(
|
||||
<%- JSON.stringify(theme.twikoo || {}) %>,
|
||||
{
|
||||
el: '#twikoo',
|
||||
path: '<%= theme.twikoo.path %>',
|
||||
onCommentLoaded: function() {
|
||||
Fluid.utils.listenDOMLoaded(function() {
|
||||
var imgSelector = '#twikoo .tk-content img:not(.tk-owo-emotion)';
|
||||
Fluid.plugins.imageCaption(imgSelector);
|
||||
Fluid.plugins.fancyBox(imgSelector);
|
||||
});
|
||||
}
|
||||
}
|
||||
)
|
||||
twikoo.init(options)
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the comments</noscript>
|
||||
<% } %>
|
||||
Reference in New Issue
Block a user