2021-10-12 23:41:35 +05:30
{{ if false }}
{{ / * to make html structure "likely" complete to prevent IDE warnings * / }}
2015-12-08 04:00:52 +05:30
<html>
<body>
<div>
2021-10-12 23:41:35 +05:30
{{ end }}
2018-01-02 16:02:41 +05:30
{{ template "custom/body_inner_post" . }}
2015-03-08 01:42:13 +05:30
</div>
2018-01-02 16:02:41 +05:30
{{ template "custom/body_outer_post" . }}
2018-09-07 08:29:06 +05:30
{{ template "base/footer_content" . }}
2017-01-25 20:45:25 +05:30
2015-12-08 04:00:52 +05:30
<!-- Third-party libraries -->
2018-07-05 09:43:05 +05:30
{{ if .EnableCaptcha }}
{{ if eq .CaptchaType "recaptcha" }}
2019-05-02 18:39:39 +05:30
<script src=' {{ URLJoin .RecaptchaURL "api.js" }} ' async></script>
2018-07-05 09:43:05 +05:30
{{ end }}
2020-10-03 09:07:53 +05:30
{{ if eq .CaptchaType "hcaptcha" }}
<script src='https://hcaptcha.com/1/api.js' async></script>
{{ end }}
2018-07-05 09:43:05 +05:30
{{ end }}
Show messages for users if the ROOT_URL is wrong, show JavaScript errors (#18971)
* ROOT_URL issues: some users did wrong to there app.ini config, then:
* The assets can not be loaded (AppSubUrl != "" and users try to access http://host:3000/)
*The ROOT_URL is wrong, then many URLs in Gitea are broken.
Now Gitea show enough information to users.
* JavaScript error issues, there are many users affected by JavaScript errors, some are caused by frontend bugs, some are caused by broken customized templates. If these JS errors can be found at first time, then maintainers do not need to ask about how bug occurs again and again.
* Some people like to modify the `head.tmpl`, so we separate the script part to `head_script.tmpl`, then it's much safer.
* use specialized CSS class "js-global-error", end users still have a chance to hide error messages by customized CSS styles.
2022-03-30 11:22:24 +05:30
<script src=" {{ AssetUrlPrefix }} /js/index.js?v= {{ MD5 AppVer }} " onerror="alert('Failed to load asset files from ' + this.src + ', please make sure the asset files can be accessed and the ROOT_URL setting in app.ini is correct.')"></script>
2017-12-03 05:56:06 +05:30
{{ template "custom/footer" . }}
2017-01-25 20:45:25 +05:30
</body>
2017-09-16 14:34:27 +05:30
</html>