my-gitea-templates/templates/base/ footer.tmpl
118 lines
3.8 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 .RequireU2F}}
  38. <script src="{{AppSubUrl}}/vendor/plugins/u2f/index.js"></script>
  39. {{end}}
  40. {{if .RequireTribute}}
  41. <script src="{{AppSubUrl}}/vendor/plugins/tribute/tribute.min.js"></script>
  42. <script>
  43. var issuesTribute = new Tribute({
  44. values: [
  45. {{ range .Assignees }}
  46. {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
  47. name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'},
  48. {{ end }}
  49. ],
  50. noMatchTemplate: function () { return null },
  51. menuItemTemplate: function (item) {
  52. var user = item.original;
  53. var itemStr = '<img src="' + user.avatar + '"/><span class="name">' + user.name + '</span>';
  54. if (user.fullname && user.fullname != '') {
  55. itemStr += '<span class="fullname">' + user.fullname + '</span>';
  56. }
  57. return itemStr;
  58. }
  59. })
  60. issuesTribute.attach(document.getElementById('content'))
  61. </script>
  62. <script>
  63. var emojiTribute = new Tribute({
  64. collection: [{
  65. trigger: ':',
  66. requireLeadingSpace: true,
  67. values: function (text, cb) {
  68. var array = emojify.emojiNames;
  69. var data = [];
  70. for(var j=0; j<array.length; j++) {
  71. if(array[j].indexOf(text) !== -1) {
  72. data.push(array[j]);
  73. if(data.length > 5) {
  74. break;
  75. }
  76. }
  77. }
  78. cb(data);
  79. },
  80. lookup: function (item) {
  81. return item;
  82. },
  83. selectTemplate: function (item) {
  84. if (typeof item === 'undefinied') return null;
  85. return ':' + item.original + ':';
  86. },
  87. menuItemTemplate: function (item) {
  88. return '<img class="emoji" src="{{AppSubUrl}}/vendor/plugins/emojify/images/' + item.original + '.png"/>' + item.original;
  89. }
  90. }]
  91. });
  92. emojiTribute.attach(document.getElementById('content'))
  93. </script>
  94. {{end}}
  95. <script src="{{AppSubUrl}}/vendor/plugins/emojify/emojify.min.js"></script>
  96. <script src="{{AppSubUrl}}/vendor/plugins/clipboard/clipboard.min.js"></script>
  97. <script src="{{AppSubUrl}}/vendor/plugins/vue/vue.min.js"></script>
  98. <!-- JavaScript -->
  99. <script src="{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.js"></script>
  100. <script src="{{AppSubUrl}}/js/index.js?v={{MD5 AppVer}}"></script>
  101. {{if .EnableHeatmap}}
  102. <script src="{{AppSubUrl}}/vendor/plugins/moment/moment.min.js" charset="utf-8"></script>
  103. <script src="{{AppSubUrl}}/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.browser.js" charset="utf-8"></script>
  104. <script type="text/javascript">
  105. initHeatmap('user-heatmap', '{{.HeatmapUser}}');
  106. </script>
  107. {{end}}
  108. {{template "custom/footer" .}}
  109. </body>
  110. </html>