Browse Source

css: not include line numbers in diff selection (#4584)

Changed template file in order to make CSS work properly.
pull/4633/head
Unknwon 8 years ago
parent
commit
c970c4ee41
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      gogs.go
  2. 3
      public/css/gogs.css
  3. 4
      public/less/_repository.less
  4. 2
      templates/.VERSION
  5. 12
      templates/repo/diff/section_unified.tmpl

2
gogs.go

@ -16,7 +16,7 @@ import (
"github.com/gogits/gogs/pkg/setting"
)
const APP_VER = "0.11.24.0627"
const APP_VER = "0.11.25.0714"
func init() {
setting.AppVer = APP_VER

3
public/css/gogs.css

@ -2140,6 +2140,9 @@ footer .ui.language .menu {
padding: 0 5px;
user-select: none;
}
.repository .diff-file-box .code-diff .lines-num::before {
content: attr(data-line-number);
}
.repository .diff-file-box .code-diff .lines-num.lines-num-old,
.repository .diff-file-box .code-diff .lines-num.lines-num-new {
cursor: pointer;

4
public/less/_repository.less

@ -1057,6 +1057,10 @@
padding: 0 5px;
user-select: none;
&::before {
content: attr(data-line-number);
}
&.lines-num-old, &.lines-num-new {
cursor: pointer;
&:hover {

2
templates/.VERSION

@ -1 +1 @@
0.11.24.0627
0.11.25.0714

12
templates/repo/diff/section_unified.tmpl

@ -8,16 +8,8 @@
{{/* {{if gt $j 0}}<span class="fold octicon octicon-fold"></span>{{end}} */}}
</td>
{{else}}
<td class="lines-num lines-num-old" {{if $line.LeftIdx}}id="diff-{{$file.Index}}L{{$line.LeftIdx}}"{{end}}>
{{if $line.LeftIdx}}
<span>{{$line.LeftIdx}}</span>
{{end}}
</td>
<td class="lines-num lines-num-new" {{if $line.RightIdx}}id="diff-{{$file.Index}}R{{$line.RightIdx}}"{{end}}>
{{if $line.RightIdx}}
<span>{{$line.RightIdx}}</span>
{{end}}
</td>
<td class="lines-num lines-num-old" {{if $line.LeftIdx}} id="diff-{{$file.Index}}L{{$line.LeftIdx}}" data-line-number="{{$line.LeftIdx}}"{{end}}></td>
<td class="lines-num lines-num-new" {{if $line.RightIdx}} id="diff-{{$file.Index}}R{{$line.RightIdx}}" data-line-number="{{$line.RightIdx}}"{{end}}></td>
{{end}}
<td class="lines-code">
<pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.ComputedInlineDiffFor $line}}</code></pre>

Loading…
Cancel
Save