luca 0.9.89 → 0.9.91
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +11 -1
- data/Gemfile +5 -2
- data/Gemfile.lock +84 -56
- data/Rakefile +10 -2
- data/app/assets/javascripts/luca/components/application.coffee +82 -89
- data/app/assets/javascripts/luca/components/collection_view.coffee +9 -5
- data/app/assets/javascripts/luca/components/controller.coffee +72 -11
- data/app/assets/javascripts/luca/components/fields/base.coffee +61 -8
- data/app/assets/javascripts/luca/components/fields/button_field.coffee +53 -7
- data/app/assets/javascripts/luca/components/fields/checkbox_array.coffee +12 -7
- data/app/assets/javascripts/luca/components/fields/text_field.coffee +1 -1
- data/app/assets/javascripts/luca/components/form_view.coffee +2 -2
- data/app/assets/javascripts/luca/components/grid_layout_view.coffee +0 -1
- data/app/assets/javascripts/luca/components/page.coffee +1 -0
- data/app/assets/javascripts/luca/components/table_view.coffee +2 -2
- data/app/assets/javascripts/luca/concerns/dom_helpers.coffee +2 -2
- data/app/assets/javascripts/luca/containers/card_view.coffee +84 -54
- data/app/assets/javascripts/luca/containers/container.coffee +126 -46
- data/app/assets/javascripts/luca/containers/modal_view.coffee +9 -9
- data/app/assets/javascripts/luca/containers/page_controller.coffee +25 -0
- data/app/assets/javascripts/luca/containers/panel_toolbar.coffee +1 -1
- data/app/assets/javascripts/luca/containers/viewport.coffee +2 -5
- data/app/assets/javascripts/luca/core/collection.coffee +18 -4
- data/app/assets/javascripts/luca/core/model.coffee +1 -1
- data/app/assets/javascripts/luca/core/panel.coffee +1 -1
- data/app/assets/javascripts/luca/core/view.coffee +26 -7
- data/app/assets/javascripts/luca/development/code_sync_manager.coffee +51 -4
- data/app/assets/javascripts/luca/development/console.coffee +1 -1
- data/app/assets/javascripts/luca/framework.coffee +1 -1
- data/app/assets/javascripts/luca/index.coffee +1 -0
- data/app/assets/javascripts/luca/util/luca.coffee +2 -1
- data/app/assets/stylesheets/luca/components/viewport.scss +0 -4
- data/bin/luca +14 -0
- data/docs/framework.json +1 -1
- data/docs/luca-framework-documentation.js +1 -0
- data/lib/luca/cli/generate.rb +37 -0
- data/lib/luca/cli/server.rb +20 -0
- data/lib/luca/cli/sync.rb +40 -0
- data/lib/luca/cli/watch.rb +16 -0
- data/lib/luca/cli.rb +68 -0
- data/lib/luca/collection/endpoint.rb +1 -0
- data/lib/luca/component_definition.rb +23 -5
- data/lib/luca/luca_application.rb +18 -7
- data/lib/luca/rails/version.rb +1 -1
- data/lib/luca/server.rb +7 -0
- data/lib/luca/stylesheet.rb +2 -3
- data/lib/luca/version.rb +3 -0
- data/lib/luca/watcher.rb +72 -0
- data/lib/luca.rb +8 -1
- data/luca.gemspec +14 -7
- data/site/.bundle/config +2 -0
- data/site/.gitignore +5 -0
- data/site/.rvmrc +1 -0
- data/site/CHANGELOG.md +41 -0
- data/site/DOCS.md +41 -0
- data/site/Gemfile +8 -0
- data/site/Gemfile.lock +134 -0
- data/site/LICENSE.md +19 -0
- data/site/config.rb +84 -0
- data/site/helpers/site_helpers.rb +20 -0
- data/site/html5bp-docs/README.md +38 -0
- data/site/html5bp-docs/contribute.md +104 -0
- data/site/html5bp-docs/crossdomain.md +21 -0
- data/site/html5bp-docs/css.md +135 -0
- data/site/html5bp-docs/extend.md +507 -0
- data/site/html5bp-docs/faq.md +77 -0
- data/site/html5bp-docs/htaccess.md +323 -0
- data/site/html5bp-docs/html.md +170 -0
- data/site/html5bp-docs/js.md +31 -0
- data/site/html5bp-docs/misc.md +25 -0
- data/site/html5bp-docs/usage.md +109 -0
- data/site/readme.md +47 -0
- data/site/source/.htaccess +540 -0
- data/site/source/404.html +157 -0
- data/site/source/app/assets/javascripts/dependencies.js.coffee +6 -0
- data/site/source/app/assets/javascripts/docs/application.coffee +64 -0
- data/site/source/app/assets/javascripts/docs/collections/docs_documentation.coffee +17 -0
- data/site/source/app/assets/javascripts/docs/collections/github_repositories.coffee +7 -0
- data/site/source/app/assets/javascripts/docs/collections/index.coffee +1 -0
- data/site/source/app/assets/javascripts/docs/collections/luca_documentation.coffee +17 -0
- data/site/source/app/assets/javascripts/docs/collections/public_gists.coffee +4 -0
- data/site/source/app/assets/javascripts/docs/config.coffee +5 -0
- data/site/source/app/assets/javascripts/docs/index.coffee +12 -0
- data/site/source/app/assets/javascripts/docs/lib/router.coffee +3 -0
- data/site/source/app/assets/javascripts/docs/lib/util.coffee +0 -0
- data/site/source/app/assets/javascripts/docs/models/component.coffee +99 -0
- data/site/source/app/assets/javascripts/docs/models/github_repository.coffee +3 -0
- data/site/source/app/assets/javascripts/docs/models/index.coffee +1 -0
- data/site/source/app/assets/javascripts/docs/templates/component_documentation.jst.ejs +55 -0
- data/site/source/app/assets/javascripts/docs/templates/examples_browser/overview.jst.ejs +4 -0
- data/site/source/app/assets/javascripts/docs/templates/examples_browser/selector.jst.ejs +11 -0
- data/site/source/app/assets/javascripts/docs/templates/github_repository.jst.ejs +4 -0
- data/site/source/app/assets/javascripts/docs/templates/layouts/main.jst.ejs +4 -0
- data/site/source/app/assets/javascripts/docs/templates/left_navigation.jst.ejs +5 -0
- data/site/source/app/assets/javascripts/docs/templates/pages/getting_started.jst.ejs +78 -0
- data/site/source/app/assets/javascripts/docs/templates/pages/home.jst.ejs +57 -0
- data/site/source/app/assets/javascripts/docs/views/components/code_editor/index.coffee +0 -0
- data/site/source/app/assets/javascripts/docs/views/components/code_editor.coffee +45 -0
- data/site/source/app/assets/javascripts/docs/views/components/component_documentation.coffee +72 -0
- data/site/source/app/assets/javascripts/docs/views/index.coffee +3 -0
- data/site/source/app/assets/javascripts/docs/views/pages/browse_source/details.coffee +37 -0
- data/site/source/app/assets/javascripts/docs/views/pages/browse_source/list.coffee +31 -0
- data/site/source/app/assets/javascripts/docs/views/pages/browse_source.coffee +46 -0
- data/site/source/app/assets/javascripts/docs/views/pages/component_editor.coffee +10 -0
- data/site/source/app/assets/javascripts/docs/views/pages/examples_browser/docs.coffee +12 -0
- data/site/source/app/assets/javascripts/docs/views/pages/examples_browser/source.coffee +13 -0
- data/site/source/app/assets/javascripts/docs/views/pages/examples_browser.coffee +102 -0
- data/site/source/app/assets/javascripts/docs/views/pages/home.coffee +10 -0
- data/site/source/app/assets/javascripts/docs/views/views/api_browser/index.coffee +43 -0
- data/site/source/app/assets/javascripts/docs/views/views/collection_view_examples/grid_layout_view_example.coffee +14 -0
- data/site/source/app/assets/javascripts/docs/views/views/collection_view_examples/table_view_example.coffee +39 -0
- data/site/source/app/assets/javascripts/docs/views/views/form_view_examples/basic_example.coffee +38 -0
- data/site/source/app/assets/javascripts/docs/views/views/form_view_examples/complex_layout.coffee +110 -0
- data/site/source/app/assets/javascripts/docs/views/views/top_navigation.coffee +6 -0
- data/site/source/app/assets/javascripts/docs-docs.js +1 -0
- data/site/source/app/assets/javascripts/luca-docs.js +1 -0
- data/site/source/app/assets/javascripts/luca-framework-documentation.js +1 -0
- data/site/source/app/assets/javascripts/site.js.coffee +4 -0
- data/site/source/app/assets/javascripts/vendor/codemirror.js +4786 -0
- data/site/source/app/assets/javascripts/vendor/coffeescript.js +346 -0
- data/site/source/app/assets/javascripts/vendor/css.js +465 -0
- data/site/source/app/assets/javascripts/vendor/htmlmixed.js +84 -0
- data/site/source/app/assets/javascripts/vendor/javascript.js +422 -0
- data/site/source/app/assets/javascripts/vendor/js-beautify.js +1353 -0
- data/site/source/app/assets/javascripts/vendor/modernizr-2.6.1.min.js +4 -0
- data/site/source/app/assets/javascripts/vendor/vim.js +2511 -0
- data/site/source/app/assets/stylesheets/docs/api-browser.css.scss +5 -0
- data/site/source/app/assets/stylesheets/docs/application.css.scss +35 -0
- data/site/source/app/assets/stylesheets/docs/browse-source.css.scss +5 -0
- data/site/source/app/assets/stylesheets/docs/scrollable-table.css.scss +5 -0
- data/site/source/app/assets/stylesheets/site.css.scss +2 -0
- data/site/source/app/assets/stylesheets/vendor/codemirror.css +240 -0
- data/site/source/app/assets/stylesheets/vendor/prettify-tomorrow-night-bright.css +160 -0
- data/site/source/app/assets/stylesheets/vendor/twilight.css +26 -0
- data/site/source/crossdomain.xml +15 -0
- data/site/source/documentation.html.haml +1 -0
- data/site/source/favicon_base.png +0 -0
- data/site/source/humans.txt +15 -0
- data/site/source/images/background.png +0 -0
- data/site/source/images/middleman.png +0 -0
- data/site/source/index.html.haml +1 -0
- data/site/source/layouts/layout.haml +55 -0
- data/site/source/readme.md +63 -0
- data/site/source/robots.txt +3 -0
- data/spec/javascripts/components/collection_view_spec.coffee +1 -1
- data/spec/javascripts/containers/card_view_spec.coffee +58 -5
- data/spec/javascripts/core/collection_spec.coffee +1 -1
- data/spec/javascripts/core/view_spec.coffee +2 -2
- data/vendor/assets/javascripts/backbone-min.js +37 -33
- data/vendor/assets/javascripts/backbone-query.min.js +1 -1
- data/vendor/assets/javascripts/jquery.js +5 -4
- data/vendor/assets/javascripts/luca-dependencies.min.js +8 -6
- data/vendor/assets/javascripts/luca-development.min.js +1 -1
- data/vendor/assets/javascripts/luca.full.min.js +12 -10
- data/vendor/assets/javascripts/luca.min.js +5 -5
- data/vendor/assets/javascripts/underscore-min.js +1 -5
- data/vendor/assets/javascripts/underscore-string.min.js +1 -1
- data/vendor/assets/stylesheets/luca-components.css +0 -2
- data/vendor/assets/stylesheets/luca-development.css +1 -1
- metadata +215 -39
- data/app/assets/javascripts/luca/components/page_controller.coffee +0 -3
- data/app/assets/javascripts/luca/core/collection_view.coffee +0 -150
- data/site/assets/bootstrap.min.js +0 -7
- data/site/assets/dependencies.js +0 -94
- data/site/assets/glyphicons-halflings-white.png +0 -0
- data/site/assets/glyphicons-halflings.png +0 -0
- data/site/assets/luca-ui-bootstrap.css +0 -1331
- data/site/assets/luca-ui-bootstrap.js +0 -9
- data/site/assets/luca-ui-development-tools.css +0 -234
- data/site/assets/luca-ui-development-tools.js +0 -18561
- data/site/assets/luca-ui-development-tools.min.js +0 -15
- data/site/assets/luca-ui-full.min.js +0 -8
- data/site/assets/luca-ui.min.js +0 -4
- data/site/assets/sandbox.css +0 -62
- data/site/assets/sandbox.js +0 -469
- data/site/docs/application.html +0 -41
- data/site/docs/caching.html +0 -43
- data/site/docs/collection.html +0 -75
- data/site/docs/collection_manager.html +0 -71
- data/site/docs/containers.html +0 -118
- data/site/docs/events.html +0 -153
- data/site/docs/view.html +0 -128
- data/site/img/glyphicons-halflings-white.png +0 -0
- data/site/img/glyphicons-halflings.png +0 -0
- data/site/index.html +0 -20
- data/site/source-map.js +0 -1
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>
|