mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 22:45:14 -04:00
More update on text preview.
This commit is contained in:
parent
74b0ec827b
commit
b92298d007
2 changed files with 17 additions and 8 deletions
|
@ -29,7 +29,6 @@
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|
||||||
.syntaxhighlighter {
|
.syntaxhighlighter {
|
||||||
overflow: visible !important;
|
|
||||||
|
|
||||||
tr:hover {
|
tr:hover {
|
||||||
background-color: rgba(0,0,0,0.05);
|
background-color: rgba(0,0,0,0.05);
|
||||||
|
@ -67,10 +66,10 @@
|
||||||
.plain {
|
.plain {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
.comments, .comments a {
|
.comments {
|
||||||
color: #008200;
|
color: #008200;
|
||||||
}
|
}
|
||||||
.string, .string a {
|
.string {
|
||||||
color: #1111ff;
|
color: #1111ff;
|
||||||
}
|
}
|
||||||
.keyword {
|
.keyword {
|
||||||
|
@ -96,15 +95,25 @@
|
||||||
color: #006699;
|
color: #006699;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.color1, .color1 a {
|
.color1 {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
.color2, .color2 a {
|
.color2 {
|
||||||
color: #ff1493;
|
color: #ff1493;
|
||||||
}
|
}
|
||||||
.color3, .color3 a {
|
.color3 {
|
||||||
color: #ff1111;
|
color: #ff1111;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a, a:active, a:visited {
|
||||||
|
color: #2080FF;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #68A9FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource',
|
||||||
var $text = $('#pv-txt-text'),
|
var $text = $('#pv-txt-text'),
|
||||||
$lineNos = $text.find('td.gutter .line').addClass('cntlinenr'),
|
$lineNos = $text.find('td.gutter .line').addClass('cntlinenr'),
|
||||||
$codeLines = $text.find('td.code .line').addClass('cntline'),
|
$codeLines = $text.find('td.code .line').addClass('cntline'),
|
||||||
$table = $('<table/>'),
|
$table = $('<table/>').addClass('syntaxhighlighter'),
|
||||||
i, $tr;
|
i, $tr;
|
||||||
|
|
||||||
for (i = 0; i < $lineNos.length; i += 1) {
|
for (i = 0; i < $lineNos.length; i += 1) {
|
||||||
|
@ -165,7 +165,7 @@ modulejs.define('ext/preview-txt', ['_', '$', 'core/settings', 'core/resource',
|
||||||
$table.append($tr);
|
$table.append($tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
$text.find('table').replaceWith($table);
|
$text.find('.syntaxhighlighter').replaceWith($table);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue