easy_html_generator 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +6 -0
  3. data/.gitignore +12 -0
  4. data/.rubocop.yml +18 -0
  5. data/.travis.yml +14 -0
  6. data/Gemfile +3 -0
  7. data/README.md +51 -337
  8. data/Rakefile +42 -0
  9. data/config.ru +4 -0
  10. data/docs/CONFIGURATION.md +84 -0
  11. data/{CONTRIBUTING.md → docs/CONTRIBUTING.md} +2 -0
  12. data/docs/GENERATORS.md +210 -0
  13. data/docs/GETSTARTED.md +92 -0
  14. data/easy_html_generator.gemspec +54 -0
  15. data/lib/easy_html_generator/checksum.rb +4 -0
  16. data/lib/easy_html_generator/config.rb +0 -77
  17. data/lib/easy_html_generator/generator/base.rb +20 -58
  18. data/lib/easy_html_generator/generator/combine.rb +9 -19
  19. data/lib/easy_html_generator/generator/compile/base.rb +51 -0
  20. data/lib/easy_html_generator/generator/compile/coffee.rb +6 -13
  21. data/lib/easy_html_generator/generator/compile/haml/helper/activesupport_override.rb +1 -6
  22. data/lib/easy_html_generator/generator/compile/haml/helper/asset_helper.rb +7 -7
  23. data/lib/easy_html_generator/generator/compile/haml.rb +20 -45
  24. data/lib/easy_html_generator/generator/compile/sass.rb +9 -13
  25. data/lib/easy_html_generator/generator/copy.rb +7 -14
  26. data/lib/easy_html_generator/generator/delete.rb +4 -13
  27. data/lib/easy_html_generator/generator/minimize/css.rb +5 -12
  28. data/lib/easy_html_generator/generator/minimize/html.rb +5 -12
  29. data/lib/easy_html_generator/generator/minimize/images.rb +6 -20
  30. data/lib/easy_html_generator/generator/minimize/js.rb +5 -12
  31. data/lib/easy_html_generator/generator/service/analytics.rb +19 -19
  32. data/lib/easy_html_generator/generator/service/bower.rb +21 -17
  33. data/lib/easy_html_generator/generator/service/grunt.rb +12 -11
  34. data/lib/easy_html_generator/generator/service/sitemap.rb +33 -0
  35. data/lib/easy_html_generator/generator/structure.rb +2 -6
  36. data/lib/easy_html_generator/generator.rb +6 -6
  37. data/lib/easy_html_generator/project.rb +5 -0
  38. data/lib/easy_html_generator/project_path_resolver.rb +57 -0
  39. data/lib/easy_html_generator/rack_dispatcher.rb +1 -1
  40. data/lib/easy_html_generator/version.rb +4 -0
  41. data/lib/easy_html_generator/workspace.rb +1 -1
  42. data/lib/easy_html_generator.rb +19 -18
  43. data/src/demo/assets/styles/app.css.sass +47 -2
  44. data/src/demo/lib/helper/projecthelper.rb +3 -0
  45. data/src/demo/project.yml +142 -0
  46. data/src/demo/views/index/_bower_and_grunt.haml +7 -0
  47. data/src/demo/views/index/_dry.haml +16 -0
  48. data/src/demo/views/index/_haml_sass_coffee.haml +11 -0
  49. data/src/demo/views/index/_inline_coffee_and_sass.haml +43 -0
  50. data/src/demo/views/index/_sass_mixins.haml +76 -0
  51. data/src/demo/views/index.html.haml +13 -1
  52. data/src/demo/views/layout/_assets.javascripts.haml +7 -0
  53. data/src/demo/views/layout/_assets.metadata.haml +12 -0
  54. data/src/demo/views/layout/_assets.stylesheets.haml +9 -0
  55. data/src/demo/views/layout/_footer.haml +3 -0
  56. data/src/demo/views/layout/_header.haml +1 -0
  57. data/src/demo/views/layout.haml +8 -4
  58. data/src/demo/views/plain.html +1 -0
  59. data/src/shared/assets/styles/mixins/_bootstrap-fixes.sass +12 -0
  60. data/src/shared/assets/styles/mixins/_headjs-bootstrap-mediaqueries.sass +30 -0
  61. data/src/shared/project.yml +56 -35
  62. data/src/template/project.yml +57 -43
  63. metadata +75 -7
  64. data/src/demo/views/index/_lore_ipsum.haml +0 -1
