mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Fix repo css and rel path img in md
This commit is contained in:
		@@ -14,7 +14,7 @@ watch_dirs = [
 | 
				
			|||||||
watch_exts = [".go", ".ini"]
 | 
					watch_exts = [".go", ".ini"]
 | 
				
			||||||
build_delay = 1500
 | 
					build_delay = 1500
 | 
				
			||||||
cmds = [
 | 
					cmds = [
 | 
				
			||||||
	["go", "install", "-tags", "sqlite cert"],
 | 
						["go", "install", "-tags", "sqlite redis cert"],
 | 
				
			||||||
	["go", "build", "-tags", "sqlite cert"],
 | 
						["go", "build", "-tags", "sqlite redis cert"],
 | 
				
			||||||
	["./gogs", "web"]
 | 
						["./gogs", "web"]
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
@@ -16,7 +16,7 @@ github.com/go-xorm/xorm = commit:2d8b3135b1
 | 
				
			|||||||
github.com/gogits/gfm = commit:40f747a9c0
 | 
					github.com/gogits/gfm = commit:40f747a9c0
 | 
				
			||||||
github.com/gogits/oauth2 = commit:99cbec870a
 | 
					github.com/gogits/oauth2 = commit:99cbec870a
 | 
				
			||||||
github.com/lib/pq = commit:b021d0ef20
 | 
					github.com/lib/pq = commit:b021d0ef20
 | 
				
			||||||
github.com/macaron-contrib/cache = commit:204d8e5137
 | 
					github.com/macaron-contrib/cache = 
 | 
				
			||||||
github.com/macaron-contrib/captcha = commit:d37d37eeea
 | 
					github.com/macaron-contrib/captcha = commit:d37d37eeea
 | 
				
			||||||
github.com/macaron-contrib/csrf = 
 | 
					github.com/macaron-contrib/csrf = 
 | 
				
			||||||
github.com/macaron-contrib/i18n = commit:2246f45894
 | 
					github.com/macaron-contrib/i18n = commit:2246f45894
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							@@ -17,7 +17,7 @@ import (
 | 
				
			|||||||
	"github.com/gogits/gogs/modules/setting"
 | 
						"github.com/gogits/gogs/modules/setting"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const APP_VER = "0.5.5.1013 Beta"
 | 
					const APP_VER = "0.5.5.1014 Beta"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func init() {
 | 
					func init() {
 | 
				
			||||||
	runtime.GOMAXPROCS(runtime.NumCPU())
 | 
						runtime.GOMAXPROCS(runtime.NumCPU())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -91,6 +91,14 @@ func (options *CustomRender) Link(out *bytes.Buffer, link []byte, title []byte,
 | 
				
			|||||||
	options.Renderer.Link(out, link, title, content)
 | 
						options.Renderer.Link(out, link, title, content)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (options *CustomRender) Image(out *bytes.Buffer, link []byte, title []byte, alt []byte) {
 | 
				
			||||||
 | 
						if len(link) > 0 && !isLink(link) {
 | 
				
			||||||
 | 
							link = []byte(path.Join(strings.Replace(options.urlPrefix, "/src/", "/raw/", 1), string(link)))
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						options.Renderer.Image(out, link, title, alt)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
	MentionPattern    = regexp.MustCompile(`@[0-9a-zA-Z_]{1,}`)
 | 
						MentionPattern    = regexp.MustCompile(`@[0-9a-zA-Z_]{1,}`)
 | 
				
			||||||
	commitPattern     = regexp.MustCompile(`(\s|^)https?.*commit/[0-9a-zA-Z]+(#+[0-9a-zA-Z-]*)?`)
 | 
						commitPattern     = regexp.MustCompile(`(\s|^)https?.*commit/[0-9a-zA-Z]+(#+[0-9a-zA-Z-]*)?`)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -980,7 +980,6 @@ The register and sign-in page style
 | 
				
			|||||||
  background-color: #FFF;
 | 
					  background-color: #FFF;
 | 
				
			||||||
  margin-left: -15px;
 | 
					  margin-left: -15px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
/* repository main */
 | 
					 | 
				
			||||||
#repo-wrapper {
 | 
					#repo-wrapper {
 | 
				
			||||||
  padding-bottom: 100px;
 | 
					  padding-bottom: 100px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -1554,20 +1553,15 @@ The register and sign-in page style
 | 
				
			|||||||
.diff-box .panel-header {
 | 
					.diff-box .panel-header {
 | 
				
			||||||
  font-size: 14px;
 | 
					  font-size: 14px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.diff-file-box .code-diff tbody tr:hover td,
 | 
					.diff-file-box .file-body.file-code .lines-num {
 | 
				
			||||||
.diff-file-box .code-diff tbody tr:hover pre {
 | 
					 | 
				
			||||||
  background-color: #FFF8D2 !important;
 | 
					 | 
				
			||||||
  border-color: #F0DB88 !important;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.diff-file-box .file-body.file-code .lines-num-old {
 | 
					 | 
				
			||||||
  border-right: 1px solid #DDD;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.file-content .file-body.file-code .lines-num {
 | 
					 | 
				
			||||||
  text-align: right;
 | 
					  text-align: right;
 | 
				
			||||||
  color: #999;
 | 
					  color: #999;
 | 
				
			||||||
  background: #fafafa;
 | 
					  background: #fafafa;
 | 
				
			||||||
  width: 1%;
 | 
					  width: 1%;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					.diff-file-box .file-body.file-code .lines-num-old {
 | 
				
			||||||
 | 
					  border-right: 1px solid #DDD;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
.diff-file-box .code-diff tbody tr.tag-code td,
 | 
					.diff-file-box .code-diff tbody tr.tag-code td,
 | 
				
			||||||
.diff-file-box .code-diff tbody tr.tag-code pre {
 | 
					.diff-file-box .code-diff tbody tr.tag-code pre {
 | 
				
			||||||
  background-color: #E0E0E0 !important;
 | 
					  background-color: #E0E0E0 !important;
 | 
				
			||||||
@@ -1583,6 +1577,11 @@ The register and sign-in page style
 | 
				
			|||||||
  background-color: #d1ffd6 !important;
 | 
					  background-color: #d1ffd6 !important;
 | 
				
			||||||
  border-color: #b4e2b4 !important;
 | 
					  border-color: #b4e2b4 !important;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					.diff-file-box .code-diff tbody tr:hover td,
 | 
				
			||||||
 | 
					.diff-file-box .code-diff tbody tr:hover pre {
 | 
				
			||||||
 | 
					  background-color: #FFF8D2 !important;
 | 
				
			||||||
 | 
					  border-color: #F0DB88 !important;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
.compare-head-box {
 | 
					.compare-head-box {
 | 
				
			||||||
  margin-top: 10px;
 | 
					  margin-top: 10px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,8 +3,6 @@
 | 
				
			|||||||
@repoHeaderBgColor: #FFF;
 | 
					@repoHeaderBgColor: #FFF;
 | 
				
			||||||
@repoHeaderNameColor: #888;
 | 
					@repoHeaderNameColor: #888;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* repository main */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#repo-wrapper {
 | 
					#repo-wrapper {
 | 
				
			||||||
    padding-bottom: 100px;
 | 
					    padding-bottom: 100px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -83,8 +81,7 @@
 | 
				
			|||||||
    .btn>i {
 | 
					    .btn>i {
 | 
				
			||||||
        margin-right: 6px;
 | 
					        margin-right: 6px;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  button,
 | 
					    button, input {
 | 
				
			||||||
  input {
 | 
					 | 
				
			||||||
        font-size: 11px;
 | 
					        font-size: 11px;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -189,7 +186,6 @@
 | 
				
			|||||||
            right: 30px;
 | 
					            right: 30px;
 | 
				
			||||||
            margin-left: 0;
 | 
					            margin-left: 0;
 | 
				
			||||||
            color: @baseFontColor;
 | 
					            color: @baseFontColor;
 | 
				
			||||||
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    >.drop-down {
 | 
					    >.drop-down {
 | 
				
			||||||
@@ -348,6 +344,7 @@
 | 
				
			|||||||
        width: 520px;
 | 
					        width: 520px;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* repository create */
 | 
					/* repository create */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#team-create-form,
 | 
					#team-create-form,
 | 
				
			||||||
@@ -595,32 +592,49 @@
 | 
				
			|||||||
        font-size: 14px;
 | 
					        font-size: 14px;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.diff-file-box .code-diff tbody tr:hover td, .diff-file-box .code-diff tbody tr:hover pre {
 | 
					.diff-file-box {
 | 
				
			||||||
    background-color: #FFF8D2 !important;
 | 
					    .file-body.file-code {
 | 
				
			||||||
    border-color: #F0DB88 !important;
 | 
					        .lines-num {
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.diff-file-box .file-body.file-code .lines-num-old {
 | 
					 | 
				
			||||||
border-right: 1px solid #DDD;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.file-content .file-body.file-code .lines-num {
 | 
					 | 
				
			||||||
            text-align: right;
 | 
					            text-align: right;
 | 
				
			||||||
            color: #999;
 | 
					            color: #999;
 | 
				
			||||||
            background: #fafafa;
 | 
					            background: #fafafa;
 | 
				
			||||||
            width: 1%;
 | 
					            width: 1%;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
.diff-file-box .code-diff tbody tr.tag-code td, .diff-file-box .code-diff tbody tr.tag-code pre {
 | 
					        .lines-num-old {
 | 
				
			||||||
 | 
					            border-right: 1px solid #DDD;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    .code-diff {
 | 
				
			||||||
 | 
					        tbody {
 | 
				
			||||||
 | 
					            tr {
 | 
				
			||||||
 | 
					                &.tag-code {
 | 
				
			||||||
 | 
					                    td, pre {
 | 
				
			||||||
                        background-color: #E0E0E0 !important;
 | 
					                        background-color: #E0E0E0 !important;
 | 
				
			||||||
                        border-color: #ADADAD !important;
 | 
					                        border-color: #ADADAD !important;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
.diff-file-box .code-diff tbody tr.del-code td, .diff-file-box .code-diff tbody tr.del-code pre {
 | 
					                }
 | 
				
			||||||
 | 
					                &.del-code {
 | 
				
			||||||
 | 
					                    td, pre {
 | 
				
			||||||
                        background-color: #ffe2dd !important;
 | 
					                        background-color: #ffe2dd !important;
 | 
				
			||||||
                        border-color: #e9aeae !important;
 | 
					                        border-color: #e9aeae !important;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
.diff-file-box .code-diff tbody tr.add-code td, .diff-file-box .code-diff tbody tr.add-code pre {
 | 
					                }
 | 
				
			||||||
 | 
					                &.add-code {
 | 
				
			||||||
 | 
					                    td, pre { 
 | 
				
			||||||
                        background-color: #d1ffd6 !important;
 | 
					                        background-color: #d1ffd6 !important;
 | 
				
			||||||
                        border-color: #b4e2b4 !important;
 | 
					                        border-color: #b4e2b4 !important;
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                &:hover {
 | 
				
			||||||
 | 
					                    td, pre {
 | 
				
			||||||
 | 
					                        background-color: #FFF8D2 !important;
 | 
				
			||||||
 | 
					                        border-color: #F0DB88 !important;   
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
.compare-head-box {
 | 
					.compare-head-box {
 | 
				
			||||||
    margin-top: 10px;
 | 
					    margin-top: 10px;
 | 
				
			||||||
    .compare {
 | 
					    .compare {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +1 @@
 | 
				
			|||||||
0.5.5.1013 Beta
 | 
					0.5.5.1014 Beta
 | 
				
			||||||
@@ -50,7 +50,7 @@
 | 
				
			|||||||
                <i class="fa fa-retweet"></i>
 | 
					                <i class="fa fa-retweet"></i>
 | 
				
			||||||
                {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
 | 
					                {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
 | 
				
			||||||
            </p>
 | 
					            </p>
 | 
				
			||||||
            <ol class="detail-files collapse" id="diff-files">
 | 
					            <ol class="detail-files collapse hide" id="diff-files">
 | 
				
			||||||
                {{range .Diff.Files}}
 | 
					                {{range .Diff.Files}}
 | 
				
			||||||
                <li>
 | 
					                <li>
 | 
				
			||||||
                    <div class="diff-counter count pull-right">
 | 
					                    <div class="diff-counter count pull-right">
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user