diff.html 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>
  5. Diff
  6. </title>
  7. <style>
  8. #left {
  9. overflow: auto;
  10. left: 0;
  11. width: 50%;
  12. position: absolute;
  13. height: 100%;
  14. }
  15. #right {
  16. overflow: auto;
  17. border-left: 1px solid #000;
  18. width: 50%;
  19. position: absolute;
  20. right: 0;
  21. height: 100%;
  22. }
  23. html {
  24. height: 100%;
  25. }
  26. body {
  27. padding: 0;
  28. margin: 0;
  29. min-height: 100%;
  30. }
  31. .stringContainer {
  32. overflow: hidden;
  33. width: fit-content;
  34. border-bottom: 1px solid #bbb;
  35. min-width: 100%;
  36. }
  37. .stringNumber {
  38. background-color: #eee;
  39. border-right: 1px solid #bbb;
  40. width: 35px;
  41. float: left;
  42. height: 20px;
  43. padding-right: 5px;
  44. text-align: right;
  45. }
  46. .stringContent {
  47. overflow: hidden;
  48. white-space: nowrap;
  49. height: 20px;
  50. }
  51. .stringNumber.added {
  52. background-color: #76e876;
  53. }
  54. .stringNumber.changed {
  55. background-color: #76a0e8;
  56. }
  57. .stringNumber.deleted {
  58. background-color: #808080;
  59. }
  60. .stringContent.added {
  61. background-color: #b5ffb6;
  62. }
  63. .stringContent.changed {
  64. background-color: #b5d0ff;
  65. }
  66. .stringContent.deleted {
  67. background-color: #b1b1b1;
  68. }
  69. #header {
  70. overflow: hidden;
  71. white-space: nowrap;
  72. background: linear-gradient(0deg, #ccc, #eee, #ccc);
  73. font-size: 22px;
  74. border-bottom: 1px solid #000;
  75. height: 25px;
  76. }
  77. #header_left {
  78. left: 0;
  79. width: 50%;
  80. position: absolute;
  81. text-align: center;
  82. }
  83. #header_right {
  84. border-left: 1px solid #000;
  85. width: 50%;
  86. position: absolute;
  87. right: 0;
  88. text-align: center;
  89. }
  90. </style>
  91. </head>
  92. <body>
  93. <div id="header">
  94. <div id="header_left">
  95. a.txt
  96. </div>
  97. <div id="header_right">
  98. b.txt
  99. </div>
  100. </div>
  101. <div id="left">
  102. <div class="stringContainer">
  103. <div class="stringNumber">
  104. 1
  105. </div>
  106. <div class="stringContent">
  107. This part of the
  108. </div>
  109. </div>
  110. <div class="stringContainer">
  111. <div class="stringNumber">
  112. 2
  113. </div>
  114. <div class="stringContent">
  115. document has stayed the
  116. </div>
  117. </div>
  118. <div class="stringContainer">
  119. <div class="stringNumber">
  120. 3
  121. </div>
  122. <div class="stringContent">
  123. same from version to
  124. </div>
  125. </div>
  126. <div class="stringContainer">
  127. <div class="stringNumber">
  128. 4
  129. </div>
  130. <div class="stringContent">
  131. version. It shouldn't
  132. </div>
  133. </div>
  134. <div class="stringContainer">
  135. <div class="stringNumber">
  136. 5
  137. </div>
  138. <div class="stringContent">
  139. be shown if it doesn't
  140. </div>
  141. </div>
  142. <div class="stringContainer">
  143. <div class="stringNumber">
  144. 6
  145. </div>
  146. <div class="stringContent">
  147. change. Otherwise, that
  148. </div>
  149. </div>
  150. <div class="stringContainer">
  151. <div class="stringNumber">
  152. 7
  153. </div>
  154. <div class="stringContent">
  155. would not be helping to
  156. </div>
  157. </div>
  158. <div class="stringContainer">
  159. <div class="stringNumber changed">
  160. 8
  161. </div>
  162. <div class="stringContent changed">
  163. compress the size of the
  164. </div>
  165. </div>
  166. <div class="stringContainer">
  167. <div class="stringNumber changed">
  168. 9
  169. </div>
  170. <div class="stringContent changed">
  171. changes.
  172. </div>
  173. </div>
  174. <div class="stringContainer">
  175. <div class="stringNumber changed">
  176. 10
  177. </div>
  178. <div class="stringContent changed">
  179. </div>
  180. </div>
  181. <div class="stringContainer">
  182. <div class="stringNumber changed">
  183. 11
  184. </div>
  185. <div class="stringContent changed">
  186. This paragraph contains
  187. </div>
  188. </div>
  189. <div class="stringContainer">
  190. <div class="stringNumber changed">
  191. 12
  192. </div>
  193. <div class="stringContent changed">
  194. text that is outdated.
  195. </div>
  196. </div>
  197. <div class="stringContainer">
  198. <div class="stringNumber changed">
  199. 13
  200. </div>
  201. <div class="stringContent changed">
  202. It will be deleted in the
  203. </div>
  204. </div>
  205. <div class="stringContainer">
  206. <div class="stringNumber changed">
  207. 14
  208. </div>
  209. <div class="stringContent changed">
  210. near future.
  211. </div>
  212. </div>
  213. <div class="stringContainer">
  214. <div class="stringNumber">
  215. 15
  216. </div>
  217. <div class="stringContent">
  218. </div>
  219. </div>
  220. <div class="stringContainer">
  221. <div class="stringNumber">
  222. 16
  223. </div>
  224. <div class="stringContent">
  225. It is important to spell
  226. </div>
  227. </div>
  228. <div class="stringContainer">
  229. <div class="stringNumber changed">
  230. 17
  231. </div>
  232. <div class="stringContent changed">
  233. check this dokument.
  234. </div>
  235. </div>
  236. <div class="stringContainer">
  237. <div class="stringNumber">
  238. 18
  239. </div>
  240. <div class="stringContent">
  241. On the other hand, a
  242. </div>
  243. </div>
  244. <div class="stringContainer">
  245. <div class="stringNumber deleted">
  246. 19
  247. </div>
  248. <div class="stringContent deleted">
  249. misspelled word isn't
  250. </div>
  251. </div>
  252. <div class="stringContainer">
  253. <div class="stringNumber deleted">
  254. 20
  255. </div>
  256. <div class="stringContent deleted">
  257. the end of the world.
  258. </div>
  259. </div>
  260. <div class="stringContainer">
  261. <div class="stringNumber">
  262. 21
  263. </div>
  264. <div class="stringContent">
  265. </div>
  266. </div>
  267. <div class="stringContainer">
  268. <div class="stringNumber">
  269. 22
  270. </div>
  271. <div class="stringContent">
  272. Nothing in the rest of
  273. </div>
  274. </div>
  275. <div class="stringContainer">
  276. <div class="stringNumber">
  277. 23
  278. </div>
  279. <div class="stringContent">
  280. this paragraph needs to
  281. </div>
  282. </div>
  283. <div class="stringContainer">
  284. <div class="stringNumber">
  285. 24
  286. </div>
  287. <div class="stringContent">
  288. be changed. Things can
  289. </div>
  290. </div>
  291. <div class="stringContainer">
  292. <div class="stringNumber">
  293. 25
  294. </div>
  295. <div class="stringContent">
  296. be added after it.
  297. </div>
  298. </div>
  299. </div>
  300. <div id="right">
  301. <div class="stringContainer">
  302. <div class="stringNumber added">
  303. 1
  304. </div>
  305. <div class="stringContent added">
  306. This is an important
  307. </div>
  308. </div>
  309. <div class="stringContainer">
  310. <div class="stringNumber added">
  311. 2
  312. </div>
  313. <div class="stringContent added">
  314. notice! It should
  315. </div>
  316. </div>
  317. <div class="stringContainer">
  318. <div class="stringNumber added">
  319. 3
  320. </div>
  321. <div class="stringContent added">
  322. therefore be located at
  323. </div>
  324. </div>
  325. <div class="stringContainer">
  326. <div class="stringNumber added">
  327. 4
  328. </div>
  329. <div class="stringContent added">
  330. the beginning of this
  331. </div>
  332. </div>
  333. <div class="stringContainer">
  334. <div class="stringNumber added">
  335. 5
  336. </div>
  337. <div class="stringContent added">
  338. document!
  339. </div>
  340. </div>
  341. <div class="stringContainer">
  342. <div class="stringNumber added">
  343. 6
  344. </div>
  345. <div class="stringContent added">
  346. </div>
  347. </div>
  348. <div class="stringContainer">
  349. <div class="stringNumber">
  350. 7
  351. </div>
  352. <div class="stringContent">
  353. This part of the
  354. </div>
  355. </div>
  356. <div class="stringContainer">
  357. <div class="stringNumber">
  358. 8
  359. </div>
  360. <div class="stringContent">
  361. document has stayed the
  362. </div>
  363. </div>
  364. <div class="stringContainer">
  365. <div class="stringNumber">
  366. 9
  367. </div>
  368. <div class="stringContent">
  369. same from version to
  370. </div>
  371. </div>
  372. <div class="stringContainer">
  373. <div class="stringNumber">
  374. 10
  375. </div>
  376. <div class="stringContent">
  377. version. It shouldn't
  378. </div>
  379. </div>
  380. <div class="stringContainer">
  381. <div class="stringNumber">
  382. 11
  383. </div>
  384. <div class="stringContent">
  385. be shown if it doesn't
  386. </div>
  387. </div>
  388. <div class="stringContainer">
  389. <div class="stringNumber">
  390. 12
  391. </div>
  392. <div class="stringContent">
  393. change. Otherwise, that
  394. </div>
  395. </div>
  396. <div class="stringContainer">
  397. <div class="stringNumber">
  398. 13
  399. </div>
  400. <div class="stringContent">
  401. would not be helping to
  402. </div>
  403. </div>
  404. <div class="stringContainer">
  405. <div class="stringNumber changed">
  406. 14
  407. </div>
  408. <div class="stringContent changed">
  409. compress anything.
  410. </div>
  411. </div>
  412. <div class="stringContainer">
  413. <div class="stringNumber">
  414. 15
  415. </div>
  416. <div class="stringContent">
  417. </div>
  418. </div>
  419. <div class="stringContainer">
  420. <div class="stringNumber">
  421. 16
  422. </div>
  423. <div class="stringContent">
  424. It is important to spell
  425. </div>
  426. </div>
  427. <div class="stringContainer">
  428. <div class="stringNumber changed">
  429. 17
  430. </div>
  431. <div class="stringContent changed">
  432. check this document.
  433. </div>
  434. </div>
  435. <div class="stringContainer">
  436. <div class="stringNumber">
  437. 18
  438. </div>
  439. <div class="stringContent">
  440. On the other hand, a
  441. </div>
  442. </div>
  443. <div class="stringContainer">
  444. <div class="stringNumber">
  445. 19
  446. </div>
  447. <div class="stringContent">
  448. </div>
  449. </div>
  450. <div class="stringContainer">
  451. <div class="stringNumber">
  452. 20
  453. </div>
  454. <div class="stringContent">
  455. Nothing in the rest of
  456. </div>
  457. </div>
  458. <div class="stringContainer">
  459. <div class="stringNumber">
  460. 21
  461. </div>
  462. <div class="stringContent">
  463. this paragraph needs to
  464. </div>
  465. </div>
  466. <div class="stringContainer">
  467. <div class="stringNumber">
  468. 22
  469. </div>
  470. <div class="stringContent">
  471. be changed. Things can
  472. </div>
  473. </div>
  474. <div class="stringContainer">
  475. <div class="stringNumber">
  476. 23
  477. </div>
  478. <div class="stringContent">
  479. be added after it.
  480. </div>
  481. </div>
  482. <div class="stringContainer">
  483. <div class="stringNumber added">
  484. 24
  485. </div>
  486. <div class="stringContent added">
  487. </div>
  488. </div>
  489. <div class="stringContainer">
  490. <div class="stringNumber added">
  491. 25
  492. </div>
  493. <div class="stringContent added">
  494. This paragraph contains
  495. </div>
  496. </div>
  497. <div class="stringContainer">
  498. <div class="stringNumber added">
  499. 26
  500. </div>
  501. <div class="stringContent added">
  502. important new additions
  503. </div>
  504. </div>
  505. <div class="stringContainer">
  506. <div class="stringNumber added">
  507. 27
  508. </div>
  509. <div class="stringContent added">
  510. to this document.
  511. </div>
  512. </div>
  513. </div>
  514. </body>
  515. </html>