diff --git a/src/_h5ai/client/css/inc/preview-txt.less b/src/_h5ai/client/css/inc/preview-txt.less index baf4f950..3b7372cd 100644 --- a/src/_h5ai/client/css/inc/preview-txt.less +++ b/src/_h5ai/client/css/inc/preview-txt.less @@ -29,7 +29,6 @@ word-break: break-all; .syntaxhighlighter { - overflow: visible !important; tr:hover { background-color: rgba(0,0,0,0.05); @@ -67,10 +66,10 @@ .plain { color: #000; } - .comments, .comments a { + .comments { color: #008200; } - .string, .string a { + .string { color: #1111ff; } .keyword { @@ -96,15 +95,25 @@ color: #006699; font-weight: bold; } - .color1, .color1 a { + .color1 { color: #999; } - .color2, .color2 a { + .color2 { color: #ff1493; } - .color3, .color3 a { + .color3 { color: #ff1111; } + + a, a:active, a:visited { + color: #2080FF; + text-decoration: none; + cursor: pointer; + + &:hover { + color: #68A9FF; + } + } } diff --git a/src/_h5ai/client/js/inc/ext/preview-txt.js b/src/_h5ai/client/js/inc/ext/preview-txt.js index 9744364c..65fbe370 100644 --- a/src/_h5ai/client/js/inc/ext/preview-txt.js +++ b/src/_h5ai/client/js/inc/ext/preview-txt.js @@ -155,7 +155,7 @@ modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource', var $text = $('#pv-txt-text'), $lineNos = $text.find('td.gutter .line').addClass('cntlinenr'), $codeLines = $text.find('td.code .line').addClass('cntline'), - $table = $(''), + $table = $('
').addClass('syntaxhighlighter'), i, $tr; for (i = 0; i < $lineNos.length; i += 1) { @@ -165,7 +165,7 @@ modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource', $table.append($tr); } - $text.find('table').replaceWith($table); + $text.find('.syntaxhighlighter').replaceWith($table); } }); }