]> source.dussan.org Git - gitea.git/commitdiff
UI: Display last-commit header without 2nd column
authorAdam Strzelecki <ono@java.pl>
Thu, 3 Dec 2015 00:15:40 +0000 (01:15 +0100)
committerAdam Strzelecki <ono@java.pl>
Thu, 3 Dec 2015 00:15:40 +0000 (01:15 +0100)
This uses a CSS trick making first th to be relative block with width equal to
first two columns, effectively working around inability to use colspan="2" on
first row that was breaking "fixed-layout" for tables.

Also use grey header for last-commit SHA1 tag.

public/css/gogs.css
public/less/_repository.less
templates/repo/view_list.tmpl

index eb6188b37fb28e1d88c29a500df233e738c0d013..c3ac5ffce19a1c4318cb88387275c4a5fd8ebef9 100755 (executable)
@@ -1859,6 +1859,11 @@ footer .container .links > *:first-child {
   padding-bottom: 5px;
   font-weight: normal;
 }
+.repository.file.list #repo-files-table thead th:first-child {
+  display: block;
+  position: relative;
+  width: 325%;
+}
 .repository.file.list #repo-files-table thead .ui.avatar {
   margin-bottom: 5px;
 }
index 25a71078e1090b0b8178326311ec9ad9ddbe656f..ee17177fc16dc7f6671dc8c23593e10e108c4845 100644 (file)
                                        padding-top: 8px;
                                        padding-bottom: 5px;
                                        font-weight: normal;
+                                       &:first-child {
+                                               display: block;
+                                               position: relative;
+                                               width: 325%;
+                                       }
                                }
                                .ui.avatar {
                                        margin-bottom: 5px;
index 9b6c0aaa19732fcebd7c24c134ca88faa3fb901f..4acfa2b676e10dc5e69702e57320293043501fd1 100644 (file)
@@ -9,10 +9,10 @@
         <img class="ui avatar image img-12" src="{{AvatarLink .LastCommit.Author.Email}}" />
         <strong>{{.LastCommit.Author.Name}}</strong>
         {{end}}
+        <a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LastCommit.ID}}" rel="nofollow">{{ShortSha .LastCommit.ID.String}}</a>
+        <span class="grey">{{RenderCommitMessage .LastCommit.Summary .RepoLink}}</span>
       </th>
       <th class="nine wide">
-        <a rel="nofollow" class="ui green sha label" href="{{.RepoLink}}/commit/{{.LastCommit.ID}}" rel="nofollow">{{ShortSha .LastCommit.ID.String}}</a>
-        <span class="grey">{{RenderCommitMessage .LastCommit.Summary .RepoLink}}</span>
       </th>
       <th class="three wide text grey right age">{{TimeSince .LastCommit.Author.When $.Lang}}</th>
     </tr>