-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
163 lines (160 loc) · 4.51 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ColTran</title>
<style>
body {
padding:10px;
font-family:consolas;
font-size:14px;
}
button {
font-family:consolas;
display:block;
background-color:#1565c0;
width: 160px;
padding:6px 14px;
margin:4px 4px 4px 0px;
vertical-align:top;
color:white;
border:0;
border-radius:3px;
cursor:pointer;
font-weight:700;
font-size:14px;
}
button:hover {
background-color:#1976d2;
}
button.copy {
background-color:#279e64;
padding:8px 20px;
}
button.copy:hover {
background-color:#2eba76;
}
textarea {
width:98%;
resize: vertical;
border: 1px solid #bbb;
border-radius:3px;
padding:1%;
height:500px;
-moz-box-shadow: inset 0 0 10px #bbb;
-webkit-box-shadow: inset 0 0 10px #bbb;
box-shadow: inset 0 0 10px #bbb;
}
textarea::-webkit-input-placeholder {
font-size: 22px;
}
textarea:-moz-placeholder {
font-size: 22px;
}
textarea::-moz-placeholder {
font-size: 22px;
}
textarea:-ms-input-placeholder {
font-size: 22px;
}
#modeKeyDiv, #likePercentDiv {
margin:8px 0px;
display:none;
}
#itemCount {
position:relative;
float:right;
margin-top:14px;
grid-area: count;
}
* {box-sizing: border-box;}
.wrapper {
max-width: 1280px;
margin: 0 auto;
display: grid;
grid-template-columns: repeat(7, 1fr);
grid-template-areas:
"btn1 . count btn2 . . ."
"ta1 ta1 ta1 ta2 ta2 ta2 btns"
"ftr ftr ftr ftr . . .";
grid-gap: 6px;
grid-auto-rows: minmax(26px, auto);
}
@media screen and (max-width: 500px) {
.wrapper {
grid-template-areas: "btn1"
"count"
"ta1"
"btn2"
"ta2"
"btns"
"ftr";
grid-template-columns: 100%;
}
}
#btn1Div {
grid-area: btn1
}
#btn2Div {
grid-area: btn2
}
#tareaDiv {
grid-area: ta1
}
#resultDiv {
grid-area: ta2
}
#options {
grid-area: btns;
}
footer {
grid-area: ftr
}
</style>
</head>
<body>
<div class="wrapper">
<div id='btn1Div'>
<button id="leftcopybtn" class="copy">COPY</button>
</div>
<div id='itemCount'>
</div>
<div id='btn2Div'>
<button id="copybtn" class="copy">COPY</button>
</div>
<div id='tareaDiv'>
<textarea id='tarea' placeholder="Paste excel column here..." autofocus></textarea>
</div>
<div id='resultDiv'>
<textarea id='result' placeholder="Example: IN ('foo','bar') or paste IN statement..."></textarea>
</div>
<div id="options">
<div>
Mode:
<select id="mode">
<option value="in">IN</option>
<option value="or">OR</option>
<option value="like">LIKE</option>
<option value="pipe">PIPE</option>
</select>
</div>
<div id="modeKeyDiv">
Key: <input id="modeKey" type="text" value='Id'/>
</div>
<div id="likePercentDiv">
LIKE type: <select id="likePercent">
<option value="right">'value%'</option>
<option value="both">'%value%'</option>
<option value="left">'%value'</option>
</select>
</div>
<button id="doMultiline"/>Multiline</button>
<button id="trimSpecialCharacters"/>Trim special characters</button>
<button id="toggleQuotesBtn">Quotes</button>
<button id="sortBtn">Sort</button>
<button id="toggleInBracketsBtn">IN ( )</button>
</div>
</div>
<script src="script.js"></script>
</body>
</html>