diff --git a/modules/templates/util_render.go b/modules/templates/util_render.go index d23103ce1..ed6eae326 100644 --- a/modules/templates/util_render.go +++ b/modules/templates/util_render.go @@ -108,10 +108,9 @@ func RenderCommitBody(ctx context.Context, msg, urlPrefix string, metas map[stri // Match text that is between back ticks. var codeMatcher = regexp.MustCompile("`([^`]+)`") -// RenderCodeBlock renders "`…`" as highlighted "" block. -// Intended for issue and PR titles, these containers should have styles for "" elements +// RenderCodeBlock renders "`…`" as highlighted "" block, intended for issue and PR titles func RenderCodeBlock(htmlEscapedTextToRender template.HTML) template.HTML { - htmlWithCodeTags := codeMatcher.ReplaceAllString(string(htmlEscapedTextToRender), "$1") // replace with HTML tags + htmlWithCodeTags := codeMatcher.ReplaceAllString(string(htmlEscapedTextToRender), `$1`) // replace with HTML tags return template.HTML(htmlWithCodeTags) } diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 202c8b8ff..11dc47f55 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -6,9 +6,9 @@ {{template "repo/code/recently_pushed_new_branches" .}} {{if and (not .HideRepoInfo) (not .IsBlame)}}
-
+
{{$description := .Repository.DescriptionHTML $.Context}} - {{if $description}}{{$description}}{{else if .IsRepositoryAdmin}}{{.locale.Tr "repo.no_desc"}}{{end}} + {{if $description}}{{$description | RenderCodeBlock}}{{else if .IsRepositoryAdmin}}{{.locale.Tr "repo.no_desc"}}{{end}} {{.Repository.Website}}
{{if .RepoSearchEnabled}} diff --git a/web_src/css/base.css b/web_src/css/base.css index c865e5973..7c65b6aaf 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -454,7 +454,7 @@ a.label, background: var(--color-hover); } -.issue-title code { +.inline-code-block { padding: 2px 4px; border-radius: var(--border-radius-medium); background-color: var(--color-markup-code-block); diff --git a/web_src/css/repo.css b/web_src/css/repo.css index bf6f0a7b5..94745ff4f 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -236,10 +236,6 @@ } } -.repository.file.list #repo-desc { - font-size: 1.2em; -} - .repository.file.list .repo-path { word-break: break-word; }