my-gitea-templates/templates/base/ footer.tmpl
111 lines
3.4 KiB

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