luca 0.9.8 → 0.9.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. data/CHANGELOG +49 -0
  2. data/Gemfile +8 -1
  3. data/Gemfile.lock +97 -53
  4. data/Guardfile +3 -25
  5. data/README.md +5 -16
  6. data/ROADMAP +15 -9
  7. data/Rakefile +24 -75
  8. data/app.rb +10 -42
  9. data/app/assets/javascripts/luca/basic.coffee +1 -1
  10. data/app/assets/javascripts/luca/components/application.coffee +187 -104
  11. data/app/assets/javascripts/luca/components/collection_view.coffee +115 -51
  12. data/app/assets/javascripts/luca/components/controller.coffee +87 -10
  13. data/app/assets/javascripts/luca/components/fields/base.coffee +74 -13
  14. data/app/assets/javascripts/luca/components/fields/button_field.coffee +60 -13
  15. data/app/assets/javascripts/luca/components/fields/checkbox_array.coffee +12 -7
  16. data/app/assets/javascripts/luca/components/fields/select_field.coffee +82 -23
  17. data/app/assets/javascripts/luca/components/fields/text_area_field.coffee +25 -10
  18. data/app/assets/javascripts/luca/components/fields/text_field.coffee +9 -3
  19. data/app/assets/javascripts/luca/components/form_view.coffee +105 -33
  20. data/app/assets/javascripts/luca/components/grid_layout_view.coffee +42 -0
  21. data/app/assets/javascripts/luca/components/index.coffee +6 -0
  22. data/app/assets/javascripts/luca/components/nav_bar.coffee +60 -6
  23. data/app/assets/javascripts/luca/components/page.coffee +70 -0
  24. data/app/assets/javascripts/luca/components/simple_collection_view.coffee +10 -0
  25. data/app/assets/javascripts/luca/components/table_view.coffee +7 -3
  26. data/app/assets/javascripts/luca/components/table_view_scrollable.coffee +23 -0
  27. data/app/assets/javascripts/luca/concerns/collection_event_bindings.coffee +4 -1
  28. data/app/assets/javascripts/luca/concerns/development_tool_helpers.coffee +23 -14
  29. data/app/assets/javascripts/luca/concerns/dom_helpers.coffee +2 -2
  30. data/app/assets/javascripts/luca/concerns/filterable.coffee +8 -11
  31. data/app/assets/javascripts/luca/concerns/form_model_bindings.coffee +20 -0
  32. data/app/assets/javascripts/luca/concerns/modal_view.coffee +40 -15
  33. data/app/assets/javascripts/luca/concerns/query_collection_bindings.coffee +7 -1
  34. data/app/assets/javascripts/luca/concerns/state_model.coffee +40 -26
  35. data/app/assets/javascripts/luca/concerns/templating.coffee +3 -1
  36. data/app/assets/javascripts/luca/config.coffee +5 -0
  37. data/app/assets/javascripts/luca/containers/card_view.coffee +87 -52
  38. data/app/assets/javascripts/luca/containers/container.coffee +305 -108
  39. data/app/assets/javascripts/luca/containers/modal_view.coffee +9 -9
  40. data/app/assets/javascripts/luca/containers/page_controller.coffee +25 -0
  41. data/app/assets/javascripts/luca/containers/panel_toolbar.coffee +5 -6
  42. data/app/assets/javascripts/luca/containers/tab_view.coffee +19 -10
  43. data/app/assets/javascripts/luca/containers/viewport.coffee +12 -16
  44. data/app/assets/javascripts/luca/core/collection.coffee +19 -5
  45. data/app/assets/javascripts/luca/core/events.coffee +5 -5
  46. data/app/assets/javascripts/luca/core/model.coffee +1 -1
  47. data/app/assets/javascripts/luca/core/panel.coffee +18 -6
  48. data/app/assets/javascripts/luca/core/registry/component_definition.coffee +2 -1
  49. data/app/assets/javascripts/luca/core/registry/meta_data.coffee +2 -0
  50. data/app/assets/javascripts/luca/core/registry/registry.coffee +14 -11
  51. data/app/assets/javascripts/luca/core/templates.coffee +5 -1
  52. data/app/assets/javascripts/luca/core/view.coffee +200 -47
  53. data/app/assets/javascripts/luca/dependencies.coffee +2 -0
  54. data/app/assets/javascripts/luca/development/code_sync_manager.coffee +173 -0
  55. data/app/assets/javascripts/luca/development/component.coffee +76 -0
  56. data/app/assets/javascripts/luca/development/components.coffee +57 -0
  57. data/app/assets/javascripts/luca/development/console.coffee +1 -1
  58. data/app/assets/javascripts/luca/development/index.coffee +4 -1
  59. data/app/assets/javascripts/luca/framework.coffee +7 -3
  60. data/app/assets/javascripts/luca/index.coffee +2 -1
  61. data/app/assets/javascripts/luca/managers/collection_manager.coffee +2 -3
  62. data/app/assets/javascripts/luca/managers/index.coffee +1 -1
  63. data/app/assets/javascripts/luca/managers/socket_manager.coffee +31 -8
  64. data/app/assets/javascripts/luca/templates/components/nav_bar.jst.ejs +16 -1
  65. data/app/assets/javascripts/luca/templates/containers/tab_view.jst.ejs +1 -1
  66. data/app/assets/javascripts/luca/util/index.coffee +1 -0
  67. data/app/assets/javascripts/luca/util/keybindings.coffee +24 -0
  68. data/app/assets/javascripts/luca/util/logging.coffee +15 -0
  69. data/app/assets/javascripts/luca/util/luca.coffee +9 -1
  70. data/app/assets/stylesheets/luca/components/table_view.scss +85 -0
  71. data/app/assets/stylesheets/luca/components/viewport.scss +0 -4
  72. data/app/assets/stylesheets/luca/containers/container.scss +8 -0
  73. data/app/assets/stylesheets/luca/index.css +2 -2
  74. data/bin/luca +14 -0
  75. data/config.ru +1 -2
  76. data/docs/framework.json +1 -0
  77. data/docs/luca-framework-documentation.js +1 -0
  78. data/docs/{application.md → old/application.md} +0 -0
  79. data/docs/{collection.md → old/collection.md} +0 -0
  80. data/docs/{collection_manager.md → old/collection_manager.md} +0 -0
  81. data/docs/{container_philosophy.md → old/container_philosophy.md} +0 -0
  82. data/docs/{event_binding_helpers.md → old/event_binding_helpers.md} +0 -0
  83. data/docs/{method_caching_and_computed_properties.md → old/method_caching_and_computed_properties.md} +0 -0
  84. data/docs/{view.md → old/view.md} +0 -0
  85. data/lib/generators/luca/application/templates/javascripts/dependencies.coffee +2 -5
  86. data/lib/guard/luca.rb +84 -0
  87. data/lib/luca.rb +25 -1
  88. data/lib/luca/asset_compiler.rb +117 -0
  89. data/lib/luca/cli.rb +68 -0
  90. data/lib/luca/cli/generate.rb +37 -0
  91. data/lib/luca/cli/server.rb +20 -0
  92. data/lib/luca/cli/sync.rb +40 -0
  93. data/lib/luca/cli/watch.rb +16 -0
  94. data/lib/luca/collection.rb +64 -0
  95. data/lib/luca/collection/endpoint.rb +38 -0
  96. data/lib/luca/collection/file_backend.rb +121 -0
  97. data/lib/luca/collection/redis_backend.rb +153 -0
  98. data/lib/luca/compiled_asset.rb +61 -0
  99. data/lib/luca/component_definition.rb +356 -0
  100. data/lib/luca/luca_application.rb +258 -0
  101. data/lib/luca/project.rb +73 -0
  102. data/lib/luca/project_harness.rb +96 -0
  103. data/lib/luca/rails.rb +5 -3
  104. data/lib/luca/rails/engine.rb +8 -0
  105. data/lib/luca/rails/version.rb +1 -2
  106. data/lib/luca/server.rb +7 -0
  107. data/lib/luca/stylesheet.rb +35 -0
  108. data/lib/luca/template.rb +2 -0
  109. data/lib/luca/template_asset.rb +64 -0
  110. data/lib/luca/version.rb +3 -0
  111. data/lib/luca/watcher.rb +72 -0
  112. data/lib/railties/luca/tasks.rake +7 -0
  113. data/site/.bundle/config +2 -0
  114. data/site/.gitignore +5 -0
  115. data/site/.rvmrc +1 -0
  116. data/site/CHANGELOG.md +41 -0
  117. data/site/DOCS.md +41 -0
  118. data/site/Gemfile +8 -0
  119. data/site/Gemfile.lock +134 -0
  120. data/site/LICENSE.md +19 -0
  121. data/site/config.rb +84 -0
  122. data/site/helpers/site_helpers.rb +20 -0
  123. data/site/html5bp-docs/README.md +38 -0
  124. data/site/html5bp-docs/contribute.md +104 -0
  125. data/site/html5bp-docs/crossdomain.md +21 -0
  126. data/site/html5bp-docs/css.md +135 -0
  127. data/site/html5bp-docs/extend.md +507 -0
  128. data/site/html5bp-docs/faq.md +77 -0
  129. data/site/html5bp-docs/htaccess.md +323 -0
  130. data/site/html5bp-docs/html.md +170 -0
  131. data/site/html5bp-docs/js.md +31 -0
  132. data/site/html5bp-docs/misc.md +25 -0
  133. data/site/html5bp-docs/usage.md +109 -0
  134. data/site/readme.md +47 -0
  135. data/site/source/.htaccess +540 -0
  136. data/site/source/404.html +157 -0
  137. data/site/source/app/assets/javascripts/dependencies.js.coffee +6 -0
  138. data/site/source/app/assets/javascripts/docs-docs.js +1 -0
  139. data/site/source/app/assets/javascripts/docs/application.coffee +64 -0
  140. data/site/source/app/assets/javascripts/docs/collections/docs_documentation.coffee +17 -0
  141. data/site/source/app/assets/javascripts/docs/collections/github_repositories.coffee +7 -0
  142. data/site/source/app/assets/javascripts/docs/collections/index.coffee +1 -0
  143. data/site/source/app/assets/javascripts/docs/collections/luca_documentation.coffee +17 -0
  144. data/site/source/app/assets/javascripts/docs/collections/public_gists.coffee +4 -0
  145. data/site/source/app/assets/javascripts/docs/config.coffee +5 -0
  146. data/site/source/app/assets/javascripts/docs/index.coffee +12 -0
  147. data/site/source/app/assets/javascripts/docs/lib/router.coffee +3 -0
  148. data/{spec/components/application_spec.coffee → site/source/app/assets/javascripts/docs/lib/util.coffee} +0 -0
  149. data/site/source/app/assets/javascripts/docs/models/component.coffee +99 -0
  150. data/site/source/app/assets/javascripts/docs/models/github_repository.coffee +3 -0
  151. data/site/source/app/assets/javascripts/docs/models/index.coffee +1 -0
  152. data/site/source/app/assets/javascripts/docs/templates/component_documentation.jst.ejs +55 -0
  153. data/site/source/app/assets/javascripts/docs/templates/examples_browser/overview.jst.ejs +4 -0
  154. data/site/source/app/assets/javascripts/docs/templates/examples_browser/selector.jst.ejs +11 -0
  155. data/site/source/app/assets/javascripts/docs/templates/github_repository.jst.ejs +4 -0
  156. data/site/source/app/assets/javascripts/docs/templates/layouts/main.jst.ejs +4 -0
  157. data/site/source/app/assets/javascripts/docs/templates/left_navigation.jst.ejs +5 -0
  158. data/site/source/app/assets/javascripts/docs/templates/pages/getting_started.jst.ejs +78 -0
  159. data/site/source/app/assets/javascripts/docs/templates/pages/home.jst.ejs +57 -0
  160. data/site/source/app/assets/javascripts/docs/views/components/code_editor.coffee +45 -0
  161. data/{spec/components/collection_loader_view_spec.coffee → site/source/app/assets/javascripts/docs/views/components/code_editor/index.coffee} +0 -0
  162. data/site/source/app/assets/javascripts/docs/views/components/component_documentation.coffee +72 -0
  163. data/site/source/app/assets/javascripts/docs/views/index.coffee +3 -0
  164. data/site/source/app/assets/javascripts/docs/views/pages/browse_source.coffee +46 -0
  165. data/site/source/app/assets/javascripts/docs/views/pages/browse_source/details.coffee +37 -0
  166. data/site/source/app/assets/javascripts/docs/views/pages/browse_source/list.coffee +31 -0
  167. data/site/source/app/assets/javascripts/docs/views/pages/component_editor.coffee +10 -0
  168. data/site/source/app/assets/javascripts/docs/views/pages/examples_browser.coffee +102 -0
  169. data/site/source/app/assets/javascripts/docs/views/pages/examples_browser/docs.coffee +12 -0
  170. data/site/source/app/assets/javascripts/docs/views/pages/examples_browser/source.coffee +13 -0
  171. data/site/source/app/assets/javascripts/docs/views/pages/home.coffee +10 -0
  172. data/site/source/app/assets/javascripts/docs/views/views/api_browser/index.coffee +43 -0
  173. data/site/source/app/assets/javascripts/docs/views/views/collection_view_examples/grid_layout_view_example.coffee +14 -0
  174. data/site/source/app/assets/javascripts/docs/views/views/collection_view_examples/table_view_example.coffee +39 -0
  175. data/site/source/app/assets/javascripts/docs/views/views/form_view_examples/basic_example.coffee +38 -0
  176. data/site/source/app/assets/javascripts/docs/views/views/form_view_examples/complex_layout.coffee +110 -0
  177. data/site/source/app/assets/javascripts/docs/views/views/top_navigation.coffee +6 -0
  178. data/site/source/app/assets/javascripts/luca-docs.js +1 -0
  179. data/site/source/app/assets/javascripts/luca-framework-documentation.js +1 -0
  180. data/site/source/app/assets/javascripts/site.js.coffee +4 -0
  181. data/site/source/app/assets/javascripts/vendor/codemirror.js +4786 -0
  182. data/site/source/app/assets/javascripts/vendor/coffeescript.js +346 -0
  183. data/site/source/app/assets/javascripts/vendor/css.js +465 -0
  184. data/site/source/app/assets/javascripts/vendor/htmlmixed.js +84 -0
  185. data/site/source/app/assets/javascripts/vendor/javascript.js +422 -0
  186. data/site/source/app/assets/javascripts/vendor/js-beautify.js +1353 -0
  187. data/site/source/app/assets/javascripts/vendor/modernizr-2.6.1.min.js +4 -0
  188. data/site/source/app/assets/javascripts/vendor/vim.js +2511 -0
  189. data/site/source/app/assets/stylesheets/docs/api-browser.css.scss +5 -0
  190. data/site/source/app/assets/stylesheets/docs/application.css.scss +35 -0
  191. data/site/source/app/assets/stylesheets/docs/browse-source.css.scss +5 -0
  192. data/site/source/app/assets/stylesheets/docs/scrollable-table.css.scss +5 -0
  193. data/site/source/app/assets/stylesheets/site.css.scss +2 -0
  194. data/site/source/app/assets/stylesheets/vendor/codemirror.css +240 -0
  195. data/site/source/app/assets/stylesheets/vendor/prettify-tomorrow-night-bright.css +160 -0
  196. data/site/source/app/assets/stylesheets/vendor/twilight.css +26 -0
  197. data/site/source/crossdomain.xml +15 -0
  198. data/site/source/documentation.html.haml +1 -0
  199. data/site/source/favicon_base.png +0 -0
  200. data/site/source/humans.txt +15 -0
  201. data/site/source/images/background.png +0 -0
  202. data/site/source/images/middleman.png +0 -0
  203. data/site/source/index.html.haml +1 -0
  204. data/site/source/layouts/layout.haml +55 -0
  205. data/site/source/readme.md +63 -0
  206. data/site/source/robots.txt +3 -0
  207. data/spec/{components/grid_view_spec.coffee → javascripts/components/application_spec.coffee} +0 -0
  208. data/spec/{components/pagination_control_spec.coffee → javascripts/components/collection_loader_view_spec.coffee} +0 -0
  209. data/spec/{components → javascripts/components}/collection_view_spec.coffee +1 -1
  210. data/spec/{components → javascripts/components}/controller_spec.coffee +0 -0
  211. data/spec/{components → javascripts/components}/fields/checkbox_array_spec.coffee +0 -0
  212. data/spec/javascripts/components/form_view_spec.coffee +162 -0
  213. data/spec/{components/record_manager_spec.coffee → javascripts/components/grid_view_spec.coffee} +0 -0
  214. data/spec/{components → javascripts/components}/multi_collection_view_spec.coffee +0 -0
  215. data/spec/{components/template_spec.coffee → javascripts/components/pagination_control_spec.coffee} +0 -0
  216. data/spec/{concerns/paginatable_spec.coffee → javascripts/components/record_manager_spec.coffee} +0 -0
  217. data/spec/{components → javascripts/components}/table_view_spec.coffee +0 -0
  218. data/spec/{containers/modal_view_spec.coffee → javascripts/components/template_spec.coffee} +0 -0
  219. data/spec/{concerns → javascripts/concerns}/collection_event_bindings_spec.coffee +0 -0
  220. data/spec/{concerns → javascripts/concerns}/dom_helpers_spec.coffee +0 -0
  221. data/spec/{concerns → javascripts/concerns}/filterable_spec.coffee +0 -0
  222. data/spec/{concerns → javascripts/concerns}/model_presenter_spec.coffee +0 -0
  223. data/spec/{containers/panel_view_spec.coffee → javascripts/concerns/paginatable_spec.coffee} +0 -0
  224. data/spec/{concerns → javascripts/concerns}/state_model_spec.coffee +5 -0
  225. data/spec/javascripts/containers/card_view_spec.coffee +108 -0
  226. data/spec/{containers/tab_view_spec.coffee → javascripts/containers/modal_view_spec.coffee} +0 -0
  227. data/spec/{containers/viewport_spec.coffee → javascripts/containers/panel_view_spec.coffee} +0 -0
  228. data/spec/{core/observer_spec.coffee → javascripts/containers/tab_view_spec.coffee} +0 -0
  229. data/spec/{managers/socket_manager_spec.coffee → javascripts/containers/viewport_spec.coffee} +0 -0
  230. data/spec/{core → javascripts/core}/collection_spec.coffee +1 -1
  231. data/spec/{core → javascripts/core}/concerns_spec.coffee +0 -0
  232. data/spec/{core → javascripts/core}/container_spec.coffee +0 -0
  233. data/spec/{core → javascripts/core}/define_spec.coffee +0 -0
  234. data/spec/{core → javascripts/core}/events_spec.coffee +0 -0
  235. data/spec/{core → javascripts/core}/field_spec.coffee +0 -0
  236. data/spec/{core → javascripts/core}/framework_spec.coffee +0 -0
  237. data/spec/{core → javascripts/core}/model_spec.coffee +0 -0
  238. data/spec/javascripts/core/observer_spec.coffee +0 -0
  239. data/spec/{core → javascripts/core}/util_spec.coffee +0 -0
  240. data/spec/{core → javascripts/core}/view_spec.coffee +51 -39
  241. data/spec/{dependencies → javascripts/dependencies}/index.coffee +0 -0
  242. data/spec/{dependencies → javascripts/dependencies}/jasmine-html.js +0 -0
  243. data/spec/{dependencies → javascripts/dependencies}/jasmine.js +0 -0
  244. data/spec/{dependencies → javascripts/dependencies}/sinon.js +0 -0
  245. data/spec/{helper.coffee → javascripts/helper.coffee} +0 -0
  246. data/spec/{managers → javascripts/managers}/collection_manager_spec.coffee +0 -0
  247. data/spec/javascripts/managers/socket_manager_spec.coffee +0 -0
  248. data/spec/lib/component_definition_spec.rb +63 -0
  249. data/spec/lib/input_compiler_spec.rb +9 -0
  250. data/spec/lib/luca_application_spec.rb +30 -0
  251. data/spec/support/fixtures/application.coffee +45 -0
  252. data/spec/support/fixtures/component.coffee +34 -0
  253. data/tutorials/component-definitions.md +0 -0
  254. data/tutorials/component-definitions/01_intro.md +0 -0
  255. data/tutorials/component-driven-design.md +140 -0
  256. data/tutorials/structure-of-a-project.md +63 -0
  257. data/vendor/assets/javascripts/backbone-min.js +37 -33
  258. data/vendor/assets/javascripts/backbone-query.min.js +1 -1
  259. data/vendor/assets/javascripts/hogan.js +707 -0
  260. data/vendor/assets/javascripts/jquery.js +5 -4
  261. data/vendor/assets/javascripts/keymaster.min.js +4 -0
  262. data/vendor/assets/javascripts/luca-dependencies.min.js +8 -0
  263. data/vendor/assets/javascripts/luca-development.min.js +1 -0
  264. data/vendor/assets/javascripts/luca-spec.js +6 -6
  265. data/vendor/assets/javascripts/luca-ui.js +7386 -0
  266. data/vendor/assets/javascripts/luca-ui.min.js +5 -0
  267. data/vendor/assets/javascripts/luca.full.min.js +12 -0
  268. data/vendor/assets/javascripts/luca.min.js +5 -0
  269. data/vendor/assets/javascripts/underscore-min.js +1 -5
  270. data/vendor/assets/javascripts/underscore-string.min.js +1 -1
  271. data/vendor/assets/stylesheets/luca-components.css +202 -0
  272. data/vendor/assets/stylesheets/luca-development.css +23 -0
  273. data/vendor/assets/stylesheets/luca-ui.css +198 -0
  274. metadata +324 -94
  275. data/app/assets/javascripts/luca/components/base_toolbar.coffee +0 -17
  276. data/app/assets/javascripts/luca/components/form_button_toolbar.coffee +0 -28
  277. data/app/assets/javascripts/luca/components/grid_view.coffee +0 -269
  278. data/app/assets/javascripts/luca/components/page_controller.coffee +0 -7
  279. data/app/assets/javascripts/luca/components/template.coffee +0 -5
  280. data/app/assets/javascripts/luca/components/toolbar_dialog.coffee +0 -25
  281. data/lib/luca/code_browser.rb +0 -55
  282. data/lib/luca/command_line.rb +0 -69
  283. data/lib/luca/component_documentation.rb +0 -72
  284. data/site/assets/bootstrap.min.js +0 -7
  285. data/site/assets/dependencies.js +0 -94
  286. data/site/assets/glyphicons-halflings-white.png +0 -0
  287. data/site/assets/glyphicons-halflings.png +0 -0
  288. data/site/assets/luca-ui-bootstrap.css +0 -1331
  289. data/site/assets/luca-ui-bootstrap.js +0 -9
  290. data/site/assets/luca-ui-development-tools.css +0 -234
  291. data/site/assets/luca-ui-development-tools.js +0 -18561
  292. data/site/assets/luca-ui-development-tools.min.js +0 -15
  293. data/site/assets/luca-ui-full.min.js +0 -8
  294. data/site/assets/luca-ui.min.js +0 -4
  295. data/site/assets/sandbox.css +0 -62
  296. data/site/assets/sandbox.js +0 -469
  297. data/site/docs/application.html +0 -41
  298. data/site/docs/caching.html +0 -43
  299. data/site/docs/collection.html +0 -75
  300. data/site/docs/collection_manager.html +0 -71
  301. data/site/docs/containers.html +0 -118
  302. data/site/docs/events.html +0 -153
  303. data/site/docs/view.html +0 -128
  304. data/site/img/glyphicons-halflings-white.png +0 -0
  305. data/site/img/glyphicons-halflings.png +0 -0
  306. data/site/index.html +0 -20
  307. data/site/source-map.js +0 -1
  308. data/spec/components/form_view_spec.coffee +0 -84
  309. data/spec/containers/card_view_spec.coffee +0 -50
  310. data/spec/luca-spec.coffee +0 -9