@@ -0,0 +1,57 @@
1
+ # encoding: utf-8
2
+
3
+ # this class represents a project and handles generators and ressources
4
+ class EasyHtmlGenerator::ProjectPathResolver
5
+ def initialize(project)
6
+ @project = project
7
+ @path_prefix_replace_map = {
8
+ 'src' => project.src_path,
9
+ 'dist' => project.dist_path,
10
+ 'src.scripts' => project.src_path_to(:scripts),
11
+ 'src.styles' => project.src_path_to(:styles),
12
+ 'src.images' => project.src_path_to(:images),
13
+ 'src.public' => project.src_path_to(:public),
14
+ 'src.views' => project.src_path_to(:views),
15
+ 'dist.scripts' => project.dist_path_to(:scripts),
16
+ 'dist.styles' => project.dist_path_to(:styles),
17
+ 'dist.images' => project.dist_path_to(:images),
18
+ 'dist.public' => project.dist_path_to(:public),
19
+ 'dist.views' => project.dist_path_to(:views),
20
+ 'workspace.root' => EasyHtmlGenerator::WORKSPACE_PATH,
21
+ 'ehg.root' => EasyHtmlGenerator::EHG_SRC_PATH
22
+ }
23
+ end
24
+
25
+ def resolve_config(config)
26
+ resolve_hash(config)
27
+ end
28
+
29
+ private
30
+
31
+ def resolve_hash(myHash)
32
+ myHash.each do |key, value|
33
+ value.is_a?(Hash) ? resolve_hash(value) : (value.is_a?(Array) ? (myHash[key] = resolve_array(value)) : (myHash[key] = resolve_path(value)))
34
+ end
35
+ end
36
+
37
+ def resolve_array(myArray)
38
+ myArray.map do |value|
39
+ value.is_a?(Array) ? resolve_array(value) : (value.is_a?(Hash) ? resolve_hash(value) : resolve_path(value))
40
+ end
41
+ end
42
+
43
+ def resolve_path(path)
44
+ return path unless path.is_a? String
45
+ return path unless path.include? '://'
46
+
47
+ splitted = path.split('://')
48
+ unresolved_prefix = splitted.first
49
+
50
+ path_prefix = @path_prefix_replace_map[unresolved_prefix]
51
+
52
+ return path unless @path_prefix_replace_map.key? unresolved_prefix
53
+ return path_prefix if splitted.length == 1
54
+
55
+ File.join(path_prefix, splitted.second)
56
+ end
57
+ end
@@ -11,7 +11,7 @@ class EasyHtmlGenerator::RackDispatcher
11
11
  </style></head>
12
12
  <body>
13
13
  {CONTENT}
14
- <a target='_blank' href='#{EHG_URL}'>ehc on Github</a></body></html>"
14
+ <a target='_blank' href='#{EHG_URL}'>ehg on Github</a></body></html>"
15
15
 
16
16
  def initialize(app)
17
17
  @app = app
@@ -0,0 +1,4 @@
1
+ # encoding: utf-8
2
+ module EasyHtmlGenerator
3
+ VERSION = '1.0.5'
4
+ end
@@ -25,7 +25,7 @@ class EasyHtmlGenerator::Workspace
25
25
 
26
26
  def self.create_project(name)
27
27
  FileUtils.cp_r(
28
- File.join(EasyHtmlGenerator::EHC_SRC_PATH, 'template'),
28
+ File.join(EasyHtmlGenerator::EHG_SRC_PATH, 'template'),
29
29
  File.join(EasyHtmlGenerator::SRC_PATH, name))
