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.

123 lines
4.0 KiB

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