@@ -0,0 +1,31 @@
1
+ [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation
2
+ table of contents](README.md)
3
+
4
+ # The JavaScript
5
+
6
+ Information about the default JavaScript included in the project.
7
+
8
+ ## main.js
9
+
10
+ This file can be used to contain or reference your site/app JavaScript code.
11
+ For larger projects, you can make use of a JavaScript module loader, like
12
+ [Require.js](http://requirejs.org/), to load any other scripts you need to
13
+ run.
14
+
15
+ ## plugins.js
16
+
17
+ This file can be used to contain all your plugins, such as jQuery plugins and
18
+ other 3rd party scripts.
19
+
20
+ One approach is to put jQuery plugins inside of a `(function($){ ...
21
+ })(jQuery);` closure to make sure they're in the jQuery namespace safety
22
+ blanket. Read more about [jQuery plugin
23
+ authoring](http://docs.jquery.com/Plugins/Authoring#Getting_Started)
24
+
25
+ ## vendor
26
+
27
+ This directory can be used to contain all 3rd party library code.
28
+
29
+ Minified versions of the latest jQuery and Modernizr libraries are included by
30
+ default. You may wish to create your own [custom Modernizr
31
+ build](http://www.modernizr.com/download/).
@@ -0,0 +1,25 @@
1
+ [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation table of contents](README.md)
2
+
3
+ # Miscellaneous
4
+
5
+ ## .gitignore
6
+
7
+ HTML5 Boilerplate includes a basic project-level `.gitignore`. This should
8
+ primarily be used to avoid certain project-level files and directories from
9
+ being kept under source control. Different development-environments will
10
+ benefit from different collections of ignores.
11
+
12
+ OS-specific and editor-specific files should be ignored using a "global
13
+ ignore" that applies to all repositories on your system.
14
+
15
+ For example, add the following to your `~/.gitconfig`, where the `.gitignore`
16
+ in your HOME directory contains the files and directories you'd like to
17
+ globally ignore:
18
+
19
+ ```gitignore
20
+ [core]
21
+ excludesfile = ~/.gitignore
22
+ ```
23
+
24
+ * More on global ignores: http://help.github.com/ignore-files/
25
+ * Comprehensive set of ignores on GitHub: https://github.com/github/gitignore
@@ -0,0 +1,109 @@
1
+ [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation
2
+ table of contents](README.md)
3
+
4
+ # Usage
5
+
6
+ Once you have cloned or downloaded HTML5 Boilerplate, creating a site or app
7
+ usually involves the following:
8
+
9
+ 1. Set up the basic structure of the site.
10
+ 2. Add some content, style, and functionality.
11
+ 3. Run your site locally to see how it looks.
12
+ 4. (Optionally run a build script to automate the optimization of your site -
13
+ e.g. [ant build script](https://github.com/h5bp/ant-build-script) or [node
14
+ build script](https://github.com/h5bp/node-build-script)).
15
+ 5. Deploy your site.
16
+
17
+
18
+ ## Basic structure
19
+
20
+ A basic HTML5 Boilerplate site initially looks something like this:
21
+
22
+ ```
23
+ .
24
+ ├── css
25
+ │ ├── main.css
26
+ │ └── normalize.css
27
+ ├── doc
28
+ ├── img
29
+ ├── js
30
+ │ ├── main.js
31
+ │ ├── plugins.js
32
+ │ └── vendor
33
+ │ ├── jquery.min.js
34
+ │ └── modernizr.min.js
35
+ ├── .htaccess
36
+ ├── 404.html
37
+ ├── index.html
38
+ ├── humans.txt
39
+ ├── robots.txt
40
+ ├── crossdomain.xml
41
+ ├── favicon.ico
42
+ └── [apple-touch-icons]
43
+ ```
44
+
45
+ What follows is a general overview of each major part and how to use them.
46
+
47
+ ### css
48
+
49
+ This directory should contain all your project's CSS files. It includes some
50
+ initial CSS to help get you started from a solid foundation. [About the
51
+ CSS](css.md).
52
+
53
+ ### doc
54
+
55
+ This directory contains all the HTML5 Boilerplate documentation. You can use it
56
+ as the location and basis for your own project's documentation.
57
+
58
+ ### js
59
+
60
+ This directory should contain all your project's JS files. Libraries, plugins,
61
+ and custom code can all be included here. It includes some initial JS to help
62
+ get you started. [About the JavaScript](js.md).
63
+
64
+ ### .htaccess
65
+
66
+ The default web server config is for Apache. [About the .htaccess](htaccess.md).
67
+
68
+ Host your site on a server other than Apache? You're likely to find the
69
+ corresponding configuration file in our [server configs
70
+ repo](https://github.com/h5bp/server-configs). If you cannot find a
71
+ configuration file for your setup, please consider contributing one so that
72
+ others can benefit too.
73
+
74
+ ### 404.html
75
+
76
+ A helpful custom 404 to get you started.
77
+
78
+ ### index.html
79
+
80
+ This is the default HTML skeleton that should form the basis of all pages on
81
+ your site. If you are using a server-side templating framework, then you will
82
+ need to integrate this starting HTML with your setup.
83
+
84
+ Make sure that you update the URLs for the referenced CSS and JavaScript if you
85
+ modify the directory structure at all.
86
+
87
+ If you are using Google Analytics, make sure that you edit the corresponding
88
+ snippet at the bottom to include your analytics ID.
89
+
90
+ ### humans.txt
91
+
92
+ Edit this file to include the team that worked on your site/app, and the
93
+ technology powering it.
94
+
95
+ ### robots.txt
96
+
97
+ Edit this file to include any pages you need hidden from search engines.
98
+
99
+ ### crossdomain.xml
100
+
101
+ A template for working with cross-domain requests. [About
102
+ crossdomain.xml](crossdomain.md).
103
+
104
+ ### icons
105
+
106
+ Replace the default `favicon.ico` and apple touch icons with your own. You
107
+ might want to check out Hans Christian's handy [HTML5 Boilerplate Favicon and
108
+ Apple Touch Icon
109
+ PSD-Template](http://drublic.de/blog/html5-boilerplate-favicons-psd-template/).
data/site/readme.md ADDED
@@ -0,0 +1,47 @@
1
+ # Middleman 3.0.x Project Template: HTML5 Boilerplate HAML, Normalize, Susy, Sprockets Includes
2
+
3
+ HTML5 Boilerplate HAML is the [HTML5 Boilerplate 4.0](http://html5boilerplate.com/) adapted as a HAML [Middleman 3.x](http://middlemanapp.com/) project template with [Susy 1.0](http://susy.oddbird.net/) responsive grids ready to go, content using [Markdown](http://daringfireball.net/projects/markdown/), [SCSS](http://sass-lang.com/) organized with [SMACSS](http://smacss.com/), Coffeescript, Sprockets and more.
4
+
5
+ Using [Bundler](http://gembundler.com/) and [RVM](https://rvm.io/) is **highly** recommended.
6
+
7
+ Features:
8
+
9
+ * Uses the [HTML5 Boilerplate 4.0](http://www.html5boilerplate.com), converted to a Middleman/HAML workflow.
10
+ * [Susy 1.0](http://susy.oddbird.net/) responsive grids ready to go.
11
+ * [SMACSS](http://smacss.com/) stylesheet organization
12
+ * [Middleman Livereload](https://github.com/middleman/middleman-livereload): enabled for the generic 'middleman' command by default
13
+ * Smart Site/Page handling for titles and descriptions (via the Middleman Docs source
14
+ * [Middleman Favicon Maker](https://github.com/follmann/middleman-favicon-maker): creates favicons and touch icons on build from `favicon_base.png` in /source/
15
+ * RVM-ready
16
+ * Some good `.gitignore` defaults
17
+
18
+ Hopefully this will save people some time. Add any suggestions to the [issue tracker](https://github.com/dannyprose/Middleman-HTML5-Boilerplate-HAML-Project-Template/issues).
19
+
20
+ ## Usage
21
+
22
+ Download and install into ~/.middleman (you'll have to create this directory if it's not already there). You can then use it with the `--template` flag on `middleman init`.
23
+
24
+ ### Example
25
+
26
+ 1. [Download](https://github.com/dannyprose/Middleman-HTML5BP-HAML/zipball/master)/clone to: `~/.middleman/html5bphaml/`
27
+ 2. Then create your new Middleman project: `middleman init my_new_project --template=html5bphaml`
28
+
29
+ For more help follow [Middleman's project template instructions](http://middlemanapp.com/getting-started/welcome/).
30
+
31
+ ### Bundled with Middleman
32
+
33
+ This will soon be bundled with Middleman by default. Stay tuned.
34
+
35
+ ## Documentation
36
+
37
+ [Middleman HTML5 Boilerplate HAML documentation](https://github.com/dannyprose/Middleman-HTML5BP-HAML/tree/master/DOCS.md): A good overview of some of the small changes we made with this version of the HTML5 Boilerplate.
38
+
39
+ [HTML5 Boilerplate documentation](https://github.com/dannyprose/Middleman-HTML5BP-HAML/tree/master/html5bp-docs): Documentation that is included with the HTML5 Boilerplate. **Note that some things (e.g. paths) will differ between this version of the HTML5 Boilerplate and the original.**
40
+
41
+ ## Older Middleman Versions
42
+
43
+ This will likely work with Middleman 2.x, but it's optimized for Middleman 3.x. You might have a few manual tasks to perform (e.g. bundling after `middleman init`, changing `Gemfile` version numbers, etc.).
44
+
45
+ ## Contribute
46
+
47
+ Have a better way of doing this? **[Jump on in](https://github.com/dannyprose/Middleman-HTML5BP-HAML)**. If there are better defaults to include in a Middleman workflow, add them in. This is just what [I](http://www.dannyprose.com) use (and [continually update](https://github.com/dannyprose/Middleman-HTML5BP-HAML)) as my standard default for Middleman Sites.
@@ -0,0 +1,540 @@
1
+ # Apache configuration file
2
+ # httpd.apache.org/docs/2.2/mod/quickreference.html
3
+
4
+ # Note .htaccess files are an overhead, this logic should be in your Apache
5
+ # config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
6
+
7
+ # Techniques in here adapted from all over, including:
8
+ # Kroc Camen: camendesign.com/.htaccess
9
+ # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
10
+ # Sample .htaccess file of CMS MODx: modxcms.com
11
+
12
+
13
+ # ----------------------------------------------------------------------
14
+ # Better website experience for IE users
15
+ # ----------------------------------------------------------------------
16
+
17
+ # Force the latest IE version, in various cases when it may fall back to IE7 mode
18
+ # github.com/rails/rails/commit/123eb25#commitcomment-118920
19
+ # Use ChromeFrame if it's installed for a better experience for the poor IE folk
20
+
21
+ <IfModule mod_headers.c>
22
+ Header set X-UA-Compatible "IE=Edge,chrome=1"
23
+ # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
24
+ <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
25
+ Header unset X-UA-Compatible
26
+ </FilesMatch>
27
+ </IfModule>
28
+
29
+
30
+ # ----------------------------------------------------------------------
31
+ # Cross-domain AJAX requests
32
+ # ----------------------------------------------------------------------
33
+
34
+ # Serve cross-domain Ajax requests, disabled by default.
35
+ # enable-cors.org
36
+ # code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
37
+
38
+ # <IfModule mod_headers.c>
39
+ # Header set Access-Control-Allow-Origin "*"
40
+ # </IfModule>
41
+
42
+
43
+ # ----------------------------------------------------------------------
44
+ # CORS-enabled images (@crossorigin)
45
+ # ----------------------------------------------------------------------
46
+
47
+ # Send CORS headers if browsers request them; enabled by default for images.
48
+ # developer.mozilla.org/en/CORS_Enabled_Image
49
+ # blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
50
+ # hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
51
+ # wiki.mozilla.org/Security/Reviews/crossoriginAttribute
52
+
53
+ <IfModule mod_setenvif.c>
54
+ <IfModule mod_headers.c>
55
+ # mod_headers, y u no match by Content-Type?!
56
+ <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
57
+ SetEnvIf Origin ":" IS_CORS
58
+ Header set Access-Control-Allow-Origin "*" env=IS_CORS
59
+ </FilesMatch>
60
+ </IfModule>
61
+ </IfModule>
62
+
63
+
64
+ # ----------------------------------------------------------------------
65
+ # Webfont access
66
+ # ----------------------------------------------------------------------
67
+
68
+ # Allow access from all domains for webfonts.
69
+ # Alternatively you could only whitelist your
70
+ # subdomains like "subdomain.example.com".
71
+
72
+ <IfModule mod_headers.c>
73
+ <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
74
+ Header set Access-Control-Allow-Origin "*"
75
+ </FilesMatch>
76
+ </IfModule>
77
+
78
+
79
+ # ----------------------------------------------------------------------
80
+ # Proper MIME type for all files
81
+ # ----------------------------------------------------------------------
82
+
83
+ # JavaScript
84
+ # Normalize to standard type (it's sniffed in IE anyways)
85
+ # tools.ietf.org/html/rfc4329#section-7.2
86
+ AddType application/javascript js jsonp
87
+ AddType application/json json
88
+
89
+ # Audio
90
+ AddType audio/ogg oga ogg
91
+ AddType audio/mp4 m4a f4a f4b
92
+
93
+ # Video
94
+ AddType video/ogg ogv
95
+ AddType video/mp4 mp4 m4v f4v f4p
96
+ AddType video/webm webm
97
+ AddType video/x-flv flv
98
+
99
+ # SVG
100
+ # Required for svg webfonts on iPad
101
+ # twitter.com/FontSquirrel/status/14855840545
102
+ AddType image/svg+xml svg svgz
103
+ AddEncoding gzip svgz
104
+
105
+ # Webfonts
106
+ AddType application/vnd.ms-fontobject eot
107
+ AddType application/x-font-ttf ttf ttc
108
+ AddType font/opentype otf
109
+ AddType application/x-font-woff woff
110
+
111
+ # Assorted types
112
+ AddType image/x-icon ico
113
+ AddType image/webp webp
114
+ AddType text/cache-manifest appcache manifest
115
+ AddType text/x-component htc
116
+ AddType application/xml rss atom xml rdf
117
+ AddType application/x-chrome-extension crx
118
+ AddType application/x-opera-extension oex
119
+ AddType application/x-xpinstall xpi
120
+ AddType application/octet-stream safariextz
121
+ AddType application/x-web-app-manifest+json webapp
122
+ AddType text/x-vcard vcf
123
+ AddType application/x-shockwave-flash swf
124
+ AddType text/vtt vtt
125
+
126
+
127
+ # ----------------------------------------------------------------------
128
+ # Allow concatenation from within specific js and css files
129
+ # ----------------------------------------------------------------------
130
+
131
+ # e.g. Inside of script.combined.js you could have
132
+ # <!--#include file="libs/jquery-1.5.0.min.js" -->
133
+ # <!--#include file="plugins/jquery.idletimer.js" -->
134
+ # and they would be included into this single file.
135
+
136
+ # This is not in use in the boilerplate as it stands. You may
137
+ # choose to use this technique if you do not have a build process.
138
+
139
+ #<FilesMatch "\.combined\.js$">
140
+ # Options +Includes
141
+ # AddOutputFilterByType INCLUDES application/javascript application/json
142
+ # SetOutputFilter INCLUDES
143
+ #</FilesMatch>
144
+
145
+ #<FilesMatch "\.combined\.css$">
146
+ # Options +Includes
147
+ # AddOutputFilterByType INCLUDES text/css
148
+ # SetOutputFilter INCLUDES
149
+ #</FilesMatch>
150
+
151
+
152
+ # ----------------------------------------------------------------------
153
+ # Gzip compression
154
+ # ----------------------------------------------------------------------
155
+
156
+ <IfModule mod_deflate.c>
157
+
158
+ # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
159
+ <IfModule mod_setenvif.c>
160
+ <IfModule mod_headers.c>
161
+ SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
162
+ RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
163
+ </IfModule>
164
+ </IfModule>
165
+
166
+ # Compress all output labeled with one of the following MIME-types
167
+ <IfModule mod_filter.c>
168
+ AddOutputFilterByType DEFLATE application/atom+xml \
169
+ application/javascript \
170
+ application/json \
171
+ application/rss+xml \
172
+ application/vnd.ms-fontobject \
173
+ application/x-font-ttf \
174
+ application/xhtml+xml \
175
+ application/xml \
176
+ font/opentype \
177
+ image/svg+xml \
178
+ image/x-icon \
179
+ text/css \
180
+ text/html \
181
+ text/plain \
182
+ text/x-component \
183
+ text/xml
184
+ </IfModule>
185
+
186
+ </IfModule>
187
+
188
+
189
+ # ----------------------------------------------------------------------
190
+ # Expires headers (for better cache control)
191
+ # ----------------------------------------------------------------------
192
+
193
+ # These are pretty far-future expires headers.
194
+ # They assume you control versioning with filename-based cache busting
195
+ # Additionally, consider that outdated proxies may miscache
196
+ # www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
197
+
198
+ # If you don't use filenames to version, lower the CSS and JS to something like
199
+ # "access plus 1 week".
200
+
201
+ <IfModule mod_expires.c>
202
+ ExpiresActive on
203
+
204
+ # Perhaps better to whitelist expires rules? Perhaps.
205
+ ExpiresDefault "access plus 1 month"
206
+
207
+ # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
208
+ ExpiresByType text/cache-manifest "access plus 0 seconds"
209
+
210
+ # Your document html
211
+ ExpiresByType text/html "access plus 0 seconds"
212
+
213
+ # Data
214
+ ExpiresByType text/xml "access plus 0 seconds"
215
+ ExpiresByType application/xml "access plus 0 seconds"
216
+ ExpiresByType application/json "access plus 0 seconds"
217
+
218
+ # Feed
219
+ ExpiresByType application/rss+xml "access plus 1 hour"
220
+ ExpiresByType application/atom+xml "access plus 1 hour"
221
+
222
+ # Favicon (cannot be renamed)
223
+ ExpiresByType image/x-icon "access plus 1 week"
224
+
225
+ # Media: images, video, audio
226
+ ExpiresByType image/gif "access plus 1 month"
227
+ ExpiresByType image/png "access plus 1 month"
228
+ ExpiresByType image/jpeg "access plus 1 month"
229
+ ExpiresByType video/ogg "access plus 1 month"
230
+ ExpiresByType audio/ogg "access plus 1 month"
231
+ ExpiresByType video/mp4 "access plus 1 month"
232
+ ExpiresByType video/webm "access plus 1 month"
233
+
234
+ # HTC files (css3pie)
235
+ ExpiresByType text/x-component "access plus 1 month"
236
+
237
+ # Webfonts
238
+ ExpiresByType application/x-font-ttf "access plus 1 month"
239
+ ExpiresByType font/opentype "access plus 1 month"
240
+ ExpiresByType application/x-font-woff "access plus 1 month"
241
+ ExpiresByType image/svg+xml "access plus 1 month"
242
+ ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
243
+
244
+ # CSS and JavaScript
245
+ ExpiresByType text/css "access plus 1 year"
246
+ ExpiresByType application/javascript "access plus 1 year"
247
+
248
+ </IfModule>
249
+
250
+
251
+ # ----------------------------------------------------------------------
252
+ # Prevent mobile network providers from modifying your site
253
+ # ----------------------------------------------------------------------
254
+
255
+ # The following header prevents modification of your code over 3G on some
256
+ # European providers.
257
+ # This is the official 'bypass' suggested by O2 in the UK.
258
+
259
+ # <IfModule mod_headers.c>
260
+ # Header set Cache-Control "no-transform"
261
+ # </IfModule>
262
+
263
+
264
+ # ----------------------------------------------------------------------
265
+ # ETag removal
266
+ # ----------------------------------------------------------------------
267
+
268
+ # FileETag None is not enough for every server.
269
+ <IfModule mod_headers.c>
270
+ Header unset ETag
271
+ </IfModule>
272
+
273
+ # Since we're sending far-future expires, we don't need ETags for
274
+ # static content.
275
+ # developer.yahoo.com/performance/rules.html#etags
276
+ FileETag None
277
+
278
+
279
+ # ----------------------------------------------------------------------
280
+ # Stop screen flicker in IE on CSS rollovers
281
+ # ----------------------------------------------------------------------
282
+
283
+ # The following directives stop screen flicker in IE on CSS rollovers - in
284
+ # combination with the "ExpiresByType" rules for images (see above).
285
+
286
+ # BrowserMatch "MSIE" brokenvary=1
287
+ # BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
288
+ # BrowserMatch "Opera" !brokenvary
289
+ # SetEnvIf brokenvary 1 force-no-vary
290
+
291
+
292
+ # ----------------------------------------------------------------------
293
+ # Set Keep-Alive Header
294
+ # ----------------------------------------------------------------------
295
+
296
+ # Keep-Alive allows the server to send multiple requests through one
297
+ # TCP-connection. Be aware of possible disadvantages of this setting. Turn on
298
+ # if you serve a lot of static content.
299
+
300
+ # <IfModule mod_headers.c>
301
+ # Header set Connection Keep-Alive
302
+ # </IfModule>
303
+
304
+
305
+ # ----------------------------------------------------------------------
306
+ # Cookie setting from iframes
307
+ # ----------------------------------------------------------------------
308
+
309
+ # Allow cookies to be set from iframes (for IE only)
310
+ # If needed, specify a path or regex in the Location directive.
311
+
312
+ # <IfModule mod_headers.c>
313
+ # Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
314
+ # </IfModule>
315
+
316
+
317
+ # ----------------------------------------------------------------------
318
+ # Start rewrite engine
319
+ # ----------------------------------------------------------------------
320
+
321
+ # Turning on the rewrite engine is necessary for the following rules and
322
+ # features. FollowSymLinks must be enabled for this to work.
323
+
324
+ # Some cloud hosting services require RewriteBase to be set: goo.gl/HOcPN
325
+ # If using the h5bp in a subdirectory, use `RewriteBase /foo` instead where
326
+ # 'foo' is your directory.
327
+
328
+ # If your web host doesn't allow the FollowSymlinks option, you may need to
329
+ # comment it out and use `Options +SymLinksOfOwnerMatch`, but be aware of the
330
+ # performance impact: http://goo.gl/Mluzd
331
+
332
+ <IfModule mod_rewrite.c>
333
+ Options +FollowSymlinks
334
+ # Options +SymLinksIfOwnerMatch
335
+ RewriteEngine On
336
+ # RewriteBase /
337
+ </IfModule>
338
+
339
+
340
+ # ----------------------------------------------------------------------
341
+ # Suppress or force the "www." at the beginning of URLs
342
+ # ----------------------------------------------------------------------
343
+
344
+ # The same content should never be available under two different URLs -
345
+ # especially not with and without "www." at the beginning, since this can cause
346
+ # SEO problems (duplicate content). That's why you should choose one of the
347
+ # alternatives and redirect the other one.
348
+
349
+ # By default option 1 (no "www.") is activated.
350
+ # no-www.org/faq.php?q=class_b
351
+
352
+ # If you'd prefer to use option 2, just comment out all option 1 lines
353
+ # and uncomment option 2.
354
+
355
+ # IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
356
+
357
+ # ----------------------------------------------------------------------
358
+
359
+ # Option 1:
360
+ # Rewrite "www.example.com -> example.com".
361
+
362
+ <IfModule mod_rewrite.c>
363
+ RewriteCond %{HTTPS} !=on
364
+ RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
365
+ RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
366
+ </IfModule>
367
+
368
+ # ----------------------------------------------------------------------
369
+
370
+ # Option 2:
371
+ # Rewrite "example.com -> www.example.com".
372
+ # Be aware that the following rule might not be a good idea if you use "real"
373
+ # subdomains for certain parts of your website.
374
+
375
+ # <IfModule mod_rewrite.c>
376
+ # RewriteCond %{HTTPS} !=on
377
+ # RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
378
+ # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
379
+ # </IfModule>
380
+
381
+
382
+ # ----------------------------------------------------------------------
383
+ # Built-in filename-based cache busting
384
+ # ----------------------------------------------------------------------
385
+
386
+ # If you're not using the build script to manage your filename version revving,
387
+ # you might want to consider enabling this, which will route requests for
388
+ # /css/style.20110203.css to /css/style.css
389
+
390
+ # To understand why this is important and a better idea than all.css?v1231,
391
+ # read: github.com/h5bp/html5-boilerplate/wiki/cachebusting
392
+
393
+ # <IfModule mod_rewrite.c>
394
+ # RewriteCond %{REQUEST_FILENAME} !-f
395
+ # RewriteCond %{REQUEST_FILENAME} !-d
396
+ # RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
397
+ # </IfModule>
398
+
399
+
400
+ # ----------------------------------------------------------------------
401
+ # Prevent SSL cert warnings
402
+ # ----------------------------------------------------------------------
403
+
404
+ # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
405
+ # https://www.example.com when your cert only allows https://secure.example.com
406
+
407
+ # <IfModule mod_rewrite.c>
408
+ # RewriteCond %{SERVER_PORT} !^443
409
+ # RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
410
+ # </IfModule>
411
+
412
+
413
+ # ----------------------------------------------------------------------
414
+ # Prevent 404 errors for non-existing redirected folders
415
+ # ----------------------------------------------------------------------
416
+
417
+ # without -MultiViews, Apache will give a 404 for a rewrite if a folder of the
418
+ # same name does not exist.
419
+ # webmasterworld.com/apache/3808792.htm
420
+
421
+ Options -MultiViews
422
+
423
+
424
+ # ----------------------------------------------------------------------
425
+ # Custom 404 page
426
+ # ----------------------------------------------------------------------
427
+
428
+ # You can add custom pages to handle 500 or 403 pretty easily, if you like.
429
+ # If you are hosting your site in subdirectory, adjust this accordingly
430
+ # e.g. ErrorDocument 404 /subdir/404.html
431
+ ErrorDocument 404 /404.html
432
+
433
+
434
+ # ----------------------------------------------------------------------
435
+ # UTF-8 encoding
436
+ # ----------------------------------------------------------------------
437
+
438
+ # Use UTF-8 encoding for anything served text/plain or text/html
439
+ AddDefaultCharset utf-8
440
+
441
+ # Force UTF-8 for a number of file formats
442
+ AddCharset utf-8 .atom .css .js .json .rss .vtt .xml
443
+
444
+
445
+ # ----------------------------------------------------------------------
446
+ # A little more security
447
+ # ----------------------------------------------------------------------
448
+
449
+ # To avoid displaying the exact version number of Apache being used, add the
450
+ # following to httpd.conf (it will not work in .htaccess):
451
+ # ServerTokens Prod
452
+
453
+ # "-Indexes" will have Apache block users from browsing folders without a
454
+ # default document Usually you should leave this activated, because you
455
+ # shouldn't allow everybody to surf through every folder on your server (which
456
+ # includes rather private places like CMS system folders).
457
+ <IfModule mod_autoindex.c>
458
+ Options -Indexes
459
+ </IfModule>
460
+
461
+ # Block access to "hidden" directories or files whose names begin with a
462
+ # period. This includes directories used by version control systems such as
463
+ # Subversion or Git.
464
+ <IfModule mod_rewrite.c>
465
+ RewriteCond %{SCRIPT_FILENAME} -d [OR]
466
+ RewriteCond %{SCRIPT_FILENAME} -f
467
+ RewriteRule "(^|/)\." - [F]
468
+ </IfModule>
469
+
470
+ # Block access to backup and source files. These files may be left by some
471
+ # text/html editors and pose a great security danger, when anyone can access
472
+ # them.
473
+ <FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
474
+ Order allow,deny
475
+ Deny from all
476
+ Satisfy All
477
+ </FilesMatch>
478
+
479
+ # If your server is not already configured as such, the following directive
480
+ # should be uncommented in order to set PHP's register_globals option to OFF.
481
+ # This closes a major security hole that is abused by most XSS (cross-site
482
+ # scripting) attacks. For more information: http://php.net/register_globals
483
+ #
484
+ # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS:
485
+ #
486
+ # Your server does not allow PHP directives to be set via .htaccess. In that
487
+ # case you must make this change in your php.ini file instead. If you are
488
+ # using a commercial web host, contact the administrators for assistance in
489
+ # doing this. Not all servers allow local php.ini files, and they should
490
+ # include all PHP configurations (not just this one), or you will effectively
491
+ # reset everything to PHP defaults. Consult www.php.net for more detailed
492
+ # information about setting PHP directives.
493
+
494
+ # php_flag register_globals Off
495
+
496
+ # Rename session cookie to something else, than PHPSESSID
497
+ # php_value session.name sid
498
+
499
+ # Disable magic quotes (This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.)
500
+ # php_flag magic_quotes_gpc Off
501
+
502
+ # Do not show you are using PHP
503
+ # Note: Move this line to php.ini since it won't work in .htaccess
504
+ # php_flag expose_php Off
505
+
506
+ # Level of log detail - log all errors
507
+ # php_value error_reporting -1
508
+
509
+ # Write errors to log file
510
+ # php_flag log_errors On
511
+
512
+ # Do not display errors in browser (production - Off, development - On)
513
+ # php_flag display_errors Off
514
+
515
+ # Do not display startup errors (production - Off, development - On)
516
+ # php_flag display_startup_errors Off
517
+
518
+ # Format errors in plain text
519
+ # Note: Leave this setting 'On' for xdebug's var_dump() output
520
+ # php_flag html_errors Off
521
+
522
+ # Show multiple occurrence of error
523
+ # php_flag ignore_repeated_errors Off
524
+
525
+ # Show same errors from different sources
526
+ # php_flag ignore_repeated_source Off
527
+
528
+ # Size limit for error messages
529
+ # php_value log_errors_max_len 1024
530
+
531
+ # Don't precede error with string (doesn't accept empty string, use whitespace if you need)
532
+ # php_value error_prepend_string " "
533
+
534
+ # Don't prepend to error (doesn't accept empty string, use whitespace if you need)
535
+ # php_value error_append_string " "
536
+
537
+ # Increase cookie security
538
+ <IfModule php5_module>
539
+ php_value session.cookie_httponly true
540
+ </IfModule>