30
30
  end
31
31
 
@@ -1,7 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- # add lib folder to paths
4
- $LOAD_PATH.unshift File.dirname(__FILE__)
3
+ require 'easy_html_generator/version'
5
4
 
6
5
  # just require bootsrap and it will be in the sass path
7
6
  require 'bootstrap-sass'
@@ -13,14 +12,14 @@ require 'thin'
13
12
 
14
13
  # main module loads projects and dispatches rack requests
15
14
  module EasyHtmlGenerator
16
- EHC_WORKSPACE_PATH =
15
+ EHG_WORKSPACE_PATH =
17
16
  File.expand_path File.join(File.dirname(__FILE__), '..')
18
17
 
19
- EHC_SRC_PATH = File.join(EHC_WORKSPACE_PATH, 'src')
20
- EHC_SHARED_PATH = File.join(EHC_SRC_PATH, 'shared')
21
- EHC_SHARED_HELPER_PATH = File.join(EHC_SHARED_PATH, 'lib', 'helper')
22
- EHC_SHARED_GENERATORS_PATH = File.join(EHC_SHARED_PATH, 'lib', 'generators')
23
- EHC_SHARED_STYLES_PATH = File.join(EHC_SHARED_PATH, 'assets', 'styles')
18
+ EHG_SRC_PATH = File.join(EHG_WORKSPACE_PATH, 'src')
19
+ EHG_SHARED_PATH = File.join(EHG_SRC_PATH, 'shared')
20
+ EHG_SHARED_HELPER_PATH = File.join(EHG_SHARED_PATH, 'lib', 'helper')
21
+ EHG_SHARED_GENERATORS_PATH = File.join(EHG_SHARED_PATH, 'lib', 'generators')
22
+ EHG_SHARED_STYLES_PATH = File.join(EHG_SHARED_PATH, 'assets', 'styles')
24
23
 
25
24
  WORKSPACE_PATH = Bundler.root
26
25
  SRC_PATH = File.join(WORKSPACE_PATH, 'src')
@@ -35,9 +34,9 @@ module EasyHtmlGenerator
35
34
  DIST_PATH
36
35
  ]
37
36
 
38
- COPY_ON_INIT = {
39
- EHC_SHARED_PATH => SHARED_PATH,
40
- "#{EHC_SRC_PATH}/template" => "#{SRC_PATH}/demo"
37
+ COPY_ON_INIT = {
38
+ EHG_SHARED_PATH => SHARED_PATH,
39
+ "#{EHG_SRC_PATH}/template" => "#{SRC_PATH}/demo"
41
40
  }
42
41
 
43
42
  Dir[File.dirname(__FILE__) + '/easy_html_generator/*.rb']
@@ -75,7 +74,7 @@ module EasyHtmlGenerator
75
74
  end
76
75
 
77
76
  def self.generate_all
78
- Workspace.projects.each{|name, project| project.generate }
77
+ Workspace.projects.each { |_name, project| project.generate }
79
78
  end
80
79
 
81
80
  def self.generate_project(project)
@@ -85,24 +84,26 @@ module EasyHtmlGenerator
85
84
  def self.rack_app
86
85
  Rack::Builder.new do
87
86
  use Rack::ShowExceptions
88
- use Rack::Reloader, 0
89
87
  use EasyHtmlGenerator::RackDispatcher
90
88
  use Rack::Deflater
91
89
  use Rack::ContentLength
92
90
  use Rack::StaticCache, urls: [''], root: EasyHtmlGenerator::DIST_PATH
93
91
  use Rack::Static,
94
- urls: [''],
95
- root: EasyHtmlGenerator::DIST_PATH,
96
- index: 'index.html'
92
+ urls: [''],
93
+ root: EasyHtmlGenerator::DIST_PATH,
94
+ index: 'index.html'
97
95
 
98
- run lambda { |env| [404, {'Content-Type' => 'text/plain'}, ['404 File not found!']] }
96
+ run -> (_env) do
97
+ [404, { 'Content-Type' => 'text/plain' }, ['404 File not found!']]
98
+ end
99
99
  end
100
100
  end
101
101
 
102
102
  def self.start_server(host, port)
103
103
  config = { Host: host,
104
- Port: port}
104
+ Port: port }
105
105
 
