Skip to content

Commit 86bad44

Browse files
committed
Improve markup code preview rendering
1 parent 8aa1179 commit 86bad44

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

templates/base/markup_codepreview.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="code-preview-container file-content">
22
<div class="code-preview-header">
3-
<a href="{{.FullURL}}" class="muted" rel="nofollow">{{.FilePath}}</a>
4-
{{$link := HTMLFormat `<a href="%s/src/commit/%s" rel="nofollow">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
3+
<a href="{{.FullURL}}" rel="nofollow" class="tw-font-semibold">{{.FilePath}}</a>
4+
{{$link := HTMLFormat `<a href="%s/src/commit/%s" class="muted tw-font-mono tw-text-text">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
55
{{- if eq .LineStart .LineStop -}}
66
{{ctx.Locale.Tr "repo.code_preview_line_in" .LineStart $link}}
77
{{- else -}}

web_src/css/markup/codepreview.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
}
66

77
.markup .code-preview-container .code-preview-header {
8+
color: var(--color-text-light-1);
89
border-bottom: 1px solid var(--color-secondary);
910
padding: 0.5em;
1011
font-size: 12px;

0 commit comments

Comments
 (0)