forked from RoBorg/MOTD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
69 lines (69 loc) · 2.79 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MOTD - Image to message of the day</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.1.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.8/clipboard.min.js"></script>
<script type="text/javascript" src="script.js"></script>
<link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>MOTD Generator</h1>
<p class="lead">Message of the day generator. Convert an image to an SSH MOTD banner.</p>
<div class="row">
<div class="col-xs-12 col-md-6">
<ol>
<li>Drag-drop or upload an image file & hit <b>Go</b></li>
<li>Copy the result into a text file on your server, for example <i>motd.txt</i></li>
<li>To preview, run <code>echo -e "`cat <i>motd.txt</i>`"</code></li>
<li>To install, run <code>echo -e "`cat <i>motd.txt</i>`" > /etc/motd</code></li>
</ol>
</div>
<form id="form" class="col-xs-12 col-md-6">
<div class="form-group" id="file-group">
<label class="control-label" for="#file">Upload image</label>
<input type="file" class="form-control" id="file">
<div class="help-block error-message">Required</div>
</div>
<div class="form-group" id="dropped-file-info">
<label class="control-label">Upload image</label><br>
<span id="dropped-file-name"></span>
<input type="button" class="btn" value="Clear" id="clear-dropped">
</div>
<div class="form-group">
<label class="control-label">Banner width (characters)</label>
<input type="number" value="80" min="10" max="500" class="form-control" id="output-width">
</div>
<input type="submit" value="Go" class="btn btn-primary">
</form>
</div>
<div class="row hidden" id="results">
<div class="col-xs-12 col-md-8" id="result-preview">
<pre></pre>
</div>
<div class="col-xs-12 col-md-4" id="result-code">
<textarea readonly="readonly"></textarea>
<button class="btn btn-primary" data-clipboard-target="#result-code textarea">Copy to clipboard</button>
</div>
</div>
</div>
<div id="drop-target">
<div id="drop-target-inner">
<p class="h1">Drop image here</p>
</div>
</div>
<footer class="footer">
<div class="container">
<p class="text-muted">
By <a href="http://www.roborg.co.uk">RoBorg</a>, 2016.
Contact me via <a href="https://twitter.com/RoBorg">Twitter</a>.
Find the source code on <a href="https://github.com/RoBorg/MOTD">GitHub</a>.
</p>
</div>
</footer>
</body>
</html>