web_app_template 0.0.1 → 0.0.2

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.
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,76 @@
1
+
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+
9
+ <title><%= options.app_name %></title>
10
+
11
+ <%%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
12
+ <%%= javascript_include_tag "application", "data-turbolinks-track" => true %>
13
+ <%%= csrf_meta_tag %>
14
+
15
+ <style type="text/css">
16
+ body {
17
+ padding-top: 40px;
18
+ padding-bottom: 40px;
19
+ background-color: #eee;
20
+ }
21
+
22
+ .form-signin {
23
+ max-width: 330px;
24
+ padding: 15px;
25
+ margin: 0 auto;
26
+ }
27
+ .form-signin .form-signin-heading,
28
+ .form-signin .checkbox {
29
+ margin-bottom: 10px;
30
+ }
31
+ .form-signin .checkbox {
32
+ font-weight: normal;
33
+ }
34
+ .form-signin .form-control {
35
+ position: relative;
36
+ font-size: 16px;
37
+ height: auto;
38
+ padding: 10px;
39
+ -webkit-box-sizing: border-box;
40
+ -moz-box-sizing: border-box;
41
+ box-sizing: border-box;
42
+ }
43
+ .form-signin .form-control:focus {
44
+ z-index: 2;
45
+ }
46
+ .form-signin input[type="text"] {
47
+ margin-bottom: -1px;
48
+ border-bottom-left-radius: 0;
49
+ border-bottom-right-radius: 0;
50
+ }
51
+ .form-signin input[type="password"] {
52
+ margin-bottom: 10px;
53
+ border-top-left-radius: 0;
54
+ border-top-right-radius: 0;
55
+ }
56
+ </style>
57
+ </head>
58
+
59
+ <body>
60
+
61
+ <div class="container">
62
+
63
+ <form class="form-signin" role="form">
64
+ <h2 class="form-signin-heading">Please sign in</h2>
65
+ <input type="text" class="form-control" placeholder="Email address" required autofocus>
66
+ <input type="password" class="form-control" placeholder="Password" required>
67
+ <label class="checkbox">
68
+ <input type="checkbox" value="remember-me"> Remember me
69
+ </label>
70
+ <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
71
+ </form>
72
+
73
+ </div> <!-- /container -->
74
+
75
+ </body>
76
+ </html>
@@ -0,0 +1,57 @@
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
+ }
18
+ .starter-template {
19
+ padding: 40px 15px;
20
+ text-align: center;
21
+ }
22
+ </style>
23
+ </head>
24
+
25
+ <body>
26
+
27
+ <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
28
+ <div class="container">
29
+ <div class="navbar-header">
30
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
31
+ <span class="sr-only">Toggle navigation</span>
32
+ <span class="icon-bar"></span>
33
+ <span class="icon-bar"></span>
34
+ <span class="icon-bar"></span>
35
+ </button>
36
+ <a class="navbar-brand" href="#"><%= options.app_name %></a>
37
+ </div>
38
+ <div class="collapse navbar-collapse">
39
+ <ul class="nav navbar-nav">
40
+ <li class="active"><a href="#">Home</a></li>
41
+ <li><a href="#about">About</a></li>
42
+ <li><a href="#contact">Contact</a></li>
43
+ </ul>
44
+ </div><!--/.nav-collapse -->
45
+ </div>
46
+ </div>
47
+
48
+ <div class="container">
49
+
50
+ <div class="starter-template">
51
+ <h1>Bootstrap starter template</h1>
52
+ <p class="lead">Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.</p>
53
+ </div>
54
+
55
+ </div><!-- /.container -->
56
+ </body>
57
+ </html>
@@ -0,0 +1,77 @@
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
+ /* Sticky footer styles
16
+ -------------------------------------------------- */
17
+
18
+ html,
19
+ body {
20
+ height: 100%;
21
+ /* The html and body elements cannot have any padding or margin. */
22
+ }
23
+
24
+ /* Wrapper for page content to push down footer */
25
+ #wrap {
26
+ min-height: 100%;
27
+ height: auto;
28
+ /* Negative indent footer by its height */
29
+ margin: 0 auto -60px;
30
+ /* Pad bottom by footer height */
31
+ padding: 0 0 60px;
32
+ }
33
+
34
+ /* Set the fixed height of the footer here */
35
+ #footer {
36
+ height: 60px;
37
+ background-color: #f5f5f5;
38
+ }
39
+
40
+
41
+ /* Custom page CSS
42
+ -------------------------------------------------- */
43
+ /* Not required for template or sticky footer method. */
44
+
45
+ .container {
46
+ width: auto;
47
+ max-width: 680px;
48
+ padding: 0 15px;
49
+ }
50
+ .container .text-muted {
51
+ margin: 20px 0;
52
+ }
53
+ </style>
54
+ </head>
55
+
56
+ <body>
57
+
58
+ <!-- Wrap all page content here -->
59
+ <div id="wrap">
60
+
61
+ <!-- Begin page content -->
62
+ <div class="container">
63
+ <div class="page-header">
64
+ <h1>Sticky footer</h1>
65
+ </div>
66
+ <p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.</p>
67
+ <p>Use <a href="../sticky-footer-navbar">the sticky footer with a fixed navbar</a> if need be, too.</p>
68
+ </div>
69
+ </div>
70
+
71
+ <div id="footer">
72
+ <div class="container">
73
+ <p class="text-muted">Place sticky footer content here.</p>
74
+ </div>
75
+ </div>
76
+ </body>
77
+ </html>
@@ -0,0 +1,118 @@
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
+ /* Sticky footer styles
16
+ -------------------------------------------------- */
17
+
18
+ html,
19
+ body {
20
+ height: 100%;
21
+ /* The html and body elements cannot have any padding or margin. */
22
+ }
23
+
24
+ /* Wrapper for page content to push down footer */
25
+ #wrap {
26
+ min-height: 100%;
27
+ height: auto;
28
+ /* Negative indent footer by its height */
29
+ margin: 0 auto -60px;
30
+ /* Pad bottom by footer height */
31
+ padding: 0 0 60px;
32
+ }
33
+
34
+ /* Set the fixed height of the footer here */
35
+ #footer {
36
+ height: 60px;
37
+ background-color: #f5f5f5;
38
+ }
39
+
40
+
41
+ /* Custom page CSS
42
+ -------------------------------------------------- */
43
+ /* Not required for template or sticky footer method. */
44
+
45
+ #wrap > .container {
46
+ padding: 60px 15px 0;
47
+ }
48
+ .container .text-muted {
49
+ margin: 20px 0;
50
+ }
51
+
52
+ #footer > .container {
53
+ padding-left: 15px;
54
+ padding-right: 15px;
55
+ }
56
+
57
+ code {
58
+ font-size: 80%;
59
+ }
60
+ </style>
61
+ </head>
62
+
63
+ <body>
64
+
65
+ <!-- Wrap all page content here -->
66
+ <div id="wrap">
67
+
68
+ <!-- Fixed navbar -->
69
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
70
+ <div class="container">
71
+ <div class="navbar-header">
72
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
73
+ <span class="sr-only">Toggle navigation</span>
74
+ <span class="icon-bar"></span>
75
+ <span class="icon-bar"></span>
76
+ <span class="icon-bar"></span>
77
+ </button>
78
+ <a class="navbar-brand" href="#"><%= options.app_name %></a>
79
+ </div>
80
+ <div class="collapse navbar-collapse">
81
+ <ul class="nav navbar-nav">
82
+ <li class="active"><a href="#">Home</a></li>
83
+ <li><a href="#about">About</a></li>
84
+ <li><a href="#contact">Contact</a></li>
85
+ <li class="dropdown">
86
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
87
+ <ul class="dropdown-menu">
88
+ <li><a href="#">Action</a></li>
89
+ <li><a href="#">Another action</a></li>
90
+ <li><a href="#">Something else here</a></li>
91
+ <li class="divider"></li>
92
+ <li class="dropdown-header">Nav header</li>
93
+ <li><a href="#">Separated link</a></li>
94
+ <li><a href="#">One more separated link</a></li>
95
+ </ul>
96
+ </li>
97
+ </ul>
98
+ </div><!--/.nav-collapse -->
99
+ </div>
100
+ </div>
101
+
102
+ <!-- Begin page content -->
103
+ <div class="container">
104
+ <div class="page-header">
105
+ <h1>Sticky footer with fixed navbar</h1>
106
+ </div>
107
+ <p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added within <code>#wrap</code> with <code>padding-top: 60px;</code> on the <code>.container</code>.</p>
108
+ <p>Back to <a href="../sticky-footer">the default sticky footer</a> minus the navbar.</p>
109
+ </div>
110
+ </div>
111
+
112
+ <div id="footer">
113
+ <div class="container">
114
+ <p class="text-muted">Place sticky footer content here.</p>
115
+ </div>
116
+ </div>
117
+ </body>
118
+ </html>
@@ -1,3 +1,3 @@
1
1
  module WebAppTemplate
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -0,0 +1,42 @@
1
+ require "spec_helper"
2
+
3
+ require "generator_spec/test_case"
4
+
5
+ require "generators/web_app_template/layout/layout_generator"
6
+
7
+ describe WebAppTemplate::Layout do
8
+ include GeneratorSpec::TestCase
9
+ destination File.expand_path('../../tmp', __FILE__)
10
+
11
+ before(:all) do
12
+ prepare_destination
13
+ end
14
+
15
+ it 'creates layout with name test1' do
16
+ run_generator %w(test1)
17
+ assert_file 'app/views/layouts/test1.html.erb'
18
+ end
19
+
20
+ describe 'are generated' do
21
+ describe 'with default template engine' do
22
+ before {run_generator}
23
+ it 'application.html.erb' do
24
+ assert_file 'app/views/layouts/application.html.erb'
25
+ end
26
+ end
27
+ describe 'with haml' do
28
+ before {run_generator %w(--engine=haml)}
29
+ it 'application.html.haml' do
30
+ assert_file 'app/views/layouts/application.html.haml'
31
+ end
32
+ end
33
+ describe 'with slim' do
34
+ before do
35
+ run_generator %w(--engine=slim)
36
+ end
37
+ it 'application.html.slim' do
38
+ assert_file 'app/views/layouts/application.html.slim'
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,14 @@
1
+ require 'bundler/setup'
2
+ require 'rspec'
3
+
4
+ RSpec.configure do |config|
5
+ config.treat_symbols_as_metadata_keys_with_true_values = true
6
+ config.run_all_when_everything_filtered = true
7
+ config.filter_run :focus
8
+
9
+ # Run specs in random order to surface order dependencies. If you find an
10
+ # order dependency and want to debug it, you can fix the order by providing
11
+ # the seed, which is printed after each run.
12
+ # --seed 1234
13
+ config.order = 'random'
14
+ end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["jurianp@gmail.com"]
11
11
  spec.summary = %q{Web app template generator}
