web_app_template 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +6 -0
  5. data/Gemfile +8 -0
  6. data/LICENSE +20 -0
  7. data/README.md +24 -3
  8. data/lib/generators/web_app_template/layout/layout_generator.rb +60 -0
  9. data/lib/generators/web_app_template/layout/templates/bootstrap3/carousel.html.erb +336 -0
  10. data/lib/generators/web_app_template/layout/templates/bootstrap3/jumbotron.html.erb +85 -0
  11. data/lib/generators/web_app_template/layout/templates/bootstrap3/justified_nav.html.erb +157 -0
  12. data/lib/generators/web_app_template/layout/templates/bootstrap3/narrow_jumbotron.html.erb +146 -0
  13. data/lib/generators/web_app_template/layout/templates/bootstrap3/navbar.html.erb +78 -0
  14. data/lib/generators/web_app_template/layout/templates/bootstrap3/navbar_fixed_top.html.erb +77 -0
  15. data/lib/generators/web_app_template/layout/templates/bootstrap3/navbar_static_top.html.erb +81 -0
  16. data/lib/generators/web_app_template/layout/templates/bootstrap3/non_responsive.html.erb +200 -0
  17. data/lib/generators/web_app_template/layout/templates/bootstrap3/offcanvas.html.erb +163 -0
  18. data/lib/generators/web_app_template/layout/templates/bootstrap3/sign_in_page.html.erb +76 -0
  19. data/lib/generators/web_app_template/layout/templates/bootstrap3/starter.html.erb +57 -0
  20. data/lib/generators/web_app_template/layout/templates/bootstrap3/sticky_footer.html.erb +77 -0
  21. data/lib/generators/web_app_template/layout/templates/bootstrap3/sticky_footer_navbar.html.erb +118 -0
  22. data/lib/web_app_template/version.rb +1 -1
  23. data/spec/generators/layout_spec.rb +42 -0
  24. data/spec/spec_helper.rb +14 -0
  25. data/web_app_template.gemspec +3 -2
  26. metadata +39 -11
  27. data/.idea/encodings.xml +0 -5
  28. data/.idea/misc.xml +0 -5
  29. data/.idea/modules.xml +0 -9
  30. data/.idea/scopes/scope_settings.xml +0 -5
  31. data/.idea/vcs.xml +0 -7
  32. data/.idea/web_app_template.iml +0 -19
  33. data/.idea/workspace.xml +0 -50
