diff options
author | Unknwon <u@gogs.io> | 2015-08-27 23:58:50 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-27 23:58:50 +0800 |
commit | 70e0153b939a2446bf1d8e459a1b965660463585 (patch) | |
tree | 4cb8012a4cdb85f773a00328f4ccea1321875691 /templates | |
parent | e44852ff79598c1a39898a00e1489c017cc2619a (diff) | |
download | gitea-70e0153b939a2446bf1d8e459a1b965660463585.tar.gz gitea-70e0153b939a2446bf1d8e459a1b965660463585.zip |
add highlight js
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/head.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/settings/hook_history.tmpl | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 7d31c51337..5497b5f86d 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -31,6 +31,10 @@ <script src="{{AppSubUrl}}/js/gogs.js?v={{AppVer}}"></script> <!-- Third-party libraries --> + {{if .RequireHighlightJS}} + <link rel="stylesheet" href="{{AppSubUrl}}/css/highlightjs/default.css?v={{AppVer}}"> + <script src="{{AppSubUrl}}/js/libs/highlight.pack.js?v={{AppVer}}"></script> + {{end}} {{if .RequireMinicolors}} <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors.css?v={{AppVer}}"> <script src="{{AppSubUrl}}/js/libs/jquery.minicolors.min.js?v={{AppVer}}"></script> diff --git a/templates/repo/settings/hook_history.tmpl b/templates/repo/settings/hook_history.tmpl index 850a38a607..4c5207ebf6 100644 --- a/templates/repo/settings/hook_history.tmpl +++ b/templates/repo/settings/hook_history.tmpl @@ -43,7 +43,7 @@ {{ range $key, $val := .RequestInfo.Headers }}<strong>{{$key}}:</strong> {{$val}} {{end}}</pre> <h5>{{$.i18n.Tr "repo.settings.webhook.payload"}}</h5> - <pre class="raw">{{.PayloadContent}}</pre> + <pre class="raw"><code class="json">{{.PayloadContent}}</code></pre> {{else}} N/A {{end}} @@ -54,7 +54,7 @@ <pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}} {{end}}</pre> <h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5> - <pre class="raw">{{.ResponseInfo.Body}}</pre> + <pre class="raw"><code>{{.ResponseInfo.Body}}</code></pre> {{else}} N/A {{end}} |