lando 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +95 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +43 -0
- data/VERSION +1 -0
- data/bin/lando +8 -0
- data/lando.gemspec +94 -0
- data/lib/lando.rb +3 -0
- data/lib/lando/generator.rb +6 -0
- data/lib/lando/generator/application.rb +62 -0
- data/lib/lando/generator/command/create.rb +24 -0
- data/lib/lando/generator/command/ls.rb +22 -0
- data/lib/lando/generator/command/preview.rb +32 -0
- data/lib/lando/generator/command_helper.rb +21 -0
- data/lib/lando/version.rb +8 -0
- data/templates/coming-soon/example.html +440 -0
- data/templates/coming-soon/images/Browser.svg +103 -0
- data/templates/coming-soon/images/Modal.svg +112 -0
- data/templates/coming-soon/images/arrow.png +0 -0
- data/templates/coming-soon/images/background.png +0 -0
- data/templates/coming-soon/images/hero.jpg +0 -0
- data/templates/coming-soon/images/middleman.png +0 -0
- data/templates/coming-soon/images/mobile.svg +51 -0
- data/templates/coming-soon/index.html +440 -0
- data/templates/coming-soon/javascripts/all.js +0 -0
- data/templates/coming-soon/stylesheets/all.css +6 -0
- data/templates/coming-soon/stylesheets/normalize.css +376 -0
- data/templates/test/example.html +9 -0
- data/test/helper.rb +34 -0
- data/test/test_lando.rb +7 -0
- metadata +190 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'lando/generator/command_helper'
|
2
|
+
require 'colorize'
|
3
|
+
|
4
|
+
module Lando
|
5
|
+
class Generator
|
6
|
+
module Command
|
7
|
+
class Preview
|
8
|
+
extend CommandHelper
|
9
|
+
|
10
|
+
class << self
|
11
|
+
def execute(template = nil)
|
12
|
+
require_nonblank('template', template)
|
13
|
+
preview_path = File.join self.templates_path, template, 'example.html'
|
14
|
+
|
15
|
+
assert_template_exists(template)
|
16
|
+
|
17
|
+
if /darwin/ =~ RUBY_PLATFORM
|
18
|
+
system "open #{preview_path}"
|
19
|
+
elsif /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
|
20
|
+
system "start #{preview_path}"
|
21
|
+
elsif /linux|bsd/ =~ RUBY_PLATFORM
|
22
|
+
system "xdg-open #{preview_path}"
|
23
|
+
else
|
24
|
+
STDERR.puts "Sorry, 'preview' is not implemented yet on this platform: #{RUBY_PLATFORM}".red
|
25
|
+
return
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Lando
|
2
|
+
class Generator
|
3
|
+
module CommandHelper
|
4
|
+
def templates_path
|
5
|
+
File.expand_path '../../../../templates', __FILE__
|
6
|
+
end
|
7
|
+
|
8
|
+
def assert_template_exists(template)
|
9
|
+
path = File.join templates_path, template
|
10
|
+
raise ArgumentError.new "Template '#{template}' does not exist" unless File.directory? path
|
11
|
+
end
|
12
|
+
|
13
|
+
def require_nonblank(name, value)
|
14
|
+
if value == nil || value.empty?
|
15
|
+
raise ArgumentError.new "'#{name}' must not be nil or empty"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
@@ -0,0 +1,440 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset='utf-8'>
|
5
|
+
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
|
6
|
+
<title>
|
7
|
+
Welcome to Middleman
|
8
|
+
</title>
|
9
|
+
<link href="stylesheets/normalize.css" rel="stylesheet" type="text/css" /><link href="/stylesheets/all.css" rel="stylesheet" type="text/css" />
|
10
|
+
<script src="javascripts/all.js" type="text/javascript"></script>
|
11
|
+
</head>
|
12
|
+
<body class='index'>
|
13
|
+
<div id='container'>
|
14
|
+
<section class='hero'>
|
15
|
+
<div class='blackener'></div>
|
16
|
+
<header>
|
17
|
+
<p>
|
18
|
+
a landing page template
|
19
|
+
by
|
20
|
+
<a href='http://montadigital.com'>Monta Digital</a>
|
21
|
+
</p>
|
22
|
+
</header>
|
23
|
+
<h1>Product Launch</h1>
|
24
|
+
<h2>Differentiated from competition</h2>
|
25
|
+
<form>
|
26
|
+
<input placeholder='My e-mail address' type='text'>
|
27
|
+
<input type='submit' value='Keep me in the loop'>
|
28
|
+
</form>
|
29
|
+
<div class='form_incentive'>
|
30
|
+
<img src='images/arrow.png'>
|
31
|
+
<p>
|
32
|
+
We promise to e-mail you only twice. Once for confirmation, and
|
33
|
+
once for the product launch.
|
34
|
+
</p>
|
35
|
+
</div>
|
36
|
+
<span class='chevron bottom'></span>
|
37
|
+
</section>
|
38
|
+
<section>
|
39
|
+
<h1>We plan to launch a website</h1>
|
40
|
+
<img class='centerbottom' src='images/Browser.svg'>
|
41
|
+
<p>
|
42
|
+
Donec placerat nibh eu aliquam facilisis. Morbi congue accumsan malesuada.
|
43
|
+
</p>
|
44
|
+
<p>
|
45
|
+
<a href="#">Nibh eu</a>
|
46
|
+
</p>
|
47
|
+
</section>
|
48
|
+
<section class='leftimage'>
|
49
|
+
<h1>... and a mobile app</h1>
|
50
|
+
<div class='left'>
|
51
|
+
<img src='images/mobile.svg'>
|
52
|
+
<p>
|
53
|
+
Image Caption
|
54
|
+
</p>
|
55
|
+
</div>
|
56
|
+
<div class='right'>
|
57
|
+
<p>
|
58
|
+
Donec placerat nibh eu aliquam facilisis. Morbi congue accumsan malesuada.
|
59
|
+
</p>
|
60
|
+
<ul>
|
61
|
+
<li>One reason why it is great...</li>
|
62
|
+
<li>... is that it is mobile ...</li>
|
63
|
+
<li>... and it is an app!</li>
|
64
|
+
</ul>
|
65
|
+
<p>
|
66
|
+
<a href="#">Morbi congue</a>
|
67
|
+
</p>
|
68
|
+
</div>
|
69
|
+
</section>
|
70
|
+
<section class='rightimage'>
|
71
|
+
<h1>What about images on the right?</h1>
|
72
|
+
<p>
|
73
|
+
Glad you asked! We have you covered.
|
74
|
+
</p>
|
75
|
+
<div class='left'>
|
76
|
+
<p>
|
77
|
+
Donec placerat nibh eu aliquam facilisis. Morbi congue accumsan malesuada.
|
78
|
+
</p>
|
79
|
+
<ul>
|
80
|
+
<li>One reason why it is great...</li>
|
81
|
+
<li>... is that it is mobile ...</li>
|
82
|
+
<li>... and it is an app!</li>
|
83
|
+
</ul>
|
84
|
+
<p>
|
85
|
+
<a href="#">Check this out</a>
|
86
|
+
</p>
|
87
|
+
</div>
|
88
|
+
<div class='right'>
|
89
|
+
<img src='images/mobile.svg'>
|
90
|
+
<p>
|
91
|
+
Image Caption
|
92
|
+
</p>
|
93
|
+
</div>
|
94
|
+
</section>
|
95
|
+
<section class='twoimages'>
|
96
|
+
<h1>Here are two images to clinch the deal</h1>
|
97
|
+
<div class='left'>
|
98
|
+
<img src='images/Modal.svg'>
|
99
|
+
<p>
|
100
|
+
Image Caption
|
101
|
+
</p>
|
102
|
+
</div>
|
103
|
+
<div class='right'>
|
104
|
+
<img src='images/Modal.svg'>
|
105
|
+
<p>
|
106
|
+
Image Caption
|
107
|
+
</p>
|
108
|
+
</div>
|
109
|
+
</section>
|
110
|
+
<section class='finalform'>
|
111
|
+
<p>We can notify you when Product becomes available. We promise not to spam you!</p>
|
112
|
+
<form>
|
113
|
+
<input placeholder='My e-mail address' type='text'>
|
114
|
+
<input type='submit' value='Keep me in the loop'>
|
115
|
+
</form>
|
116
|
+
</section>
|
117
|
+
<footer>
|
118
|
+
<p>
|
119
|
+
helped out by ♥
|
120
|
+
<a href='http://github.com/montadigital.com/lando'>lando</a>
|
121
|
+
</p>
|
122
|
+
</footer>
|
123
|
+
</div>
|
124
|
+
<style>
|
125
|
+
/* line 1, (__TEMPLATE__) */
|
126
|
+
section.leftimage > .right {
|
127
|
+
float: right;
|
128
|
+
width: 25%;
|
129
|
+
padding-right: 24%; }
|
130
|
+
|
131
|
+
/* line 6, (__TEMPLATE__) */
|
132
|
+
section.leftimage > .left {
|
133
|
+
float: left;
|
134
|
+
width: 49%; }
|
135
|
+
|
136
|
+
/* line 10, (__TEMPLATE__) */
|
137
|
+
section.leftimage > div.left > * {
|
138
|
+
width: 40%;
|
139
|
+
text-align: center;
|
140
|
+
display: block;
|
141
|
+
margin-right: 10%;
|
142
|
+
margin-left: auto; }
|
143
|
+
|
144
|
+
/* line 19, (__TEMPLATE__) */
|
145
|
+
section.rightimage > .left {
|
146
|
+
float: left;
|
147
|
+
width: 25%;
|
148
|
+
padding-left: 24%; }
|
149
|
+
|
150
|
+
/* line 24, (__TEMPLATE__) */
|
151
|
+
section.rightimage > .right {
|
152
|
+
float: right;
|
153
|
+
width: 49%; }
|
154
|
+
|
155
|
+
/* line 28, (__TEMPLATE__) */
|
156
|
+
section.rightimage > div.right > * {
|
157
|
+
width: 40%;
|
158
|
+
text-align: center;
|
159
|
+
display: block;
|
160
|
+
margin-right: auto;
|
161
|
+
margin-left: 10%; }
|
162
|
+
|
163
|
+
/* line 36, (__TEMPLATE__) */
|
164
|
+
section.twoimages > .right {
|
165
|
+
float: right;
|
166
|
+
width: 49%; }
|
167
|
+
|
168
|
+
/* line 40, (__TEMPLATE__) */
|
169
|
+
section.twoimages > .left {
|
170
|
+
float: left;
|
171
|
+
width: 49%; }
|
172
|
+
|
173
|
+
/* line 44, (__TEMPLATE__) */
|
174
|
+
section.twoimages > div.right > * {
|
175
|
+
width: 40%;
|
176
|
+
text-align: center;
|
177
|
+
display: block;
|
178
|
+
margin-right: auto;
|
179
|
+
margin-left: 10%; }
|
180
|
+
|
181
|
+
/* line 51, (__TEMPLATE__) */
|
182
|
+
section.twoimages > div.left > * {
|
183
|
+
width: 40%;
|
184
|
+
text-align: center;
|
185
|
+
display: block;
|
186
|
+
margin-right: 10%;
|
187
|
+
margin-left: auto; }
|
188
|
+
|
189
|
+
/* line 59, (__TEMPLATE__) */
|
190
|
+
section > img.centerbottom {
|
191
|
+
width: 35%;
|
192
|
+
display: block;
|
193
|
+
margin: 0 auto; }
|
194
|
+
|
195
|
+
/* line 64, (__TEMPLATE__) */
|
196
|
+
.chevron::before {
|
197
|
+
border-style: solid;
|
198
|
+
border-width: 0.25em 0.25em 0 0;
|
199
|
+
content: '';
|
200
|
+
display: inline-block;
|
201
|
+
height: 0.45em;
|
202
|
+
left: 0.15em;
|
203
|
+
position: relative;
|
204
|
+
top: 0.15em;
|
205
|
+
transform: rotate(-45deg);
|
206
|
+
vertical-align: top;
|
207
|
+
width: 0.45em; }
|
208
|
+
|
209
|
+
/* line 78, (__TEMPLATE__) */
|
210
|
+
.chevron.right:before {
|
211
|
+
left: 0;
|
212
|
+
transform: rotate(45deg); }
|
213
|
+
|
214
|
+
/* line 83, (__TEMPLATE__) */
|
215
|
+
.chevron.bottom:before {
|
216
|
+
top: 0;
|
217
|
+
transform: rotate(135deg); }
|
218
|
+
|
219
|
+
/* line 88, (__TEMPLATE__) */
|
220
|
+
.chevron.left:before {
|
221
|
+
left: 0.25em;
|
222
|
+
transform: rotate(-135deg); }
|
223
|
+
|
224
|
+
/* line 93, (__TEMPLATE__) */
|
225
|
+
* {
|
226
|
+
font-family: 'Open Sans', sans; }
|
227
|
+
|
228
|
+
/* line 96, (__TEMPLATE__) */
|
229
|
+
header a {
|
230
|
+
color: white; }
|
231
|
+
|
232
|
+
/* line 99, (__TEMPLATE__) */
|
233
|
+
footer a {
|
234
|
+
color: #4A4A4A; }
|
235
|
+
|
236
|
+
/* line 102, (__TEMPLATE__) */
|
237
|
+
footer {
|
238
|
+
overflow: hidden;
|
239
|
+
text-align: center;
|
240
|
+
font-size: 10px;
|
241
|
+
background: white;
|
242
|
+
margin: 20px 0;
|
243
|
+
color: #4A4A4A; }
|
244
|
+
|
245
|
+
/* line 110, (__TEMPLATE__) */
|
246
|
+
header {
|
247
|
+
left: 0;
|
248
|
+
top: 0;
|
249
|
+
text-align: center;
|
250
|
+
font-size: 10px;
|
251
|
+
position: absolute;
|
252
|
+
background: rgba(0, 0, 0, 0.8);
|
253
|
+
color: white;
|
254
|
+
width: 100%;
|
255
|
+
z-index: 1; }
|
256
|
+
|
257
|
+
/* line 137, (__TEMPLATE__) */
|
258
|
+
section {
|
259
|
+
width: 100%;
|
260
|
+
background: white;
|
261
|
+
overflow: hidden; }
|
262
|
+
|
263
|
+
/* line 143, (__TEMPLATE__) */
|
264
|
+
#container {
|
265
|
+
width: 100%;
|
266
|
+
height: 100%;
|
267
|
+
position: fixed;
|
268
|
+
perspective: 1px;
|
269
|
+
overflow-x: hidden;
|
270
|
+
overflow-y: scroll; }
|
271
|
+
|
272
|
+
/* line 152, (__TEMPLATE__) */
|
273
|
+
section.after-hero {
|
274
|
+
background-color: #fe3c40;
|
275
|
+
/* padding-top:5vh; */ }
|
276
|
+
|
277
|
+
/* line 157, (__TEMPLATE__) */
|
278
|
+
.blackener {
|
279
|
+
position: absolute;
|
280
|
+
left: 0;
|
281
|
+
top: 0;
|
282
|
+
width: 100%;
|
283
|
+
height: 100%;
|
284
|
+
background: rgba(0, 0, 0, 0.25);
|
285
|
+
z-index: -1; }
|
286
|
+
|
287
|
+
/* line 167, (__TEMPLATE__) */
|
288
|
+
section.hero > .chevron {
|
289
|
+
color: white;
|
290
|
+
position: absolute;
|
291
|
+
left: 50%;
|
292
|
+
bottom: 15px; }
|
293
|
+
|
294
|
+
/* line 174, (__TEMPLATE__) */
|
295
|
+
section.finalform {
|
296
|
+
margin-top: 80px;
|
297
|
+
margin-bottom: 80px;
|
298
|
+
display: -webkit-box;
|
299
|
+
/* OLD - iOS 6-, Safari 3.1-6 */
|
300
|
+
display: -moz-box;
|
301
|
+
/* OLD - Firefox 19- (buggy but mostly works) */
|
302
|
+
display: -ms-flexbox;
|
303
|
+
/* TWEENER - IE 10 */
|
304
|
+
display: -webkit-flex;
|
305
|
+
display: flex;
|
306
|
+
justify-content: center;
|
307
|
+
-webkit-justify-content: center;
|
308
|
+
-webkit-box-align: center;
|
309
|
+
-webkit-flex-align: center;
|
310
|
+
-ms-flex-align: center;
|
311
|
+
-webkit-align-items: center;
|
312
|
+
align-items: center;
|
313
|
+
flex-direction: column; }
|
314
|
+
|
315
|
+
/* line 180, (__TEMPLATE__) */
|
316
|
+
section.hero {
|
317
|
+
position: relative;
|
318
|
+
display: -webkit-box;
|
319
|
+
/* OLD - iOS 6-, Safari 3.1-6 */
|
320
|
+
display: -moz-box;
|
321
|
+
/* OLD - Firefox 19- (buggy but mostly works) */
|
322
|
+
display: -ms-flexbox;
|
323
|
+
/* TWEENER - IE 10 */
|
324
|
+
display: -webkit-flex;
|
325
|
+
display: flex;
|
326
|
+
justify-content: center;
|
327
|
+
-webkit-justify-content: center;
|
328
|
+
-webkit-box-align: center;
|
329
|
+
-webkit-flex-align: center;
|
330
|
+
-ms-flex-align: center;
|
331
|
+
-webkit-align-items: center;
|
332
|
+
align-items: center;
|
333
|
+
flex-direction: column;
|
334
|
+
background-image: url(images/hero.jpg);
|
335
|
+
background-size: cover;
|
336
|
+
background-position: 50% 50%;
|
337
|
+
transform: translateZ(-1px) scale(2);
|
338
|
+
top: 0;
|
339
|
+
height: 100vh;
|
340
|
+
position: relative;
|
341
|
+
z-index: -1000; }
|
342
|
+
|
343
|
+
/* line 193, (__TEMPLATE__) */
|
344
|
+
.form_incentive {
|
345
|
+
margin-top: 20px;
|
346
|
+
left: 10%;
|
347
|
+
width: 40%;
|
348
|
+
position: relative; }
|
349
|
+
|
350
|
+
/* line 199, (__TEMPLATE__) */
|
351
|
+
.form_incentive > p {
|
352
|
+
font-family: 'Annie Use Your Telescope', cursive;
|
353
|
+
color: white;
|
354
|
+
font-size: 18px; }
|
355
|
+
|
356
|
+
/* line 205, (__TEMPLATE__) */
|
357
|
+
.form_incentive > img {
|
358
|
+
width: 50px;
|
359
|
+
float: left;
|
360
|
+
margin-right: 10px; }
|
361
|
+
|
362
|
+
/* line 211, (__TEMPLATE__) */
|
363
|
+
.hero > h1 {
|
364
|
+
margin: 0; }
|
365
|
+
|
366
|
+
/* line 214, (__TEMPLATE__) */
|
367
|
+
.hero > h2 {
|
368
|
+
margin-top: 0;
|
369
|
+
color: white;
|
370
|
+
font-size: 30px;
|
371
|
+
text-transform: uppercase;
|
372
|
+
font-weight: 300;
|
373
|
+
text-shadow: 0 1px rgba(0, 0, 0, 0.5); }
|
374
|
+
|
375
|
+
/* line 222, (__TEMPLATE__) */
|
376
|
+
.hero > form {
|
377
|
+
padding: 10px;
|
378
|
+
border-radius: 10px;
|
379
|
+
background: rgba(0, 0, 0, 0.5); }
|
380
|
+
|
381
|
+
/* line 227, (__TEMPLATE__) */
|
382
|
+
form > input {
|
383
|
+
width: 50%; }
|
384
|
+
|
385
|
+
/* line 228, (__TEMPLATE__) */
|
386
|
+
.hero > form > input[type=text],
|
387
|
+
.finalform > form > input[type=text] {
|
388
|
+
border-radius: 5px;
|
389
|
+
border: 1px solid #A4A4A4;
|
390
|
+
font-family: 'Open Sans', sans;
|
391
|
+
padding: 5px;
|
392
|
+
width: 200px; }
|
393
|
+
|
394
|
+
/* line 236, (__TEMPLATE__) */
|
395
|
+
form {
|
396
|
+
text-align: center; }
|
397
|
+
|
398
|
+
/* line 237, (__TEMPLATE__) */
|
399
|
+
.hero > form > input[type=submit],
|
400
|
+
.finalform > form > input[type=submit] {
|
401
|
+
background: #E27319;
|
402
|
+
border: 0;
|
403
|
+
width: 150px;
|
404
|
+
padding: 5px 15px;
|
405
|
+
font-weight: bold;
|
406
|
+
color: white;
|
407
|
+
border-radius: 5px; }
|
408
|
+
|
409
|
+
/* line 248, (__TEMPLATE__) */
|
410
|
+
section a {
|
411
|
+
color: #E27319; }
|
412
|
+
|
413
|
+
/* line 251, (__TEMPLATE__) */
|
414
|
+
section.hero a {
|
415
|
+
color: white; }
|
416
|
+
|
417
|
+
/* line 255, (__TEMPLATE__) */
|
418
|
+
section > h1 {
|
419
|
+
text-align: center;
|
420
|
+
font-size: 40px; }
|
421
|
+
|
422
|
+
/* line 260, (__TEMPLATE__) */
|
423
|
+
section > p {
|
424
|
+
text-align: center; }
|
425
|
+
|
426
|
+
/* line 264, (__TEMPLATE__) */
|
427
|
+
section {
|
428
|
+
font-size: 12px; }
|
429
|
+
</style>
|
430
|
+
<style>
|
431
|
+
/* line 1, (__TEMPLATE__) */
|
432
|
+
.hero > h1 {
|
433
|
+
font-family: "Cabin", sans-serif;
|
434
|
+
color: white;
|
435
|
+
font-size: 80px;
|
436
|
+
font-weight: 400;
|
437
|
+
text-shadow: 0 1px rgba(0, 0, 0, 0.5); }
|
438
|
+
</style>
|
439
|
+
</body>
|
440
|
+
</html>
|