@@ -0,0 +1,85 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+
8
+ <title><%= options.app_name %></title>
9
+
10
+ <%%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
11
+ <%%= javascript_include_tag "application", "data-turbolinks-track" => true %>
12
+ <%%= csrf_meta_tag %>
13
+
14
+ <style type="text/css">
15
+ body {
16
+ padding-top: 50px;
17
+ padding-bottom: 20px;
18
+ }
19
+ </style>
20
+ </head>
21
+
22
+ <body>
23
+
24
+ <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
25
+ <div class="container">
26
+ <div class="navbar-header">
27
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
28
+ <span class="sr-only">Toggle navigation</span>
29
+ <span class="icon-bar"></span>
30
+ <span class="icon-bar"></span>
31
+ <span class="icon-bar"></span>
32
+ </button>
33
+ <a class="navbar-brand" href="#"><%= options.app_name %></a>
34
+ </div>
35
+ <div class="navbar-collapse collapse">
36
+ <form class="navbar-form navbar-right" role="form">
37
+ <div class="form-group">
38
+ <input type="text" placeholder="Email" class="form-control">
39
+ </div>
40
+ <div class="form-group">
41
+ <input type="password" placeholder="Password" class="form-control">
42
+ </div>
43
+ <button type="submit" class="btn btn-success">Sign in</button>
44
+ </form>
45
+ </div><!--/.navbar-collapse -->
46
+ </div>
47
+ </div>
48
+
49
+ <!-- Main jumbotron for a primary marketing message or call to action -->
50
+ <div class="jumbotron">
51
+ <div class="container">
52
+ <h1>Hello, world!</h1>
53
+ <p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
54
+ <p><a class="btn btn-primary btn-lg" role="button">Learn more &raquo;</a></p>
55
+ </div>
56
+ </div>
57
+
58
+ <div class="container">
59
+ <!-- Example row of columns -->
60
+ <div class="row">
61
+ <div class="col-md-4">
62
+ <h2>Heading</h2>
63
+ <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
64
+ <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
65
+ </div>
66
+ <div class="col-md-4">
67
+ <h2>Heading</h2>
68
+ <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
69
+ <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
70
+ </div>
71
+ <div class="col-md-4">
72
+ <h2>Heading</h2>
73
+ <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
74
+ <p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
75
+ </div>
76
+ </div>
77
+
78
+ <hr>
79
+
80
+ <footer>
81
+ <p>&copy; Company 2013</p>
82
+ </footer>
83
+ </div> <!-- /container -->
84
+ </body>
85
+ </html>
@@ -0,0 +1,157 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+
8
+ <title><%= options.app_name %></title>
9
+
10
+ <%%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
11
+ <%%= javascript_include_tag "application", "data-turbolinks-track" => true %>
12
+ <%%= csrf_meta_tag %>
13
+
14
+ <style type="text/css">
15
+ body {
16
+ padding-top: 20px;
17
+ }
18
+
19
+ .footer {
20
+ border-top: 1px solid #eee;
21
+ margin-top: 40px;
22
+ padding-top: 40px;
23
+ padding-bottom: 40px;
24
+ }
25
+
26
+ /* Main marketing message and sign up button */
27
+ .jumbotron {
28
+ text-align: center;
29
+ background-color: transparent;
30
+ }
31
+ .jumbotron .btn {
32
+ font-size: 21px;
33
+ padding: 14px 24px;
34
+ }
35
+
36
+ /* Customize the nav-justified links to be fill the entire space of the .navbar */
37
+
38
+ .nav-justified {
39
+ background-color: #eee;
40
+ border-radius: 5px;
41
+ border: 1px solid #ccc;
42
+ }
43
+ .nav-justified > li > a {
44
+ margin-bottom: 0;
45
+ padding-top: 15px;
46
+ padding-bottom: 15px;
47
+ color: #777;
48
+ font-weight: bold;
49
+ text-align: center;
50
+ border-bottom: 1px solid #d5d5d5;
51
+ background-color: #e5e5e5; /* Old browsers */
52
+ background-repeat: repeat-x; /* Repeat the gradient */
53
+ background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%); /* FF3.6+ */
54
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
55
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Chrome 10+,Safari 5.1+ */
56
+ background-image: -o-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Opera 11.10+ */
57
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
58
+ background-image: linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* W3C */
59
+ }
60
+ .nav-justified > .active > a,
61
+ .nav-justified > .active > a:hover,
62
+ .nav-justified > .active > a:focus {
63
+ background-color: #ddd;
64
+ background-image: none;
65
+ box-shadow: inset 0 3px 7px rgba(0,0,0,.15);
66
+ }
67
+ .nav-justified > li:first-child > a {
68
+ border-radius: 5px 5px 0 0;
69
+ }
70
+ .nav-justified > li:last-child > a {
71
+ border-bottom: 0;
72
+ border-radius: 0 0 5px 5px;
73
+ }
74
+
75
+ @media (min-width: 768px) {
76
+ .nav-justified {
77
+ max-height: 52px;
78
+ }
79
+ .nav-justified > li > a {
80
+ border-left: 1px solid #fff;
81
+ border-right: 1px solid #d5d5d5;
82
+ }
83
+ .nav-justified > li:first-child > a {
84
+ border-left: 0;
85
+ border-radius: 5px 0 0 5px;
86
+ }
87
+ .nav-justified > li:last-child > a {
88
+ border-radius: 0 5px 5px 0;
89
+ border-right: 0;
90
+ }
91
+ }
92
+
93
+ /* Responsive: Portrait tablets and up */
94
+ @media screen and (min-width: 768px) {
95
+ /* Remove the padding we set earlier */
96
+ .masthead,
97
+ .marketing,
98
+ .footer {
99
+ padding-left: 0;
100
+ padding-right: 0;
101
+ }
102
+ }
103
+ </style>
104
+ </head>
105
+
106
+ <body>
107
+
108
+ <div class="container">
109
+
110
+ <div class="masthead">
111
+ <h3 class="text-muted"><%= options.app_name %></h3>
112
+ <ul class="nav nav-justified">
113
+ <li class="active"><a href="#">Home</a></li>
114
+ <li><a href="#">Projects</a></li>
115
+ <li><a href="#">Services</a></li>
116
+ <li><a href="#">Downloads</a></li>
117
+ <li><a href="#">About</a></li>
118
+ <li><a href="#">Contact</a></li>
119
+ </ul>
120
+ </div>
121
+
122
+ <!-- Jumbotron -->
123
+ <div class="jumbotron">
124
+ <h1>Marketing stuff!</h1>
125
+ <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet.</p>
126
+ <p><a class="btn btn-lg btn-success" href="#" role="button">Get started today</a></p>
127
+ </div>
128
+
129
+ <!-- Example row of columns -->
130
+ <div class="row">
131
+ <div class="col-lg-4">
132
+ <h2>Safari bug warning!</h2>
133
+ <p class="text-danger">Safari exhibits a bug in which resizing your browser horizontally causes rendering errors in the justified nav that are cleared upon refreshing.</p>
134
+ <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
135
+ <p><a class="btn btn-primary" href="#" role="button">View details &raquo;</a></p>
136
+ </div>
137
+ <div class="col-lg-4">
138
+ <h2>Heading</h2>
139
+ <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
140
+ <p><a class="btn btn-primary" href="#" role="button">View details &raquo;</a></p>
141
+ </div>
142
+ <div class="col-lg-4">
143
+ <h2>Heading</h2>
144
+ <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa.</p>
145
+ <p><a class="btn btn-primary" href="#" role="button">View details &raquo;</a></p>
146
+ </div>
147
+ </div>
148
+
149
+ <!-- Site footer -->
150
+ <div class="footer">
151
+ <p>&copy; Company 2013</p>
152
+ </div>
153
+
154
+ </div> <!-- /container -->
155
+
156
+ </body>
157
+ </html>
@@ -0,0 +1,146 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+
8
+ <title><%= options.app_name %></title>
9
+
10
+ <%%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
11
+ <%%= javascript_include_tag "application", "data-turbolinks-track" => true %>
12
+ <%%= csrf_meta_tag %>
13
+
14
+ <style type="text/css">
15
+ /* Space out content a bit */
16
+ body {
17
+ padding-top: 20px;
18
+ padding-bottom: 20px;
19
+ }
20
+
21
+ /* Everything but the jumbotron gets side spacing for mobile first views */
22
+ .header,
23
+ .marketing,
24
+ .footer {
25
+ padding-left: 15px;
26
+ padding-right: 15px;
27
+ }
28
+
29
+ /* Custom page header */
30
+ .header {
31
+ border-bottom: 1px solid #e5e5e5;
32
+ }
33
+ /* Make the masthead heading the same height as the navigation */
34
+ .header h3 {
35
+ margin-top: 0;
36
+ margin-bottom: 0;
37
+ line-height: 40px;
38
+ padding-bottom: 19px;
39
+ }
40
+
41
+ /* Custom page footer */
42
+ .footer {
43
+ padding-top: 19px;
44
+ color: #777;
45
+ border-top: 1px solid #e5e5e5;
46
+ }
47
+
48
+ /* Customize container */
49
+ @media (min-width: 768px) {
50
+ .container {
51
+ max-width: 730px;
52
+ }
53
+ }
54
+ .container-narrow > hr {
55
+ margin: 30px 0;
56
+ }
57
+
58
+ /* Main marketing message and sign up button */
59
+ .jumbotron {
60
+ text-align: center;
61
+ border-bottom: 1px solid #e5e5e5;
62
+ }
63
+ .jumbotron .btn {
64
+ font-size: 21px;
65
+ padding: 14px 24px;
66
+ }
67
+
68
+ /* Supporting marketing content */
69
+ .marketing {
70
+ margin: 40px 0;
71
+ }
72
+ .marketing p + h4 {
73
+ margin-top: 28px;
74
+ }
75
+
76
+ /* Responsive: Portrait tablets and up */
77
+ @media screen and (min-width: 768px) {
78
+ /* Remove the padding we set earlier */
79
+ .header,
80
+ .marketing,
81
+ .footer {
82
+ padding-left: 0;
83
+ padding-right: 0;
84
+ }
85
+ /* Space out the masthead */
86
+ .header {
87
+ margin-bottom: 30px;
88
+ }
89
+ /* Remove the bottom border on the jumbotron for visual effect */
90
+ .jumbotron {
91
+ border-bottom: 0;
92
+ }
93
+ }
94
+ </style>
95
+ </head>
96
+
97
+ <body>
98
+
99
+ <div class="container">
100
+ <div class="header">
101
+ <ul class="nav nav-pills pull-right">
102
+ <li class="active"><a href="#">Home</a></li>
103
+ <li><a href="#">About</a></li>
104
+ <li><a href="#">Contact</a></li>
105
+ </ul>
106
+ <h3 class="text-muted"><%= options.app_name %></h3>
107
+ </div>
108
+
109
+ <div class="jumbotron">
110
+ <h1>Jumbotron heading</h1>
111
+ <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
112
+ <p><a class="btn btn-lg btn-success" href="#" role="button">Sign up today</a></p>
113
+ </div>
114
+
115
+ <div class="row marketing">
116
+ <div class="col-lg-6">
117
+ <h4>Subheading</h4>
118
+ <p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>
119
+
120
+ <h4>Subheading</h4>
121
+ <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>
122
+
123
+ <h4>Subheading</h4>
124
+ <p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
125
+ </div>
126
+
127
+ <div class="col-lg-6">
128
+ <h4>Subheading</h4>
129
+ <p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>
130
+
131
+ <h4>Subheading</h4>
132
+ <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>
133
+
134
+ <h4>Subheading</h4>
135
+ <p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
136
+ </div>
137
+ </div>
138
+
139
+ <div class="footer">
140
+ <p>&copy; Company 2013</p>
141
+ </div>
142
+
143
+ </div> <!-- /container -->
144
+
145
+ </body>
146
+ </html>
@@ -0,0 +1,78 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+
8
+ <title><%= options.app_name %></title>
9
+
10
+ <%%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
11
+ <%%= javascript_include_tag "application", "data-turbolinks-track" => true %>
12
+ <%%= csrf_meta_tag %>
13
+
14
+ <style type="text/css">
15
+ body {
16
+ padding-top: 20px;
17
+ padding-bottom: 20px;
18
+ }
19
+
20
+ .navbar {
21
+ margin-bottom: 20px;
22
+ }
23
+ </style>
24
+ </head>
25
+
26
+ <body>
27
+
28
+ <div class="container">
29
+
30
+ <!-- Static navbar -->
31
+ <div class="navbar navbar-default" role="navigation">
32
+ <div class="navbar-header">
33
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
34
+ <span class="sr-only">Toggle navigation</span>
35
+ <span class="icon-bar"></span>
36
+ <span class="icon-bar"></span>
37
+ <span class="icon-bar"></span>
38
+ </button>
39
+ <a class="navbar-brand" href="#"><%= options.app_name %></a>
40
+ </div>
41
+ <div class="navbar-collapse collapse">
42
+ <ul class="nav navbar-nav">
43
+ <li class="active"><a href="#">Link</a></li>
44
+ <li><a href="#">Link</a></li>
45
+ <li><a href="#">Link</a></li>
46
+ <li class="dropdown">
47
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
48
+ <ul class="dropdown-menu">
49
+ <li><a href="#">Action</a></li>
50
+ <li><a href="#">Another action</a></li>
51
+ <li><a href="#">Something else here</a></li>
52
+ <li class="divider"></li>
53
+ <li class="dropdown-header">Nav header</li>
54
+ <li><a href="#">Separated link</a></li>
55
+ <li><a href="#">One more separated link</a></li>
56
+ </ul>
57
+ </li>
58
+ </ul>
59
+ <ul class="nav navbar-nav navbar-right">
60
+ <li class="active"><a href="#">Default</a></li>
61
+ <li><a href="#">Static top</a></li>
62
+ <li><a href="#">Fixed top</a></li>
63
+ </ul>
64
+ </div><!--/.nav-collapse -->
65
+ </div>
66
+
67
+ <!-- Main component for a primary marketing message or call to action -->
68
+ <div class="jumbotron">
69
+ <h1>Navbar example</h1>
70
+ <p>This example is a quick exercise to illustrate how the default, static navbar and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.</p>
71
+ <p>
72
+ <a class="btn btn-lg btn-primary" href="../../components/#navbar" role="button">View navbar docs &raquo;</a>
73
+ </p>
74
+ </div>
75
+
76
+ </div> <!-- /container -->
77
+ </body>
78
+ </html>