本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 line
4.5KB

  1. {{/*
  2. <html>
  3. <body>
  4. <div>
  5. */}}
  6. {{template "custom/body_inner_post" .}}
  7. </div>
  8. {{template "custom/body_outer_post" .}}
  9. {{template "base/footer_content" .}}
  10. <script src="{{StaticUrlPrefix}}/vendor/plugins/jquery/jquery.min.js?v=3.4.1"></script>
  11. <script src="{{StaticUrlPrefix}}/vendor/plugins/jquery-migrate/jquery-migrate.min.js?v=3.0.1"></script>
  12. <script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.areyousure/jquery.are-you-sure.js"></script>
  13. {{if .RequireSimpleMDE}}
  14. <script src="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.js"></script>
  15. <script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js"></script>
  16. <script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js"></script>
  17. <script>
  18. CodeMirror.modeURL = "{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/%N/%N.js";
  19. </script>
  20. {{end}}
  21. {{if .RequireGitGraph}}
  22. <!-- graph -->
  23. <script src="{{StaticUrlPrefix}}/vendor/plugins/gitgraph/gitgraph.js"></script>
  24. <script src="{{StaticUrlPrefix}}/js/draw.js"></script>
  25. {{end}}
  26. <!-- Third-party libraries -->
  27. {{if .RequireHighlightJS}}
  28. <script src="{{StaticUrlPrefix}}/vendor/plugins/highlight/highlight.pack.js"></script>
  29. {{end}}
  30. {{if .RequireMinicolors}}
  31. <script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.minicolors/jquery.minicolors.min.js"></script>
  32. {{end}}
  33. {{if .RequireDatetimepicker}}
  34. <script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.js"></script>
  35. {{end}}
  36. {{if .RequireDropzone}}
  37. <script src="{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.js"></script>
  38. {{end}}
  39. {{if .RequireU2F}}
  40. <script src="{{StaticUrlPrefix}}/vendor/plugins/u2f/index.js"></script>
  41. {{end}}
  42. {{if .EnableCaptcha}}
  43. {{if eq .CaptchaType "recaptcha"}}
  44. <script src='{{ URLJoin .RecaptchaURL "api.js"}}' async></script>
  45. {{end}}
  46. {{end}}
  47. {{if .RequireTribute}}
  48. <script src="{{StaticUrlPrefix}}/vendor/plugins/tribute/tribute.min.js"></script>
  49. <script>
  50. var issuesTribute = new Tribute({
  51. values: [
  52. {{ range .Assignees }}
  53. {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
  54. name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'},
  55. {{ end }}
  56. ],
  57. noMatchTemplate: function () { return null },
  58. menuItemTemplate: function (item) {
  59. var user = item.original;
  60. var itemStr = '<img src="' + user.avatar + '"/><span class="name">' + user.name + '</span>';
  61. if (user.fullname && user.fullname != '') {
  62. itemStr += '<span class="fullname">' + user.fullname + '</span>';
  63. }
  64. return itemStr;
  65. }
  66. });
  67. var content = document.getElementById('content');
  68. if (content != null) {
  69. issuesTribute.attach(content);
  70. }
  71. </script>
  72. <script>
  73. var emojiTribute = new Tribute({
  74. collection: [{
  75. trigger: ':',
  76. requireLeadingSpace: true,
  77. values: function (text, cb) {
  78. var array = emojify.emojiNames;
  79. var data = [];
  80. for(var j=0; j<array.length; j++) {
  81. if(array[j].indexOf(text) !== -1) {
  82. data.push(array[j]);
  83. if(data.length > 5) {
  84. break;
  85. }
  86. }
  87. }
  88. cb(data);
  89. },
  90. lookup: function (item) {
  91. return item;
  92. },
  93. selectTemplate: function (item) {
  94. if (typeof item === 'undefined') return null;
  95. return ':' + item.original + ':';
  96. },
  97. menuItemTemplate: function (item) {
  98. return '<img class="emoji" src="{{StaticUrlPrefix}}/vendor/plugins/emojify/images/' + item.original + '.png"/>' + item.original;
  99. }
  100. }]
  101. });
  102. var emojiInputs = document.querySelectorAll('.emoji-input');
  103. if (emojiInputs.length > 0) {
  104. emojiTribute.attach(emojiInputs);
  105. }
  106. var content = document.getElementById('content');
  107. if (content != null) {
  108. emojiTribute.attach(document.getElementById('content'));
  109. }
  110. </script>
  111. {{end}}
  112. <script src="{{StaticUrlPrefix}}/vendor/plugins/emojify/emojify.min.js"></script>
  113. <script src="{{StaticUrlPrefix}}/vendor/plugins/clipboard/clipboard.min.js"></script>
  114. <script src="{{StaticUrlPrefix}}/vendor/plugins/vue/vue.min.js"></script>
  115. <!-- JavaScript -->
  116. <script src="{{StaticUrlPrefix}}/vendor/plugins/semantic/semantic.min.js"></script>
  117. <script src="{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}"></script>
  118. {{if .EnableHeatmap}}
  119. <script src="{{StaticUrlPrefix}}/vendor/plugins/moment/moment.min.js" charset="utf-8"></script>
  120. <script src="{{StaticUrlPrefix}}/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.browser.js" charset="utf-8"></script>
  121. <script type="text/javascript">
  122. initHeatmap('user-heatmap', '{{.HeatmapUser}}');
  123. </script>
  124. {{end}}
  125. {{template "custom/footer" .}}
  126. </body>
  127. </html>
上海开阖软件有限公司 沪ICP备12045867号-1