Browse Source

Changes to be committed:

modified:   public/css/gogs.css
	modified:   public/js/gogs.js
	modified:   templates/repo/view_file.tmpl
pull/4590/head
28111600 8 years ago
parent
commit
773f393afd
  1. 12
      public/css/gogs.css
  2. 8
      public/js/gogs.js
  3. 2
      templates/repo/view_file.tmpl

12
public/css/gogs.css

@ -1485,7 +1485,6 @@ footer .ui.language .menu {
}
.repository.file.list #file-content .code-view .blob-num {
width: 1%;
min-width: 50px;
line-height: 20px;
cursor: pointer;
text-align: right;
@ -1505,15 +1504,14 @@ footer .ui.language .menu {
}
.repository.file.list #file-content .code-view .blob-code pre,
.repository.file.list #file-content .code-view .blob-code .hljs {
background-color: white;
margin: 0;
padding: 0 !important;
}
.repository.file.list #file-content .code-view .blob-code pre li.active,
.repository.file.list #file-content .code-view .blob-code ol li.active,
.repository.file.list #file-content .code-view .blob-code .hljs li.active {
background: #ffffdd;
.repository.file.list #file-content .code-view .blob-code {
background-color: white;
}
.repository.file.list #file-content .code-view .blob-code.active {
background: #ffffdd !important;;
}
.repository.file.list .sidebar {

8
public/js/gogs.js

@ -1048,11 +1048,11 @@ function searchRepositories() {
function initCodeView() {
if ($('.code-view .linenums').length > 0) {
$(document).on('click', '.lines-num span', function (e) {
$(document).on('click', '.blob-num', function (e) {
var $select = $(this);
var $list = $select.parent().siblings('.lines-code').find('ol.linenums > li');
selectRange($list, $list.filter('[rel=' + $select.attr('id') + ']'), (e.shiftKey ? $list.filter('.active').eq(0) : null));
deSelect();
var $code = $select.parent().find('.blob-code');
$select.parent().parent().find(".blob-code").removeClass("active");
$code.addClass("active");
});
$(window).on('hashchange', function (e) {

2
templates/repo/view_file.tmpl

@ -35,7 +35,7 @@
</div>
{{end}}
</h4>
<div class="ui attached table segment">
<div class="ui attached table unstackable segment">
<div id="{{if .IsIPythonNotebook}}ipython-notebook{{end}}" class="file-view {{if .IsMarkdown}}markdown{{else if .IsIPythonNotebook}}ipython-notebook{{else if .ReadmeInList}}plain-text{{else if and .IsTextFile}}code-view{{end}} has-emoji">
{{if .IsMarkdown}}
{{if .FileContent}}{{.FileContent | Str2html}}{{end}}

Loading…
Cancel
Save