summaryrefslogtreecommitdiffstats
path: root/templates/base
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-02-23 22:34:28 +0100
committerGitHub <noreply@github.com>2020-02-23 21:34:28 +0000
commit062f35109df236a06a00d403d006b90760f9cfac (patch)
tree908b1dc1fe14a55a7c72bcf6a49ac586fc677602 /templates/base
parent09dbd85a3a9043de9f8ea06a0a7ee7fd45711344 (diff)
downloadgitea-062f35109df236a06a00d403d006b90760f9cfac.tar.gz
gitea-062f35109df236a06a00d403d006b90760f9cfac.zip
move vue and vue-calendar-heatmap to webpack (#10188)
- unvendor vue and vue-calendar-heatmap - remove unused moment.js leftover from previous heatmap version - ensure webpack loads the full version of vue - fix vue devmode warning related to 'searchLimit' type I wanted to name the chunk heatmap.js but adblockers don't like that filename [1]. [1] https://github.com/easylist/easylist/blob/3899d5dff33216c0bc64f09ff15d376f346d3e33/easyprivacy/easyprivacy_general.txt#L2095
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/footer.tmpl8
-rw-r--r--templates/base/head.tmpl5
2 files changed, 2 insertions, 11 deletions
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl
index 633a340388..fcf2f91b8c 100644
--- a/templates/base/footer.tmpl
+++ b/templates/base/footer.tmpl
@@ -108,16 +108,8 @@
</script>
{{end}}
<script src="{{StaticUrlPrefix}}/vendor/plugins/emojify/emojify.custom.js"></script>
- <script src="{{StaticUrlPrefix}}/vendor/plugins/vue/vue.min.js"></script>
<script src="{{StaticUrlPrefix}}/fomantic/semantic.min.js?v={{MD5 AppVer}}"></script>
<script src="{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}"></script>
-{{if .EnableHeatmap}}
- <script src="{{StaticUrlPrefix}}/vendor/plugins/moment/moment.min.js" charset="utf-8"></script>
- <script src="{{StaticUrlPrefix}}/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.browser.js" charset="utf-8"></script>
- <script type="text/javascript">
- window.initHeatmap('user-heatmap', '{{.HeatmapUser}}');
- </script>
-{{end}}
{{template "custom/footer" .}}
</body>
</html>
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index 9985b7cb59..491776958f 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -93,6 +93,8 @@
SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}},
Tribute: {{if .RequireTribute}}true{{else}}false{{end}},
U2F: {{if .RequireU2F}}true{{else}}false{{end}},
+ Heatmap: {{if .EnableHeatmap}}true{{else}}false{{end}},
+ heatmapUser: {{if .HeatmapUser}}'{{.HeatmapUser}}'{{else}}null{{end}},
};
</script>
<link rel="shortcut icon" href="{{StaticUrlPrefix}}/img/favicon.png">
@@ -125,9 +127,6 @@
{{if .RequireDropzone}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.css">
{{end}}
-{{if .EnableHeatmap}}
- <link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.css">
-{{end}}
<style class="list-search-style"></style>
{{if .PageIsUserProfile}}
<meta property="og:title" content="{{.Owner.Name}}" />