-
Notifications
You must be signed in to change notification settings - Fork 24
/
index.html
214 lines (201 loc) · 12.7 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Plain Text Table</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="vendor/boilerplate/main.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/handsontable/0.12.6/handsontable.full.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<!--[if lte IE 8]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Plain Text Table</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="/">Home</a></li>
<li><a href="https://github.com/PlainTextTools/plain-text-table"><img src="https://raw.github.com/PlainTextTools/plain-text-table/gh-pages/img/github.png"> Source Code </a></li>
<li><a href="https://github.com/PlainTextTools/plain-text-table/issues"><img src="https://raw.github.com/PlainTextTools/plain-text-table/gh-pages/img/bugs.png"> Issues </a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="http://twitter.com/j2r2b">@j2r2b</a></li>
<li><a href="http://twitter.com/lorefnon">@lorefnon</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
<div class="container">
<div class="jumbotron">
<h1> Plain Text Table </h1>
<h2> Interactively create and edit tables and export them to plain text </h2>
</div>
<h2> Huh ? </h2>
<p>
At a lot of places, like Stackoverflow questions/answers, source code
comments, plain text emails etc. HTML tables are not an option. We can
always format ascii characters to simulate tables but unless you are a
ninja with keyboard, doing so is a headache.
</p>
<p>
This web based tool provides a dead simple way for doing just that - sans
the PITA.
</p>
<hr>
<h2> Your table </h2>
<p> Click to edit cell, Right click for options </p>
<div id='table-wrapper'>
</div>
<br>
<pre id="ptt-wrapper"></pre>
<hr>
<div id="configuration" class="col-md-6">
<p>Characters: <select id="charset" name="charset" onchange="charsetSelectChange(this);">
<option value="ascii">Ascii</option>
<option value="unicode" selected="selected">Unicode</option>
</select></p>
<hr/>
<p>Horizontal Header: <select id="horizontal_header" name="horizontalHeader" onchange="horizontalHeaderSelectChange(this);">
<option value="none">None</option>
<option value="first_line" selected="selected">First line</option>
<option value="number">Number</option>
<option value="letter">Letter</option>
</select></p>
<p>Vertical Header: <select id="vertical_header" name="verticalHeader" onchange="verticalHeaderSelectChange(this);">
<option value="none" selected="selected">None</option>
<option value="first_column">First column</option>
<option value="number">Number</option>
<option value="letter">Letter</option>
</select></p>
<hr/>
<p>Horizontal Top Border: <select id="horizontal_top_border" name="horizontalTopBorder" onfocus="borderSelectGetFocus(this);" onchange="borderSelectChange(this);" onblur="borderSelectLostFocus(this);">
<option value="none">None</option>
<option value="single">Single</option>
<option value="double" selected="selected">Double</option>
</select></p>
<p id="p_horizontal_inner_header_border">Horizontal Inner Header Border: <select id="horizontal_inner_header_border" name="horizontalInnerHeaderBorder" onfocus="borderSelectGetFocus(this);" onchange="borderSelectChange(this);" onblur="borderSelectLostFocus(this);">
<option value="none">None</option>
<option value="single">Single</option>
<option value="double" selected="selected">Double</option>
</select></p>
<p>Horizontal Inner Border: <select id="horizontal_inner_border" name="horizontalInnerBorder" onfocus="borderSelectGetFocus(this);" onchange="borderSelectChange(this);" onblur="borderSelectLostFocus(this);">
<option value="none">None</option>
<option value="single" selected="selected">Single</option>
<option value="double">Double</option>
</select></p>
<p>Horizontal Bottom Border: <select id="horizontal_bottom_border" name="horizontalBottomBorder" onfocus="borderSelectGetFocus(this);" onchange="borderSelectChange(this);" onblur="borderSelectLostFocus(this);">
<option value="none">None</option>
<option value="single">Single</option>
<option value="double" selected="selected">Double</option>
</select></p>
<hr/>
<p>Vertical Left Border: <select id="vertical_left_border" name="verticalLeftBorder" onfocus="borderSelectGetFocus(this);" onchange="borderSelectChange(this);" onblur="borderSelectLostFocus(this);">
<option value="none">None</option>
<option value="single">Single</option>
<option value="double" selected="selected">Double</option>
</select></p>
<p id="p_vertical_inner_header_border">Vertical Inner Header Border: <select id="vertical_inner_header_border" name="verticalInnerHeaderBorder" onfocus="borderSelectGetFocus(this);" onchange="borderSelectChange(this);" onblur="borderSelectLostFocus(this);">
<option value="none">None</option>
<option value="single">Single</option>
<option value="double" selected="selected">Double</option>
</select></p>
<p>Vertical Inner Border: <select id="vertical_inner_border" name="verticalInnerBorder" onfocus="borderSelectGetFocus(this);" onchange="borderSelectChange(this);" onblur="borderSelectLostFocus(this);">
<option value="none">None</option>
<option value="single" selected="selected">Single</option>
<option value="double">Double</option>
</select></p>
<p>Vertical Right Border: <select id="vertical_right_border" name="verticalRightBorder" onfocus="borderSelectGetFocus(this);" onchange="borderSelectChange(this);" onblur="borderSelectLostFocus(this);">
<option value="none">None</option>
<option value="single">Single</option>
<option value="double" selected="selected">Double</option>
</select></p>
<hr/>
<p id="p_ascii_intersection">ASCII intersection character: <select id="ascii_intersection" name="asciiIntersection" onchange="genPTT();">
<option value="plus" selected="selected">Plus</option>
<option value="horizontal_border">Horizontal Border</option>
<option value="vertical_border">Vertical Border</option>
</select></p>
<p><input type="checkbox" id="spacePadding" checked="checked" onclick="genPTT();"> Ensure a padding of one space in each cell.</input></p>
</div>
<div class="col-md-6" id="predefined">
<p>Click on the image to select one of the predefined style:</p>
<div class="row">
<div class="col-md-6" id="predefined-unicode">
<p><a onClick="predefinedStyle('unicode1')"><img src="img/unicode1.png"></a><p>
<p><a onClick="predefinedStyle('unicode2')"><img src="img/unicode2.png"></a><p>
<p><a onClick="predefinedStyle('unicode3')"><img src="img/unicode3.png"></a><p>
<p><a onClick="predefinedStyle('unicode4')"><img src="img/unicode4.png"></a><p>
<p><a onClick="predefinedStyle('unicode5')"><img src="img/unicode5.png"></a><p>
<p><a onClick="predefinedStyle('unicode6')"><img src="img/unicode6.png"></a><p>
</div>
<div class="col-md-6" id="predefined-ascii">
<p><a onClick="predefinedStyle('ascii1')"><img src="img/ascii1.png"></a><p>
<p><a onClick="predefinedStyle('ascii2')"><img src="img/ascii2.png"></a><p>
<p><a onClick="predefinedStyle('ascii3')"><img src="img/ascii3.png"></a><p>
<p><a onClick="predefinedStyle('ascii4')"><img src="img/ascii4.png"></a><p>
<p><a onClick="predefinedStyle('ascii5')"><img src="img/ascii5.png"></a><p>
<p><a onClick="predefinedStyle('ascii6')"><img src="img/ascii6.png"></a><p>
</div>
</div>
</div>
<table class="table footer-table">
<tr>
<th> Credits </th>
<th> Privacy </th>
<th> Donations </th>
</tr>
<tr>
<td>
<ul>
<li> <a href="http://handsontable.com/"> Handsontable </a></li>
<li> <a href="http://getbootstrap.com/"> Twitter Bootstrap </a></li>
</ul>
</td>
<td>
The script runs entirely in browser.
<br>
The data you enter in the grid is not saved to any server.
</td>
<td>
I do not accept donations. However if you are interested in supporting
open source software please consider donating to one or more of the projects
mentioned in the credits section.
</td>
</tr>
</table>
</div>
<script src="vendor/polyfills/console.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handsontable/0.12.6/handsontable.full.min.js"></script>
<script src="js/main.js"></script>
<!-- [TODO] Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-47274059-1', 'lorefnon.me');
ga('send', 'pageview');
</script>
</body>
</html>