|
1 | 1 | <template> |
2 | | - <div class="page-contents"> |
3 | | - <Navbar :show-back-button="true"> |
4 | | - <template #right> |
5 | | - <button |
6 | | - type="button" |
7 | | - class=" |
8 | | - inline-flex |
9 | | - justify-center |
10 | | - px-4 |
11 | | - py-2 |
12 | | - transition-transform |
13 | | - transform |
14 | | - rounded-md |
15 | | - shadow |
16 | | - outline-none |
17 | | - copy-uri-button |
18 | | - align-center |
19 | | - focus:ring-4 |
20 | | - active:scale-y-75 |
21 | | - " |
22 | | - :class="{ |
23 | | - 'bg-blue-500 text-white': !copied, |
24 | | - 'bg-green-500 text-gray-800': copied, |
25 | | - }" |
26 | | - @click="copyUrlToClipboard" |
27 | | - > |
28 | | - <span v-show="copied" class="inline-flex justify-center"> |
29 | | - <svg |
30 | | - class="inline-block w-6 h-6 ml-[-4px]" |
31 | | - fill="none" |
32 | | - stroke="currentColor" |
33 | | - viewBox="0 0 24 24" |
34 | | - xmlns="http://www.w3.org/2000/svg" |
35 | | - > |
36 | | - <path |
37 | | - stroke-linecap="round" |
38 | | - stroke-linejoin="round" |
39 | | - stroke-width="2" |
40 | | - d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4" |
41 | | - ></path> |
42 | | - </svg> |
43 | | - <span class="hidden ml-2 md:inline-block">Copied</span> |
44 | | - </span> |
45 | | - <span v-show="!copied" class="inline-flex justify-center"> |
46 | | - <svg |
47 | | - class="w-6 h-6" |
48 | | - fill="none" |
49 | | - stroke="currentColor" |
50 | | - viewBox="0 0 24 24" |
51 | | - xmlns="http://www.w3.org/2000/svg" |
52 | | - > |
53 | | - <path |
54 | | - stroke-linecap="round" |
55 | | - stroke-linejoin="round" |
56 | | - stroke-width="2" |
57 | | - d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" |
58 | | - ></path> |
59 | | - </svg> |
60 | | - <span class="hidden ml-2 md:inline-block">Copy link</span> |
61 | | - </span> |
62 | | - </button> |
63 | | - </template> |
64 | | - </Navbar> |
65 | | - <main class="outline-none" tabindex="0"> |
66 | | - <div |
67 | | - class=" |
68 | | - flex |
69 | | - items-stretch |
70 | | - w-full |
71 | | - gap-4 |
72 | | - font-mono |
73 | | - text-gray-800 |
74 | | - dark:text-gray-50 |
75 | | - " |
76 | | - > |
77 | | - <div |
78 | | - class=" |
79 | | - relative |
80 | | - flex-1 |
81 | | - px-4 |
82 | | - py-2 |
83 | | - overflow-y-auto |
84 | | - border-2 |
85 | | - rounded-md |
86 | | - dark:border-gray-500 |
87 | | - max-h-screen--nav |
88 | | - line-number-gutter |
89 | | - min-h-80 |
90 | | - " |
91 | | - > |
92 | | - <RTStickyCopyButton :click-handler="copyTextToClipboard" /> |
93 | | - <div |
94 | | - v-for="(lineDiff, index) in lhsDiff" |
95 | | - :key="index" |
| 2 | + <div class="contents"> |
| 3 | + <div class="page-contents"> |
| 4 | + <Navbar :show-back-button="true"> |
| 5 | + <template #right> |
| 6 | + <button |
| 7 | + type="button" |
| 8 | + class="inline-flex justify-center px-4 py-2 transition-transform transform rounded-md shadow outline-none copy-uri-button align-center focus:ring-4 active:scale-y-75" |
96 | 9 | :class="{ |
97 | | - 'bg-red-200 dark:bg-red-800': lineDiff.includes('isModified'), |
| 10 | + 'bg-blue-500 text-white': !copied, |
| 11 | + 'bg-green-500 text-gray-800': copied, |
98 | 12 | }" |
| 13 | + @click="copyUrlToClipboard" |
99 | 14 | > |
100 | | - <p class="break-all whitespace-pre-wrap" v-html="lineDiff"></p> |
101 | | - </div> |
102 | | - </div> |
| 15 | + <span v-show="copied" class="inline-flex justify-center"> |
| 16 | + <svg |
| 17 | + class="inline-block w-6 h-6 ml-[-4px]" |
| 18 | + fill="none" |
| 19 | + stroke="currentColor" |
| 20 | + viewBox="0 0 24 24" |
| 21 | + xmlns="http://www.w3.org/2000/svg" |
| 22 | + > |
| 23 | + <path |
| 24 | + stroke-linecap="round" |
| 25 | + stroke-linejoin="round" |
| 26 | + stroke-width="2" |
| 27 | + d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4" |
| 28 | + ></path> |
| 29 | + </svg> |
| 30 | + <span class="hidden ml-2 md:inline-block">Copied</span> |
| 31 | + </span> |
| 32 | + <span v-show="!copied" class="inline-flex justify-center"> |
| 33 | + <svg |
| 34 | + class="w-6 h-6" |
| 35 | + fill="none" |
| 36 | + stroke="currentColor" |
| 37 | + viewBox="0 0 24 24" |
| 38 | + xmlns="http://www.w3.org/2000/svg" |
| 39 | + > |
| 40 | + <path |
| 41 | + stroke-linecap="round" |
| 42 | + stroke-linejoin="round" |
| 43 | + stroke-width="2" |
| 44 | + d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" |
| 45 | + ></path> |
| 46 | + </svg> |
| 47 | + <span class="hidden ml-2 md:inline-block">Copy link</span> |
| 48 | + </span> |
| 49 | + </button> |
| 50 | + </template> |
| 51 | + </Navbar> |
| 52 | + <main class="outline-none" tabindex="0"> |
103 | 53 | <div |
104 | | - class=" |
105 | | - relative |
106 | | - flex-1 |
107 | | - px-4 |
108 | | - py-2 |
109 | | - overflow-y-auto |
110 | | - border-2 |
111 | | - rounded-md |
112 | | - dark:border-gray-500 |
113 | | - min-h-80 |
114 | | - line-number-gutter |
115 | | - max-h-screen--nav |
116 | | - " |
| 54 | + class="flex items-stretch w-full gap-4 font-mono text-gray-800 dark:text-gray-50" |
117 | 55 | > |
118 | | - <RTStickyCopyButton :click-handler="copyTextToClipboard" /> |
119 | 56 | <div |
120 | | - v-for="(lineDiff, index) in rhsDiff" |
121 | | - :key="index" |
122 | | - :class="{ |
123 | | - 'bg-green-200 dark:bg-green-700': lineDiff.includes('isModified'), |
124 | | - }" |
| 57 | + class="relative flex-1 px-4 py-2 overflow-y-auto border-2 rounded-md dark:border-gray-500 max-h-screen--nav line-number-gutter min-h-80" |
125 | 58 | > |
126 | | - <p class="break-all whitespace-pre-wrap" v-html="lineDiff"></p> |
| 59 | + <RTStickyCopyButton :click-handler="copyTextToClipboard" /> |
| 60 | + <div |
| 61 | + v-for="(lineDiff, index) in lhsDiff" |
| 62 | + :key="index" |
| 63 | + :class="{ |
| 64 | + 'bg-red-200 dark:bg-red-800': lineDiff.includes('isModified'), |
| 65 | + }" |
| 66 | + > |
| 67 | + <p class="break-all whitespace-pre-wrap" v-html="lineDiff"></p> |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + <div |
| 71 | + class="relative flex-1 px-4 py-2 overflow-y-auto border-2 rounded-md dark:border-gray-500 min-h-80 line-number-gutter max-h-screen--nav" |
| 72 | + > |
| 73 | + <RTStickyCopyButton :click-handler="copyTextToClipboard" /> |
| 74 | + <div |
| 75 | + v-for="(lineDiff, index) in rhsDiff" |
| 76 | + :key="index" |
| 77 | + :class="{ |
| 78 | + 'bg-green-200 dark:bg-green-700': |
| 79 | + lineDiff.includes('isModified'), |
| 80 | + }" |
| 81 | + > |
| 82 | + <p class="break-all whitespace-pre-wrap" v-html="lineDiff"></p> |
| 83 | + </div> |
127 | 84 | </div> |
128 | 85 | </div> |
129 | | - </div> |
130 | | - </main> |
| 86 | + </main> |
| 87 | + </div> |
131 | 88 | <Footer /> |
132 | 89 | </div> |
133 | 90 | </template> |
|
0 commit comments