detail.js 917 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // 加载 modal
  2. function load_modal(article_id, comment_id) {
  3. let modal_body = '#modal_body_' + comment_id;
  4. let modal_id = '#comment_' + comment_id;
  5. // 加载编辑器
  6. if ($(modal_body).children().length === 0) {
  7. let content = '<iframe src="/comment/post_comment/' +
  8. article_id +
  9. '/' +
  10. comment_id +
  11. '"' +
  12. ' frameborder="0" style="width: 100%; height: 100%;" id="iframe_' +
  13. comment_id +
  14. '"></iframe>';
  15. $(modal_body).append(content);
  16. }
  17. ;
  18. $(modal_id).modal('show');
  19. }
  20. $(".django-ckeditor-widget").removeAttr('style');
  21. $('#sidebar').stickySidebar({
  22. topSpacing: 20,
  23. bottomSpacing: 20,
  24. });
  25. (function ($) {
  26. "use strict";
  27. function initParallax() {
  28. $('#masthead').parallax("100%", 0.3);
  29. $('#content').parallax("20%", 0.7);
  30. }
  31. initParallax();
  32. })(jQuery);