aboutsummaryrefslogtreecommitdiffstats
path: root/templates/base
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-01-05 20:17:25 +0800
committerGitHub <noreply@github.com>2022-01-05 13:17:25 +0100
commita38ba634a4da15fbb2d1b6ac6742cf01c1503ea4 (patch)
tree9bf892ae0e481e2d3b36b1eaf9a5273152c3c628 /templates/base
parent0572c78938d3d8287f81f53effc7ffaacd75d3e7 (diff)
downloadgitea-a38ba634a4da15fbb2d1b6ac6742cf01c1503ea4.tar.gz
gitea-a38ba634a4da15fbb2d1b6ac6742cf01c1503ea4.zip
Load EasyMDE/CodeMirror dynamically, remove RequireEasyMDE (#18069)
This PR makes frontend load EasyMDE/CodeMirror dynamically, and removes `RequireEasyMDE`.
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/footer.tmpl8
-rw-r--r--templates/base/head.tmpl3
2 files changed, 0 insertions, 11 deletions
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl
index 2b641cc9de..122b3b46b4 100644
--- a/templates/base/footer.tmpl
+++ b/templates/base/footer.tmpl
@@ -12,14 +12,6 @@
{{template "custom/body_outer_post" .}}
{{template "base/footer_content" .}}
-{{if .RequireEasyMDE}}
- <script src="{{AssetUrlPrefix}}/js/easymde.js?v={{MD5 AppVer}}"></script>
- <script src="{{AssetUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js"></script>
- <script src="{{AssetUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js"></script>
- <script>
- CodeMirror.modeURL = '{{AssetUrlPrefix}}/vendor/plugins/codemirror/mode/%N/%N.js';
- </script>
-{{end}}
<!-- Third-party libraries -->
{{if .RequireU2F}}
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index 8bc6ae689d..499c113abf 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -59,9 +59,6 @@
</script>
<link rel="icon" href="{{AssetUrlPrefix}}/img/logo.svg" type="image/svg+xml">
<link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
-{{if .RequireEasyMDE}}
- <link rel="stylesheet" href="{{AssetUrlPrefix}}/css/easymde.css?v={{MD5 AppVer}}">
-{{end}}
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/index.css?v={{MD5 AppVer}}">
<noscript>
<style>