12
12
  spec.description = %q{Web app theme generator for Ruby On Rails projects}
13
- spec.homepage = "http://github.com/jurrick/web-app-template"
13
+ spec.homepage = "http://github.com/jurrick/web_app_ratemplate"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
22
  spec.add_development_dependency "rake"
23
- end
23
+ spec.add_development_dependency "rspec"
24
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_app_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurrick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-11 00:00:00.000000000 Z
11
+ date: 2014-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: Web app theme generator for Ruby On Rails projects
42
56
  email:
43
57
  - jurianp@gmail.com
@@ -46,21 +60,33 @@ extensions: []
46
60
  extra_rdoc_files: []
47
61
  files:
48
62
  - .gitignore
49
- - .idea/encodings.xml
50
- - .idea/misc.xml
51
- - .idea/modules.xml
52
- - .idea/scopes/scope_settings.xml
53
- - .idea/vcs.xml
54
- - .idea/web_app_template.iml
55
- - .idea/workspace.xml
63
+ - .rspec
64
+ - .travis.yml
56
65
  - Gemfile
66
+ - LICENSE
57
67
  - LICENSE.txt
58
68
  - README.md
59
69
  - Rakefile
70
+ - lib/generators/web_app_template/layout/layout_generator.rb
71
+ - lib/generators/web_app_template/layout/templates/bootstrap3/carousel.html.erb
72
+ - lib/generators/web_app_template/layout/templates/bootstrap3/jumbotron.html.erb
73
+ - lib/generators/web_app_template/layout/templates/bootstrap3/justified_nav.html.erb
74
+ - lib/generators/web_app_template/layout/templates/bootstrap3/narrow_jumbotron.html.erb
75
+ - lib/generators/web_app_template/layout/templates/bootstrap3/navbar.html.erb
76
+ - lib/generators/web_app_template/layout/templates/bootstrap3/navbar_fixed_top.html.erb
77
+ - lib/generators/web_app_template/layout/templates/bootstrap3/navbar_static_top.html.erb
78
+ - lib/generators/web_app_template/layout/templates/bootstrap3/non_responsive.html.erb
79
+ - lib/generators/web_app_template/layout/templates/bootstrap3/offcanvas.html.erb
80
+ - lib/generators/web_app_template/layout/templates/bootstrap3/sign_in_page.html.erb
81
+ - lib/generators/web_app_template/layout/templates/bootstrap3/starter.html.erb
82
+ - lib/generators/web_app_template/layout/templates/bootstrap3/sticky_footer.html.erb
83
+ - lib/generators/web_app_template/layout/templates/bootstrap3/sticky_footer_navbar.html.erb
60
84
  - lib/web_app_template.rb
61
85
  - lib/web_app_template/version.rb
86
+ - spec/generators/layout_spec.rb
87
+ - spec/spec_helper.rb
62
88
  - web_app_template.gemspec
63
- homepage: http://github.com/jurrick/web-app-template
89
+ homepage: http://github.com/jurrick/web_app_ratemplate
64
90
  licenses:
65
91
  - MIT
66
92
  metadata: {}
@@ -84,4 +110,6 @@ rubygems_version: 2.2.0
84
110
  signing_key:
85
111
  specification_version: 4
86
112
  summary: Web app template generator
87
- test_files: []
113
+ test_files:
114
+ - spec/generators/layout_spec.rb
115
+ - spec/spec_helper.rb