diff --git a/routers/repo/blame.go b/routers/repo/blame.go
index 69becc50d4..812c55ea4d 100644
--- a/routers/repo/blame.go
+++ b/routers/repo/blame.go
@@ -237,6 +237,7 @@ func renderBlame(ctx *context.Context, blameParts []git.BlamePart, commitNames m
}
fileName := fmt.Sprintf("%v", ctx.Data["FileName"])
line = highlight.Code(fileName, line)
+ line = `` + line + `
`
if len(part.Lines)-1 == index && len(blameParts)-1 != pi {
codeLines.WriteString(fmt.Sprintf(`
{{.BlameContent}}
{{.BlameContent}}
{{$.section.GetComputedInlineDiffFor $line}}
{{if $line.LeftIdx}}{{$.section.GetComputedInlineDiffFor $line}}{{end}}
{{if $line.RightIdx}}{{$.section.GetComputedInlineDiffFor $line}}{{end}}
{{$.section.GetComputedInlineDiffFor $line}}
{{$section.GetComputedInlineDiffFor $line}}
{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
{{$section.GetComputedInlineDiffFor $line}}
{{$section.GetComputedInlineDiffFor $line}}
Request URL: {{.URL}} +Request URL: {{.URL}} Request method: {{if .HTTPMethod}}{{.HTTPMethod}}{{else}}POST{{end}} {{ range $key, $val := .RequestInfo.Headers }}{{$key}}: {{$val}} {{end}}{{$.i18n.Tr "repo.settings.webhook.payload"}}
-+{{.PayloadContent}}
{{else}} N/A {{end}} @@ -57,10 +57,10 @@{{.PayloadContent}}
{{if .ResponseInfo}}{{$.i18n.Tr "repo.settings.webhook.headers"}}
-{{ range $key, $val := .ResponseInfo.Headers }}{{$key}}: {{$val}} +{{ range $key, $val := .ResponseInfo.Headers }}{{$key}}: {{$val}} {{end}}{{$.i18n.Tr "repo.settings.webhook.body"}}
-+{{.ResponseInfo.Body}}
{{else}} N/A {{end}} diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index a8d60bd96e..a849fa1f84 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -99,7 +99,7 @@{{.ResponseInfo.Body}}
- {{end}} diff --git a/templates/repo/wiki/revision.tmpl b/templates/repo/wiki/revision.tmpl index da07901bff..5f1fa08a53 100644 --- a/templates/repo/wiki/revision.tmpl +++ b/templates/repo/wiki/revision.tmpl @@ -31,7 +31,7 @@{{$code | Safe}}
+{{$code | Safe}}
{{.revision}} {{svg "octicon-home"}} {{$title}} -+{{$timeSince := TimeSince .Author.When $.Lang}} {{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 9deadd921d..3a3192a828 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -13,11 +13,11 @@ {{end}} -+{{if .Owner.FullName}}{{.Owner.FullName}}{{end}} {{.Owner.Name}}-+{{if .Owner.Location}}
- {{svg "octicon-location"}} {{.Owner.Location}}
diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 9a22e075f5..09e796ac5e 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -177,42 +177,6 @@ a:hover, color: var(--color-primary-dark-2); } -.rounded { - border-radius: var(--border-radius) !important; -} - -.wrap { - word-wrap: break-word; - word-break: break-all; -} - -.mono { - font-family: var(--fonts-monospace); -} - -pre, -code { - font: 12px var(--fonts-monospace); - - &.raw { - padding: 7px 12px; - margin: 10px 0; - background-color: #f8f8f8; - border: 1px solid #dddddd; - border-radius: 3px; - font-size: 13px; - line-height: 1.5; - overflow: auto; - } - - &.wrap { - white-space: pre-wrap; - word-break: break-all; - overflow-wrap: break-word; - word-wrap: break-word; - } -} - .dont-break-out { overflow-wrap: break-word; word-wrap: break-word; @@ -1137,10 +1101,6 @@ i.icon.centerlock { padding-left: 5px; } -.lines-code code { - white-space: pre; -} - .lines-code.active, .lines-code .active { background: #fffbdd !important; @@ -1155,6 +1115,18 @@ i.icon.centerlock { padding: 0 !important; } +.code-inner { + font: 12px var(--fonts-monospace); + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; + word-wrap: break-word; +} + +.blame .code-inner { + white-space: pre; +} + .lines-commit { vertical-align: top; color: #999999; diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 45abae9178..72b500d4ab 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -3239,6 +3239,17 @@ td.blob-excerpt { padding-left: 8px; } +.webhook-info { + padding: 7px 12px; + margin: 10px 0; + background-color: #f8f8f8; + border: 1px solid #dddddd; + border-radius: 3px; + font-size: 13px; + line-height: 1.5; + overflow: auto; +} + .title_wip_desc { margin-top: 1em; } diff --git a/web_src/less/helpers.less b/web_src/less/helpers.less index fff866c66c..b62ce3494b 100644 --- a/web_src/less/helpers.less +++ b/web_src/less/helpers.less @@ -4,6 +4,9 @@ .js { justify-content: flex-start; } .je { justify-content: flex-end; } .sb { justify-content: space-between; } +.mono { font-family: var(--fonts-monospace); } +.rounded { border-radius: var(--border-radius) !important; } +.word-break { word-wrap: break-word; word-break: break-all; } .m-0 { margin: 0 !important; } .m-1 { margin: .125rem !important; }