-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
120 lines (119 loc) · 3.55 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<html>
<head>
<title>Two Text Diff</title>
<link
rel="icon"
href="https://projedefteri.com/favicon/open-source/favicon.ico"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="https://projedefteri.com/favicon/open-source/favicon-16x16.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="https://projedefteri.com/favicon/open-source/favicon-32x32.png"
/>
<link
rel="apple-touch-icon"
href="https://projedefteri.com/favicon/open-source/apple-touch-icon.png"
/>
<link
rel="mask-icon"
href="https://projedefteri.com/favicon/open-source/apple-touch-icon.png"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/tailwindcss/dist/tailwind.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/diff2html/bundles/css/diff2html.min.css"
/>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/diff2html/bundles/js/diff2html-ui.min.js"
></script>
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jsdiff/5.1.0/diff.min.js"
></script>
<link href="style.css" type="text/css" rel="stylesheet" />
</head>
<body class="bg-gray-100 theme-dark">
<header>
<h1
class="text-3xl font-bold text-center top-0 right-0 m-4"
style="filter: drop-shadow(0 0 4px #f7fafca9)"
>
Two Text Diff
</h1>
<button
class="absolute top-0 right-0 m-4 focus:outline-none"
style="filter: drop-shadow(0 0 5px #f7fafca9)"
id="theme-toggle-button"
onclick="toggleTheme()"
></button>
</header>
<div class="container mx-auto py-10">
<div class="flex flex-wrap -mx-3 mb-6">
<div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
<label
class="block uppercase tracking-wide text-xs font-bold mb-2"
for="text1"
style="filter: drop-shadow(0 0 5px #f7fafca9)"
>Text 1</label
>
<textarea
class="bg-gray-200 appearance-none block w-full bg-white rounded py-3 px-4 mb-3 leading-tight focus:outline-none"
id="text1"
rows="7"
></textarea>
</div>
<div class="w-full md:w-1/2 px-3">
<label
class="block uppercase tracking-wide text-xs font-bold mb-2"
for="text2"
style="filter: drop-shadow(0 0 5px #f7fafca9)"
>Text 2</label
>
<textarea
class="bg-gray-200 appearance-none block w-full bg-white rounded py-3 px-4 mb-3 leading-tight focus:outline-none"
id="text2"
rows="7"
></textarea>
</div>
</div>
<div class="flex justify-center gap-3">
<button
class="btn btn-4 py-2 px-4 rounded-full"
style="filter: drop-shadow(0 0 10px #f7fafc)"
onclick="showDiff()"
>
Show Diff
</button>
<button
class="btn btn-4 py-2 px-4 rounded-full"
style="filter: drop-shadow(0 0 10px #f7fafc)"
onclick="clearDiff()"
>
Clear
</button>
</div>
<div id="diffOutput" class="mt-10" />
</div>
<footer>
<h6
class="text-sm font-bold text-center"
style="filter: drop-shadow(0 0 4px #f7fafca9)"
>
<a href="https://projedefteri.com/en">projedefteri.com</a>
</h6>
</footer>
<script src="script.js"></script>
</body>
</html>