-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
171 lines (157 loc) · 4.29 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>GIT HTML PREVIEW TOOL</title>
<link rel="stylesheet" href="./gradient.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
</script>
<script async defer src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"
integrity="sha384-LtrjvnR4Twt/qOuYxE721u19sVFLVSA4hf/rRt6PrZTmiPltdZcI7q7PXQBYTKyf" crossorigin="anonymous"></script>
<script async defer src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</script>
<style>
code,
pre {
position: relative;
}
code,
pre {
display: block;
padding: 20px;
background: linear-gradient(-45deg, #da0000, #0008ffe5, #23d5a2d8, #2f2fbce5);
background-size: 400% 400%;
-webkit-animation: gradient 15s ease infinite;
animation: gradient 15s ease infinite;
}
span.command-copy {
position: absolute;
top: 10px;
right: 10px;
opacity: .6;
font-size: 20px;
color: #555755;
}
span.command-copy:hover {
cursor: pointer;
}
.userInfoForm {
width: 80%;
padding: 5px 5px;
margin: 0 auto;
background: #FF6700;
border-radius: 25px;
background: linear-gradient(-45deg, #da0000, #0008ffe5, #23d5a2d8, #2f2fbce5);
background-size: 400% 400%;
-webkit-animation: gradient 15s ease infinite;
animation: gradient 15s ease infinite;
}
.userInfoForm input {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border-radius: 25px;
}
body {
font: 12px 'Helvetica Neue', Helvetica, Arial, freesans, clean, sans-serif;
color: #333;
}
h1 {
font-size: 20px;
}
a {
color: #666;
}
.previewform {
display: none;
padding: 20px;
text-align: center;
}
strong {
color: #333;
background-color: #FAFFA6;
padding: 0.1em;
}
.footer {
margin: 20px 0;
font-size: 10px;
color: #666;
}
a {
color: black !important;
font-size: 11;
white-space: normal;
}
li {
top: 0px;
list-style-type: none;
overflow: visible;
/* margin: top; */
font-size: 20px;
letter-spacing: 0px;
font-weight: 700;;
cursor: pointer;
white-space: normal;
color: rgb(243, 211, 31) !important;
word-wrap: break-word;
height: 30px;
text-align:center;
padding: 0.5em 1em 0;
box-shadow: 0 0 5px;
margin: 0.2em;
/* display: grid; */
/* -webkit-border-radius: 10px;
-moz-border-radius: 10px;
-ms-border-radius: 10px;
-o-border-radius: 10px; */
}
</style>
</head>
<body>
<form id="previewform" class="userInfoForm" onsubmit="location.href='/?'+this.file.value;return false">
<h1>GIT HTML PREVIEW TOOL</h1>
<p>
Enter URL of the HTML file to preview:
<input type="url" id="file" class="userInfoForm" value="" placeholder="e.g. https://github.com/user/repo/blob/master/index.html" size="60" autofocus>
<input type="submit" value="Preview">
</p>
<p>try </p>
<pre><code> <ul>
<a href="https://github.com/uvacoder/html-preview-tool/blob/master/readme.html">
<li></a>
https://github.com/uvacoder/html-preview-tool/blob/master/readme.html
</li>
</ul>
</code></pre>
<p>as an example</a></p>
</form>
<script src="/htmlpreview.js"></script>
<script async defer>
$(document).ready(function() {
$('code, pre').append('<span class="command-copy"><i class="fa fa-clipboard" aria-hidden="true"></i></span>');
$('code span.command-copy').click(function(e) {
var text = $(this).parent().text().trim(); //.text();
var copyHex = document.createElement('input');
copyHex.value = text
document.body.appendChild(copyHex);
copyHex.select();
document.execCommand('copy');
console.log(copyHex.value)
document.body.removeChild(copyHex);
});
$('pre span.command-copy').click(function(e) {
var text = $(this).parent().text().trim();
var copyHex = document.createElement('input');
copyHex.value = text
document.body.appendChild(copyHex);
copyHex.select();
document.execCommand('copy');
console.log(copyHex.value)
document.body.removeChild(copyHex);
});
})
</script>
</body>
</html>