This repository was archived by the owner on May 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
executable file
·215 lines (193 loc) · 6.8 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
215
<!DOCTYPE html>
<html>
<head>
<!-- Meta setup - Required for apple device -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- Title -->
<title>Rocket Form Module</title>
<!-- Styles -->
<link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="node_modules/rocket-demo/css/demo.min.css" rel="stylesheet" type="text/css">
<link href="css/form.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="rocket-demo-message">
You need to run "npm install" and include the neccessary demo files in order to view this file.
</div>
<div id="rocket-demo" style="display:none;">
<div class="heading"><div class="container">
<h2>Rocket Form Module</h2>
</div></div>
<div class="container">
<h4>Getting Started</h4>
<p>Install via NPM.</p>
<pre class="prettyprint linenums">
npm install rocket-form
</pre>
<p class="note">Note that this module has a dependency <a href="https://github.com/chrishumboldt/Rocket-Tools" class="link" target="_blank">Rocket Tools (28kb)</a> which will automatically be installed as well.</p>
<p>Start by including the necessary files.</p>
<pre class="prettyprint linenums">
<head>
<link href="node_modules/rocket-form/css/form.min.css" rel="stylesheet" type="text/css">
</head>
<body>
/* Your content goes here */
<script src="node_modules/rocket-tools/js/tools.min.js"></script>
<script src="node_modules/rocket-form/js/form.min.js"></script>
</body>
</pre>
<br>
<h4>HTML and Javascript Call</h4>
<pre class="prettyprint linenums">
<div class="mod-form">
<label for="text-1">Form Label</label>
<input type="text" id="text-1">
</div>
<div class="mod-form-alt">
<label for="text-2">Form Label</label>
<input type="text" id="text-2">
</div>
<script>
// Default target property is ".mod-form".
Rocket.form({
colour: 'red',
style: 'raised'
});
// With Shifting Label
Rocket.form({
target: '.mod-form-alt',
colour: 'red',
label: 'shift',
style: 'raised'
});
</script>
</pre>
<br>
<h4>HTML Examples</h4>
<div class="block">
<div class="left">
<h3>Basic Inputs</h3>
<div class="mod-form">
<input type="text" id="text-1" placeholder="Text input">
</div>
<div class="mod-form">
<label for="password-1">Password Label</label>
<input type="password" id="password-1" placeholder="Password input">
</div>
<div class="mod-form-alt">
<label for="text-2">Shift Label</label>
<input type="text" id="text-2">
</div>
<div class="mod-form">
<label for="textarea-1">Textarea Label</label>
<textarea id="textarea-1" placeholder="Textarea">This is a test.</textarea>
</div>
<div class="mod-form-alt">
<label for="textarea-2">Textarea Shift Label</label>
<textarea id="textarea-2"></textarea>
</div>
<div class="mod-form">
<label for="text-3">Input Icon</label>
<div class="mod-form-icon">
<i class="fa fa-cog"></i>
<input type="text" id="text-3" placeholder="Text input">
</div>
</div>
<h3>Drop-down</h3>
<div class="mod-form">
<select>
<option value="1">Select Option 1</option>
<option value="2">Select Option 2</option>
<option value="3">Select Option 3</option>
</select>
</div>
</div>
<div class="right">
<h3>Checkboxes</h3>
<div class="mod-form">
<input type="checkbox" id="checkbox-1" checked="checked">
<label for="checkbox-1">Checkbox 1</label>
</div>
<div class="mod-form">
<input type="checkbox" id="checkbox-2" checked="checked">
<label for="checkbox-2">Checkbox 2</label>
</div>
<div class="mod-form">
<input type="checkbox" id="checkbox-3">
<label for="checkbox-3">Checkbox 3</label>
</div>
<h3>Toggler</h3>
<div class="mod-form">
<input type="checkbox" id="toggler-1" class="_mod-make-toggler" checked="checked">
</div>
<h3>Radio Inputs</h3>
<div class="mod-form">
<input type="radio" id="radio-1" name="radio-selection" value="1" checked="checked">
<label for="radio-1">Radio Selection</label>
</div>
<div class="mod-form">
<input type="radio" id="radio-2" name="radio-selection" value="2">
<label for="radio-2">Radio Selection</label>
</div>
<div class="mod-form">
<input type="radio" id="radio-3" name="radio-selection" value="3">
<label for="radio-3">Radio Selection</label>
</div>
</div>
</div>
<div class="block">
<h3>Input Group</h3>
<div class="mod-form">
<label for="text-4">Two</label>
<div class="mod-form-group _mod-group-two">
<input type="text" id="text-4" placeholder="Text input">
<input type="text" id="text-5" placeholder="Text input">
</div>
</div>
<div class="mod-form">
<label for="text-6">Three</label>
<div class="mod-form-group _mod-group-three">
<input type="text" id="text-6" placeholder="Text input">
<input type="text" id="text-7" placeholder="Text input">
<input type="text" id="text-8" placeholder="Text input">
</div>
</div>
<div class="mod-form">
<label for="text-9">Two With Icon</label>
<div class="mod-form-group _mod-group-two">
<div class="mod-form-icon">
<i class="fa fa-cog"></i>
<input type="text" id="text-9" placeholder="Text input">
</div>
<div class="mod-form-icon">
<i class="fa fa-cog"></i>
<input type="text" id="text-10" placeholder="Text input">
</div>
</div>
</div>
</div>
<br><br>
<h4>Detailed Documentation</h4>
<p>For a more detailed look into the available options, you can read the documentation at <a target="_blank" href="https://github.com/chrishumboldt/Rocket-Form" class="link">https://github.com/chrishumboldt/Rocket-Form</a></p>
</div>
<footer><div class="container"><div class="col-double">
<div class="left">
Made by <a href="http://chrishumboldt.com" target="_blank">Chris Humboldt</a>
</div>
<!-- <div class="right">
A <a href="http://getwebplate.com" target="_blank">Webplate Project</a>
Want updates? <a href="http://twitter.com/webplatetweets" target="_blank">@webplatetweets</a>
</div> -->
</div></div></footer>
</div>
<!-- Scripts -->
<script src="node_modules/rocket-tools/js/tools.min.js"></script>
<script src="node_modules/rocket-demo/js/demo.min.js"></script>
<script src="build/js/form.js"></script>
<script>
Rocket.form();
Rocket.form({target: '.mod-form-alt', label: 'shift'});
</script>
</body>
</html>