106
+ Thin::Logging.debug = true
106
107
  Rack::Handler.get('thin').run(rack_app, config)
107
108
  end
108
109
  end
@@ -1,2 +1,47 @@
1
- body
2
- background-color: red
1
+ @import "bootstrap/variables"
2
+ @import "bootstrap/mixins"
3
+ @import "mixins/css3"
4
+ @import "mixins/helper"
5
+ @import "mixins/normalize"
6
+ @import "mixins/buttons"
7
+ @import "mixins/arrows"
8
+
9
+ *
10
+ font-family: 'Open SANS',sans-serif
11
+
12
+ +headlines
13
+ +text-shadow(1px, 1px, 3px, #555)
14
+
15
+ h1
16
+ font-size: 42px
17
+ +bold
18
+
19
+ img
20
+ +transition(all, .3s, ease-in-out)
21
+
22
+ .semibold
23
+ font-weight: 600
24
+
25
+ .content-left, .content-right
26
+ +make-xs-column(12)
27
+ +make-sm-column(6)
28
+
29
+ .button.magenta
30
+ +make-magenta-button()
31
+ +zoom-on-hover
32
+
33
+ .button.green
34
+ +make-green-button()
35
+ +zoom-on-hover
36
+
37
+ .arrow-up
38
+ +arrow-up(60px, 20px, #62bc19)
39
+ +inline-block
40
+
41
+ .arrow-down
42
+ +arrow-down(40px, 40px, #c83c29)
43
+ +inline-block
44
+
45
+ .section
46
+ padding: 30px 0
47
+ +make-row
@@ -2,4 +2,7 @@
2
2
 
3
3
  # this helper will be loaded into the haml render context for this project
4
4
  module Projecthelper
5
+ def action_view_link
6
+ link_to 'action_view', 'http://guides.rubyonrails.org/action_view_overview.html#overview-of-helpers-provided-by-action-view', target: 'blank'
7
+ end
5
8
  end
@@ -0,0 +1,142 @@
1
+ generate_on_request_path_match:
2
+ - '.*html$'
3
+
4
+ paths:
5
+ src:
6
+ images: 'assets/images'
7
+ scripts: 'assets/scripts'
8
+ styles: 'assets/styles'
9
+ public: 'assets/public'
10
+ helper: 'lib/helper'
11
+ generators: 'lib/generators'
12
+ views: 'views'
13
+ dist:
14
+ public: ''
15
+ views: ''
16
+ images: 'images'
17
+ scripts: 'scripts'
18
+ styles: 'styles'
19
+
20
+ generators:
21
+ - delete:
22
+ enabled: false
23
+ source: 'dist://**/*'
24
+
25
+ - structure:
26
+ enabled: true
27
+
28
+ - service_bower:
29
+ enabled: true
30
+ source: 'src://'
31
+ target: 'dist://lib'
32
+
33
+ - compile_coffee:
34
+ enabled: true
35
+ minimize: true
36
+ source: 'src.scripts://'
37
+ target: 'dist.scripts://'
38
+ selector: '**/*.js.coffee'
39
+
40
+ - compile_sass:
41
+ enabled: true
42
+ minimize: true
43
+ source: 'src.styles://'
44
+ target: 'dist.styles://'
45
+ selector: '**/*.css.sass'
46
+
47
+ - copy:
48
+ enabled: true
49
+ repetitive:
50
+ -
51
+ source: 'src.styles://'
52
+ target: 'dist.styles://'
53
+ selector: '**/*.css'
54
+ -
55
+ source: 'src.scripts://'
56
+ target: 'dist.scripts://'
57
+ -
58
+ source: 'src.images://'
59
+ target: 'dist.images://'
60
+ -
61
+ source: 'src.public://'
62
+ target: 'dist.public://'
63
+
64
+ - compile_haml:
65
+ enabled: true
66
+ minimize: true
67
+ source: 'src.views://'
68
+ target: 'dist.views://'
69
+ selector: '**/*.html.haml'
70
+ default_layout: 'views/layout.haml'
71
+ renderer:
72
+ attr_wrapper: '"'
73
+ format: :html5
74
+ shared_helper_path: 'shared/lib'
75
+
76
+ - service_analytics:
77
+ enabled: false
78
+ source: 'dist.views://'
79
+ target: 'dist.views://'
80
+ selector: '**/*.html'
81
+ repetitive:
82
+ -
83
+ enabled: true
84
+ name: 'google'
85
+ code: "<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', '{GOOGLE_UA_ID}', 'auto');ga('send', 'pageview');</script>"
86
+ params:
87
+ GOOGLE_UA_ID: google_id
88
+
89
+ - minimize_js:
90
+ enabled: true
91
+ source: 'src.scripts://'
92
+ target: 'dist.scripts://'
93
+ selector: '**/*.js'
94
+ prefix_extension: '.min'
95
+
96
+ - minimize_css:
97
+ enabled: true
98
+ source: 'src.styles://'
99
+ target: 'dist.styles://'
100
+ selector: '**/*.css'
101
+ prefix_extension: '.min'
102
+
103
+ - minimize_html:
104
+ enabled: true
105
+ source: 'src.public://'
106
+ target: 'dist.public://'
107
+ selector: '**/*.html'
108
+ prefix_extension: ''
109
+
110
+ - minimize_images:
111
+ enabled: false
112
+ source: 'src.images://'
113
+ target: 'dist.images://'
114
+ selector: '**/*.{jpg,jpeg,png}'
115
+ options:
116
+ quality: 90
117
+ level: 3
118
+ verbose: true
119
+
120
+ - combine:
121
+ enabled: false
122
+ repetitive:
123
+ -
124
+ target: 'dist.scripts://combined.js'
125
+ sources:
126
+ - 'dist.scripts://**/*.js'
127
+ -
128
+ target: 'dist.styles://combined.css'
129
+ sources:
130
+ - 'dist.styles://**/*.css'
131
+
132
+ - service_grunt:
133
+ enabled: true
134
+ source: 'src://Gruntfile.coffee'
135
+ task: 'default'
136
+
137
+ - service_sitemap:
138
+ enabled: false
139
+ domain: www.demo.com
140
+ source: 'dist.views:'
141
+ target: 'dist.views://sitemap.xml'
142
+ selector: '**/*.html'
@@ -0,0 +1,7 @@
1
+ %h2.semibold
2
+ use bower and grunt in your projects
3
+
4
+ %p
5
+ just put a bower.json or a Gruntfile into your source folder and configure the generators in your project.yml. don't forget to install bower 'npm install -g bower\'
6
+ = link_to 'http://bower.io/', 'http://bower.io/', target: 'blank'
7
+ = link_to 'http://gruntjs.com/', 'http://gruntjs.com/', target: 'blank'
@@ -0,0 +1,16 @@
1
+ %h2.semibold
2
+ Dont`t repeat your self!
3
+
4
+ %p
5
+ Layouts, templates, partials, helpers and static assets. There are shared helper for haml, sass and coffee. You can extend these helpers. You can add per project helpers and generators or per workspace.
6
+ %p
7
+ So Dont Repeat Your self! There are tons of features allready implemented and there will be more!
8
+
9
+ = link_to 'Follow on github', 'https://github.com/creative-workflow/easy-html-generator', target: '_blank'
10
+
11
+ The copyright for ex.
12
+ %br
13
+ %code
14
+ \= copyright 'ehg'
15
+ %br
16
+ = copyright 'ehg'
@@ -0,0 +1,11 @@
1
+ %h2.semibold
2
+ sass, haml, coffee
3
+ %p
4
+ We use sass, haml and coffe script. We also include
5
+ = action_view_link
6
+ for easier displaying images for ex.
7
+ %br
8
+ %code
9
+ \= image_tag('demo.png', class: 'img-thumbnail', style: 'height: 50px; width: auto')
10
+ %br
11
+ = image_tag('demo.png', class: 'img-thumbnail', style: 'height: 50px; width: auto')
@@ -0,0 +1,43 @@
1
+ %h2.semibold
2
+ inline coffee and sass, with minimization support
3
+
4
+ .content-left
5
+ %h3
6
+ inline sass
7
+
8
+ %p.inline-sass
9
+ text styled from inline sass
10
+
11
+ = with_sass do
12
+ :plain
13
+ p.inline-sass
14
+ color: green
15
+
16
+ %pre.code
17
+ = preserve do
18
+ :escaped
19
+ = with_sass do
20
+ :plain
21
+ p.inline-sass
22
+ color: green
23
+
24
+ .content-right
25
+ %h3
26
+ inline coffee
27
+
28
+ %p
29
+ %button.inline-coffee
30
+ click me
31
+
32
+ = with_coffee do
33
+ :plain
34
+ $('.inline-coffee').click ->
35
+ alert 'button clicked'
36
+
37
+ %pre.code
38
+ = preserve do
39
+ :escaped
40
+ = with_coffee do
41
+ :plain
42
+ $('.inline-coffee').click ->
43
+ alert 'button clicked'
@@ -0,0 +1,76 @@
1
+
2
+ %h2.semibold
3
+ For sass we offer mixins for ...
4
+
5
+ .content-left
6
+ %h3
7
+ bootsrap, reset, normalize and headjs
8
+
9
+ %pre.code
10
+ = preserve do
11
+ :escaped
12
+ @import "bootstrap/variables"
13
+ @import "bootstrap/mixins"
14
+ @import "mixins/normalize"
15
+
16
+ *
17
+ font-family: 'Open SANS',sans-serif
18
+
19
+ .content-left, .content-right
20
+ +make-xs-column(12)
21
+ +make-sm-column(6)
22
+
23
+ .content-right
24
+ %h3
25
+ css3 and helper mixins
26
+
27
+ %pre.code
28
+ = preserve do
29
+ :escaped
30
+ @import "mixins/css3"
31
+ @import "mixins/helper"
32
+
33
+ +headlines
34
+ +text-shadow(1px, 1px, 3px, #555)
35
+
36
+ h1
37
+ +bold
38
+
39
+ img
40
+ +transition(all, .3s, ease-in-out)
41
+
42
+ .content-left
43
+ %h3
44
+ buttons
45
+
46
+ %p
47
+ .button.green
48
+ green button
49
+ .button.magenta
50
+ magenta button
51
+
52
+ %pre.code
53
+ = preserve do
54
+ :escaped
55
+ @import "mixins/buttons"
56
+
57
+ .button.magenta
58
+ +make-magenta-button()
59
+ +zoom-on-hover
60
+
61
+ .content-right
62
+ %h3
63
+ arrows
64
+
65
+ %p
66
+ .arrow-up
67
+ .arrow-down
68
+
69
+ %pre.code
70
+ = preserve do
71
+ :escaped
72
+ @import "mixins/arrows"
73
+
74
+ .arrow-up
75
+ +arrow-up(60px, 20px, #62bc19)
76
+ +inline-block
@@ -1 +1,13 @@
1
- = render_partial "index/_lore_ipsum"
1
+
2
+ %h1
3
+ easy-html-generator - It speeds up your web developement ...easy! =)
4
+
5
+ - partials= ['_dry',
6
+ '_haml_sass_coffee',
7
+ '_sass_mixins',
8
+ '_inline_coffee_and_sass',
9
+ '_bower_and_grunt']
10
+
11
+ - partials.each do |partial|
12
+ .section
13
+ = render_partial "index/#{partial}"
@@ -0,0 +1,7 @@
1
+ = javascript_include_tag 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'
2
+ = javascript_include_tag 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js'
3
+ /[if lt IE 9]
4
+ = javascript_include_tag 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js'
5
+ = javascript_include_tag 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js'
6
+ %script
7
+ var ltie9 = true
@@ -0,0 +1,12 @@
1
+ %title
2
+ easy-html-generator #demo
3
+
4
+ = meta_tag_http 'Content-Type', 'text/html; charset=utf-8'
5
+ = meta_tag_http 'X-UA-Compatible', 'IE=edge'
6
+ = meta_tag 'robots', 'noindex,follow,noodp,noydir'
7
+ = meta_tag 'description', ''
8
+ = meta_tag 'keywords', ''
9
+ = meta_tag 'viewport', 'width=device-width, initial-scale=1.0'
10
+
11
+ = link_tag 'favicon.ico', 'icon', 'image/x-icon'
12
+ = link_tag 'favicon.ico', 'shortcut icon', 'image/x-icon'
@@ -0,0 +1,9 @@
1
+
2
+ = stylesheet_link_tag 'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css'
3
+
4
+
5
+ = stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Open+Sans:400'
6
+ = stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Open+Sans:400italic'
7
+ = stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Open+Sans:600'
8
+ = stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Open+Sans:700'
9
+ = inline_stylesheet_link_tag 'app.css'
@@ -0,0 +1,3 @@
1
+ .footer
2
+ .copyright
3
+ = copyright('ehg')
@@ -0,0 +1 @@
1
+
@@ -1,8 +1,12 @@
1
1
  !!!
2
2
  %html{lang: 'de'}
3
3
  %head
4
+ = render_partial 'layout/_assets.metadata'
5
+ = render_partial 'layout/_assets.stylesheets'
6
+ = render_partial 'layout/_assets.javascripts'
4
7
 
5
- %body{class: [body_class, 'loading']}
6
- = image_tag('demo.png', width: '100', alt: 'Gear', class: 'gear')
7
-
8
- = yield
8
+ %body{class: body_class}
9
+ = render_partial 'layout/_header'
10
+ .container
11
+ = yield
12
+ = render_partial 'layout/_footer'
@@ -0,0 +1 @@
1
+ this is a plain html demo file ...it works ...but please use haml and the full pwer of ehg ;)
@@ -10,3 +10,15 @@ $grid-gutter-width: 0
10
10
  .form-horizontal .form-group
11
11
  margin-left: 0
12
12
  margin-right: 0
13
+
14
+ .navbar-default
15
+ background: transparent
16
+ border: none
17
+ border-radius: 0
18
+
19
+ .navbar-collapse
20
+ padding: 0
21
+
22
+ .container-fluid
23
+ margin: 0
24
+ padding: 0
@@ -40,3 +40,33 @@
40
40
  @mixin min-width-lg
41
41
  html.gte-1200 &
42
42
  @content
43
+
44
+ // hide element in specific viewport range
45
+ @mixin hide-xs
46
+ html.lt-768 &
47
+ display: none
48
+
49
+ @mixin hide-sm
50
+ html.gte-768.lt-992 &
51
+ display: none
52
+
53
+ @mixin hide-md
54
+ html.gte-992.lt-1200 &
55
+ display: none
56
+
57
+ @mixin hide-lg
58
+ html.gte-1200 &
59
+ display: none
60
+
61
+ // classes for hiding elements
62
+ .hidden-xs
63
+ +hide-xs
64
+
65
+ .hidden-sm
66
+ +hide-sm
67
+
68
+ .hidden-md
69
+ +hide-md
70
+
71
+ .hidden-lg
72
+ +hide-lg