my-gitea-templates/templates/base/ footer.tmpl
136 lines
4.7 KiB

  1. {{/*
  2. <html>
  3. <body>
  4. <div>
  5. */}}
  6. {{template "custom/body_inner_post" .}}
  7. </div>
  8. {{template "custom/body_outer_post" .}}
  9. <footer>
  10. <div class="ui container">
  11. <div class="ui left">
  12. © Gitea {{if (or .ShowFooterVersion .PageIsAdmin)}}{{.i18n.Tr "version"}}: {{AppVer}}{{end}} {{if ShowFooterTemplateLoadTime}}{{.i18n.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong> {{.i18n.Tr "template"}}: <strong>{{call .TmplLoadTimes}}</strong>{{end}}
  13. </div>
  14. <div class="ui right links">
  15. {{if .ShowFooterBranding}}
  16. <a target="_blank" rel="noopener" href="https://github.com/go-gitea/gitea"><i class="fa fa-github-square"></i><span class="sr-only">GitHub</span></a>
  17. {{end}}
  18. <div class="ui language bottom floating slide up dropdown link item">
  19. <i class="world icon"></i>
  20. <div class="text">{{.LangName}}</div>
  21. <div class="menu">
  22. {{range .AllLangs}}
  23. <a class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a>
  24. {{end}}
  25. </div>
  26. </div>
  27. <a href="{{AppSubUrl}}/vendor/librejs.html" data-jslicense="1">JavaScript licenses</a>
  28. {{if .EnableSwaggerEndpoint}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
  29. <a target="_blank" rel="noopener" href="https://gitea.io">{{.i18n.Tr "website"}}</a>
  30. {{if (or .ShowFooterVersion .PageIsAdmin)}}<span class="version">{{GoVer}}</span>{{end}}
  31. </div>
  32. </div>
  33. </footer>
  34. <script src="{{AppSubUrl}}/vendor/plugins/jquery/jquery.min.js"></script>
  35. <script src="{{AppSubUrl}}/vendor/plugins/jquery.areyousure/jquery.are-you-sure.js"></script>
  36. {{if .RequireSimpleMDE}}
  37. <script src="{{AppSubUrl}}/vendor/plugins/simplemde/simplemde.min.js"></script>
  38. <script src="{{AppSubUrl}}/vendor/plugins/codemirror/addon/mode/loadmode.js"></script>
  39. <script src="{{AppSubUrl}}/vendor/plugins/codemirror/mode/meta.js"></script>
  40. <script>
  41. CodeMirror.modeURL = "{{AppSubUrl}}/vendor/plugins/codemirror/mode/%N/%N.js";
  42. </script>
  43. {{end}}
  44. {{if .RequireGitGraph}}
  45. <!-- graph -->
  46. <script src="{{AppSubUrl}}/vendor/plugins/gitgraph/gitgraph.js"></script>
  47. <script src="{{AppSubUrl}}/js/draw.js"></script>
  48. {{end}}
  49. <!-- Third-party libraries -->
  50. {{if .RequireHighlightJS}}
  51. <script src="{{AppSubUrl}}/vendor/plugins/highlight/highlight.pack.js"></script>
  52. {{end}}
  53. {{if .RequireMinicolors}}
  54. <script src="{{AppSubUrl}}/vendor/plugins/jquery.minicolors/jquery.minicolors.min.js"></script>
  55. {{end}}
  56. {{if .RequireDatetimepicker}}
  57. <script src="{{AppSubUrl}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.js"></script>
  58. {{end}}
  59. {{if .RequireDropzone}}
  60. <script src="{{AppSubUrl}}/vendor/plugins/dropzone/dropzone.js"></script>
  61. {{end}}
  62. {{if .RequireTribute}}
  63. <script src="{{AppSubUrl}}/vendor/plugins/tribute/tribute.min.js"></script>
  64. {{if .Assignees}}
  65. <script>
  66. var issuesTribute = new Tribute({
  67. values: [
  68. {{ range .Assignees }}
  69. {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
  70. name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'},
  71. {{ end }}
  72. ],
  73. noMatchTemplate: function () { return null },
  74. menuItemTemplate: function (item) {
  75. var user = item.original;
  76. var itemStr = '<img src="' + user.avatar + '"/><span class="name">' + user.name + '</span>';
  77. if (user.fullname && user.fullname != '') {
  78. itemStr += '<span class="fullname">' + user.fullname + '</span>';
  79. }
  80. return itemStr;
  81. }
  82. })
  83. issuesTribute.attach(document.getElementById('content'))
  84. </script>
  85. {{end}}
  86. <script>
  87. var emojiTribute = new Tribute({
  88. collection: [{
  89. trigger: ':',
  90. requireLeadingSpace: true,
  91. values: function (text, cb) {
  92. var array = emojify.emojiNames;
  93. var data = [];
  94. for(var j=0; j<array.length; j++) {
  95. if(array[j].indexOf(text) !== -1) {
  96. data.push(array[j]);
  97. if(data.length > 5) {
  98. break;
  99. }
  100. }
  101. }
  102. cb(data);
  103. },
  104. lookup: function (item) {
  105. return item;
  106. },
  107. selectTemplate: function (item) {
  108. if (typeof item === 'undefinied') return null;
  109. return ':' + item.original + ':';
  110. },
  111. menuItemTemplate: function (item) {
  112. return '<img class="emoji" src="{{AppSubUrl}}/vendor/plugins/emojify/images/' + item.original + '.png"/>' + item.original;
  113. }
  114. }]
  115. });
  116. emojiTribute.attach(document.getElementById('content'))
  117. </script>
  118. {{end}}
  119. <script src="{{AppSubUrl}}/vendor/plugins/emojify/emojify.min.js"></script>
  120. <script src="{{AppSubUrl}}/vendor/plugins/clipboard/clipboard.min.js"></script>
  121. <script src="{{AppSubUrl}}/vendor/plugins/vue/vue.min.js"></script>
  122. <!-- JavaScript -->
  123. <script src="{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.js"></script>
  124. <script src="{{AppSubUrl}}/js/index.js?v={{MD5 AppVer}}"></script>
  125. {{template "custom/footer" .}}
  126. </body>
  127. </html>