mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Fixed wordwrap and marking
This commit is contained in:
parent
4bdcbdcd20
commit
f08c7de609
3 changed files with 7 additions and 6 deletions
|
@ -59,7 +59,8 @@
|
|||
$codeColor: #f8f8f2;
|
||||
$codeLineColor: #aaa;
|
||||
$codeBackgroundColor: #232829;
|
||||
$markerColor: #f4e009;
|
||||
$markerColor: rgb(244,244,9);
|
||||
$markerBackgroundColor: rgba(244,244,9,.2);
|
||||
|
||||
.snippet-code {
|
||||
|
||||
|
@ -71,7 +72,7 @@ $markerColor: #f4e009;
|
|||
line-height: 1.1rem;
|
||||
padding: 1rem 0;
|
||||
|
||||
.wordwrap {
|
||||
&.wordwrap {
|
||||
overflow: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
@ -85,7 +86,7 @@ $markerColor: #f4e009;
|
|||
|
||||
&.marked {
|
||||
color: $markerColor;
|
||||
background-color: $markerColor;
|
||||
background-color: $markerBackgroundColor;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -98,12 +98,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
let lines = document.querySelectorAll('.code li');
|
||||
let lines = document.querySelectorAll('.snippet-code li');
|
||||
lines.forEach(function(el){
|
||||
el.onclick = function(e) {
|
||||
el.classList.toggle('marked');
|
||||
let hash = 'L';
|
||||
let marked = document.querySelectorAll('.code li.marked');
|
||||
let marked = document.querySelectorAll('.snippet-code li.marked');
|
||||
marked.forEach(function(line){
|
||||
if (hash !== 'L')
|
||||
hash += ',';
|
||||
|
|
Loading…
Reference in a new issue