summaryrefslogtreecommitdiffstats
path: root/templates/base/footer.tmpl
diff options
context:
space:
mode:
authorMichael Lustfield <MTecknology@users.noreply.github.com>2017-08-23 09:58:05 -0500
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-08-23 16:58:05 +0200
commita915a09e4f8edc7734c9374ad9f9a51b39241ee3 (patch)
treed2498d2cfb579cd5c1d73d750163905cfbc5fab5 /templates/base/footer.tmpl
parent64b706884635bcac31710d878bbb5e1b2d96ac0c (diff)
downloadgitea-a915a09e4f8edc7734c9374ad9f9a51b39241ee3.tar.gz
gitea-a915a09e4f8edc7734c9374ad9f9a51b39241ee3.zip
Moved vendored js/css into `public/vendor` and documented sources (#1484) (#2241)
* Cleaning up public/ and documenting js/css libs. This commit mostly addresses #1484 by moving vendor'ed plugins into a vendor/ directory and documenting their upstream source and license in vendor/librejs.html. This also proves gitea is using only open source js/css libraries which helps toward reaching #1524. * Removing unused css file. The version of this file in use is located at: vendor/plugins/highlight/github.css * Cleaned up librejs.html and added javascript header A SafeJS function was added to templates/helper.go to allow keeping comments inside of javascript. A javascript comment was added in the header of templates/base/head.tmpl to mark all non-inline source as free. The librejs.html file was updated to meet the current librejs spec. I have now verified that the librejs plugin detects most of the scripts included in gitea and suspect the non-free detections are the result of a bug in the plugin. I believe this commit is enough to meet the C0.0 requirement of #1534. * Updating SafeJS function per lint suggestion * Added VERSIONS file, per request
Diffstat (limited to 'templates/base/footer.tmpl')
-rw-r--r--templates/base/footer.tmpl38
1 files changed, 19 insertions, 19 deletions
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl
index a0c14db218..be1c28b761 100644
--- a/templates/base/footer.tmpl
+++ b/templates/base/footer.tmpl
@@ -22,49 +22,49 @@
{{end}}
</div>
</div>
- <a href="{{AppSubUrl}}/assets/librejs/librejs.html" data-jslicense="1">Javascript licenses</a>
+ <a href="{{AppSubUrl}}/vendor/librejs.html" data-jslicense="1">Javascript licenses</a>
<a href="{{AppSubUrl}}/swagger">API</a>
<a target="_blank" rel="noopener" href="https://gitea.io">{{.i18n.Tr "website"}}</a>
{{if (or .ShowFooterVersion .PageIsAdmin)}}<span class="version">{{GoVer}}</span>{{end}}
</div>
</div>
</footer>
- <script src="{{AppSubUrl}}/js/jquery-1.11.3.min.js"></script>
- <script src="{{AppSubUrl}}/js/libs/jquery.are-you-sure.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/jquery/jquery.min.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/jquery.areyousure/jquery.are-you-sure.js"></script>
{{if .RequireSimpleMDE}}
- <script src="{{AppSubUrl}}/plugins/simplemde-1.10.1/simplemde.min.js"></script>
- <script src="{{AppSubUrl}}/plugins/codemirror-5.17.0/addon/mode/loadmode.js"></script>
- <script src="{{AppSubUrl}}/plugins/codemirror-5.17.0/mode/meta.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/simplemde/simplemde.min.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/codemirror/addon/mode/loadmode.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/codemirror/mode/meta.js"></script>
<script>
- CodeMirror.modeURL = "{{AppSubUrl}}/plugins/codemirror-5.17.0/mode/%N/%N.js";
+ CodeMirror.modeURL = "{{AppSubUrl}}/vendor/plugins/codemirror/mode/%N/%N.js";
</script>
{{end}}
{{if .RequireGitGraph}}
<!-- graph -->
- <script src="{{AppSubUrl}}/js/libs/gitgraph.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/gitgraph/gitgraph.js"></script>
<script src="{{AppSubUrl}}/js/draw.js"></script>
{{end}}
<!-- Third-party libraries -->
{{if .RequireHighlightJS}}
- <script src="{{AppSubUrl}}/plugins/highlight-9.11.0/highlight.pack.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/highlight/highlight.pack.js"></script>
{{end}}
{{if .RequireMinicolors}}
- <script src="{{AppSubUrl}}/plugins/jquery.minicolors-2.2.3/jquery.minicolors.min.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/jquery.minicolors/jquery.minicolors.min.js"></script>
{{end}}
{{if .RequireDatetimepicker}}
- <script src="{{AppSubUrl}}/plugins/jquery.datetimepicker-2.4.5/jquery.datetimepicker.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.js"></script>
{{end}}
{{if .RequireDropzone}}
- <script src="{{AppSubUrl}}/plugins/dropzone-4.2.0/dropzone.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/dropzone/dropzone.js"></script>
{{end}}
- <script src="{{AppSubUrl}}/js/libs/autolink.js"></script>
- <script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script>
- <script src="{{AppSubUrl}}/js/libs/clipboard-1.5.9.min.js"></script>
- <script src="{{AppSubUrl}}/js/libs/vue.min.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/autolink/autolink.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/emojify/emojify.min.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/clipboard/clipboard.min.js"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/vue/vue.min.js"></script>
<!-- JavaScript -->
- <script src="{{AppSubUrl}}/js/semantic-2.2.1.min.js"></script>
- <script src="{{AppSubUrl}}/js/index.js?v={{MD5 AppVer}}"></script>
+ <script src="{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.js"></script>
+ <script src="{{AppSubUrl}}/js/index.js?v={{MD5 AppVer}}"></script>
</body>
-</html>
+</html> \ No newline at end of file