6060 v-for =" (lineDiff, index) in lhsDiff"
6161 :key =" index"
6262 :class =" {
63- 'bg-red-100 dark:bg-yellow-700 ': lineDiff.includes('isModified'),
63+ 'bg-red-200 dark:bg-red-800 ': lineDiff.includes('isModified'),
6464 }"
6565 >
6666 <p class =" break-all whitespace-pre-wrap" v-html =" lineDiff" ></p >
7474 v-for =" (lineDiff, index) in rhsDiff"
7575 :key =" index"
7676 :class =" {
77- 'bg-green-100 dark:bg-green-700': lineDiff.includes('isModified'),
77+ 'bg-green-200 dark:bg-green-700': lineDiff.includes('isModified'),
7878 }"
7979 >
8080 <p class =" break-all whitespace-pre-wrap" v-html =" lineDiff" ></p >
8989<script >
9090import pako from ' pako'
9191import { undoUrlSafeBase64 , escapeHtml } from ' ../helpers/utils'
92- import footer from ' ~/components/footer.vue'
92+ import Footer from ' ~/components/footer.vue'
9393export default {
94- components: { footer },
94+ components: { Footer },
9595 layout: ' main' ,
9696 data () {
9797 return {
@@ -100,9 +100,6 @@ export default {
100100 copied: false ,
101101 }
102102 },
103- asyncData () {
104- return { name: ' World' }
105- },
106103 mounted () {
107104 const _diff = this .$route .hash
108105 const gunzip = pako .ungzip (Buffer .from (undoUrlSafeBase64 (_diff), ' base64' ))
@@ -112,7 +109,7 @@ export default {
112109 const hunkState = item[0 ]
113110 if (hunkState === - 1 || hunkState === 0 ) {
114111 const className =
115- hunkState === - 1 ? ' isModified bg-red-300 dark:bg-yellow-900 ' : ' '
112+ hunkState === - 1 ? ' isModified bg-red-300 dark:bg-red-500 ' : ' '
116113 return ` <span class="break-all inline p-0 m-0 ${ className} ">${ escapeHtml (
117114 item[1 ]
118115 )} </span>`
@@ -127,7 +124,7 @@ export default {
127124 const hunkState = item[0 ]
128125 if (hunkState === 1 || hunkState === 0 ) {
129126 const className =
130- hunkState === 1 ? ' isModified bg-green-300 dark:bg-green-900' : ' '
127+ hunkState === 1 ? ' isModified bg-green-400 dark:bg-green-900' : ' '
131128 return ` <span class="break-all inline p-0 m-0 ${ className} ">${ escapeHtml (
132129 item[1 ]
133130 )} </span>`
@@ -191,6 +188,9 @@ export default {
191188 </script >
192189
193190<style lang="scss">
191+ ::selection {
192+ @apply bg-gray-800 text-gray-300 dark :bg- gray- 200 dark :text- gray- 800;
193+ }
194194.copy-uri-button :hover {
195195 @apply shadow-lg ;
196196 svg {
@@ -206,31 +206,24 @@ export default {
206206 & ::before {
207207 content : ' ' ;
208208 width : var (--line-number-gutter-width );
209- @apply bg-gray-200 dark :bg- gray- 700 inline-block left- 0 top- 0 bottom- 0 absolute text- sm;
209+ @apply bg-gray-300 dark :bg- gray- 700 inline-block left- 0 top- 0 bottom- 0 absolute text- sm;
210210 }
211211 @apply relative ;
212212 p {
213213 padding-left : calc (var (--line-number-gutter-width ) - 10px );
214214 line-height : 1.65 ;
215215 @apply relative ;
216216 & :hover {
217- @apply bg-gray-200 dark :bg- gray- 700;
217+ @apply bg-gray-200 dark :bg- gray- 600;
218+ span {
219+ @apply dark :mix- blend- hard- light dark :bg- blend- multiply;
220+ }
218221 }
219222 & ::before {
220223 counter-increment : line- numbers;
221224 content : counter (line-numbers );
222225 width : var (--line-number-gutter-width );
223- @apply absolute left-0 top-0 -mx- 4 bottom-0 text-center bg-gray-200 dark :bg- gray- 700 dark :text- gray- 50 text- gray- 500 flex justify- center text- sm;
224- }
225- & :first-of-type {
226- & ::before {
227- @apply -mt- 2 pt- 2;
228- }
229- }
230- & :last-of-type {
231- & ::before {
232- @apply -mb- 2 pb- 2;
233- }
226+ @apply absolute left-0 top-0 -mx- 4 bg-gray-200 dark :bg- gray- 700 dark :text- gray- 50 text- gray- 500 inline-flex justify- center items- center text- sm h- full;
234227 }
235228 }
236229}
0 commit comments