aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-02-17 17:45:55 +0000
committerGitHub <noreply@github.com>2020-02-17 19:45:55 +0200
commit314740e215fa2d4a0a375095ce0a7c484af56ebb (patch)
tree7b2b03a0e0abf3557420603b901e7cde6e65bbb0 /templates
parentb5f28d154d16e03367da5d83a39a1aca0e26783d (diff)
downloadgitea-314740e215fa2d4a0a375095ce0a7c484af56ebb.tar.gz
gitea-314740e215fa2d4a0a375095ce0a7c484af56ebb.zip
Truncate long commit message header (#10301)
* Truncate long commit message header * Fix overflow in view commit table * Use @media less * Further improvements * Fix the commit message on small screens * adjust width of minimal table
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/commit_page.tmpl2
-rw-r--r--templates/repo/view_list.tmpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl
index e8477ed985..0c3430c6ac 100644
--- a/templates/repo/commit_page.tmpl
+++ b/templates/repo/commit_page.tmpl
@@ -6,7 +6,7 @@
<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
{{.i18n.Tr "repo.diff.browse_source"}}
</a>
- <h3 class="has-emoji">{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}</h3>
+ <h3 class="has-emoji"><span class="message-wrapper"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</span></span>{{template "repo/commit_status" .CommitStatus}}</h3>
{{if IsMultilineCommitMessage .Commit.Message}}
<pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
{{end}}
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index 3d4fc14cbb..e8163787f5 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -29,7 +29,7 @@
</a>
{{template "repo/commit_status" .LatestCommitStatus}}
{{ $commitLink:= printf "%s/commit/%s" .RepoLink .LatestCommit.ID }}
- <span class="grey has-emoji commit-summary" title="{{.LatestCommit.Summary}}">{{RenderCommitMessageLinkSubject .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}
+ <span class="grey has-emoji commit-summary" title="{{.LatestCommit.Summary}}"><span class="message-wrapper">{{RenderCommitMessageLinkSubject .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
{{if IsMultilineCommitMessage .LatestCommit.Message}}
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
<pre class="commit-body" style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>