Compare commits

..

638 Commits
v3.0 ... v7.1.0

Author SHA1 Message Date
Rob Larsen
b846ed928d Merge pull request #2122 from h5bp/jquery-cdn
jQuery CDN docs - remove unnecessary info
2019-03-19 16:37:47 -04:00
Christian Oliff
7bd9a8b4e9 revert removal of paragraph and instead clarify 'serve jQuery to users in China' 2019-03-19 12:34:36 +09:00
Rob Larsen
f38338068d Merge pull request #2121 from roblarsen/7.1.1
Upgrading modernizr and bumping version
2019-03-18 13:16:07 -04:00
Christian Oliff
2ef1629a5b remove unnessecary info 2019-03-18 10:01:49 +09:00
Christian Oliff
58618a202e update version to v7.1.0
+ minor devdeps update
+ update CHANGELOG.md
2019-03-18 09:55:13 +09:00
Rob Larsen
8372416cba Upgrading modernizr and bumping version 2019-03-15 16:04:53 -04:00
Christian Oliff
751dc34d02 Update modernizr-3.7.0.min.js (#2120)
This wasn't done correctly in the previous PR.
2019-03-11 10:38:52 -04:00
Christian Oliff
c9a3d57b8d Update Google Analytics docs and snippet (#2118)
- We now include ` ga('set','transport','beacon');` in the `index.html` analytics snippet for improved peformance
- Docs updated mentioning why we are using 'analytics.js' rather than 'gtag.js'. Removed link to mathias bynens old blog post as its not so relevant since the async snippet is included in the official Google Develoepr docs. There's a link to Philip Walton's excellent guide to advanced setup.
2019-03-08 16:55:46 -05:00
Christian Oliff
ec1a2165ba update CSS from main.css in dist (#2119) 2019-03-08 12:22:01 -05:00
Christian Oliff
95557efa65 Update Modernizr to 3.7.0 (#2116) 2019-03-07 14:59:42 -05:00
Christian Oliff
de8c28334e minor docs update (#2115)
Update https://cdn.polyfill.io from v2 to v3
Remove unneeded shrink-to-fit=no meta tag
2019-02-20 16:15:41 -05:00
Christian Oliff
fe815176cb Minor update to eslint-plugin-mocha and eslint (#2114) 2019-02-20 14:15:37 -05:00
Christian Oliff
b91f2a95a1 Merge pull request #2113 from mattbrundage/patch-1
Update index.html
2019-02-14 12:16:14 +09:00
Matt Brundage
81cd508b4d Update index.html 2019-02-13 12:16:38 -05:00
Matt Brundage
09729c6899 Update index.html
A more succinct way of writing the conditional comment -- still recognized by IE 5-9. (IE10+ doesn't support conditional comments)
2019-02-13 10:50:09 -05:00
Rob Larsen
409309c31e 7.0.1 (#2112)
updates main.css to latest, updates changelog and bumps version
2019-02-11 22:28:17 -05:00
Rob Larsen
32b38722c2 npm published 2019-02-09 08:37:36 -05:00
Rob Larsen
7069a1b789 Typo 2019-02-08 16:45:06 -05:00
Rob Larsen
61a8e30d74 Merge pull request #2107 from h5bp/changelog-update
Update CHANGELOG.md
2019-02-08 16:08:33 -05:00
Rob Larsen
81a3fef3d3 updating changelog 2019-02-08 15:33:52 -05:00
Rob Larsen
34dbedf293 Merge pull request #2110 from LeoColomb/patch-1
Bump apache-server-configs to v3.1.0
2019-02-08 10:55:42 -05:00
Léo Colombaro
81537a3827 Update .htaccess with config v3.1.0 2019-02-08 14:03:48 +01:00
Léo Colombaro
45ae13440f Bump apache-server-configs to v3.1.0 2019-02-08 14:00:10 +01:00
Rob Larsen
2c4c508a8a Merge pull request #2108 from h5bp/devdeps-update
Update package.json
2019-02-08 06:29:12 -05:00
Rob Larsen
9eae72a59b Merge pull request #2109 from h5bp/fix-for-dist-build
the CSS and html MD files hadn't been updated
2019-02-08 06:28:14 -05:00
Christian Oliff
d186e2c98f the CSS and html MD files hadn't been updated 2019-02-08 16:35:10 +09:00
Christian Oliff
26c4c0f8c7 Update package.json 2019-02-08 16:29:42 +09:00
Christian Oliff
36b68af67d Update CHANGELOG.md 2019-02-08 16:22:27 +09:00
Rob Larsen
bbe9e8ad10 Merge pull request #2074 from h5bp/v7.0
v7.0 Docs Update
2019-02-07 13:30:07 -05:00
Scott O'Hara
bad98c453e remove instances of shrink-to-fit=no (#2103)
closes #2102

Per my findings, the need for it as a default was rectified with the release of iOS 9.3, where the viewport no longer shrunk to accommodate overflow, as was introduced in iOS 9.
2018-12-17 15:52:18 -05:00
Richie Bendall
49130f6cfe Upgrade Normalize.css from 8.0.0 to 8.0.1 (#2104)
* Upgrade Normalize.css from 8.0.0 to 8.0.1

* Update Normalizecss version
2018-12-17 15:51:56 -05:00
Rob Larsen
cfc5f3a92c Merge branch 'master' into v7.0 2018-11-24 08:55:33 -05:00
Maxim Mazurok
c8767e30c9 Removed link to #404html (#2099)
I've removed link to #404html section of the page, since there is on section for 404 page and in IDE I'm getting "Cannot resolve anchor #404html" warning. I hope that it makes sense.
2018-11-02 21:35:43 -04:00
Christian Oliff
3170d21177 Removes "display": "standalone" from manifest (#2096) 2018-11-01 07:08:04 -04:00
Rob Larsen
570a5ef6ac updating CSS docs to reference main.css (#2079)
Also, o need to dupe this documentation over two repos.
2018-10-23 10:47:06 -04:00
Rob Larsen
41d8f945af removing travis-after-all (#2078)
closes #2020
2018-10-10 16:03:54 -04:00
Rob Larsen
a37fcc3dec Removes out of date comments (#2077)
Fixes #2052
2018-10-09 16:18:17 -04:00
Rob Larsen
e1e7277024 copies main.css from main.css project (#2066)
This code updates the package.json, build and tests to pull main.css from the main.css npm package.
2018-10-09 11:31:27 -04:00
coliff
85f99b9d5b Add security.txt details 2018-10-09 14:54:28 +09:00
coliff
c6b5f62d58 Add <meta name="theme-color" content="#fafafa"> 2018-10-09 01:16:42 +09:00
Christian Oliff
35c6157f34 Merge pull request #2060 from Richienb/patch-1
Improve PWA manifest
2018-10-09 01:11:40 +09:00
Richie Bendall
db6a08d4f6 Re Add display standalone attribute 2018-10-04 19:49:02 +13:00
Richie Bendall
b6cf4c1bb6 Re Add display standalone attribute 2018-10-04 19:48:36 +13:00
coliff
b3d07b191b update README to links to previous versions
- update package,json deps
2018-10-04 12:50:28 +09:00
coliff
a75c3a394f v7.0 (WIP)
- Remove unneeded x-ua-compatible - not needed for IE11
- Update many external links
- Fix typos
- Add info for creating a good meta description
- Add link for iPhone X viewport info
- Update browser upgrade prompt
- Remove integrating Bootstrap with H5BP (it was written a longtime ago and I don't think is relevant so much)
- Remove statement that Twitter Cards requires registering a domain
- Remove official shortlink section, it was always very poorly supported
- Made the touch icons sections more consise (no need at all to mention about non-retina iPhones and iOS versions prior to iOS 6 etc)
2018-10-04 12:36:59 +09:00
Christian Oliff
e7adcb40bc Merge pull request #2064 from h5bp/eslint-version
bump eslint version to 5.6.0
2018-10-04 11:33:37 +09:00
Christian Oliff
c52802b540 Fixing links on the EXTEND page (#2065)
- Removed dead link to http://dayofjs.com/videos/22158462/web-browsers_alex-russel
- Fix many redirects to browser docs on Mozilla, Apple, Faceook and Microsoft sites
2018-09-18 13:12:31 -04:00
Christian Oliff
05314199f3 bump eslint version to 5.6.0 2018-09-18 12:17:46 +09:00
Christian Oliff
2805813d1e Add Install with Yarn option (#2063)
Yarn is popular these days and H5BP is currently getting 2.4K downloads per month so I think it'd be good to add this here.
I changed the list of options to unnumbered as they aren't steps/instructions so bullets make more sense imho.
2018-09-17 23:14:33 -04:00
Christian Oliff
a139645651 update links (#2062)
- Fix for link to Google for mobile seperate links
- https link to hixie.ch
- fix link for Twitter Cards for Developers
2018-09-17 23:02:23 -04:00
Richie Bendall
11d70553eb Merge pull request #1 from h5bp/master
[pull] latest from master
2018-08-31 17:37:51 +12:00
Richie Bendall
1200a880cf Update dist manifest 2018-08-31 17:33:45 +12:00
Richie Bendall
64d90afde8 Update src manifest 2018-08-31 17:33:36 +12:00
Christian Oliff
2e754d881c updates to dev deps (#2061) 2018-08-30 11:59:20 -04:00
Richie Bendall
59961d6431 Update correct site manifest and apply suggestions 2018-08-30 23:38:27 +12:00
Richie Bendall
b6248446ed Reset incorrect site manifest 2018-08-30 23:38:06 +12:00
Richie Bendall
31fa69f21d Improve manifest 2018-08-29 23:56:04 +12:00
Rob Larsen
26316e0643 Update TOC.md 2018-08-15 13:03:56 -04:00
Waren Gonzaga
24c8fb2059 Update dev deps (#2058)
* Update dev deps

* Update package.json

update eslint again

* Update file_existence.js
2018-08-08 22:52:41 -04:00
Rob Larsen
2e32b433f7 removes package-lock.json 2018-07-05 12:41:41 -04:00
Christian Oliff
60198fa998 Ignore package-lock.json
We already do this on the html5boilerplate.com site
REF: https://github.com/h5bp/html5boilerplate.com/blob/master/.gitignore
2018-07-05 12:41:41 -04:00
Christian Oliff
7e74f27208 https links to editorconfig (#2055) 2018-05-30 12:15:41 -04:00
Christian Oliff
9dcf42b2a1 Update dev deps (#2053)
updates to:
```
babel-preset-env
gulp-rename
gulp-replace
mocha
```
2018-05-21 19:48:17 -04:00
子骅
7737439ab9 change the attribute of "notranslate" to "content" (#2050)
* change the key of "notranslate" to "content"

"value" is not a valid attribute on element meta (http://w3c.github.io/html/single-page.html#the-meta-element).
According to https://support.google.com/webmasters/answer/79812?hl=en,
content="notranslate" is recommended to use.

* don't specify the language on the Google site
2018-05-16 14:15:09 -04:00
Christian Oliff
269f72796f Prepare 6.1 release (#2045)
- Update `CHANGELOG.md` date
- Update dev deps
- Indenting on `index.html` to 2 space (was 4 space)
2018-05-01 12:36:59 -04:00
Rob Larsen
1b96f0fc4d adds 2042 2018-04-30 21:35:01 -04:00
Rob Larsen
1debe1a9b0 adds 2037 2018-04-30 21:35:01 -04:00
Christian Oliff
c7780e2a69 Update CHANGELOG.md 2018-04-30 21:35:01 -04:00
Léo Colombaro
b191874842 Bump Apache Server Config to v3 (#2042) 2018-04-17 13:19:36 -04:00
Rob Larsen
f121b53023 Features/eslint (#2037)
Fixes #1913

* Drops node 4

* update node engine to >=6 (#2035)

* syncs changes to spacing across different editorconfigs

* adds eslint with minimally invasive configuration- basically moving from 4 to 2 spaces.
2018-04-06 17:31:27 -04:00
Rob Larsen
2c8c4ea3c2 getting indent lined up across the project 2018-04-06 14:48:05 -04:00
Christian Oliff
475424abe2 HTTPS links (#2036)
* https a link

* https more links

* Fix paramaters typo

* Remove trailing . (unneeded)
2018-04-04 21:59:48 -04:00
Christian Oliff
0922cc62af Update package.json (#2034) 2018-03-29 22:59:15 -04:00
Christian Oliff
44f71e7e60 update devdeps (#2032) 2018-03-29 08:50:16 -04:00
Thomas Vantuycom
7523c41733 Replace node-sri with ssri (#2031)
Closes #1997.
2018-03-29 08:49:29 -04:00
Vladimir Kutepov
d6561f2c47 Add .babelrc and .prettierrc to .gitattributes (#2030) 2018-03-19 22:49:47 -04:00
Rob Larsen
d2f1bba395 Adding a note about PRs 2018-03-14 13:13:42 -04:00
Christian Oliff
ec30531d64 Update JS head snippets (#2029)
plus correct capitalization of JavaScript
2018-03-06 10:20:01 -05:00
Christian Oliff
39cb6359da Devdeps update (mocha, modernizr, normalize and gulp-autoprefixer) (#2028)
* Update Dev Dependencies

mocha, modernizr, gulp-autoprefixer updates.
The build tests run fine with no changes. The dist CSS is different as the PR from 2025 didn't include changes in the dist dir.

* Update Normalize
2018-03-05 21:50:53 -05:00
Gaël Poupard
24d1a3287d Remove clip-path (#2025)
Revert #1920 to fix #2021.
2018-02-05 20:27:42 -05:00
Christian Oliff
33648c2e21 update link to Atom RSS (#2024) 2018-02-05 12:45:20 -05:00
Christian Oliff
86df1ead6f Minor CSS comments update (#2019) 2018-01-26 07:43:02 -05:00
Christian Oliff
1359bb9322 Update to jQuery 3.3.1 (#2018) 2018-01-25 07:57:54 -05:00
Christian Oliff
7e7460e904 update dev dependencies (#2017) 2018-01-22 11:09:14 -05:00
Christian Oliff
23f2322ec5 Update to jQuery 3.3.0 (#2016) 2018-01-20 22:08:04 -05:00
Christian Oliff
698776558f Remove info about Flash in Metro mode IE10 (no longer applicable) (#2015)
This was addressed nearly 5 years ago:
https://blogs.msdn.microsoft.com/ie/2013/03/11/flash-in-windows-8/
2018-01-12 12:48:03 -05:00
Sumit Kumar
76f6b7d953 Upgrading to babel-preset-env (#2010) 2017-11-28 21:17:35 -05:00
Chris Watson
0ca2bc2f55 Updated tests (Travis and Mocha) and dependencies, rebuilt dist (#2009)
* docs: remove trailing whitespace in CHANGELOG.md

* test: update node versions & add trusty to travis

* test: update deps and test script in package.json

* refactor: rebuild & add updated docs, css, & html

* docs: remove duplicate 'be' in usage.md
2017-11-28 14:13:45 -05:00
Christian Oliff
33e0d7613a Create CODE_OF_CONDUCT.md (#2011) 2017-11-28 14:13:19 -05:00
byog
6180cd90fc Update extend.md (#2006)
* Update extend.md

* Update extend.md
2017-11-07 20:54:07 -05:00
Léo Colombaro
9a176f57af Update .htaccess to v2.15.0 from h5bp/server-configs-apache (#2003) 2017-10-31 09:34:48 -04:00
Azeem Bande-Ali
b831c7621f Add documentation for humans.txt (#2007)
* Add documentation for humans.txt

* Change src instead of dist
2017-10-31 09:31:34 -04:00
Abdel_95
37871286b4 double word on line 21 (be) (#1996)
Please the word 'be' duplicated and corrected that. 
Thanks.
2017-10-03 14:56:04 -04:00
Brayan Febles
4eb36b3c79 What about the meta tag, shrink-to-fit=no (#1984)
https://stackoverflow.com/questions/33767533/what-does-the-shrink-to-fit-viewport-meta-attribute-do
It worth?
I am trying to help please don't blame me
2017-09-25 21:14:07 -04:00
Jan Willem
f11f2fe2ab Fixed JSHint errors (#1994) 2017-09-25 21:13:05 -04:00
Rob Larsen
7db4ba338d adding npm instructions 2017-09-25 14:38:07 -04:00
Rob Larsen
dbc3ed9735 Restores stable visuallyhidden (#1991)
see the saga unfold #1985
2017-09-11 09:48:56 -04:00
Rob Larsen
bfdc2c5ccd Updates package.json for npm (#1988)
* added repository field

* Small update to package.json
2017-08-17 12:56:37 -04:00
Rob Larsen
40080b5689 updates changelog and dist css (#1987) 2017-08-17 12:55:43 -04:00
Joe Watkins
9f13695d21 1985 - fix VoiceOver reading order bug with visually hidden text - remove clip and absolute positioning - add inline-block (#1989) 2017-08-17 12:07:12 -04:00
Scott O'Hara
7bff68fa57 Fix Bug: .visuallyhidden on macOS VO (#1986)
This PR solves [issue 1985: macOS - VoiceOver / Chrome announcing visually hidden text out of order](https://github.com/h5bp/html5-boilerplate/issues/1985)

By removing the negative margin, and setting it to `margin: 0;`, the issue is resolved.
2017-08-11 20:45:53 -04:00
Rob Larsen
d22220590b Docs updated (#1983) 2017-08-01 14:27:31 -04:00
Rob Larsen
f91a9253d3 Updates js.md (#1982) 2017-08-01 13:31:10 -04:00
Rob Larsen
a0aa8370a6 Updating faq.md (#1981)
#1554
2017-07-31 16:38:04 -04:00
Rob Larsen
826f5f05d8 Updating usage.md (#1979)
* Rewriting the basic usage blurb

* Expanding the Usage intro

* interesting - > interested
2017-07-25 11:04:17 -04:00
Christian Oliff
14d3756b42 Update .gitattributes (#1980)
Latest updates from: https://github.com/alexkaratarakis/gitattributes/blob/master/Web.gitattributes
2017-07-25 11:01:10 -04:00
Rob Larsen
0be93d5ffc Missing an "n" 2017-07-24 10:30:21 -04:00
Christian Oliff
1dcd1e524e Create SUPPORT.md (#1978)
Add a SUPPORT file to the .github/ folder directing folks to Stack Overflow if they have a general question about using H5BP. A link to this file will now display when someone opens a new issue which could cut down on new issues being opened unnecessarily. I realise the content in this file could have overlap in the existing ISSUE_TEMPLATE.md file but I think it'd be worth adding.
2017-07-22 08:10:40 -04:00
Christian Oliff
6f0eaec0ba Remove link to the retired initializr site (#1976) 2017-07-21 21:30:57 -04:00
Christian Oliff
bad87b9f54 Remove 'Chrome Web Store app section' (#1975)
Chrome Web Store are no longer accepting submissions for web apps (Windows, Mac or Linux) so this section is no longer needed. Users can use W3C Manifest file instead to allow for users to install their webapps.

> As of 21 November 2016, all newly published packaged or hosted apps are restricted to Chrome OS, and are not available to users on Windows, Mac or Linux. Existing apps will continue to be available on all major platforms and will continue to receive updates
REF: https://blog.chromium.org/2016/08/from-chrome-apps-to-web.html
2017-07-20 12:37:22 -04:00
Christian Oliff
83ee10314c Fix typos and markdown errors (#1974)
Fix typos and markdown errors
2017-07-20 12:12:22 -04:00
Rob Larsen
4d593d15cb clarification on favico.ico
see #1783
2017-07-20 11:02:28 -04:00
Rob Larsen
a9a271c999 Updated with accessibility note. 2017-07-20 10:58:37 -04:00
Rob Larsen
026c50c1f3 Update html.md
Adds some docs about the web app manifest and modernizr 3.
Also, housekeeping!
2017-07-18 13:58:32 -04:00
Christian Oliff
0ab739989e Update html.md (#1973)
- Update IE versions compatibility for Browser Upgrade Prompt section
2017-07-18 12:37:18 -04:00
Christian Oliff
67b8cd63f2 Update extend.md (#1972)
- HTTPS links to example.com (I know it's only an example but good to encourage always using HTTPS for everything)
- Fix Markdown issue with iOS web apps code not displaying.
- Remove section incorrectly stating that 'Screen readers currently have less-than-stellar support for HTML5'. The JavaScript polyfill is largely unnecessary and hasn't been updated for 4 years.
- Rename filename reference for apple-touch-icon to be icon.png to match what is used by H5BP
- Remove the no-longer-exists Firefox OS from list of browsers which support `theme-color`  (Firefox browser does not support theme-color at this time)
2017-07-18 12:36:40 -04:00
Rob Larsen
a0fd4b4b6b Added direct links to various server config repos 2017-07-18 10:57:40 -04:00
Christian Oliff
0cb11dc50a Updates to usage.md (#1970)
- Updated file tree with relevant additions, filename changes and
alphabetized
- Mention that browserconfig.xml is relevant for Edge (as well as IE11)
- Remove very old link with favicon.psd. It is deprecated and doesn't
have any of the recent iPhones app sizes.
2017-07-17 13:39:46 -04:00
Pete Cooper
ac39d02090 Typo in CHANGELOG.md (#1971)
Changed `housekeeing` to a real word.
2017-07-17 08:46:10 -04:00
Rob Larsen
a05250d121 CHANGELOG updated
Lots of changes!
2017-07-14 10:58:16 -04:00
Christian Oliff
89b15a6506 Editorconfig change 'will need a plugin' to 'may need' (#1968)
Visual Studio, BBEdit, WebStorm and others have built-in support for
Editorconfig files so we should change ‘will need to install a plugin’
to ‘may need to install a plugin’.
2017-07-13 10:56:59 -04:00
Christian Oliff
57b3983500 Update autoprefixer to IE 9 and above (#1969)
was previously IE 8 and above
2017-07-13 10:49:14 -04:00
Christian Oliff
9bd483882f Remove package-lock.json (#1966)
There's a known issue with NPM where the package-lock.json file is not updated after package.json file is changed. This has been confirmed as a bug by NPM and a fix will be rolling out soon. For the time being I propose we remove this file (particularly as the dependency versions are now out of sync). 
REF: https://github.com/npm/npm/issues/16866
2017-07-12 10:48:31 -04:00
Christian Oliff
14d990e270 Update dev dependencies (#1965)
Updated archiver, babel-core, del, glob, gulp-load-plugins, gulp-replace, jshint, run-sequence, and travis-after-all to the latest versions. All tests completed without issues and the 'dist' folders output is the same as before so we're all good there.
2017-07-12 10:34:53 -04:00
Christian Oliff
0dd2a66702 Losslessly optimized icon.png (#1964)
Losslessly optimized with ImageOptim (MacOS). Saved 0.5%. :-)
2017-07-12 08:30:13 -04:00
Rob Larsen
bc2710e047 Adds web app manifest file (#1963)
closes #1629
2017-07-11 14:54:22 -04:00
Christian Oliff
efa3db1cd0 ::first-letter in print style can cause incorrect rendering in Chrome (#1962)
Chrome currently has a bug (when printing) that results in
::first-letter being vertically misaligned under certain (seemingly
unrelated) conditions. This PR fixes issue by removing the CSS that
causes the issue.
2017-07-11 12:40:35 -04:00
Rob Larsen
fb6cb8d198 Upgrades Normalize (#1960)
closes #1959
2017-07-06 12:11:44 -04:00
Christian Oliff
487c64fa78 Update polyfill JS example (#1958)
- Update Polyfill CDN to v2 which is the default version (Ref: https://cdn.polyfill.io )
- Switch the JQuery from Google's CDN to Jquery's CDN to match the main index.html
- Update to jQuery 3.2.1.
- Add SRI hash to jQuery link
2017-07-06 12:06:22 -04:00
Christian Oliff
e7fe855a44 Update to jQuery 3.2.1 (#1942)
* Update to jQuery 3.2.1

Update to jQuery 3.2.1

* Update package.json
2017-07-06 10:30:36 -04:00
Christian Oliff
957f9f3f66 Remove link to ySlow (#1957)
Yahoo's YSlow is (sadly) no longer actively maintained. The browser extensions don't work anymore and the main repo hasn't been updated for nearly four years. I suggest to remove the http://developer.yahoo.com/yslow/ link.
2017-07-06 10:18:36 -04:00
Christian Oliff
76bafcf5c5 HTTPS some third-party links (#1956)
HTTPS some third-party links
2017-07-06 10:18:00 -04:00
Markus Oberlehner
8b35e707b7 Improve ::selection documentation which became confusing after c7057be (#1955)
After Autoprefixer was added a comment explaining that the vendor prefixed
`::-moz-selection` and the default `::selection` can't be combined became
obsolete. I (with the help of @roblarsen) rephrased the comment to be more
general and so that it still makes sense in the dist css file. A stackoverflow
link explains why vendor prefixed selectors can't be combined with other selectors.

Fixes #1953
2017-07-05 13:19:47 -04:00
Maik Ellerbrock
591b2f6194 refactor(html): update browsehappy to https instead of http (#1952) 2017-06-30 16:12:28 -04:00
Jacob Dreesen
5505ef0133 Fix links to CONTRIBUTING.md (#1951) 2017-06-11 12:03:51 -04:00
Rob Larsen
907918637c Adds .github folder and contents Fixes #1943 (#1948)
Adds Issue Template

 Adds PR Template

 Rewrites Contributing.md and moves it to ./github
2017-06-07 14:14:59 -04:00
Rob Larsen
2ad7077517 Adds Modernizr 3 (#1940)
Fixes #1740 and #1605

- removes the static custom build of modernizr
- moves Modernizr to the bottom
- builds a custom modernizr in gulp
- adds tests for the generated modernizr
2017-05-28 08:54:44 -04:00
Rob Larsen
9888a8f5b4 Updates HEAD changelog 2017-05-23 15:01:43 -04:00
saharjs
e0114f377e Update README.md (#1937) 2017-04-20 22:34:51 -04:00
Alexander Salas Bastidas
220937b1ac Update .gitattributes for Web Projects (#1935)
Based from a collection of useful .gitattributes templates of @alexkaratarakis

https://github.com/alexkaratarakis/gitattributes
2017-04-08 21:56:07 -04:00
Alexander Salas Bastidas
f86189a254 Add the link for useful .gitignore templates (#1936) 2017-04-07 10:40:30 -04:00
Amila Welihinda
024b8a05ee Restricted engines to node 4, npm 3 (#1931) 2017-03-27 10:38:07 -04:00
Amila Welihinda
6f21d78a21 Removed duplicate babel config in package.json (#1928) 2017-03-27 10:37:37 -04:00
Amila Welihinda
29fd4124f4 Test against modern node versions (#1925) 2017-03-19 13:15:30 -04:00
Rob Larsen
9d6176a26c Updates jQuery to 3.2.0 (#1924)
* Updates jquery to 3.2.0
2017-03-17 21:31:38 -04:00
Gaël Poupard
abc64efcb7 clip is deprecated: add clip-path as PE (#1920)
`clip` [is deprecated since 2014](https://www.w3.org/TR/css-masking-1/#clip-property). It works great but already has a more future proof version: `clip-path`.

@ryuran [suggested](https://twitter.com/ryuran78/status/778943389819604992) the `clip:path: inset(50%);` notation as it's the shorter possible to mimic our old clip.

Here's [a codepen](http://codepen.io/ffoodd/pen/gwKZyq?editors=1100#) and [a post translated by Hugo Giraudel](http://hugogiraudel.com/2016/10/13/css-hide-and-seek/).

Hope it'll help :)
2017-03-11 21:42:11 -05:00
Mr. Hyde
f888d9611b Reference sitemap.xml from robots.txt file (#1918)
Replaced urban legend about referencing robots.txt file for with an actually working and suggested by all major search engines method.

See:
[Google](https://support.google.com/webmasters/answer/183668?hl=en#addsitemap)
[Bing](https://www.bing.com/webmaster/help/how-to-submit-sitemaps-82a15bd4)
[Yandex](https://yandex.com/support/webmaster/indexing-options/sitemap.xml#notify-about)

ref: [h5bp#1895](https://github.com/h5bp/html5-boilerplate/issues/1895), [kotsu#88](https://github.com/LotusTM/Kotsu/issues/88)
2017-02-24 20:01:28 -05:00
Marco Biedermann
4ded8b5ce0 update devDependencies (#1910) 2016-12-25 12:23:17 -05:00
Marco Biedermann
2ea87deb35 use es2015 syntax in mocha tests (#1788)
use import instead of require
use fat arrow => function instead of function() {} callback
use and let and const instead of var
use template stings instead of string concatenation
2016-12-25 12:07:10 -05:00
H5BP
41b63975e5 Update content from the dist directory [skip ci] 2016-12-09 23:43:23 +00:00
Rob Larsen
f14024b9b3 Bumps jquery to 3.1.1 (#1909) 2016-12-09 18:40:15 -05:00
Waqas Ibrahim
6d22bdb02b updated to normalize.css v5.0.0 (#1908)
* updated normalize.css to v5.0.0
2016-12-09 18:07:35 -05:00
H5BP
5425efa538 Update content from the dist directory [skip ci] 2016-11-30 15:09:14 +00:00
Zearin
3937c41d91 Minor formatting edits (#1907) 2016-11-30 10:04:52 -05:00
H5BP
754268a347 Update content from the dist directory [skip ci] 2016-11-17 13:44:27 +00:00
Sergio Lavanga
fea7f22aef Scope :first-letter selector for print styles (#1905)
See: https://github.com/twbs/bootstrap/pull/21095
2016-11-17 08:34:46 -05:00
Kamil Breguła
76baba6a16 Add SRI Hash for jQuery (#1904)
Adds SRI Hash for jQuery

More info:
https://www.srihash.org/
https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
jquery/codeorigin.jquery.com#20
http://caniuse.com/#feat=subresource-integrity
2016-11-16 18:06:52 -05:00
XhmikosR
f1ed892389 Update .jshintrc (#1903) 2016-10-29 23:29:01 -04:00
H5BP
dff0e5ea33 Update content from the dist directory [skip ci] 2016-10-21 15:06:36 +00:00
Becky
2f9d2a41fc Improve accessibility with visuallyhidden content (#1900)
Add white-space: nowrap to visuallyhidden class so screenreaders can interpret line feeds correctly.
Add white-space: inherit to the focusable modifier so when focused the content appears as normal.
2016-10-21 10:21:47 -04:00
QWp6t
a2356c1cbf Display .browserupgrade message to IE 8 and 9 users. (#1748) 2016-09-12 22:36:03 -04:00
Rob Larsen
5b894fbc5e Updates Changelog to match recent history 2016-09-12 21:07:28 -04:00
Rob Larsen
4ebe939594 Updates README to reflect new IE support 2016-09-12 12:47:05 -04:00
Rob Larsen
b0ce6c4b77 Removes IE8 Support - Fixes #1524 (#1892)
- upgrades normalize
- upgrades jQuery

commit
2016-09-12 12:07:24 -04:00
Kenneth Williams
98c8f99b38 Re-add sudo: false to Travis config (#1890)
`sudo: false` is only default in repositories added in 2015 and later.

Ref: https://docs.travis-ci.com/user/ci-environment/
2016-08-17 21:38:20 -04:00
Damian Wajer
9c98cfaffb Fix print styles for Internet Explorer 11 (#1799)
*:first-line pseudo-selector freezes window with print preview in IE 11
(tested on Windows 7 with IE 11.0.9600.17420 and 11.0.9600.18204,
Windows 8.1 with IE 11.0.9600.16663, Windows 10 with IE 11.63.10586.0)

To reproduce just open: http://demo.html5boilerplate.com/
or /dist/index.html and select Print > Print preview...
2016-08-17 15:53:43 -04:00
H5BP
b0aad4fd9c Update content from the dist directory [skip ci] 2016-08-17 13:22:43 +00:00
Rob Larsen
7eb61d80bd DOCS: remove double slash
In updating the links we inadvertently added a double slash to one of the links.
2016-08-17 09:18:23 -04:00
H5BP
5400e04fb2 Update content from the dist directory [skip ci] 2016-08-15 21:06:23 +00:00
Carlos Araya
88b3eefff6 Resolving greenkeeper issues. (#1887)
Resolve #1870, #1869, #1868. Upgrades jQuery to 1.12.4 until discussion on removing support for IE8 is complete
2016-08-15 17:01:55 -04:00
H5BP
71b062d38a Update content from the dist directory [skip ci] 2016-08-15 20:58:51 +00:00
XhmikosR
274cd56646 Update links. (#1889)
* switch to `https`
* remove redirects
* add/remove trailing slash
2016-08-15 16:54:31 -04:00
H5BP
a4200355e9 Update content from the dist directory [skip ci] 2016-08-15 20:10:46 +00:00
t1st3
58a2ba81d2 Delete crossdomain.xml (#1881)
from #1779

* removes crossdomain.xml
* remove occurences to crossdomain.xml in doc and test
2016-08-15 16:06:54 -04:00
Ryan Dlugosz
a90685e01d Remove print img max-width: 100%. Fixes #1741 (#1882)
Following the lead of Twitter Bootstrap (see: https://github.com/twbs/bootstrap/pull/19000), remove the print media query that sets a max-width of 100% to images. This code was meant to prevent images from being cut off in print, but has a side effect of causing map tiles to disappear when printing medium-to-large maps (e.g., with Google Maps).

For reference, this style was added to H5BP in b2faa1fc3c
2016-08-15 10:19:25 -04:00
Chris Laughlin
59d0ce0e87 Adds pre-wrap to PRE fixes #1742 (#1886) 2016-08-15 09:42:58 -04:00
XhmikosR
b840bebeaf Fix license banner in main.css after #1814. (#1888) 2016-08-13 20:18:35 -04:00
H5BP
a7fd7c0e96 Update content from the dist directory [skip ci] 2016-08-08 20:25:43 +00:00
Paul Irish
908c6b6344 Merge pull request #1814 from wolfie/patch-1
Change license format to SPDX format
2016-08-08 13:21:12 -07:00
Paul Irish
a1f549f9f6 Merge pull request #1845 from kaelig/patch-1
Remove sudo: false in Travis configuration
2016-08-08 13:18:47 -07:00
H5BP
c7081f3700 Update content from the dist directory [skip ci] 2016-08-08 20:16:23 +00:00
Paul Irish
3bc2193384 Merge pull request #1859 from johnbacon/patch-1
Update the link to theme-color documentation
2016-08-08 13:10:28 -07:00
John Bacon
47004043d4 Update the link to theme-color documentation
Previous link was obsolete and pointing to WHATWG link.
2016-05-31 12:54:16 -04:00
Kaelig
76aa339a23 Remove sudo: false in Travis configuration
Travis builds now run on their container build by default and sudo: false is now the default value.
2016-05-18 20:10:11 -07:00
Henrik Paul
e5e11481d2 Change license format to SPDX format
The old license style (license.type and license.url) is deprecated by NPM
2016-03-29 19:23:37 +03:00
H5BP
b5d6e7b161 Update content from the dist directory [skip ci] 2016-03-28 00:29:12 +00:00
greenkeeperio-bot
4c52f6e669 Update jQuery to v1.12.2
Close h5bp/html5-boilerplate#1810
Close h5bp/html5-boilerplate#1811
2016-03-28 03:00:55 +03:00
Cătălin Mariș
a2bf312950 Remove SSH set up related code
Remove the code added in order to set up the SSH connection,
and instead, use travis-scripts' helper function `set-up-ssh`.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: https://github.com/alrra/travis-scripts/issues/19
2016-03-28 03:00:49 +03:00
H5BP
55d0985e6f Update content from the dist directory [skip ci] 2016-03-28 03:00:42 +03:00
Cătălin Mariș
296d301e27 Docs: Remove Mobile Boilerplate recommendation
The `Mobile Boilerplate` project is no longer actively maintained
and has been deprecated for a while.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Thanks @joekalange!

Close: h5bp/html5-boilerplate#1807
2016-03-11 15:21:37 +02:00
greenkeeperio-bot
0ffd0cb79c Update babel-preset-es2015 to v6.6.0
Close h5bp/html5-boilerplate#1797
2016-03-11 15:08:57 +02:00
greenkeeperio-bot
67ffc91d03 Update glob to v7.0.3
Close h5bp/html5-boilerplate#1803
Close h5bp/html5-boilerplate#1804
2016-03-11 15:05:22 +02:00
greenkeeperio-bot
5f4d2d8e08 Update babel-core to v6.7.2
Close h5bp/html5-boilerplate#1796
Close h5bp/html5-boilerplate#1800
Close h5bp/html5-boilerplate#1802
Close h5bp/html5-boilerplate#1805
Close h5bp/html5-boilerplate#1808
2016-03-11 15:05:08 +02:00
H5BP
00419696c2 Update content from the dist directory [skip ci] 2016-02-26 09:06:31 +00:00
greenkeeperio-bot
b22de5dcb2 Update jQuery to v1.12.1
Close h5bp/html5-boilerplate#1791
2016-02-26 11:02:20 +02:00
Mathias Bynens
2dfb90309f Simplify analytics snippet using async & defer
With this snippet, modern browsers use `async`, older browsers (i.e.
IE8 & IE9) use `defer`.

IE8 and IE9 lack `async` support but they have a broken implementation
of `defer`. However, the brokenness doesn’t apply in this scenario
since no scripts depend on GA in the way jQuery UI depends on jQuery.
`async` is also not supported by the Android 2.3 browser, but that
browser does have a preload scanner to make up for it.

Once we drop support for IE8 and IE9, the `defer` attribute can be
omitted.

The only downside is that the snippet is not a pure JavaScript
solution anymore, meaning it cannot be moved or concatenated into a
`.js` file. On the other hand, no one seemed to be doing that anyway;
everyone just inlines the snippet into the HTML.

Ref. https://github.com/h5bp/html5-boilerplate/pull/1660#issuecomment-89285678

Closes #1696.
2016-02-12 00:01:44 +01:00
Jimo
1dc011fe7e Doc: Make minor improvements
Close h5bp/html5-boilerplate#1720
2016-02-12 00:39:19 +02:00
Cătălin Mariș
72823a97b6 Use https:// where possible 2016-02-12 00:24:13 +02:00
H5BP
31047ecc30 Update content from the dist directory [skip ci] 2016-02-11 22:03:50 +00:00
t1st3
7f456c96f2 Docs: Improve social networks & SEO metadata info
Fix h5bp/html5-boilerplate#1674
Close h5bp/html5-boilerplate#1780
2016-02-12 00:00:47 +02:00
Cătălin Mariș
10fb130e76 Update tests to include Node v5 2016-02-11 23:51:47 +02:00
H5BP
d3be5f3730 Update content from the dist directory [skip ci] 2016-02-11 21:51:00 +00:00
Cătălin Mariș
7bad82c97b Further losslessly optimize apple-touch-icon.png
Before:         3959 B
  After:          3958 B
  ──────────────────────
  Reduction:         1 B [0.025%]
2016-02-11 23:47:04 +02:00
Cătălin Mariș
03ddc0d696 Update travis-scripts to v2.0.0
* Move to using GitHub deploy keys² as they are more secure
  than GitHub tokens.

* Add `travis-after-all` as a dev dependency as it's no longer
  installed and executed by `travis-scripts`.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ https://github.com/alrra/travis-scripts#readme
² https://developer.github.com/guides/managing-deploy-keys/#deploy-keys
³ https://github.com/alrra/travis-after-all#readme
2016-02-11 23:47:00 +02:00
greenkeeperio-bot
959ee8229d Update gulp to v3.9.1
Close h5bp/html5-boilerplate#1785
2016-02-11 23:16:15 +02:00
greenkeeperio-bot
daece9bdc0 Update glob to v7.0.0
Close h5bp/html5-boilerplate#1786
2016-02-11 23:16:15 +02:00
Marco Biedermann
800a806f2b ES2015ify the gulpfile
Close h5bp/html5-boilerplate#1787
2016-02-11 23:16:12 +02:00
H5BP
952f0352c3 Update content from the dist directory [skip ci] 2016-02-03 11:55:17 +00:00
Prayag Verma
8c91bb4a28 Docs: Fix typo in misc.md
Close h5bp/html5-boilerplate#1782
2016-02-03 13:53:13 +02:00
Cătălin Mariș
77c09009f6 v5.3.0 2016-01-12 14:59:19 +02:00
Cătălin Mariș
4b089a3a76 Update jQuery to v1.12.0
Ref: https://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/
2016-01-09 02:12:06 +02:00
Rob Larsen
340b012a1f Fetch jQuery from jQuery's CDN instead of Google's
In countries where `googleapis.com` is blocked (e.g.: China),
HTML5 Boilerplate is broken out of the box as jQuery will not load
until the request times out.

This commit changes the default jQuery source to use the jQuery CDN
as it is as fast or faster (by some reckoning) than the Google Hosted
Libraries version and is available worldwide.

While the chance of hitting the cache lottery is smaller with the
jQuery CDN (it's not as ubiquitous as Google), that chance is not enough
to override the need to ship working code for everyone in the world.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix h5bp/html5-boilerplate#1737
Close h5bp/html5-boilerplate#1739
2016-01-09 02:05:18 +02:00
Lowell Mower
438b8a7eef Docs: Add links to the Apache docs in misc.md
Fix h5bp/html5-boilerplate#1772
Close h5bp/html5-boilerplate#1774
2016-01-02 13:49:28 +02:00
greenkeeperio-bot
181c98ca75 Update archiver to v0.21.0
Close h5bp/html5-boilerplate#1763
2016-01-02 13:27:19 +02:00
Cătălin Mariș
97b04f4f4e Make build set permissions in archive correctly
Fix h5bp/html5-boilerplate#1730
2015-11-30 22:02:46 +02:00
greenkeeperio-bot
7ac0465aa1 Update archiver to v0.19.0
Close h5bp/html5-boilerplate#1757
Close h5bp/html5-boilerplate#1758
Close h5bp/html5-boilerplate#1759
Close h5bp/html5-boilerplate#1760
2015-11-30 22:02:02 +02:00
Cătălin Mariș
e8b9a8be39 Update gulp-jshint to v2.0.0
Close h5bp/html5-boilerplate#1756
2015-11-23 19:20:33 +02:00
greenkeeperio-bot
3b215df3ec Update glob to v6.0.1
Close h5bp/html5-boilerplate#1753
2015-11-11 23:04:26 +02:00
greenkeeperio-bot
7df016247c Update gulp-load-plugins to version 1.1.0
Close h5bp/html5-boilerplate#1751
2015-11-08 10:43:01 +02:00
greenkeeperio-bot
fa840f07ef Update devDependencies
Close h5bp/html5-boilerplate#1746
2015-10-19 22:13:54 +03:00
H5BP
0c8b71eb88 Update content from the dist directory [skip ci] 2015-10-13 18:11:26 +00:00
Michael Thorne
1cf48987f5 Remove leftover colon from comment from main.css
Ref: https://github.com/h5bp/html5-boilerplate/pull/1734#issuecomment-139189541
2015-10-13 21:02:08 +03:00
Matt Smith
a6a9094eba README.md: Add Edge to Browser support section
Close h5bp/html5-boilerplate#1745
2015-10-13 20:40:14 +03:00
Phillip Alexander
9fb12e846a Update tests to include latest Node v4.x.x release
Ref https://nodejs.org/en/blog/announcements/foundation-v4-announce/
Close h5bp/html5-boilerplate#1733
2015-10-13 20:39:45 +03:00
Cătălin Mariș
50e4ffa3cf Update devDependencies 2015-10-13 20:32:12 +03:00
Cătălin Mariș
8dd98e8fc1 Fetch automation script via npm 2015-10-13 20:07:44 +03:00
Sid Roberts
fc05bc82ab Change print color for ::first-letter and ::first-line pseudo-elements
Pseudo-elements `::first-letter` and `::first-line` now get printed
black by default as `::before` and `::after` are.

All pseudo-elements:
https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements

Closes #1715.
2015-07-19 17:09:41 +02:00
Cătălin Mariș
85d79ed6cc v5.2.0 2015-04-30 23:54:24 +03:00
Cătălin Mariș
fee2238978 Update jQuery to v1.11.3
Fix h5bp/html5-boilerplate#1699
2015-04-30 22:00:30 +03:00
Cătălin Mariș
a91fea4cd6 Update and improve README.md 2015-04-16 19:27:57 +03:00
Cătălin Mariș
bf141af507 Docs: Make minor improvements
* Fix broken links and use `https://` where possible.
* Remove the `Servers and Stacks` section (introduced by
  h5bp/html5-boilerplate#1572) from the `misc.md` file, as now, since
  h5bp/html5-boilerplate#1694 was merged, it brings even less value.
2015-04-16 10:31:02 +03:00
H5BP
c0665f0989 Update content from the dist directory [skip ci] 2015-04-16 06:32:33 +00:00
Mathias Bynens
dd6ec22ea5 Update CHANGELOG.md 2015-04-16 08:31:07 +02:00
Patrick Kettner
2de99b2ba3 Deprecate protocol-relative URLs
Always use the HTTPS URL when it’s available.

See also:
* https://github.com/konklone/cdns-to-https#conclusion-cdns-should-redirect-to-https
* http://www.paulirish.com/2010/the-protocol-relative-url/

Close h5bp/html5-boilerplate#1694
2015-04-16 08:30:05 +02:00
Cătălin Mariș
d35a8e9020 Fix broken links in CONTRIBUTING.md 2015-04-13 15:59:26 +03:00
Cătălin Mariș
7463646b48 Update devDependencies 2015-04-12 22:49:02 +03:00
Hans Christian Reinl
0d9f00826a Update the high resolution media query
Add `dppx` variant of `min-resolution` to the high resolution media
query as `dppx` is more accurate¹ than `dpi`.

Notes:

 * since `dppx` is not supported by all browsers the media query
   still needs the `dpi` fallback

 * this change removes the `dppx` related warning² from Blink based
   browsers (e.g.: Chrome, Opera)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ `dpi` (dots per inch) refers to a defined size of pixels where one
  inch is `96px` no matter what, so it does not take into consideration
  the physical inches.

² "Consider using 'dppx' units, as in CSS 'dpi' means dots-per-CSS-inch,
   not dots-per-physical-inch, so does not correspond to the actual 'dpi'
   of a screen. In media query expression: print,
   (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi)"

Fix h5bp/html5-boilerplate#1474
Close h5bp/html5-boilerplate#1691
2015-04-10 14:28:00 +03:00
Cătălin Mariș
6ee34e1ced Fix errors pointed out by JSCS from gulpfile.js 2015-04-10 11:33:56 +03:00
Cătălin Mariș
907838737b Update Apache Server Configs to v2.14.0 2015-04-07 23:53:39 +03:00
Cătălin Mariș
1c93f0a056 v5.1.0 2015-04-01 21:08:35 +03:00
Cătălin Mariș
0c32a937e0 Update CHANGELOG.md
Remove line regarding the inclusion of the `LICENSE.txt` file in the
`dist/` directory as it does not constitute an important change as far
as end users are concerned.
2015-04-01 20:54:33 +03:00
Cătălin Mariș
735b9ad706 Update Normalize.css to v3.0.3. 2015-03-31 07:05:20 +03:00
Cătălin Mariș
f4d731e23c Update devDependencies 2015-03-25 12:13:57 +02:00
H5BP
9581cf3a81 Update content from the dist directory [skip ci] 2015-03-13 20:46:00 +00:00
Matt Smith
c7057bef0c Use Autoprefixer to add the vendor prefixes
Ref h5bp/html5-boilerplate#1682
    https://github.com/h5bp/html5-boilerplate/pull/1682#discussion_r26377139
    https://github.com/postcss/autoprefixer
    https://github.com/sindresorhus/gulp-autoprefixer

Close h5bp/html5-boilerplate#1682
2015-03-13 22:42:27 +02:00
battaglr
4f6a87f985 README.md: Add detailed info about browser support
Close h5bp/html5-boilerplate#1684
2015-03-13 19:10:06 +02:00
Cătălin Mariș
29af44ef9c Update CHANGELOG.md 2015-03-11 17:14:58 +02:00
Cătălin Mariș
eee759bfe1 Use https:// in the Google Analytics snippet
Nowadays HTTPS is fast and increasingly necessary, so using
protocol-relative URLs is becoming an anti-pattern, especially for CDNs.

From https://developers.google.com/speed/libraries/devguide?csw=1#libraries:

 " We recommend that you load libraries from the CDN via HTTPS, even
   if your own website only uses HTTP. Nowadays, performance is fast
   and caching works just the same "

See also: https://github.com/konklone/cdns-to-https#conclusion-cdns-should-redirect-to-https
2015-03-11 17:13:53 +02:00
Cătălin Mariș
57342272e6 Include the LICENSE file in the dist directory
* Rename `LICENSE.md` to `LICENSE.txt` so that more text editors
  know how to open it.

* Make the build step copy the `LICENSE.txt` file in the `dist/`
  directory so that it gets included in the distribution package.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref https://www.youtube.com/watch?v=hWDSToC9EV8&t=15m15s
    h5bp/html5-boilerplate#1655

Fix h5bp/html5-boilerplate#1655
Close h5bp/html5-boilerplate#1680
2015-03-11 08:17:57 +02:00
Cătălin Mariș
2431333b63 Update devDependencies 2015-03-11 08:17:09 +02:00
Cătălin Mariș
422537b96c Remove visibility: hidden from .hidden
The `visibility: hidden` declaration was added to the `.hidden` class
in order to prevent¹ some screen readers from announcing the content:

 * JAWS:

   "Announces content in a `span` element hidden with `display: none`
    if it is in an anchor element. This only works with a `span`
    element; other inline elements used in an anchor element, such
    as `em`, `strong`, `abbr`, `code`, and so on, are not announced
    in JAWS."

    (from: http://juicystudio.com/article/screen-readers-display-none.php#jawsdisplaynone)

 * Window-Eyes:

   "if a container has a value specified for the `background-image`
    property, content hidden with `display: none` will be announced
    in Window-Eyes."

    (from http://juicystudio.com/article/screen-readers-display-none.php#wedisplaynone)

Nowadays however, both of those screen reader fixed² their issues,
therefore, the `visibility: hidden` declaration is no longer needed.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ http://juicystudio.com/article/screen-readers-display-none.php
² https://github.com/h5bp/html5-boilerplate/issues/1663#issuecomment-77583110

Fix h5bp/html5-boilerplate#1663
2015-03-06 18:02:03 +02:00
Cătălin Mariș
0a40054b7e Use https:// where possible 2015-03-05 01:41:23 +02:00
Cătălin Mariș
b07c91dad6 Docs: Update links
* Use `https://` for links where possible.
* Fix broken links.
2015-03-05 01:41:23 +02:00
Cătălin Mariș
57639ee786 Docs: Lowercase attr values for X-UA-Compatible
Ref: h5bp/html5-boilerplate#1656
2015-03-05 01:41:23 +02:00
BLooperZ
356e141ec9 Lowercase attr values for x-ua-compatible meta tag
Change made in order to be more consistent with the overall use of
lowercase in `index.html`.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

From https://msdn.microsoft.com/en-us/library/jj676915.aspx:

  "The X-UA-Compatible header isn't case sensitive; however, it must
   appear in the header of the webpage (the HEAD section) before all
   other elements except for the title element and other meta elements."

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref h5bp/html5-boilerplate#1656

Close h5bp/html5-boilerplate#1656
Close h5bp/html5-boilerplate#1668
2015-03-05 01:41:00 +02:00
drKraken
c8165a6da0 Update devDependencies
Close h5bp/html5-boilerplate#1679
2015-03-04 22:18:38 +02:00
Cătălin Mariș
c0de8e873a Update Apache Server Configs to v2.13.0 2015-03-04 15:51:05 +02:00
Cătălin Mariș
2a6bb8d219 Update Apache Server Configs to v2.12.0 2015-03-02 23:45:20 +02:00
drKraken
b4bbee5468 Exclude .htaccess from GitHub's language stats
Ref https://github.com/github/linguist#using-gitattributes
Close h5bp/html5-boilerplate#1678
2015-03-02 11:05:19 +02:00
Cătălin Mariș
6443483dd2 Update .travis.yml
* Redirect all output from `export $(cat .to_export_back)` to
  `/dev/null` in order to prevent `export` from leaking the access
  token in the case when, for some odd reason, the `.to_export_back`
  file is not created.

* Regenerate the `secure` key based on a new access token.
2015-02-25 01:09:04 +02:00
Mark Macdonald
192d7fed39 Docs: Add missing period in js.md
Close #1669
2015-02-10 07:12:58 +01:00
Cătălin Mariș
e7465be638 Update .travis.yml
* Add `io.js` runtime.
  https://iojs.org/

* Ensure that the `commit_build_changes.sh` script is only
  executed if the tests pass in all runtimes.
2015-02-09 12:39:44 +02:00
Cătălin Mariș
3575a69db6 Update .travis.yml
* Start using Travis CI's container-based infrastructure.
  http://docs.travis-ci.com/user/workers/container-based-infrastructure/

* Update `Node.js` to `v0.12.0`.
2015-02-08 21:31:24 +02:00
Cătălin Mariș
3be7fe5c01 Update devDependencies 2015-02-07 13:41:05 +02:00
Alex Wigmore
78c84ce701 Docs: Add info about <meta name="theme-color"...>
Ref: https://github.com/whatwg/meta-theme-color
     https://bugzilla.mozilla.org/show_bug.cgi?id=1013913
     https://twitter.com/ahmednefzaoui/status/492344698493997057
     http://updates.html5rocks.com/2014/11/Support-for-theme-color-in-Chrome-39-for-Android

Close: h5bp/html5-boilerplate#1642
2015-02-07 13:33:58 +02:00
Cătălin Mariș
ad26878202 CHANGELOG.md: Add date for the v5.0.0 release 2015-02-07 11:42:42 +02:00
Arthur Verschaeve
60a8ff0336 v5.0.0 2015-02-01 21:56:31 +01:00
H5BP
f61c062ff8 Update content from the dist directory [skip ci] 2015-02-01 20:26:28 +00:00
Paul Irish
4af329eedb changelog: HEAD -> 5.0 2015-02-01 12:25:31 -08:00
Paul Irish
0d5c32fb8b TOC.md - small tweaks in wording 2015-02-01 12:22:23 -08:00
gokulkrishh
db639fd0ec Docs: fix spelling mistake in misc.md
Fix #1652
Close #1652
2014-12-23 07:47:27 +01:00
Arthur Verschaeve
001a6c909a Docs: add info on browserconfig.xml and tile images
Ref #1554
    #1639
2014-12-22 15:02:33 +01:00
Arthur Verschaeve
2fcde1ef33 Docs: add new files to usage.md
Updated `usage.md` to include 4 new files included with the project:

* `.editorconfig`
* `tile-wide.png`, `tile.png` and `browserconfig.xml`

Ref 80530d6b46
    a99d8563dd
Close #1647
2014-12-21 22:54:27 +01:00
Arthur Verschaeve
330b60c212 Update to jQuery 1.11.2
Ref http://blog.jquery.com/2014/12/18/jquery-1-11-2-and-2-1-3-released-safari-fail-safe-edition/
Close #1650
2014-12-21 19:12:45 +01:00
Cătălin Mariș
c97c23c06e Update devDependencies 2014-12-08 17:37:45 +02:00
Cătălin Mariș
0dab796231 Update .travis.yml
Use `commit_build_changes.sh` v0.6.0 and make all the necessary changes
that come with the update.
2014-12-08 17:33:58 +02:00
Arthur Verschaeve
45798ee7f8 README.md: Use https:// where possible
Close h5bp/html5-boilerplate#1640
2014-11-30 19:59:27 +02:00
Cătălin Mariș
598ac20128 Update .travis.yml
Use `commit_build_changes.sh` v0.5.0 and make all the necessary changes
that come with the update.
2014-11-29 23:52:07 +02:00
Cătălin Mariș
10f58216b0 Update devDependencies 2014-11-29 16:18:32 +02:00
Cătălin Mariș
be023b8e2d Clean up package.json
Remove `update_dist_directory` from the `scripts` property as it no
longer works, nor it is needed¹.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ d2740f3c6b
2014-11-21 19:53:21 +02:00
Fagner Brack
7275f79fbc Docs: Link to pages that explain certain concepts
Close h5bp/html5-boilerplate#1637
2014-11-21 11:05:39 +02:00
Fagner Brack
91dc924163 Docs: Remove the extra "this" from CONTRIBUTING.md
Close h5bp/html5-boilerplate#1638
2014-11-21 10:50:58 +02:00
Cătălin Mariș
078a37ae38 Docs: Add link to the GA Demos and Tools website
Ref: https://googledevelopers.blogspot.com/2014/11/google-analytics-demos-tools.html
2014-11-21 00:43:31 +02:00
Cătălin Mariș
1318b71cdf Docs: Remove some outdated info from extend.md 2014-11-21 00:35:45 +02:00
Arthur Verschaeve
45a3adcb2e Docs: Add information about including polyfills
Close h5bp/html5-boilerplate#1636
2014-11-21 00:15:17 +02:00
Morten Bengtson
1d0d78509d Docs: Update information about X-UA-Compatible
Remove statement about

    `<meta http-equiv="X-UA-Compatible" content="IE=edge">`

breaking validation.

Ref: validator/validator#12
     h5bp/html5-boilerplate#1630

Close h5bp/html5-boilerplate#1631
2014-11-09 20:19:23 +02:00
Cătălin Mariș
f6efcf0783 Update .travis.yml
Update the link to the `commit_build_changes.sh` script so
that it points to version 0.4.0.
2014-11-08 03:54:24 +02:00
Cătălin Mariș
98fc61b9d1 Use octothorpes (#) for comments in .editorconfig
For consistency, only use octothorpes (#) for comments in the
`.editorconfig` file.

Ref: http://editorconfig.org/#file-format-details
2014-11-07 22:28:25 +02:00
Cătălin Mariș
8d901e6fb8 Improve inline comments from .travis.yml
Add more information about the `secure` key and what the
`commit_build_changes.sh` script does.
2014-11-07 19:36:13 +02:00
Cătălin Mariș
f1503cb6c3 Update devDependencies 2014-11-07 19:15:21 +02:00
Bo-Yi Wu
eba30f07ac Add informational inline comments in .jshintrc
Close h5bp/html5-boilerplate#1628
2014-11-02 20:09:54 +02:00
Cătălin Mariș
d2740f3c6b Remove update_dist_directory.sh script
Use the more configurable form of the `update_dist_directory.sh`
script the has been added in a separate repository.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Note: The `update_dist_directory.sh` was moved into a different
repository in order to:

  * be more easily maintained
  * allow other projects with similar needs to use it
2014-10-28 19:16:24 +02:00
Cătălin Mariș
3c2aac8001 Split tests based on what they check 2014-10-28 13:35:42 +02:00
Cătălin Mariș
61015dbbea Update Apache Server Configs to v2.11.0 2014-10-27 00:47:30 +02:00
Cătălin Mariș
918c88e372 Update devDependencies 2014-10-23 14:01:08 +03:00
Cătălin Mariș
345925f043 Rename Apple touch icon & add <link> in index.html
Until now we recommended to our users to include an image named
`apple-touch-icon-precomposed.png` in the root of their website.

Since the iOS 8 release however, Safari will no longer request¹
the `/apple-touch-icon-precomposed.png` by default, and instead,
it will make the following requests¹:

    /apple-touch-icon-152x152-precomposed.png
    /apple-touch-icon-152x152.png
    /apple-touch-icon.png

In order to fix this issue we decided¹ to rename
`apple-touch-icon-precomposed.png` to `apple-touch-icon.png`,
and include a `<link>` element in the `index.html`:

    <link rel="apple-touch-icon" href="apple-touch-icon.png">

Notes:

  * Just renaming `apple-touch-icon-precomposed.png` to
    `apple-touch-icon.png` would have also worked², even with
    older version of iOS. Unfortunately, it wouldn't have
    represented a good solution as Apple may change again what
    is requested by default, plus, it would have generated quite
    a few 404s³.

  * We decided to rename the touch icon because most iOS users⁴
    are on iOS 7+, so the `precomposed` keyword no longer brings
    much benefit (as of iOS 7, no special effects are applied to
    touch icons).

  * Adding `<link rel="apple-touch-icon" ...>` in `index.html`
    will also allow⁵ (some of) the default Android 2.2+ browsers
    to use the touch icon.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ h5bp/html5-boilerplate#1615

² https://mathiasbynens.be/notes/touch-icons
  https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

³ https://code.google.com/p/chromium/issues/detail?id=259681
  h5bp/html5-boilerplate#1615

⁴ According to Apple (as measured by the App Store on October 13, 2014):

    * 5%  iOS < 7
    * 47% iOS 7
    * 48% iOS 8

  From: https://developer.apple.com/support/appstore/
        https://cloud.githubusercontent.com/assets/1223565/4720999/2aa8ba26-5935-11e4-9492-92ff6a50ad7d.pnghttp://www.ravelrumba.com/blog/android-apple-touch-icon/

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Close h5bp/html5-boilerplate#1622
2014-10-22 00:02:26 +03:00
Cătălin Mariș
d7976c3f75 Update Apache Server Configs to v2.10.0 2014-10-20 17:33:02 +03:00
Cătălin Mariș
ad27d2e6b2 Enforce LF newlines also for hidden files 2014-10-20 16:57:18 +03:00
Cătălin Mariș
6f50688c1c Enforce LF newlines
This change is done in order to ensure that Windows users don't
encounter any newline related issues.

e.g.: Prior to this change, after the build script was run, files
from `node_modules` (having `LF` newlines, and which wouldn't have
be normalized by `git`) would be copied to the `dist/` directory
and would appear to Windows users as if they where changed.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Thanks to @XhmikosR for pointing this out!

Ref http://git-scm.com/docs/gitattributes#_effects
    http://en.wikipedia.org/wiki/Newline

Close h5bp/html5-boilerplate#1618
2014-10-15 21:55:01 +03:00
Cătălin Mariș
697fa65431 Replace short links with original links
While the short links look "nicer" and can be useful (e.g.: stats),
when our site (http://h5bp.com) goes down, it prevents users from
accessing the information they point to.

Close h5bp/html5-boilerplate#1619
2014-10-15 16:00:52 +03:00
Cătălin Mariș
695e8d9f82 Update Apache Server Configs to v2.9.0 2014-10-15 15:43:43 +03:00
XhmikosR
c3d52666d0 Remove lint options covered by JSCS from .jshintrc
Ref https://github.com/jscs-dev/node-jscs#rules
Close h5bp/html5-boilerplate#1617
2014-10-14 23:48:19 +03:00
XhmikosR
f2d9182155 Add JSCS JavaScript code style checker to build
Ref https://github.com/jscs-dev/node-jscs#readme
    h5bp/html5-boilerplate#1617
2014-10-14 23:48:09 +03:00
Cătălin Mariș
f3a94f5f6e Separate jQuery URL test into two different tests 2014-10-14 22:18:59 +03:00
XhmikosR
768a15235f Add test to the list of dirs from package.json 2014-10-13 12:57:55 +03:00
H5BP
c9ac4325bb Update content from the dist directory [skip ci] 2014-10-13 08:30:54 +00:00
XhmikosR
9d127a2c82 Add test/tests.js in the JSHint check 2014-10-13 11:26:33 +03:00
XhmikosR
2b69bde024 Make consistency changes in test/tests.js 2014-10-13 11:26:11 +03:00
XhmikosR
80ee26d734 Further losslessly compress images
* apple-touch-icon-precomposed.png

   before:         3962 B
   after:          3959 B
   ──────────────────────
   reduction:         3 B [0.07%]

 * tile.png

   before:         3495 B
   after:          3482 B
   ──────────────────────
   reduction:        13 B [0.37%]

 * tile-wide.png

   before:         1864 B
   after:          1854 B
   ──────────────────────
   reduction:        10 B [0.53%]
2014-10-13 11:26:11 +03:00
H5BP
4b07bb3f8b Update content from the dist directory [skip ci] 2014-10-12 08:30:11 +00:00
Chris Rebert
c2abc3f6e0 Docs: Fix wrong homophone in html.md
Close h5bp/html5-boilerplate#1616
2014-10-12 11:29:14 +03:00
Cătălin Mariș
3d4c3da5d9 Move update_dist_directory.sh into bin/travis
Make it even more clear that the `update_dist_directory.sh`
is intended for Travis¹, and not for the user to run it.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ http://docs.travis-ci.com/
2014-10-12 11:27:31 +03:00
slavanga
f3ecc0c67f Add vertical centering for iframe
Remove gap between the `iframe` elements and the bottom
of their containers by vertically centering them.

Close h5bp/html5-boilerplate#1613
2014-10-11 18:04:31 +03:00
Cătălin Mariș
1cac1c9ecc Docs: Improve info regarding IE's document modes
Ref h5bp/html5-boilerplate#1554
Close h5bp/html5-boilerplate#1446
2014-10-10 14:06:59 +03:00
Cătălin Mariș
f8ee8fec3f Docs: Make minor update regarding touch icons 2014-10-06 19:01:40 +03:00
Andrew Brinker
d5e0625312 Change the outdated browser prompt classname
While the outdated browser prompt currently links to `browsehappy.com`,
users are free and even encouraged to substitute the link with their own
page or site of preference.

This commit changes the `browsehappy` specific classname with the more
agnostic `browserupgrade` in order to make the link substitution
easier, but more importantly to hint to the users that they don't have
to stick with the currently default provided `browsehappy.com` link.

Ref: h5bp/html5-boilerplate#1582
     h5bp/html5-boilerplate#1608

Close h5bp/html5-boilerplate#1608
2014-10-06 12:15:16 +03:00
Cătălin Mariș
c9a5fb4d70 Docs: Make minor correction regarding touch icons
Clarify that the iPad and iPad mini with @1x display running iOS 8 are
also using the `76×76px` touch icon.

Ref: h5bp/html5-boilerplate#1599.
2014-10-06 10:52:26 +03:00
Arthur Verschaeve
7aa92ea5f6 Update to normalize.css v3.0.2
Close h5bp/html5-boilerplate#1609
2014-10-05 17:03:42 +03:00
Cătălin Mariș
d3e9cbfcec Update devDependencies 2014-10-05 16:54:13 +03:00
Cătălin Mariș
66d5b120d6 Update devDependencies 2014-09-28 23:34:19 +03:00
Cătălin Mariș
32c0b2b160 Docs: Use https:// where possible 2014-09-28 14:34:17 +03:00
Cătălin Mariș
1c4fcf3214 Update apple-touch-icon-precomposed.png and docs
* Update the documentation regarding the Apple touch icons, by
   reflecting the recent changes brought by the release of iOS 8 and the
   new iPhone 6 and 6 Plus.

   Note: The changes do not follow all Apple's iOS Human Interface
   Guidelines¹, as in practice, the images used by the different devices
   are different² from the ones specified in the Apple documentation.

 * Update the `apple-touch-icon-precomposed.png` to be `180×180px` (this
   is now the largest image size used by any Apple device running iOS).

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html
² h5bp/html5-boilerplate#1599

Close h5bp/html5-boilerplate#1599.
2014-09-25 11:29:05 +03:00
Arthur Verschaeve
712568f229 Futher optimize tile.png and tile-wide.png
* `tile.png`:

    before:        13743 B
    after:          3495 B
    ──────────────────────
    reduction:     10248 B [74.56%]

 * `tile-wide.png`

    before:         6774 B
    after:          1864 B
    ──────────────────────
    reduction:      4910 B [72.48%]

Close h5bp/html5-boilerplate#1604.
2014-09-22 20:09:01 +03:00
Cătălin Mariș
215bebe5e5 Remove the cross-domain phrase from README.md
The part about `Cross-domain Ajax and Flash` from the `README.md` file
isn't accurate, as by default:

 * the `crossdomain.xml` file doesn't grant a web client — such as Adobe
   Flash Player, Adobe Reader, etc. — permission to handle data across
   multiple domains

 * the Apache server configs, do not allow cross-origin access to all
   resources, unless the user enables that behavior
2014-09-20 17:51:12 +03:00
Cătălin Mariș
f134545b95 Docs: Provide link to Google's docs on robots.txt
Ref: h5bp/html5-boilerplate#1554
2014-09-19 17:56:57 +03:00
Arthur Verschaeve
3e3b770b0d Docs: Add information about the robots.txt file
Ref: h5bp/html5-boilerplate#1554
Close: h5bp/html5-boilerplate#1598
2014-09-19 17:56:24 +03:00
H5BP
a8fabc504b Update content from the dist directory [skip ci] 2014-09-18 20:37:29 +00:00
Chris Rebert
ed6ba6d8ba Docs: Fix typos
Close h5bp/html5-boilerplate#1600
2014-09-18 23:35:25 +03:00
Paul Irish
c35f8d3c2e Update update_dist_directory.sh 2014-09-17 11:45:42 -07:00
H5BP
6cd8083b15 Update content from the dist directory [skip ci] 2014-09-14 07:35:01 +00:00
Arthur Verschaeve
75d6ea62a0 Docs: Fix broken link in misc.md
Close h5bp/html5-boilerplate#1596
2014-09-14 10:33:52 +03:00
Cătălin Mariș
59911a536d Update Apache Server Configs to v2.8.0 2014-09-13 14:06:40 +03:00
H5BP
e830ce22b5 Update content from the dist directory [skip ci] 2014-09-11 17:59:04 +00:00
Arthur Verschaeve
d352b37ac1 Docs: Fix broken link in usage.md
Close h5bp/html5-boilerplate#1595
2014-09-11 20:57:03 +03:00
Cătălin Mariș
77684b1638 Docs: Add info on disabling phone no. formatting
By default Safari on iOS will automatically inject a `<a href="tel:…">`
when it detects any string formatted like a phone number on the web page
(see: https://cloud.githubusercontent.com/assets/1223565/4230929/90243cd8-398a-11e4-9363-67faf5cb355c.png).

This commit improves the documentation by providing information on
how to disable the automatic detection and formatting of possible phone
numbers in Safari on iOS.

Ref: https://twitter.com/marcosc/status/507897299587313665/
     https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html/#//apple_ref/doc/uid/TP40008193-SW5
2014-09-11 12:37:22 +03:00
H5BP
029093fdc4 Update content from the dist directory [skip ci] 2014-09-10 20:02:20 +00:00
Cătălin Mariș
a3baca2367 Make Travis automatically update dist directory
Configure Travis to automatically update the content from the `dist`
directory by executing a script¹ that will regenerate the content from
the `dist` directory and commit any new changes to the `master` branch.

This change will help in the development process by:

  * ensuring that the content from the `dist` directory is always
    in sync with the rest of the content

  * removing the need to execute the build step locally everytime
    a change is made (especially in the case of trivial changes,
    such as, typos)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ The script (`bin/update_dist_directory.sh`) will only be executed
  if the tests pass, and will only run if the changes are made in the
  `master` branch.

See also: http://docs.travis-ci.com/user/encryption-keys/

Close h5bp/html5-boilerplate#1593
2014-09-10 22:59:48 +03:00
QWp6t
93c3ec4480 Docs: Add more info regarding servers and stacks
Ref: h5bp/html5-boilerplate#1572
Close: h5bp/html5-boilerplate#1572
2014-09-10 15:04:40 +03:00
Hans Christian Reinl
a44c533d55 Minor fix: Use short version of shorthand for margin declaration in 404 template 2014-09-01 22:42:25 +02:00
Haller, Christian
176aa951d5 Remove unneeded comma from gulpfile.js
Close h5bp/html5-boilerplate#1591
2014-09-01 14:12:23 +03:00
Cătălin Mariș
2a09bdf3e3 Update the content from the dist directory 2014-08-30 20:30:29 +03:00
Cătălin Mariș
9c03754490 Make Travis CI limit the Git clone depth even more
In order to speed up the tests a little bit more, inform Travis CI
to limit the Git clone depth to 10 commits (default is 50).

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

e.g.:

  $ time g clone --depth 10 git@github.com:h5bp/html5-boilerplate.git
  ...

  real    0m2.636s
  user    0m0.052s
  sys     0m0.040s

  $ time g clone --depth 50 git@github.com:h5bp/html5-boilerplate.git
  ...

  real    0m3.542s
  user    0m0.064s
  sys     0m0.072s

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: http://git-scm.com/docs/git-clone
     https://twitter.com/travisci/status/288390896339267584
2014-08-30 20:30:23 +03:00
Antoine Leblanc
927df9df01 Docs: Update icon size for Chrome Mobile web apps
The recommended size for the icon that Chrome Mobile uses to
install to the homescreen was recently changed to 192×192px.

Ref: https://developer.chrome.com/multidevice/android/installtohomescreen#icon
     h5bp/html5-boilerplate#1587

Close: h5bp/html5-boilerplate#1587
2014-08-28 08:35:10 +03:00
Arthur Verschaeve
77d43a3d5d Fix typo in gulpfile.js
Close h5bp/html5-boilerplate#1586.
2014-08-27 18:13:06 +03:00
Grant
fccfbbbbdc Add pseudo-elements to universal selector in print media query
The pseudo-elements `:before` and `:after` are not targeted by the
universal `*` selector. When the page is printed the CSS properties of
any pseudo-elements will only be overridden if they are being inherited
from their selector. Any styles that have been defined directly on a
pseudo-element are unaffected.

Closes #1585.
2014-08-27 15:24:45 +02:00
Cătălin Mariș
268611e33a Fix Modernizr path in index.html
Thanks @juukie14.
2014-08-18 14:29:09 +03:00
Thomas Krug
287f12229e Update to Modernizr 2.8.3
Close h5bp/html5-boilerplate#1580.
2014-08-15 09:14:23 +03:00
Cătălin Mariș
954eef1b1e Allow Travis to send email notifications
Travis has a pretty decent default behavior when it comes to sending
email notifications.

Ref: http://docs.travis-ci.com/user/notifications/#Email-notifications
2014-08-06 01:40:11 +03:00
Cătălin Mariș
641586aaca Include gulpfile.js to be run through JSHint 2014-08-05 16:27:36 +03:00
Will
3928548dc4 Update gulpfile to use del instead of gulp-rimraf
Ref: robrich/gulp-rimraf#14
Close: h5bp/html5-boilerplate#1578
       h5bp/html5-boilerplate#1579
2014-08-05 15:44:42 +03:00
Cătălin Mariș
4b779d3ed9 Fix link in README.md 2014-08-04 19:29:59 +03:00
Cătălin Mariș
c73ae71db4 Add badges
* Add Travis CI status icon.
  http://docs.travis-ci.com/user/status-images/

* Add `devDependencies` status icon.
  https://david-dm.org/
2014-08-04 19:02:40 +03:00
Cătălin Mariș
2bf27eb108 Add dist/ directory
The `dist/` directory is added in order to allow even less experienced
users (users that may not want to deal with the build script) to get
the latest changes, namely, what is in the `master` branch, but is not
yet released.
2014-08-04 19:02:40 +03:00
Cătălin Mariș
9318c6321a Change project architecture
* Move all the H5BP source files into the `src/` directory and remove
  all external components that can be fetch via `npm`, namely: the
  Apache Server Configs, jQuery, and Normalize.css.

* Add `package.json`, and move to using `npm` for managing dependencies
  (for more information about `npm`, see: https://www.npmjs.org/doc/).

* Add `gulp` based build script to allows us to automatically create
  the distribution files as well as an archive that can then be attached
  to the release - https://github.com/blog/1547-release-your-software
  (for more information about gulp, see: http://gulpjs.com/).

* Add other miscellaneous files to help us in our development process:

   * `.editorconfig` - to define and maintain consistent coding styles
                       http://editorconfig.org/

   * `.jshintrc`     - to specify JSHint configuration options
                       http://www.jshint.com/docs/

   * `.travis.yml`   - to specify Travis CI configuration options
                       http://docs.travis-ci.com/

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

These changes:

  * automate some of the tedious work (e.g.: updating the external
    components, updating some of the inline content such as version
    numbers, etc.)

  * will allow us to experiment more (e.g.: allow us to create different
    builds of H5BP, builds that can contain different components)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref h5bp/html5-boilerplate#1563
Close h5bp/html5-boilerplate#1563
2014-08-04 19:02:30 +03:00
Arthur Verschaeve
da7bf0d530 Make minor correction in README.md
Close h5bp/html5-boilerplate#1576.
2014-08-02 13:03:29 +03:00
Evgeny Orekhov
c3a72ff882 Remove need to readjust margins in 404.html
Since some of the users prefer to just modify the placeholder 404
page instead of replacing it with their own, this commit makes it
easier to do that by allowing them to modify the content without
worrying about readjusting the margins.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Note: The different in size compared to the old 404 is negligible:

 * old 404:

   original size:         1242 B
   gzipped size:           574 B

 * new 404:

   original size:         1274 B
   gzipped size:           570 B

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: h5bp/html5-boilerplate#1567.
Close: h5bp/html5-boilerplate#1567.
2014-07-31 21:28:49 +03:00
Arthur Verschaeve
8ef199adf6 Docs: Add information about PHP's built-in server
Ref: http://php.net/manual/en/features.commandline.webserver.php
Close: h5bp/html5-boilerplate#1569.
2014-07-29 14:34:37 +03:00
Cătălin Mariș
ef48601262 Update to Apache Server Configs 2.7.0 2014-07-28 04:28:43 +03:00
₍˄ุ.͡˳̫.˄ุ₎
c3d967ab25 Docs: Remove gendered pronoun from faq.md
Close: h5bp/html5-boilerplate#1566.
2014-07-27 12:41:58 +03:00
Cătălin Mariș
3c3c5e6460 Docs: Remove minimal-ui related information
The `minimal-ui` viewport property was introduced in iOS 7.1,
but it will no longer be supported in iOS 8.

Ref: https://developer.apple.com/library/prerelease/ios/releasenotes/General/RN-iOSSDK-8.0/#//apple_ref/doc/uid/TP40014223-CH1-SW83
Close: h5bp/html5-boilerplate#1565
2014-07-23 01:55:04 +03:00
Jonathan Neal
a99d8563dd Add /.editorconfig file
The addition of the `/.editorconfig` file is made in order to
encourage and help developers and their teams define and maintain
consistent coding styles between their different editors and IDEs.

By default, `/.editorconfig` includes some basic properties that
reflect the coding styles from the files provided by default, but
users can easily change them to better suit their needs.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Since users need to install a editor/IDE plugin in order for the
properties from the `/.editorconfig` to be applied, we were reluctant
to add this file in the past (see: h5bp/html5-boilerplate#1124).
Nowadays however, the EditorConfig project provides plugins for most
of the popular editors/IDEs (see: http://editorconfig.org/#download),
plus, more and more developers are using it.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: http://editorconfig.org/

Close: h5bp/html5-boilerplate#1561
       h5bp/html5-boilerplate#1564
2014-07-21 23:08:02 +03:00
Cătălin Mariș
973b8453de Docs: Make minor improvments in html.md 2014-07-19 03:35:08 +03:00
Philip Walton
4fca586fae Add auto to the GA tracker create method
The Google Universal Analytics now supports automatic cookie domain
configuration simply by adding `auto` to the analytics tracker create
method: `ga('create', 'UA-XXXX-Y', 'auto');`.

From https://developers.google.com/analytics/devguides/collection/analyticsjs/domains#auto:

  "Automatic Cookie Domain Configuration simplifies cross domain
   tracking implementations by automatically writing cookies to the
   highest level domain possible when the auto parameter is used.
   When used on the domain www.example.co.uk, it will try to write
   cookies in the following order:

     1. co.uk
     2. example.co.uk
     3. www.example.co.uk

   Analytics.js will fail to write a cookie on co.uk but will succeed
   on example.co.uk. Since a cookie was succesfully written on a higher
   level domain, www.example.co.uk will be skipped"

So, when this parameter is omitted (as it was prior to this commit),
Google Universal Analytics will default to using `location.hostname`,
which will include the subdomain, preventing websites with multiple
subdomains from being able to automatically track unique users across
those subdomains.

Note: The `auto` parameter is now officially part of the recommended
Google Universal Analytics snippet.
https://developers.google.com/analytics/devguides/collection/analyticsjs/

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: https://developers.google.com/analytics/devguides/collection/analyticsjs/domains#auto
Close: h5bp/html5-boilerplate#1562.
2014-07-17 15:20:12 +03:00
ltodorov
8daaa56023 Add timeline & timelineEnd in plugins.js
In Chrome and Opera the console object now includes two new methods:

 * `timeline`
    https://developer.chrome.com/devtools/docs/console-api#consoletimelinelabel

 * `timelineEnd`
    https://developer.chrome.com/devtools/docs/console-api#consoletimestamplabel

Close: h5bp/html5-boilerplate#1559.
2014-07-11 22:39:37 +03:00
Arthur Verschaeve
5027eeaab2 Docs: Update info from js.md regarding plugins.js
Add information about the script from the `plugins.js` file.

Ref   h5bp/html5-boilerplate#1554
Close h5bp/html5-boilerplate#1558
2014-07-11 18:00:34 +03:00
Arthur Verschaeve
ff27f8c563 Docs: Add basic info about .htaccess in misc.md
Ref   h5bp/html5-boilerplate#1554
Close h5bp/html5-boilerplate#1557
2014-07-10 13:15:57 +03:00
Cătălin Mariș
8935453014 Docs: Update jQuery CDN related info from faq.md
Update documentation to include the information from the recent
jQuery team announcement:

   "To mitigate the risk of “breaking the web”, the jQuery team
    decided back in 2013 that jquery-latest.js could not be
    upgraded to the 2.0 branch even though that is technically
    the latest version. There would just be too many sites that
    would mysteriously stop working with older versions of Internet
    Explorer, and many of those sites may not be maintained today.

    As jQuery adoption has continued to grow, even that safeguard
    seems insufficient to protect against careless use of
    http://code.jquery.com/jquery-latest.js. So we have decided to
    stop updating this file, as well as the minified copy, keeping
    both files at version 1.11.1 forever ...

    The Google CDN team has joined us in this effort to prevent
    inadvertent web breakage and no longer updates the file at
    http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js. That
    file will stay locked at version 1.11.1 as well."

   (from: http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/)

Ref: h5bp/html5-boilerplate#1554
2014-07-05 17:48:11 +03:00
Cătălin Mariș
1c5be4d307 Update to Apache Server Configs 2.6.0
Changelog: 155b0b68c0/CHANGELOG.md (260-july-3-2014).
2014-07-03 20:29:57 +03:00
Cătălin Mariș
0443e50892 Docs: Update and improve css.md 2014-07-01 00:18:55 +03:00
Cătălin Mariș
0efb9fb4df Docs: Update and improve TOC.md
* Make minor updates and improvements.
* Remove `.htaccess` mention as the Apache server configs are no longer
  part of the HTML5 Boilerplate core, plus, more information about them
  will be included in the `misc.md` file.
2014-06-28 00:52:55 +03:00
Cătălin Mariș
296b0bbf25 Docs: Update and improve faq.md 2014-06-25 00:08:04 +03:00
Cătălin Mariș
3220cf1d63 Docs: Move crossdomain.xml info into misc.md
Update and improve the `crossdomain.xml` related documentation,
as well as move it into the `misc.md` file.

The move is made in order to be more consistent (we don't have
special pages for any of the other "miscellaneous" files).
2014-06-24 23:52:35 +03:00
Cătălin Mariș
d2b86f78a4 Mention Apache Server Configs in humans.txt
The Apache server configs have evolved into their own separate
project, and thus, they are now considered an external component.
2014-06-24 21:02:44 +03:00
Cătălin Mariș
5e0b0d642b Update links 2014-06-21 03:18:30 +03:00
Cătălin Mariș
8c4b71e6c6 Update to Apache Server Configs 2.5.0 2014-06-14 14:00:37 +03:00
Ismay
a82c61fb3e Docs: Update content regarding Google Analytics
* Explain the reason for providing the Google Universal Analytics
  snippet by default.

* Make it more clear that users are encouraged to use whatever
  tracking solution suits their needs best.

Ref h5bp/html5-boilerplate#1547
Close h5bp/html5-boilerplate#1548
2014-06-13 01:17:30 +03:00
Cătălin Mariș
261f8dd398 Update to Apache Server Configs v2.4.1 2014-06-07 00:33:09 +03:00
Cătălin Mariș
d916a72025 Add lang="" to <html>
In the past we decided¹ to remove the `lang` attribute due to the fact
that developers were often forgetting to update its value. This change
turned out not to be the best solution because some of the users:

 * didn't read the documentation, and thus, they found the absence
   of the `lang` attribute confusing, or didn't even knew they had
   to add it

 * didn't notice the absence of the `lang` attribute, and thus, forgot
   to include it (expecting it to be there)

To make things more clearer and to remind users that they need to
specify the primary language of the document, this commit reintroduces
the `lang` attribute, while leaving its value to `""`.

Using `lang=""` has the exact same effect as not specifying the `lang`
attribute at all, in both cases the language being treated as unknown².

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ https://github.com/h5bp/html5-boilerplate/issues/1110
² From WHATWG (http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#attr-lang):

  "To determine the language of a node, user agents must look at the
   nearest ancestor element (including the element itself if the node
   is an element) that has a lang attribute in the XML namespace set
   or is an HTML element and has a lang in no namespace attribute set.
   That attribute specifies the language of the node (regardless of
   its value).

   If both the lang attribute in no namespace and the lang attribute
   in the XML namespace are set on an element, user agents must use
   the lang attribute in the XML namespace, and the lang attribute in
   no namespace must be ignored for the purposes of determining the
   element's language.

   If neither the node nor any of the node's ancestors, including the
   root element, have either attribute set, but there is a pragma-set
   default language set, then that is the language of the node. If there
   is no pragma-set default language set, then language information from
   a higher-level protocol (such as HTTP), if any, must be used as the
   final fallback language instead. In the absence of any such language
   information, and in cases where the higher-level protocol reports
   multiple languages, the language of the node is unknown, and the
   corresponding language tag is the empty string.

   If the resulting value is not a recognized language tag, then it
   must be treated as an unknown language having the given language tag,
   distinct from all other languages."

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Close h5bp/html5-boilerplate#1542.
2014-05-13 22:51:29 +03:00
Cătălin Mariș
c0ea65101a Update to jQuery 1.11.1
See also: http://blog.jquery.com/2014/05/01/jquery-1-11-1-and-2-1-1-released/

Close h5bp/html5-boilerplate#1535.
2014-05-13 08:26:05 +03:00
Cătălin Mariș
11262ec742 Update CONTRIBUTING.md
* Remove extra `the`.
* Remove IRC reference as it does not help the user in
  any way, plus, we don't have an official IRC channel.
2014-05-09 20:07:09 +03:00
Mateusz Jagiełło
2d443d853f Remove empty line from main.js
Close h5bp/html5-boilerplate#1538.
2014-05-03 19:18:14 +03:00
Mateusz Jagiełło
f067d5eec5 Fix file system permissions for normalize.css
Close #1537.
2014-05-03 17:16:29 +03:00
Cătălin Mariș
2e8a977d2c Update print related comments in main.css file
Use correct terminology and remove the outdated parts of the comments.

See also:

 * JavaScript URIs:
   https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void#JavaScript_URIs

 * URL fragments:
   http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#scroll-to-fragid

 * `href` attribute:
   http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#attr-link-href
   https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href
2014-05-01 12:48:36 +03:00
Cătălin Mariș
e12fc689a5 Add newline at the end of the gitattributes file
Under UNIX-like OSes, a text file consists of a series of lines, each
of which ends with a `newline` character (`\n`). A file that is not
empty and does not end with a `newline` is therefore considered not to
be a text file.

Because of this, utilities that are supposed to operate on text files
may not cope well with files that don't end with a `newline` (e.g.: they
might ignore the text after the last `newline`).

Adding the `newline` character at the end of the file ensures that users
won't encounter any odd behavior when using it.

Reference/Source: http://unix.stackexchange.com/a/18789.
2014-05-01 01:16:07 +03:00
Hans Christian Reinl
41b9f1a36a Update to Modernizr v2.8.0 2014-04-29 23:23:01 +02:00
XhmikosR
dcc5958a39 Further optimize tile images
* tile.png

     before:        13767 B
     after:         13743 B
     ──────────────────────
     reduction:        24 B [0.17%]

 * tile-wide.png

     before:         6781 B
     after:          6774 B
     ──────────────────────
     reduction:         7 B [0.10%]
2014-04-27 11:53:31 +03:00
Cătălin Mariș
d01c26fd13 Make inline comments from main.css more consistent 2014-04-25 14:46:32 +03:00
Cătălin Mariș
861c359e40 Update to Apache Server Configs v2.3.0 2014-04-10 11:05:21 +03:00
Cătălin Mariș
e67e9cc7c1 Use <!doctype html> instead of <!DOCTYPE html>
Return back to the lowercase doctype in order to be more consistent
with the lowercase of the html tags.

References:

  * h5bp/html5-boilerplate#1522
  * http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doctype

Close h5bp/html5-boilerplate#1522.
2014-04-02 12:32:49 +03:00
Cătălin Mariș
06b4df40e2 Update to Normalize.css 3.0.1 2014-03-28 08:22:55 +02:00
Alastair Hole
ee0de7541f Docs: Make minor grammar change in extend.md
Close h5bp/html5-boilerplate#1517.
2014-03-13 19:55:17 +02:00
Tom Fuertes
7997c1b9a1 Docs: Update content regarding Google Analytics
Close: h5bp/html5-boilerplate#1490
       h5bp/html5-boilerplate#1515
2014-03-02 09:41:57 +02:00
Cătălin Mariș
dea7690774 Update CHANGELOG.md
Include missing reference.
2014-02-25 22:13:17 +02:00
Rob Larsen
f639653d3d Docs: Improve content about use of CDN for jQuery
Ref: https://github.com/h5bp/html5-boilerplate/issues/1498#issuecomment-33163993.
Close: #1511, #1514.
2014-02-25 09:48:00 +02:00
XhmikosR
106bb43c37 Docs: Fix typo in extend.md
Close #1510.
2014-02-23 13:49:57 +02:00
Cătălin Mariș
4d7ba31ada Docs: Use Bootstrap instead of "Twitter Bootstrap"
"Twitter Bootstrap" is now simply known as "Bootstrap".

Ref: http://getbootstrap.com/about/#brand

Thanks @cvrebert.
2014-02-23 13:46:07 +02:00
Cătălin Mariș
80530d6b46 Add /browserconfig.xml and tile images
By default, starting with IE11 on Windows 8.1, IE will request the
`/browserconfig.xml` file when a user clicks/touches the `pin site`
button (same as Safari for iOS does with the `apple-touch-icons` when
the user touches the `share` button).

Adding the `/browserconfig.xml` file and the tile images:

* reduces the number of 404s, especially as IE11 on Windows 8.1 gets
  more market share
* provides a starting point for dealing with Windows tiles
* reminds users about the tile images, so that their website doesn't
  end up having as a tile the default IE11 logo, or (if the favicon
  is 32×32px or bigger and not `.ico`) the website's favicon
* unlike using `<meta>` tags, offers a way that doesn't increase the
  page size

Only two images are provided since:

* `tile.png` (558×558px) - can be used for the `Small`, `Medium`,
  and `Large` tiles, being automatically resized where necessary
* `tile-wide.png` (558×270px) - can be used for the `Wide` tile
  as, in this case, resizing the 558×558px image would just end up
  looking weird

The two images are 558×558px and 558×270px because those are the
recommended image sizes in order for the tiles to look good on a wide
range of devices.

For more in depth information, please refer to the MSDN documentation:

 * http://msdn.microsoft.com/en-us/library/ie/dn455106.aspx
 * http://msdn.microsoft.com/en-us/library/ie/dn255024.aspx

Close #1481.
2014-02-19 00:12:39 +02:00
Cătălin Mariș
f73bb1f614 Update to Apache Server Configs 2.2.0 2014-02-03 11:16:28 +02:00
Cătălin Mariș
ab0a9ea391 Make consistency changes
Change code indentation in `normalize.css` from 2 to 4 spaces. This
is done in order to be consistent with the indentation used in the
other files.
2014-02-01 12:33:26 +02:00
Abhinay Rathore
cacfa08050 Docs: Add Separate mobile URLs subsection
Inform users that, if they use separate URLs for desktop and mobile
users, they should consider helping search engine algorithms better
understand the configuration on their web site.

See also:

 * https://developers.google.com/webmasters/smartphone-sites/details#separateurls
 * https://developers.google.com/webmasters/smartphone-sites/feature-phones

Close #1504.
2014-02-01 12:16:39 +02:00
Cătălin Mariș
e70ee31d2b Update to jQuery 1.11.0
Close #1499.
2014-01-29 22:50:49 +02:00
Cătălin Mariș
185b730edd Update CHANGELOG.md 2014-01-29 22:44:48 +02:00
Nicolas Gallagher
3c216951d4 Update to Normalize.css 3.0.0 2014-01-28 14:40:30 -08:00
Cătălin Mariș
f5d58728e1 Further optimize apple-touch-icon-precomposed
before:         1226 B
  after:          1076 B
  ──────────────────────
  reduction:      -150 B [-12.23%]
2014-01-27 22:36:58 +02:00
Cătălin Mariș
4e5f438e1e Add Disallow: to robots.txt
The addition of `Disallow:` is made in order to be compliant with:

  * the `robots.txt` specification (http://www.robotstxt.org/), which
    specifies that: "At least one Disallow field needs to be present
    in a record"
  * what is suggested in the documentation of most of the major search
    engines, e.g.:

      - Baidu:  http://www.baidu.com/search/robots_english.html
      - Google: https://developers.google.com/webmasters/control-crawl-index/docs/getting_started
                http://www.youtube.com/watch?v=P7GY1fE5JQQ
      - Yandex: help.yandex.com/webmaster/controlling-robot/robots-txt.xml

Besides the addition specified above, this commit also:

  * adds a comment making it clear to everyone that the directives from
    the `robots.txt` file allow all content on the site to be crawled
  * updates the URL to `www.robotstxt.org`, as `robotstxt.org` doesn't
    quite work:

      curl -LsS robotstxt.org
      curl: (7) Failed connect to robotstxt.org:80; Operation timed out

Close #1487.
2014-01-15 22:14:06 +02:00
David Alexander
a20a3c76d5 Combine the html selectors into one rule
Close #1492.
2014-01-14 23:36:27 +02:00
Cătălin Mariș
76d3021d19 Docs: Update the Apple Touch Icons section
* Add note about `precomposed` not being required anymore, as starting
  with iOS 7, no special effects are applied to the touch icons.

* Add missing touch icon sizes.

Close #1488
2014-01-10 21:15:04 +02:00
Cătălin Mariș
0a04171137 Update to Apache Server Configs v2.1.0 2014-01-07 10:32:55 +02:00
Cătălin Mariș
3da500d5e5 Update 404.html
* Link to a more official page for the information regarding Internet
  Explorer's "friendly HTTP error pages", namely:
  http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx.

* Remove the indentation for the `<head>` and `<body>` tags in order
  to reduce the file size even closer to the 512 bytes limit. This is
  particularly helpful when compression is not enabled.

* Stats:

  - before:

     original size:         1409 B
     gzipped size:           580 B
     ─────────────────────────────
     reduction:              829 B [58.8%]

  - after:

     original size:         1242 B
     gzipped size:           580 B
     ─────────────────────────────
     reduction:              662 B [53.3%]

Ref: #1443.
2014-01-07 10:28:19 +02:00
timmytofu
1c4df2aa07 Remove default foreground color from form elements
Specifying a default foreground color for the form elements can be
problematic when users (often with visual impairments) use a darker
OS/browser theme. Also, the color set on the form elements is quite
opinionated, so developers tend to change it anyway.

Ref: #1390.
Close: #1390.
2013-12-29 21:18:19 +02:00
Hans Christian Reinl
a557ea0513 Docs: Add note about Chrome Mobile web apps
"Add to Homescreen" feature in Chrome Mobile

Closes #1441.
2013-12-26 13:42:34 +01:00
Cătălin Mariș
57be193031 Remove default margin from print styles
Providing a default value (such as `5cm`) for the print margins is
problematic because:

 1) in some browsers, it prevents users from customizing the browser
    print settings
 2) in some contexts (browser/os/printer), the value may be too:
    * small, and the margins may collide with all the different
      headers/footers (URL, date, etc) that are usually printed
      by default
    * big, and the margins will just waste the space

Most browsers provide a default non-zero value for the print margins,
so it's better to not specify a value at all, and just let them handle
this themselves.

See also:

 * http://www.w3.org/TR/css3-page/#at-page-rule
 * https://developer.mozilla.org/en-US/docs/Web/CSS/@page

Close #1477.
2013-12-25 02:10:15 +02:00
Cătălin Mariș
34c7fbde74 Update CHANGELOG.md
* Include missing references.
* Improve consistency.
* Wrap text at 80 characters.
2013-12-23 11:47:13 +02:00
Connor McSheffrey
f4a2cbfcad Docs: Add note about iOS 7.1 minimal-ui property
Ref: #1485.
Close: #1485.
2013-12-20 13:13:30 +02:00
Cătălin Mariș
df2306766e Docs: Make minor improvements in extend.md
* Wrap text at 80 characters.
* Rephrase content from the `Apple Touch Icons` section to limit subject
  to only `apple-touch-icon`s (ref: #1486).
* Other improvements.
2013-12-20 12:56:49 +02:00
Hans Christian Reinl
15b5cb1b5c Docs: Add comment about lang attribute on <html>
We don't set a default `lang` attribute on `<html>` due to the
discussion in #1110. This commit adds a note about how to set it.

Close #1483.
2013-12-20 12:05:33 +02:00
Anselm Hannemann
d592953e7a Clarify the default of only 2 icons
In extend.md, which is linked as source for 'more details' on the
touch-icons and favicon, this commit clarifies that by default two
icons are enough if one doesn't want to use art-direction.
2013-12-19 22:47:51 +01:00
Hans Christian Reinl
49e4569d02 Docs: Add anchor for MDN link to meta charset 2013-12-15 22:03:01 +01:00
David Walsh
24420747fd Docs: Update MDN link paths 2013-12-15 22:00:24 +01:00
Felix
ec49630374 README.md: Add link to the list of releases
Close #1480.
2013-12-12 00:01:33 +02:00
Cătălin Mariș
9fab0f9990 Update .htaccess file 2013-12-11 23:50:35 +02:00
Hans Christian Reinl
73ea9a5e68 Update Modernizr to v2.7.1 2013-12-03 10:31:38 +01:00
Cătălin Mariș
fbffd2322d Docs: Update links and reorganize extend.md
* Update various links.
* Remove link to the `Node build script` repository as the project is no
  longer maintained.
* Better organize the information provided in `extend.md` by rearranging
  the sections alphabetically by title, and including a table of content
  for faster navigation.
2013-11-19 16:22:16 +02:00
Cătălin Mariș
ca1ced9654 Docs: Update server configs links
* Replace links to the Apache Server Configs `doc`
  directory, as it no longer exists:
  4f778c4a22.

* Provide missing links under the `X-UA-Compatible`
  section in the `html.md` file.
2013-11-19 10:56:54 +02:00
Hans Christian Reinl
f1a8e914be Remove image replacement helper class .ir
This class was removed because it doesn't provide enough use
cases within modern web development. Cases are mostly handled
indiviually by developers.

Reference #1472.
Closes #1475.
2013-11-18 23:39:22 +01:00
Rob Larsen
94c3540ce6 Update to Modernizr 2.7.0 2013-11-18 09:01:34 +01:00
Cătălin Mariș
96d7c99762 Update to Apache Server Configs v2.0.0 2013-11-12 13:32:32 +02:00
Cătălin Mariș
e039cf4275 Remove phrase about IE conditional classes 2013-11-12 13:30:57 +02:00
Jeffrey Godwyll
87274cb181 Fix typo in doc/css.md 2013-11-03 16:13:35 -08:00
Joseph Jaber
3f91469e7f Fix typo in header of doc/html.md (promt → prompt)
Close #1459.
2013-11-01 10:51:34 +02:00
Cătălin Mariș
5e090e0db5 Add note about legacy browser support in v4
Close #1050.
2013-10-21 21:37:53 +03:00
Cătălin Mariș
dc752d7952 Docs: Remove outdated info on Skype highlighting
The snippet provided in the docs about how to prevent the Skype
plugin from formatting numbers on a web pages is outdated and no
longer works.

Nowadays, the Skype plugin makes it more difficult to overwrite
its injected styles (class names include timestamps, e.g.:
`skype_pnh_print_container_1381964168`, `!important` is used, etc.).

Providing a solution for this use case isn't viable. Also, users
that install such a plugin usually expect the behavior.

Close #1454.
2013-10-17 18:21:29 +03:00
Benoît Chantre
8565264a4d Add vertical centering for svg
Remove gap between the `svg` elements and the bottom of their containers
by vertically centering them.

Ref #1326.
Close #1453.
2013-10-16 00:10:51 +03:00
Cătălin Mariș
782aefab7e Redesign 404 page
Changes:

* simplify the overall design
* remove the Google search functionality as in most cases, it does not
  provide much value
* reduce the overall file size while keeping the gzipped size over 512
  bytes to prevent IE from displaying its own custom error page (thanks
  @mikealmond and @patrickkettner):
  http://www.404-error-page.com/404-error-page-too-short-problem-microsoft-ie.shtml

Benefits include:

* small file size (1409 bytes / 580 bytes gzipped), which is particular-
  ly useful when users are on a data plan and / or the server is wrongly
  configured (e.g.: tries to redirect to a "mobile" version of the web
  page and ends up serving a 404 page) or developers forget to provide
  certain files (e.g.: /favicon.ico -
  http://zoompf.com/blog/2012/04/instagram-and-optimizing-favicons)
* improved performance (less HTTP requests, less memory consumption,
  faster rendering, etc.)
* designed to work with all kinds of screen sizes and support IE 6+

Close #1443.
2013-10-12 22:54:14 +03:00
Cătălin Mariș
6d10fc8cce Docs: Add info about how to block Google Translate
Inform users on how to disable the translation prompt in Chrome or
block Google Translate from translating a web page or any particular
section of the web page.

See also: https://support.google.com/translate/?hl=en#2641276.

Close: #1440.
2013-10-03 21:29:02 +03:00
Oskar S. Jakieła
f07a80011b Fix comment in index.html about apple-touch-icons
Close #1438.
2013-09-29 12:04:53 +03:00
Cătălin Mariș
18d3a9dd9e Update documentation and README.md
Remove content regarding legacy browsers.

Ref: #1050.
2013-09-29 12:01:42 +03:00
Cătălin Mariș
b96191e590 Show outdated browser prompt to IE 6 and 7 users
Ref: #1050.
2013-09-24 20:19:08 +03:00
Nicolas Gallagher
afaed48700 Remove IE 6/7 hacks from main.css
Ref: #1050.
2013-09-24 09:30:20 -07:00
Cătălin Mariș
b7208f1e01 Update to normalize.css v2.1.3
Ref: #1050.
2013-09-24 15:33:08 +03:00
Cătălin Mariș
13f17a737a Remove IE conditional classes
The reasons behind this decision include the following:

* This project will drop legacy browser support (see #1050), therefore,
  the use for conditional classes for IE 8+, becomes much more limited.
* IE 10+ does not support conditional comments:
  http://msdn.microsoft.com/en-us/library/ms537512%28v=VS.85%29.aspx.
* Users do and can develop easily without using the conditional
  classes, this technique being very limited in scope as no other
  browser versions are explicitly target in the same way.
* It fixes the issue that prevents IE from honouring
  `<meta http-equiv="X-UA-Compatible" content="IE=edge">` (see: #1187).

This change also removes the related documentation.

Close #1290 and #1187.
2013-09-24 11:38:05 +03:00
Hans Christian Reinl
fdbff109c9 Remove notes about Google Chrome Frame from docs
Currently we don't use Google Chrome Frame anymore as support for
it will end at the end of the year.
This commit removes references to Chrome Frame within the
documentation. It is related to 2cf1ef7.

Reference #1433.
2013-09-20 16:18:55 +02:00
Hans Christian Reinl
72cdf1e96c v4.3.0 2013-09-10 21:33:07 +02:00
Cătălin Mariș
f033325bac Update CHANGELOG
Include all changes that are not yet mentioned in the `CHANGELOG.md`.
0adda79fee...d144341003
2013-09-10 22:24:36 +03:00
Cătălin Mariș
d144341003 Add version & license info in .htaccess / main.css
Make it easier for people to know what version of the `.htaccess`
and `main.css` files they are using and under what license these
are provided, by adding this information within the files.

This is useful primarily when developers only copy these files from
the HTML5 Boilerplate project, forget to update their project's change
log or simply do not use anything similar to a change log.

Fix h5bp/html5-boilerplate#1424.
2013-09-10 20:24:31 +03:00
Hans Christian Reinl
71ca9fb7a0 Use one apple-touch-icon instead of six
This commit removes five Apple Touch Icons with different sizes for
the same icon and adds a new icon `apple-touch-icon-precomposed.png`
with a resolution of 152×152px.
Apart from that it adds documentation on how to add more icons if
you need them within your project.
Using only one Apple Touch Icon saves time and is enough in most
cases.

Closes #1367.
Closes #1425.
2013-09-04 14:09:47 +02:00
Hans Christian Reinl
23f5e084e5 Update normalize.css to v1.1.3 2013-08-30 10:14:08 +02:00
Nicolas Gallagher
da9528e568 Update CHANGELOG 2013-08-25 23:58:18 -07:00
Rob Wierzbowski
ab6b2fc4aa Move font-related base declarations to html 2013-08-25 23:55:11 -07:00
XhmikosR
ab05d000f8 Compress .png files losslessly
Use `zopfli-png` with 1000 iterations, `pngout /r` with various block sizes and deflopt.

apple-touch-icon-114x114-precomposed.png | Bin 865 -> 751 bytes
apple-touch-icon-144x144-precomposed.png | Bin 947 -> 939 bytes
apple-touch-icon-57x57-precomposed.png   | Bin 495 -> 450 bytes
apple-touch-icon-72x72-precomposed.png   | Bin 575 -> 512 bytes
apple-touch-icon-precomposed.png         | Bin 495 -> 450 bytes
apple-touch-icon.png                     | Bin 495 -> 450 bytes

The total difference is -320 bytes.

Closes #1418.
2013-08-16 11:20:24 +02:00
Roland Warmerdam
8a68443746 Docs: Update the Track JS errors in GA section
Add column number parameter to the example to reflect the recent changes
in the specification and in the Chrome and IE 10 implementations.

http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#errorevent
https://code.google.com/p/chromium/issues/detail?id=264197

Close #1417.
2013-08-15 13:31:35 +03:00
Pere Orga
cd981e52f7 Further optimize the apple touch icons
Reduce the total size of the icons by 172 bytes using zopfli.

Close #1415.
2013-08-15 09:19:45 +03:00
Hans Christian Reinl
2cf1ef7cea Docs: Update section about the X-UA-Compatible meta option
Chrome Frame is not supported anymore and we removed the option in
8fc2650.
This commit removes the documentation about Chrome Frame in the
X-UA-Compatible meta tag docs.

Related to #1396.
2013-08-14 14:30:49 +02:00
Cătălin Mariș
5bc2a985c7 Docs: Update .htaccess related info and links 2013-08-01 19:24:27 +03:00
Cătălin Mariș
21c614849a Update to Apache Server Configs v1.1.0 2013-08-01 14:35:05 +03:00
Cătălin Mariș
01624d71f5 Update CONTRIBUTING.md
* Reflect the recent changes in @necolas's Issue Guidelines:
  https://github.com/necolas/issue-guidelines.
* Add note about not opening issues and pull requests regarding the code
  in the Apache Server Configs, jQuery, Modernizr and Normalize.css.
2013-08-01 14:23:22 +03:00
Sindre Sorhus
be4484add0 Further optimize the apple touch icons
Reduce the total size of the icons by 1.7KB using ImageAlpha
(16 colors - no visible difference) and ImageOptim.

Close #1406.
2013-07-21 21:37:44 +03:00
bmcustodio
ce7c3c5c15 Updating jQuery to 1.10.2. 2013-07-03 18:40:15 +01:00
Snugug
ff37dba6bf Add initial-scale=1 to meta viewport
iOS 6 fixes the infamous orientation change bug, so a better experience
is provided by reintroducing `initial-scale=1`.
2013-06-30 13:45:20 -07:00
Bommeli
8fc26501f4 Remove Chrome Frame meta tag and HTTP header hints
See also `Retiring Chrome Frame - developer FAQ`:
https://developers.google.com/chrome/chrome-frame/

Close #1396.
2013-06-26 13:56:45 +03:00
Hans Christian Reinl
9ec546569b Add vertical centering for audio-, canvas- and video-tags
Remove the gap between videos, audio and canvas and the bottom of
their containers by vertically centering the tags.

Closes #1326.
2013-06-25 21:42:49 +02:00
Gustavo Rodrigues
02713eedd2 Remove Google Frame message
As said at http://blog.chromium.org/2013/06/retiring-chrome-frame.html Google Frame was retired/obsolete.

Changed "chromeframe" class to "browsehappy"
2013-06-24 13:25:18 -07:00
alrra
8f743702f6 Docs: update information about print styles
Fix: h5bp/html5-boilerplate#1386
2013-06-14 12:03:52 +03:00
Mathias Bynens
48d49e96d6 Update to Google Universal Analytics
This is an optimized version of the official Google Universal Analytics snippet,
based on http://mathiasbynens.be/notes/async-analytics-snippet.
The only difference is that this version still uses
`document.getElementsByTagName('script')[0]` instead of `document.scripts[0]`
for Firefox < 9 support.

Unminified, optimized code:

    (function(window, document, script, variableName, scriptElement, firstScript) {
      window['GoogleAnalyticsObject'] = variableName;
      window[variableName] || (window[variableName] = function() {
        (window[variableName].q = window[variableName].q || []).push(arguments)
      });
      window[variableName].l = +new Date;
      scriptElement = document.createElement(script);
      firstScript = document.getElementsByTagName(script)[0];
      scriptElement.src = '//www.google-analytics.com/analytics.js';
      firstScript.parentNode.insertBefore(scriptElement, firstScript)
    }(window, document, 'script', 'ga'));

    ga('create', 'UA-XXXX-Y');
    ga('send', 'pageview');

Minified:

    (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;e=o.createElement(i);r=o.getElementsByTagName(i)[0];e.src='//www.google-analytics.com/analytics.js';r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));ga('create','UA-XXXX-Y');ga('send','pageview');

Closes #1347 and #1369.
2013-06-03 19:29:37 +02:00
Hans Christian Reinl
deec362213 Update to jQuery 1.10.1 2013-05-31 21:30:44 +02:00
bmcustodio
713abf57a9 Update to jQuery 1.10.0 2013-05-30 17:00:49 +03:00
Hans Christian Reinl
f27c2b7372 Update to Normalize.css 1.1.2 2013-05-12 13:24:19 +02:00
Hans Christian Reinl
52f17087f9 Add documentation for iOS web applications
Add several options to improve iOS web apps with meta tags when
adding a web page to the Home Screen.

Closes #1352.
2013-05-10 10:48:25 +02:00
alrra
7a22a33d40 Docs: fix broken links 2013-04-12 17:40:55 +03:00
Nicolas Gallagher
0adda79fee v4.2.0 2013-04-07 19:41:59 -07:00
Nicolas Gallagher
d94e506189 Update CHANGELOG 2013-04-07 19:35:51 -07:00
George Gooding
fa7527fb26 Remove Google Analytics protocol check
Google now serves all Analytics scripts via SSL also so the protocol
check is no longer necessary.

Close #1319
2013-04-07 19:33:37 -07:00
Nicolas Gallagher
2a8e5828af Update normalize.css to v1.1.1 2013-04-07 17:40:59 -07:00
alrra
6cfbc95cd6 Docs: replace htaccess.md with link (fix #1344)
Remove `htaccess.md` and link to the Apache `README.md` in
the `server-configs` repository as the documentation for the
configurations is now officially maintained in that repository.
2013-04-01 13:29:14 +03:00
Nicolas Gallagher
a7a4d0685c Fix Grunt link in docs
The repo has moved from 'cowboy/grunt' to 'gruntjs/grunt'.
2013-03-30 17:49:47 -07:00
alrra
c8b0431c7d Import latest .htaccess configurations
Update the Apache configurations to include the
latest changes in the canonical `.htaccess` file.
2013-03-30 11:19:28 +02:00
Nicolas Gallagher
1b0f042e06 Update CHANGELOG 2013-03-04 21:25:20 -08:00
Alfred Xing
a10460934d Fix 404 widget script URL
Fix 404 widget script URL to be compatible with HTTPS by replacing
`http://` with `//`. The script hosted by Google is available on both
protocols.
2013-03-04 09:00:53 -08:00
Drew Noakes
b83ce3b1b4 Fixed typo in main.css 2013-02-17 18:05:40 +02:00
Nicolas Gallagher
c01aa0474d Merge pull request #1313 from impressivewebs/patch-1
Corrected terminology in comment
2013-02-15 21:27:48 -08:00
Louis Lazaris
2f966781d8 Corrected terminology in comment
Really, really nitpicky change here but ... the comment was referring to the selection rule sets as "declarations", which isn't exactly the correct term. See:

http://nimbupani.com/css-vocabulary.html
http://www.impressivewebs.com/css-terms-definitions/
2013-02-15 20:58:23 -05:00
Noah Bass
b4587434f8 Fix link to Pull Request help in CONTRIBUTING.md
GitHub changed their help page URLs and did not correctly redirect the
old Pull Request help URL.
2013-02-10 17:56:56 -08:00
brianblakely
522fa645c3 Added IE10 tap highlight disable & WebKit→IE10 doc 2013-02-09 12:32:51 +02:00
Alexander Zonov
19c03c4bf0 Recommend version-specific python server commands 2013-02-09 12:11:08 +02:00
Hans Christian Reinl
7dae637800 Update jQuery to version 1.9.1 2013-02-05 09:04:19 +01:00
Nicolas Gallagher
922df45999 Use relative paths in README
GitHub recently fixed a problem where relative paths in Markdown files
didn't behave as desired.

Fix gh-1296
2013-01-30 19:28:18 -08:00
Nicolas Gallagher
aa9bcbeb5b v4.1.0 2013-01-20 18:58:04 -08:00
Nicolas Gallagher
c3358e2399 Update to Normalize.css v1.1.0. 2013-01-20 17:55:13 -08:00
Kevin Martensson
3a7de0b41a Update to jQuery 1.9.0 2013-01-15 11:12:23 +01:00
Nicolas Gallagher
964c929ef0 Improve copy in CONTRIBUTING.md
Reflect some of the recent changes in necolas/issue-guidelines that tidy
up the language and simplify parts of the guidelines.
2013-01-13 11:56:44 -08:00
Gregory Pakosz
e9a471bc3f Mention Normalize.css in humans.txt
Normalize.css was missing from the stock humans.txt's technology
colophon.
2013-01-13 10:24:50 -08:00
Nicolas Gallagher
29315016dc v4.0.3 2013-01-12 16:16:35 -08:00
Nicolas Gallagher
90f99e1587 Update CHANGELOG 2013-01-12 16:15:15 -08:00
Jonathan Neal
fb9166461b Merge pull request #1286 from jonathantneal/issue-1285
HiDPI (32x32px) favicon.ico - Issue #1285
2013-01-09 17:15:30 -08:00
Jonathan Neal
21702c4198 HiDPI (32x32px) favicon.ico
32x32-only version. Tested in IE6+, Safari 4+, and the latest Chrome,
Firefox, and Opera.
2013-01-09 17:12:19 -08:00
Simon Owen Design
7bc8241f51 Minor amend, closing a missing bracket. 2013-01-04 19:43:31 +00:00
Devin Rhode
a2b3d06e8b Remove named function expression in plugins.js
Details on various bugs with named function expressions:
http://kangax.github.com/nfe/#jscript-bugs
2012-12-28 12:58:11 +00:00
Nicolas Gallagher
081f8aa0de Adjust CSS image-replacement
Make sure that any text-highlight, or other factors that may break the
illusion, are far enough outside the element to be unnoticed.

Fix gh-1239
2012-12-28 12:39:19 +00:00
Nicolas Gallagher
1987e5a1ee Update HiDPI CSS @media rule
Provide greater cross-browser support. Thanks to Wordpress -
http://core.trac.wordpress.org/changeset/22629 - and @marcedwards - see
issue #1127.
2012-12-28 12:31:58 +00:00
Nicolas Gallagher
46446727b2 v4.0.2 2012-12-09 15:12:30 -08:00
Nicolas Gallagher
3d5d852697 Update placeholder icons
Apply the latest design of the H5BP logo to each of the touch icons and
the favicon.
2012-12-08 10:54:17 -08:00
Hans Christian Reinl
052ecc4b29 Update Normalize.css to 1.0.2
This update corrects `h6` font size normalization.
2012-11-25 20:54:13 +01:00
Frederic Hemberger
dac15682b3 Add note about AddOutputFilterByType in Apache < v2.3.7 2012-11-18 22:30:45 +02:00
Hans Christian Reinl
8c08445487 Merge pull request #1253 from bmcustodio/jquery-1.8.3
Updated 'jQuery' to 1.8.3.
2012-11-14 01:38:33 -08:00
bmcustodio
d141f70910 Updated 'jQuery' to 1.8.3. 2012-11-14 09:06:22 +00:00
Nicolas Gallagher
e9f6a9890c Remove broken link to PDF in cross-domain docs
Adobe have changed the location of the PDF. There is no gaurantee that
it will remain at the new location either. Since we already link to an
Adobe article about the cross-domain policy spec (that links to a PDF)
we don't need to link to both.
2012-11-04 09:44:33 -08:00
alrra
e85301270f htaccess: for consistency, use mod_php5.c 2012-11-01 15:48:09 +02:00
Christian Bundy
0615b940c3 htaccess: sort the values of directives alphabetically 2012-10-30 12:58:54 +02:00
Thomas Bassetto
551dd5c5d6 Fix missing parenthesis to CHANGELOG.md 2012-10-29 15:12:34 +02:00
Nicolas Gallagher
25c1073d13 v4.0.1 2012-10-20 16:01:31 -07:00
Nicolas Gallagher
7b04f32d5a Update CHANGELOG 2012-10-18 21:59:54 -07:00
Hans Christian Reinl
750bf0e093 Further improvements to console stubbing method
These improvements are:

- cache current method in `while`-loop to reduce property look-ups
- use `if` as the conditional assignment in `while`-loop in order to improve performance and readability

Reference: commit 578f377
Closes gh-1229
2012-10-14 21:06:53 +02:00
bmcustodio
dc00673b7c Fix console stubbing method in oldIE
Expose `console` object to global scope in IE6 and IE7

Reference: gh-1229
2012-10-14 15:00:32 +02:00
Nicolas Gallagher
5bed678da0 Update CHANGELOG 2012-09-22 03:15:45 -07:00
Devin Rhode
578f377849 Improve console method stubbing
Avoid browsers with `console` and `console.log` throwing errors for some
of the other methods that they did not support.

Fix gh-1206
Close gh-1218
2012-09-22 03:04:03 -07:00
Nicolas Gallagher
e1b163041e Merge pull request #1219 from ryanve/master
Disambiguate chromeframe prompt wording.
2012-09-22 02:58:52 -07:00
bmcustodio
4ac3ffef5c Updated jQuery to 1.8.2
jQuery 1.8.2 has just been released. Google's CDN has not yet
been updated, but it shouldn't take too long before it is.
2012-09-21 22:41:35 +02:00
Ryan Van Etten
6be0119cd2 Disambiguate chromeframe prompt wording. 2012-09-20 15:14:13 -04:00
Nicolas Gallagher
e6c64a238d Remove duplicate markTimeline from plugins.js
Fix gh-1211
2012-09-19 23:28:55 +01:00
Alec Rust
b378ce239d Enforce coding style in main.css print styles 2012-09-19 23:25:40 +01:00
Nicolas Gallagher
2c079ae144 Add a CONTRIBUTING.md file
Move the information on contributing from the bundled documentation to a
new root file - CONTRIBUTING. This is both a more meaningful location
(not part of code documentation) and allows us to take advantage of
GitHub's latest UI changes that prompt people to read a repo's
guidelines before reporting issues or opening pull requests.
2012-09-17 20:40:46 +01:00
Haralan Dobrev
2dd1153cfc Fix SymLinksIfOwnerMatch typo in .htaccess
Ref. gh-1209
2012-09-17 10:42:15 +02:00
Nicolas Gallagher
bfeac11c9a Update CHANGELOG 2012-09-16 12:07:31 +01:00
Nicolas Gallagher
bb7b3577b1 Remove outdated URL from .htaccess
Fix gh-1201
2012-09-16 12:06:36 +01:00
paulwithap
d20a342c95 Add Apache configuration instructions for Mac 2012-09-16 12:04:08 +01:00
Nicolas Gallagher
0dcd9d120e Rename doc/README to doc/TOC
Avoid the problem with links in a directory README on github.com. GitHub
displays a directory's README when at the dir level, which results in
incorrect URLs when links are using relative paths. This is causing some
confusion for people who browse to the documentation on GitHub and try
to browse the docs from the automatically displayed README.
2012-09-16 11:45:57 +01:00
Nicolas Gallagher
cb0bb16eb7 Revert "fixed all the broken links to doc"
This reverts commit dd420ef187.

The commit itself broken all the links in the documentation README when
the README was viewed directly (as intended). This meant people coming
to the documentation from the html5boilerplate.com site, or those
generating HTML from the markdown docs, were not able to view the docs.
2012-09-16 11:38:04 +01:00
shichuan
dd420ef187 fixed all the broken links to doc 2012-09-16 13:28:42 +08:00
Hans Christian Reinl
1c6485adb9 Update Modernizr to v2.6.2
See http://modernizr.com/news/modernizr-262/ for more information on what changed since v2.6.1.
2012-09-05 22:14:00 +02:00
Hans Christian Reinl
d4467ad7f2 Fix typo in .htaccess documentation, fixes gh-1198 2012-09-03 16:48:46 +02:00
Mathias Bynens
5735ee396d Update to jQuery 1.8.1 2012-08-31 16:16:46 +02:00
Nicolas Gallagher
0b60046431 v4.0.0 2012-08-28 23:41:15 +01:00
Nicolas Gallagher
07ee69683c Fix broken links to issues in CHANGELOG 2012-08-27 19:21:32 +01:00
Nicolas Gallagher
19c8065b6a Small adjustments to documentation 2012-08-27 11:53:46 +01:00
Nicolas Gallagher
6f5ed6f921 Remove placeholder link styles
The placeholder link styles don't add much value but do introduce
potentially unwanted specificity issues. By specifying `a:visited` it
forces subsequent styles for components (like buttons) to have a greater
specificity than this selector if they are to avoid the color changing
once it has been visited.

A similar problem is also evident if a user builds their link styles
upon the project styles (rather than editing the ones included).

This was also an issue in Normalize.css and was fixed in the same way.
2012-08-27 11:38:31 +01:00
Nicolas Gallagher
6415ccd9b0 Remove duplicate line from htaccess
Fix gh-1177
2012-08-27 10:16:05 +01:00
Divya Manian
39a1801a88 Adding a link to Issue Tracker in Reporting Issues section 2012-08-26 08:46:31 -07:00
Divya Manian
dfca687243 Adding link to issues from Changelog
The Regex is 
Find: (#([0-9]+)) 
Replace: [$1](https://github.com/h5bp/html5-boilerplate/$2)
2012-08-26 08:32:34 -07:00
Divya Manian
42f16dfaa1 Formatting headings. 2012-08-26 08:27:39 -07:00
alrra
a36b296b89 More general compression configuration for Apache
Works with Apache ≥ 2.1 and requires `mod_deflate` and `mod_filter` to
be enabled. However, use of Apache < 2.2 is no longer recommended.

For Apache ≥ 2.1 → 2.3.7, `mod_filter` isn't needed, but requiring it
and using this solution is the best way going forward (plus, it doesn't
introduce other dependencies to other modules like, for example,
`mod_version`).

Fix gh-1012
Ref gh-1173
2012-08-23 00:00:24 +01:00
Nicolas Gallagher
68197bc42d Correct typo in the clearfix code 2012-08-22 15:31:48 +01:00
Nicolas Gallagher
adecc5da03 New image replacement approach
This approach uses a pseudo-element to force the element's content
downwards without covering the background of the element. The overflow
is hidden. For IE 6/7, fallback to the cruder `text-indent` method.

Known advantages:

* Works in IE6+ (although better in IE8+).

* Replaces any content in IE8+, including inner HTML.

* Nothing new for people to learn. Works just like all "traditional" IR
  techniques (unlike NIR, which needs you to add the image using a
  pseudo-element's `content` and relies margins for sprite positioning).

* Doesn't draw a large out-of-element box in modern browsers. You can
  even mix in something like `font: 10px/1 a` to reduce ce the size of
  the "off-screen" box, if you really need to.

* Doesn't have any potential SEO problems from `font-size:0`.

* Doesn't care about any minimum font-size that a browser might have.

* Doesn't have any potential failed-IR problems from inherited styles,
  like text being positioned within the element's visible box (i.e., if
  you use other properties like `text-stroke`).

Known issues:

* Doesn't work when images are off or fail to load (same as every other
  IR technique apart from NIR).

* If the IR'ed element has bottom-padding, then either it needs to be
  removed or the height of the pseudo-element needs to be bumped up
  (e.g., set to 200%).

* Doesn't avoid the `inline-block` bug in IE 6/7 due to the text-indent
  fallback for those browsers.

* Doesn't work on input elements (but they shouldn't be the subject of
  IR anyway).

* There is the potential for some final-result differences between
  IE 6/7 and modern browsers, but this is already the case with other IR
  techniques.

Fix gh-1149
2012-08-21 23:37:37 +01:00
Nicolas Gallagher
fac03ef28f Minor update to README 2012-08-21 22:54:40 +01:00
Nicolas Gallagher
38c7a90cbf Minor update to clearfix 2012-08-20 23:38:35 +01:00
Nicolas Gallagher
7b0ba6b083 Update to Normalize.css 1.0.1 2012-08-20 22:57:28 +01:00
Nicolas Gallagher
28f922ff3c Add a HiDPI example media query
`-webkit-device-pixel-ratio` targets WebKit browsers.
`min-resolution` targets everything else.

Reference: http://www.w3.org/blog/CSS/2012/06/14/unprefix-webkit-device-pixel-ratio/

Fix gh-1127
2012-08-18 18:56:42 +01:00
Nicolas Gallagher
445037ccf4 Docs: update FAQ
Remove the section on "profiling" which was incomplete and not directly
linked to the code in this project. Also fix the headings so that
they're all of the same level.

Fix gh-1170
2012-08-18 18:56:29 +01:00
Nicolas Gallagher
920e52a5d4 Add "Hello world" to index.html
This avoids the default template rendering a completely blank page and
makes it easy for people to know straight away that things are
"working".

Fix gh-1165
2012-08-15 22:52:37 +01:00
Nicolas Gallagher
456211dc54 htaccess: include a SymLinksIfOwnerMatch comment
Some web hosts disallows the use of the FollowSymLinks option in
.htaccess files, and suggest the use of SymLinksIfOwnerMatch.

Close gh-1147
2012-08-15 20:48:39 +01:00
Nicolas Gallagher
e52927a03e Docs: adjust line length and whitespace 2012-08-15 00:33:21 +01:00
Nicolas Gallagher
596d9a9dcc Update to normalize.css v1.0.0 2012-08-15 00:21:11 +01:00
brianblakely
50b46d6fa2 Update doc/extend.md
Added:
* IE10/Win8 badges
* Twitter Cards
* Chrome Web Store inline install
* iOS 6 Safari's Smart App Banners
2012-08-14 11:34:55 -03:00
Nicolas Gallagher
1d96e32876 Docs: minor tweaks 2012-08-12 15:17:58 +01:00
Nicolas Gallagher
8e90c33cef Simplify apple touch icons
Remove the radial gradient from around the star symbol.
2012-08-12 15:04:11 +01:00
Nicolas Gallagher
66b137083f Minor HTML indentation change 2012-08-10 12:29:22 +01:00
Nicolas Gallagher
02bdaea124 Docs: add info about using Metro tiles
Thanks to @Kroc for raising this issue and providing extra details. It
has been included in the 'extend' documentation alongside other IE tips.

Close gh-1136
2012-08-10 10:36:23 +01:00
Nicolas Gallagher
5ed4dadf5c Update CHANGELOG
Ref gh-1161
2012-08-10 10:34:12 +01:00
Jonathan Fielding
1c30c5a660 Update jQuery 1.7.2 to jQuery 1.8.0
Ref gh-1161
2012-08-10 09:44:01 +02:00
Nicolas Gallagher
d590b0efe9 Separate normalize.css from main.css
Benefits of disentangling  normalize.css from the rest of the project's
CSS:

* Easier to track normalize.css version.
* Easier to update normalize.css.
* Easier to remove normalize.css if the user wants.
* Clearer distinction between normalizing CSS and the additions that
  HTML5 Boilerplate provides.

Drawback is the additional HTTP request incurred from the extra
stylesheet referenced in the HTML. However, we already do something
similar for the JS, and anyone serious about performance is going to
employ a build process to concatenate and minify CSS/JS.

Ref gh-1132
Ref gh-1140
2012-08-09 21:48:57 +01:00
Nicolas Gallagher
f23340ed9b Add MIT license
Provide a proper, highly permission license, recognized by the OSI, to
remove any potential for ambiguity. Addresses concerns around the
inability to elect to place work in the Public Domain.

Fix gh-1139
2012-08-08 23:56:10 +01:00
Nicolas Gallagher
3ce6e98cde Clean up .gitignore
Remove all the ignores from `.gitignore`. The default boilerplate
doesn't generate any project-specific files that need to be ignored. All
OS and Editor-generated files should be globally ignored rather than
polluting the local project ignores.

Further information on using git ignore's appropriately can be found in
the miscellaneous part of the bundled docs.
2012-08-05 12:22:32 +01:00
Nicolas Gallagher
703d0b8651 Add CHANGELOG
Keep the project history available within the repo; make it easier to
track what is currently changed over the last tagged release.
2012-08-05 11:11:02 +01:00
Nicolas Gallagher
1e3be1842b Rewrite documentation and add to repo
Include all documentation related to the project and its code. This
ensures that docs are available offline and that any future download
will have docs that relevant for the version in use.

This change involves a documentation rewrite to update, simplify,
clarify, and consolidate it.
2012-08-02 14:06:13 +01:00
Nicolas Gallagher
cc265d4511 Remove uncompressed jQuery
Not referenced anywhere else in the project and is unlikely to ever get
used since the CDN version of jQuery is used by default.

Fix gh-1153
2012-07-31 23:39:27 +01:00
Nicolas Gallagher
889e377b2d Remove superfluous code comments
Reduce the perceived complexity and verbosity of certain files by
stripping unneccessary inline comments.

Relevant documentation may end up in a `doc/` directory such that any
download has an accurate and matching code documentation bundle.

Ref gh-1048
2012-07-29 14:48:14 +01:00
Paul Irish
d3969484ff update modernizr to 2.6.1. fixes #1146. ref #1086 2012-07-19 14:17:26 +01:00
Mathias Bynens
5370479476 Create stubbed console methods
Remove the previous `log()` wrapper method as it changed the reported
line position in logs. Instead, avoid `console` errors in browsers
without `console` by setting its methods to empty functions.

Ref. #1107.
2012-07-08 20:20:17 +01:00
alrra
83f4f28186 .htaccess: Serve WebVTT files as text/vtt with UTF-8 encoding 2012-06-24 11:46:06 +02:00
AD7six
288f9922c0 Remove excessive ExpiresByType rule
Ref. #1122.
2012-06-14 09:14:13 +02:00
Hans Christian Reinl
2a60c6b3d1 Add a comment and link to more .gitignore info
A repository's `.gitignore` should be focused on ignoring files within
the repo that we do not want to be committed. For example, a build
directory.

A global ignore is a better place for ignoring OS-level files, editor
extensions, and files that you are always likely to want ignored (e.g.
zip).

Close #1065
Close #1120
2012-06-11 09:21:33 +01:00
Nicolas Gallagher
49089be067 Merge pull request #1119 from alrra/h5bp
Smaller file size favicon.ico
2012-06-10 05:08:38 -07:00
alrra
ca30a53977 replace the 'favicon.ico' with a smaller size one 2012-06-10 14:33:29 +03:00
Nicolas Gallagher
7aa306c0b3 Rename style.css to main.css
Make it consistent with the naming of main.js

Close #1116
2012-06-09 12:32:47 +01:00
Nicolas Gallagher
0c52750ea6 Remove the lang attribute from html
The boilerplate is used with many different languages, not just English.
This makes it inappropriate to have `lang="en"` included by default.

Fix #1110
2012-06-09 11:27:39 +01:00
Hans Christian Reinl
cbde32f684 Typo in .htaccess: Keep-Alive has to be capitalized in the comment too 2012-06-08 13:21:16 +02:00
Hans Christian Reinl
4505fa12b1 Capitalize "Keep-Alive" to match the HTTP-spec
thanks @mathiasbynens
2012-06-05 19:27:22 +02:00
Hans Christian Reinl
5a2585f42c Include Keep-Alive header in .htaccess
as discussed in #1115
2012-06-05 19:07:33 +02:00
Nicolas Gallagher
d2d5fd1eac Merge pull request #1113 from nchaves/master
Fixing two bugs introduced into plugins.js during reformatting to multiline
2012-06-04 02:58:38 -07:00
Nick Chaves
d242bd27cd Fixing two bugs introduced in the multiline reformat
First bug is that the "c" is expected by the for loop condition to be
the array, not the string.  Second bug is that the new semicolon on
line 36 (after the first anonymous function declaration) separated the
calling parentheses and the return result of the second function, which
was intentionally attached as a parameter to be passed in as "a" to the
first.
2012-06-04 00:38:12 -06:00
Nicolas Gallagher
7a2f9dcf8b Formatting and consistency improvements
- Consistent use of quotes in HTML.
- Consistent use of hex for color values in CSS.
- Multi-line CSS and JS.
- 4 spaces for indentation.
- Always use closing tags.
- Use common DOCTYPE capitalization.

These are steps toward reducing the number of repeat issues we get
around inconsistencies or uncommon patterns; making diffs more readable;
and using common conventions.
2012-06-02 11:29:38 +01:00
Nicolas Gallagher
6bfd7948c6 Humans.txt prettification
Simplify the template a bit. Switch to hash-style comments to mirror
robots.txt standard.
2012-06-01 21:47:17 +01:00
Nicolas Gallagher
3942ee1775 Merge pull request #1095 from clarkni5/master
Add [OR] to rewrite condition

The first condition checks to see if the request matches a directory and the second condition checks to see if it matches a file. Without the [OR], the condition always fails.
2012-05-28 07:44:41 -07:00
Mathias Bynens
e53c1df9cf Merge pull request #1097 from karlpcrowley/patch-1
.htaccess: Prevent mobile network providers from modifying your site (disabled by default)
2012-05-20 23:03:02 -07:00
Karl Crowley
d055e4e6c1 Updated .htaccess:
Prevent mobile network providers from modifying your site
2012-05-20 12:55:49 +02:00
Nicholas Clark
4934c5defd Update documentation. 2012-05-18 16:33:33 -04:00
Nicholas Clark
b2b24c351e Add missing or next condition. 2012-05-18 16:24:27 -04:00
Hans
c20eb1a6fa Merge pull request #1071 from mikealmond/master
Add some MIME-types (JSON, JSONP, audio, video and flash), a note about a custom 404-file and a PHP flag (magic_quotes_gpc)
2012-04-25 09:54:05 -07:00
Mike Almond
09dc03ae17 Merge branch 'master' of git://github.com/h5bp/html5-boilerplate
* 'master' of git://github.com/h5bp/html5-boilerplate:
  Update .gitignore to include AppleDouble (dot underscore) files
  Update .gitignore to include Rubinius's compiled files.
2012-04-25 09:03:26 -04:00
Mike Almond
6e1417b857 Adding JSONP 2012-04-25 09:02:49 -04:00
Hans
509648b8a5 Merge pull request #1073 from lekkerduidelijk/patch-3
Update .gitignore to include AppleDouble (dot underscore) files
2012-04-25 02:27:36 -07:00
Rutger Laurman
e1e53cf83c Update .gitignore to include AppleDouble (dot underscore) files 2012-04-25 09:51:21 +03:00
Hans
1ab8d64169 Merge pull request #1055 from danielgrippi/patch-1
Include Rubinius' compiled files in .gitignore
2012-04-24 15:18:54 -07:00
Mike Almond
e49353b05f Adding new MIME types, a note about 404, and a PHP flag
Fixes #1062 and #1053
2012-04-24 16:19:51 -04:00
Hans Christian Reinl
a95f300ac8 Change selection-color in 404 error template, closes #1067
The selection-color was changed in 1d320b5. Add this background-color in the 404 error template and remove the text-color. Thanks to @elexx.
2012-04-23 23:33:31 +02:00
Nicolas Gallagher
1d320b59a3 R.I.P. Hot pink text-selection highlight
Replace hot pink with a more neutral selection background color: the
default found on OS X.

A number of high-profile sites have failed to customize the hot pink
default that HTML5 Boilerplate used to include. People should be able to
trust the project to include sensible defaults. Keeping hot pink in
there by default breaks the "no surprises" expectation of amateur and
professional developers.

Ref #610
Ref #969
2012-04-22 15:08:46 +01:00
Nicolas Gallagher
eb2dc2fe90 Remove HTML comment about appcache
Using appcache is complicated and can have unexpected consequences if
you do not have a good grasp of the spec. The way that this project
suggested using appcache was likely to be problematic.

Ref #1060
2012-04-20 23:39:14 +01:00
Daniel Grippi
1b581aff02 Update .gitignore to include Rubinius's compiled files. 2012-04-18 18:44:18 -07:00
Nicolas Gallagher
c264d91c6c Merge pull request #1051 from sjonnet/patch-1
Additional changes to index.html for rename libs to vendor
2012-04-14 07:10:37 -07:00
Shawn Jonnet
02bf76cd16 Additional changes to index.html for rename libs to vendor 2012-04-14 10:06:54 -03:00
Nicolas Gallagher
3606c8345f JS: rename libs/ and script.js
The dir name `vendor/` is increasingly common and this small change
might save some people a bit of time when it comes to using the project
with RequireJS et al.

See:

http://www.javascriptu.org/decks/sd/building_the_foundation/#slide-51
2012-04-13 20:16:20 +01:00
Nicolas Gallagher
cfae00adab Merge pull request #963 from ProBackup-nl/master
Remove * {filter:none} from media print due to IE9 repositioning and float issues
2012-04-10 16:42:58 -07:00
Nicolas Gallagher
5469e272a4 Remove placeholder content from <body>
Lengthy previous discussion in #203

Close #926
Close #1033
2012-04-11 00:35:29 +01:00
Nicolas Gallagher
21e77285e2 Merge pull request #998 from Calvein/patch-1
Added a link to explain why to put the JavaScript file at the bottom
2012-04-10 16:28:42 -07:00
Paul Irish
b0db5d5eb6 Merge pull request #1043 from Kvakes/master
Espresso generated files
2012-04-08 07:46:51 -07:00
Max Izmailov
060ac246fd Ignore files generated by Espresso 2012-04-08 15:18:19 +02:00
Nicolas Gallagher
339b6c96ad Remove .htaccess comment about query params
Using query params to version files is not recommended. This removes
a stray reference to that technique.

Close #997
2012-04-07 00:52:52 +01:00
Paul Irish
086280e6fd linking up some docs for the RewriteBase cloud issues. ref #1015 2012-04-06 15:57:29 -07:00
Hans
ce64453057 Merge pull request #1015 from WraithKenny/patch-1
Add RewriteBase to .htaccess - commented out by default as it allows for use w/o configuration.
2012-04-06 15:52:38 -07:00
Hans
00ee25c1be Merge pull request #1036 from alecrust/patch-1
Corrected spacing
2012-04-04 13:39:39 -07:00
Ken Newman
6c1c1db5a2 Comment-out RewriteBase by default. This allows for "no-configuration" flexible deployment. Some servers need this setting configured, but the value depends on deployment location. 2012-04-03 12:55:40 -03:00
Alec Rust
263af0b468 Corrected spacing 2012-04-03 11:57:00 +02:00
Hans
4026f03249 Merge pull request #1026 from jonathan-fielding/master
Updated the jQuery to 1.7.2
2012-03-29 13:54:23 -07:00
Divya Manian
258cbef93c Merge pull request #1029 from philipwalton/strict-log
added a try/catch block to make log work with 'use strict'
2012-03-28 15:51:56 -07:00
Philip Walton
9cb7e46f32 added a try/catch block to make log work with 'use strict' 2012-03-22 23:29:10 -07:00
Divya Manian
863de294e8 Actually fixing #1028. Thnx @niftylettuce 2012-03-22 21:20:25 -07:00
Divya Manian
7912513084 Fixing typo in css class. Fixes #1028 2012-03-22 21:07:39 -07:00
Jonathan Fielding
1c55518def Updated jQuery to 1.7.2
Signed-off-by: Jonathan Fielding <j.fielding@me.com>
2012-03-21 23:42:54 +00:00
Mathias Bynens
9cf989542c Further optimize the new touch icons
apple-touch-icon-114x114-precomposed.png |  Bin 3247 -> 3242 bytes
   apple-touch-icon-144x144-precomposed.png |  Bin 3779 -> 3777 bytes

Ref. #1025.
2012-03-21 08:35:50 +01:00
Mathias Bynens
9ced71e8ef Merge pull request #1025 from richardcornish/master
Redesigned touch icons and favicon
2012-03-21 00:31:17 -07:00
Richard Cornish
e2fff6fe07 Redesigned touch icons and favicon
New icons designed to be sharper on the pixel grid, with slight light
source variations that are pleasing to the eye in a touch environment.
Also put through ImageAlpha and ImageOptim for added optimization.
Please see
http://dl.dropbox.com/u/2066483/h5bp-icons/docs/comparison.png for
before/after comparison.
2012-03-21 00:41:50 -05:00
Mathias Bynens
923b0f3adc Add 144×144px touch icon for third-generation iPad
See http://mathiasbynens.be/notes/touch-icons. Closes #1020.
2012-03-16 16:44:15 +01:00
Ken Newman
767dc09916 Add RewriteBase subdirectory note. 2012-03-13 15:11:02 -03:00
Ken Newman
efe88dfbf2 Update .htaccess 2012-03-13 14:33:13 -03:00
Ken Newman
1ec581885a Cloud Sites (and probably other cloud/shared hosting) needs a RewriteBase set for rewrites to work. See http://www.rackspace.com/knowledge_center/index.php/Why_is_mod_rewrite_not_working_on_my_site 2012-03-08 14:38:57 -05:00
Nicolas Gallagher
aa0396eae7 Update CSS image replacement technique
The new technique avoids various problems with any text-indent method.
The benefits are:

* No box of any kind is drawn offscreen, so there is no risk of
  related performance problems in old iOS devices.

* No need to specify a text-alignment and hide overflow since the text
  is crushed to take up no space.

* No need to hide `br` or make all fallback HTML `display:inline`
  because unlike the text-indent approaches, this method is not
  affected by those scenarios.

* Fewer styles are needed as a result of these improvements.

The function of the new CSS is as follows:

* `font: 0/0 a` is a shorthand property that reduces the font-size and
  line-height to 0. The `a` value acts as a font-family. The CSS
  validator complains that using `0/0` in the shorthand `font` property
  is not valid, but every browser accepts it.

* `text-shadow: none` makes sure than any inherited text shadow is
  removed, otherwise it will show over the image.

* `color: transparent` is only really needed in browsers than don't
  completely crush the text to the point of being invisible. Safari 4 is
  such a browser (but extremely rare). Leaving it in for now in case
  there are any mobile browsers that require it. Upon further testing,
  it may be possible to remove this declaration.

Some parts of the pre-existing image replacement technique have been
retained. The border and background resets are useful when using IR on
form submit inputs or buttons, as well as when links use default borders
or backgrounds

Close #1005
2012-03-06 00:12:12 +00:00
Nicolas Gallagher
758eab9f35 Merge pull request #1010 from richardcornish/master
Added `application/xml` for RSS MIME types
2012-03-05 01:46:27 -08:00
Richard Cornish
c448cc03e7 Added application/xml for RSS MIME types
Based on research on the [issue
list](https://github.com/h5bp/html5-boilerplate/issues/989)
2012-03-05 03:43:08 -06:00
Mathias Bynens
db1574059d Merge pull request #1003 from alrra/h5bp
Updated link in the "robots.txt" file
2012-02-28 13:35:52 -08:00
alrra
ca4bf4793d updated the "Controlling Crawling and Indexing" link from the "robots.txt" file 2012-02-28 23:14:17 +02:00
François Robichet
1aad336ef7 Added a link to explain why put the JavaScript file at the bottom 2012-02-26 20:48:02 +01:00
Paul Irish
1929462a39 Merge pull request #994 from Jakobud/master
Changed Cache-Busting help url in the .htaccess
2012-02-21 18:56:06 -08:00
Jake Wilson
5bbd604930 Changed cache-busting help url 2012-02-21 19:32:16 -07:00
Paul Irish
b0ddd13910 Merge pull request #992 from mikealmond/master
Removing the <Location> tag from the P3P Header - Fixes issue #975
2012-02-21 11:18:15 -08:00
Mike Almond
fe6c2f56ec Removing the <Location> tags from the P3P Header
The Location tag was causing a 500 error.
2012-02-21 13:59:16 -05:00
Paul Irish
f8f347e392 new modernizr. 2012-02-19 11:00:08 -08:00
Paul Irish
080026e4f4 modernizr 2.5.2. includes html5shiv 3.3. 2012-02-07 18:28:52 -08:00
Paul Irish
9434b5bc79 upgrade Modernizr to 1.5.1 which includes IE7 fix. also yepnope 1.5.2 2012-02-07 17:35:49 -08:00
ProBackup-nl
a2240384c7 Remove @media print "filter:none !important; -ms-filter: none !important;".
In combination with html form input tags, having float:left style applied, Modernizr 2.0.6, IE9 and PIE-1.0beta6 (for rendering CSS3 properties in IE) the setting of "filter:none" causes the input elements to disappear. See it for yourself (in IE9):

http://www.kbrbeheer.nl/bugs/h5bp/stylesheet-media-print/with-filter.html
http://www.kbrbeheer.nl/bugs/h5bp/stylesheet-media-print/without-filter.html
Or when you haven't got IE9 at your disposal:
http://www.kbrbeheer.nl/bugs/h5bp/stylesheet-media-print/with-filter.pdf
http://www.kbrbeheer.nl/bugs/h5bp/stylesheet-media-print/without-filter.pdf
2012-02-03 17:23:35 +01:00
93 changed files with 6707 additions and 10404 deletions

22
.editorconfig Normal file
View File

@@ -0,0 +1,22 @@
# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# https://editorconfig.org/
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[{.travis.yml,package.json}]
# The indent size used in the `package.json` file cannot be changed
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
indent_size = 2
indent_style = space

26
.eslintrc.js Normal file
View File

@@ -0,0 +1,26 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"mocha": true
},
"plugins": ["mocha"],
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
};

29
.gitattributes vendored
View File

@@ -1 +1,28 @@
* text=auto
# Automatically normalize line endings for all text-based files
# https://git-scm.com/docs/gitattributes#_end_of_line_conversion
* text=auto
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# For the following file types, normalize line endings to LF on
# checkin and prevent conversion to CRLF when they are checked out
# (this is required in order to prevent newline related issues like,
# for example, after the build script is run)
.* text eol=lf
*.css text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.sh text eol=lf
*.txt text eol=lf
*.xml text eol=lf
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Exclude the `.htaccess` file from GitHub's language statistics
# https://github.com/github/linguist#using-gitattributes
dist/.htaccess linguist-vendored

46
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at h5bp@htmlcssjavascript.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/

154
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,154 @@
# Contributing to HTML5 Boilerplate
♥ [HTML5 Boilerplate](https://html5boilerplate.com/) and want to get involved?
Thanks! We're actively looking for folks interested in helping out and there
are plenty of ways you can help!
Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.
Following these guidelines helps to communicate that you respect the time of
the developers managing and developing this open source project. In return,
they should reciprocate that respect in addressing your issue or assessing
patches and features.
## Using the issue tracker
The [issue tracker](https://github.com/h5bp/html5-boilerplate/issues) is
the preferred channel for [bug reports](#bugs), [features requests](#features)
and [submitting pull requests](#pull-requests), but please respect the following
restrictions:
* Please **do not** use the issue tracker for personal support requests (use
[Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate)).
* Please **do not** derail or troll issues. Keep the discussion on topic and
respect the opinions of others.
* Please **do not** open issues or pull requests regarding the code in
[`.htaccess`](https://github.com/h5bp/server-configs-apache),
[`jQuery`](https://github.com/jquery/jquery/),
[`Modernizr`](https://github.com/Modernizr/Modernizr) or
[`Normalize.css`](https://github.com/necolas/normalize.css) (open them in
their respective repositories).
<a name="bugs"></a>
## Bug reports
A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!
Guidelines for bug reports:
1. **Use the GitHub issue search** &mdash; check if the issue has already been
reported.
2. **Check if the issue has been fixed** &mdash; try to reproduce it using the
latest `master` or development branch in the repository.
3. **Isolate the problem** &mdash; ideally create a [reduced test
case](https://css-tricks.com/reduced-test-cases/) and a live example.
A good bug report shouldn't leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report. What is
your environment? What steps will reproduce the issue? What browser(s) and OS
experience the problem? What would you expect to be the outcome? All these
details will help people to fix any potential bugs.
Example:
> Short and descriptive example bug report title
>
> A summary of the issue and the browser/OS environment in which it occurs. If
> suitable, include the steps required to reproduce the bug.
>
> 1. This is the first step
> 2. This is the second step
> 3. Further steps, etc.
>
> `<url>` - a link to the reduced test case
>
> Any other information you want to share that is relevant to the issue being
> reported. This might include the lines of code that you have identified as
> causing the bug, and potential solutions (and your opinions on their
> merits).
<a name="features"></a>
## Feature requests
Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to *you* to make a strong
case to convince the project's developers of the merits of this feature. Please
provide as much detail and context as possible.
<a name="pull-requests"></a>
## Pull requests
Good pull requests - patches, improvements, new features - are a fantastic
help. They should remain focused in scope and avoid containing unrelated
commits.
**Please ask first** before embarking on any significant pull request (e.g.
implementing features, refactoring code, porting to a different language),
otherwise you risk spending a lot of time working on something that the
project's developers might not want to merge into the project.
Please adhere to the coding conventions used throughout a project (indentation,
accurate comments, etc.) and any other requirements (such as test coverage).
Adhering to the following process is the best way to get your work
included in the project:
1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your
fork, and configure the remotes:
```bash
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/html5-boilerplate.git
# Navigate to the newly cloned directory
cd html5-boilerplate
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/h5bp/html5-boilerplate.git
```
2. If you cloned a while ago, get the latest changes from upstream:
```bash
git checkout master
git pull upstream master
```
3. Create a new topic branch (off the main project development branch) to
contain your feature, change, or fix:
```bash
git checkout -b <topic-branch-name>
```
4. Commit your changes in logical chunks. Please adhere to these [git commit
message guidelines](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
or your code is unlikely be merged into the main project. Use Git's
[interactive rebase](https://help.github.com/articles/about-git-rebase/)
feature to tidy up your commits before making them public.
5. Locally merge (or rebase) the upstream development branch into your topic branch:
```bash
git pull [--rebase] upstream master
```
6. Push your topic branch up to your fork:
```bash
git push origin <topic-branch-name>
```
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
with a clear title and description.
**IMPORTANT**: By submitting a patch, you agree to allow the project
owners to license your work under the terms of the [MIT License](LICENSE.txt).

74
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,74 @@
**I'm submitting a ...**
<!-- (check one with "x") -->
- [ ] bug report
- [ ] feature request
- [ ] other (Please do not submit support requests here (below))
## Notes:
* Please **do not** use the issue tracker for personal support requests (use
[Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate)).
* Please **do not** derail or troll issues. Keep the discussion on topic and
respect the opinions of others.
* Please **do not** open issues or pull requests regarding the code in
[`.htaccess`](https://github.com/h5bp/server-configs-apache),
[`jQuery`](https://github.com/jquery/jquery/),
[`Modernizr`](https://github.com/Modernizr/Modernizr) or
[`Normalize.css`](https://github.com/necolas/normalize.css) (open them in
their respective repositories).
## Bug reports
A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!
Guidelines for bug reports:
1. **Use the GitHub issue search** &mdash; check if the issue has already been
reported.
We have a long history of sometimes _very_ detailed discussion of every line of code
in the project. We want discussion, so it might still warrant an issue. It
just helps to get the (sometimes extensive) context.
2. **Check if the issue has been fixed** &mdash; try to reproduce it using the
latest `master` or development branch in the repository.
3. **Isolate the problem** &mdash; ideally create a [reduced test
case](https://css-tricks.com/reduced-test-cases/) and a live example.
A good bug report shouldn't leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report. What is
your environment? What steps will reproduce the issue? What browser(s) and OS
experience the problem? What would you expect to be the outcome? All these
details will help people to fix any potential bugs.
Example:
> Short and descriptive example bug report title
>
> A summary of the issue and the browser/OS environment in which it occurs. If
> suitable, include the steps required to reproduce the bug.
>
> 1. This is the first step
> 2. This is the second step
> 3. Further steps, etc.
>
> `<url>` - a link to the reduced test case
>
> Any other information you want to share that is relevant to the issue being
> reported. This might include the lines of code that you have identified as
> causing the bug, and potential solutions (and your opinions on their
> merits).
## Feature requests
Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to *you* to make a strong
case to convince the project's developers of the merits of this feature. Please
provide as much detail and context as possible.

19
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,19 @@
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
Pull requests should be thought of as a conversation. There will be some back and forth when trying to get code merged into this or any other project. With all but the simplest changes you can and should expect that the maintainers of the project will request changes to your code. Please be aware of that and check in after you open your PR in order to get your code merged in cleanly.
Thanks!

10
.github/SUPPORT.md vendored Normal file
View File

@@ -0,0 +1,10 @@
# Support
For personal support requests with HTML5 Boilerplate please use Stack Overflow
([`html5boilerplate`](https://stackoverflow.com/questions/tagged/html5boilerplate) tag).
Please check the respective repository/website for support regarding the code in
[`.htaccess`](https://github.com/h5bp/server-configs-apache),
[`jQuery`](https://jquery.org/support/),
[`Modernizr`](https://modernizr.com/) or
[`Normalize.css`](https://github.com/necolas/normalize.css).

46
.gitignore vendored
View File

@@ -1,43 +1,3 @@
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache
# OS or Editor folders
.DS_Store
Thumbs.db
.cache
.project
.settings
.tmproj
*.esproj
nbproject
*.sublime-project
*.sublime-workspace
# Dreamweaver added files
_notes
dwsync.xml
# Komodo
*.komodoproject
.komodotools
# Folders to ignore
.hg
.svn
.CVS
intermediate
publish
.idea
# build script local files
build/buildinfo.properties
build/config/buildinfo.properties
archive
node_modules
package-lock.json

536
.htaccess
View File

@@ -1,536 +0,0 @@
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache config if possible
# httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
###
### If you run a webserver other than Apache, consider:
### github.com/h5bp/server-configs
###
# ----------------------------------------------------------------------
# Better website experience for IE users
# ----------------------------------------------------------------------
# Force the latest IE version, in various cases when it may fall back to IE7 mode
# github.com/rails/rails/commit/123eb25#commitcomment-118920
# Use ChromeFrame if it's installed for a better experience for the poor IE folk
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=Edge,chrome=1"
# mod_headers can't match by content-type, but we don't want to send this header on *everything*...
<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)$" >
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
# ----------------------------------------------------------------------
# Cross-domain AJAX requests
# ----------------------------------------------------------------------
# Serve cross-domain Ajax requests, disabled by default.
# enable-cors.org
# code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
# <IfModule mod_headers.c>
# Header set Access-Control-Allow-Origin "*"
# </IfModule>
# ----------------------------------------------------------------------
# CORS-enabled images (@crossorigin)
# ----------------------------------------------------------------------
# Send CORS headers if browsers request them; enabled by default for images.
# developer.mozilla.org/en/CORS_Enabled_Image
# blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
# hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
# wiki.mozilla.org/Security/Reviews/crossoriginAttribute
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
# mod_headers, y u no match by Content-Type?!
<FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
SetEnvIf Origin ":" IS_CORS
Header set Access-Control-Allow-Origin "*" env=IS_CORS
</FilesMatch>
</IfModule>
</IfModule>
# ----------------------------------------------------------------------
# Webfont access
# ----------------------------------------------------------------------
# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "subdomain.example.com".
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
# ----------------------------------------------------------------------
# Proper MIME type for all files
# ----------------------------------------------------------------------
# JavaScript
# Normalize to standard type (it's sniffed in IE anyways)
# tools.ietf.org/html/rfc4329#section-7.2
AddType application/javascript js
# Audio
AddType audio/ogg oga ogg
AddType audio/mp4 m4a
# Video
AddType video/ogg ogv
AddType video/mp4 mp4 m4v
AddType video/webm webm
# SVG
# Required for svg webfonts on iPad
# twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# Webfonts
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttf ttc
AddType font/opentype otf
AddType application/x-font-woff woff
# Assorted types
AddType image/x-icon ico
AddType image/webp webp
AddType text/cache-manifest appcache manifest
AddType text/x-component htc
AddType application/x-chrome-extension crx
AddType application/x-opera-extension oex
AddType application/x-xpinstall xpi
AddType application/octet-stream safariextz
AddType application/x-web-app-manifest+json webapp
AddType text/x-vcard vcf
# ----------------------------------------------------------------------
# Allow concatenation from within specific js and css files
# ----------------------------------------------------------------------
# e.g. Inside of script.combined.js you could have
# <!--#include file="libs/jquery-1.5.0.min.js" -->
# <!--#include file="plugins/jquery.idletimer.js" -->
# and they would be included into this single file.
# This is not in use in the boilerplate as it stands. You may
# choose to name your files in this way for this advantage or
# concatenate and minify them manually.
# Disabled by default.
#<FilesMatch "\.combined\.js$">
# Options +Includes
# AddOutputFilterByType INCLUDES application/javascript application/json
# SetOutputFilter INCLUDES
#</FilesMatch>
#<FilesMatch "\.combined\.css$">
# Options +Includes
# AddOutputFilterByType INCLUDES text/css
# SetOutputFilter INCLUDES
#</FilesMatch>
# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $image/x-icon
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
</IfModule>
<IfModule !mod_filter.c>
# Legacy versions of Apache
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
</IfModule>
</IfModule>
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------
# These are pretty far-future expires headers.
# They assume you control versioning with cachebusting query params like
# <script src="application.js?20100608">
# Additionally, consider that outdated proxies may miscache
# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
# If you don't use filenames to version, lower the CSS and JS to something like
# "access plus 1 week" or so.
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Feed
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# Media: images, video, audio
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# Webfonts
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
</IfModule>
# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------
# FileETag None is not enough for every server.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
# Since we're sending far-future expires, we don't need ETags for
# static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None
# ----------------------------------------------------------------------
# Stop screen flicker in IE on CSS rollovers
# ----------------------------------------------------------------------
# The following directives stop screen flicker in IE on CSS rollovers - in
# combination with the "ExpiresByType" rules for images (see above). If
# needed, un-comment the following rules.
# BrowserMatch "MSIE" brokenvary=1
# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
# BrowserMatch "Opera" !brokenvary
# SetEnvIf brokenvary 1 force-no-vary
# ----------------------------------------------------------------------
# Cookie setting from iframes
# ----------------------------------------------------------------------
# Allow cookies to be set from iframes (for IE only)
# If needed, uncomment and specify a path or regex in the Location directive
# <IfModule mod_headers.c>
# <Location />
# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
# </Location>
# </IfModule>
# ----------------------------------------------------------------------
# Start rewrite engine
# ----------------------------------------------------------------------
# Turning on the rewrite engine is necessary for the following rules and features.
# FollowSymLinks must be enabled for this to work.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
</IfModule>
# ----------------------------------------------------------------------
# Suppress or force the "www." at the beginning of URLs
# ----------------------------------------------------------------------
# The same content should never be available under two different URLs - especially not with and
# without "www." at the beginning, since this can cause SEO problems (duplicate content).
# That's why you should choose one of the alternatives and redirect the other one.
# By default option 1 (no "www.") is activated. Remember: Shorter URLs are sexier.
# no-www.org/faq.php?q=class_b
# If you rather want to use option 2, just comment out all option 1 lines
# and uncomment option 2.
# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
# ----------------------------------------------------------------------
# Option 1:
# Rewrite "www.example.com -> example.com"
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>
# ----------------------------------------------------------------------
# Option 2:
# To rewrite "example.com -> www.example.com" uncomment the following lines.
# Be aware that the following rule might not be a good idea if you
# use "real" subdomains for certain parts of your website.
# <IfModule mod_rewrite.c>
# RewriteCond %{HTTPS} !=on
# RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# </IfModule>
# ----------------------------------------------------------------------
# Built-in filename-based cache busting
# ----------------------------------------------------------------------
# If you're not using the build script to manage your filename version revving,
# you might want to consider enabling this, which will route requests for
# /css/style.20110203.css to /css/style.css
# To understand why this is important and a better idea than all.css?v1231,
# read: github.com/h5bp/html5-boilerplate/wiki/Version-Control-with-Cachebusting
# Uncomment to enable.
# <IfModule mod_rewrite.c>
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
# </IfModule>
# ----------------------------------------------------------------------
# Prevent SSL cert warnings
# ----------------------------------------------------------------------
# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
# https://www.example.com when your cert only allows https://secure.example.com
# Uncomment the following lines to use this feature.
# <IfModule mod_rewrite.c>
# RewriteCond %{SERVER_PORT} !^443
# RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L]
# </IfModule>
# ----------------------------------------------------------------------
# Prevent 404 errors for non-existing redirected folders
# ----------------------------------------------------------------------
# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the same name does not exist
# e.g. /blog/hello : webmasterworld.com/apache/3808792.htm
Options -MultiViews
# ----------------------------------------------------------------------
# Custom 404 page
# ----------------------------------------------------------------------
# You can add custom pages to handle 500 or 403 pretty easily, if you like.
ErrorDocument 404 /404.html
# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------
# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8
# Force UTF-8 for a number of file formats
AddCharset utf-8 .css .js .xml .json .rss .atom
# ----------------------------------------------------------------------
# A little more security
# ----------------------------------------------------------------------
# Do we want to advertise the exact version number of Apache we're running?
# Probably not.
## This can only be enabled if used in httpd.conf - It will not work in .htaccess
# ServerTokens Prod
# "-Indexes" will have Apache block users from browsing folders without a default document
# Usually you should leave this activated, because you shouldn't allow everybody to surf through
# every folder on your server (which includes rather private places like CMS system folders).
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
<IfModule mod_rewrite.c>
RewriteCond %{SCRIPT_FILENAME} -d
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]
</IfModule>
# Block access to backup and source files
# This files may be left by some text/html editors and
# pose a great security danger, when someone can access them
<FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
# If your server is not already configured as such, the following directive
# should be uncommented in order to set PHP's register_globals option to OFF.
# This closes a major security hole that is abused by most XSS (cross-site
# scripting) attacks. For more information: http://php.net/register_globals
#
# IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS :
#
# Your server does not allow PHP directives to be set via .htaccess. In that
# case you must make this change in your php.ini file instead. If you are
# using a commercial web host, contact the administrators for assistance in
# doing this. Not all servers allow local php.ini files, and they should
# include all PHP configurations (not just this one), or you will effectively
# reset everything to PHP defaults. Consult www.php.net for more detailed
# information about setting PHP directives.
# php_flag register_globals Off
# Rename session cookie to something else, than PHPSESSID
# php_value session.name sid
# Do not show you are using PHP
# Note: Move this line to php.ini since it won't work in .htaccess
# php_flag expose_php Off
# Level of log detail - log all errors
# php_value error_reporting -1
# Write errors to log file
# php_flag log_errors On
# Do not display errors in browser (production - Off, development - On)
# php_flag display_errors Off
# Do not display startup errors (production - Off, development - On)
# php_flag display_startup_errors Off
# Format errors in plain text
# Note: Leave this setting 'On' for xdebug's var_dump() output
# php_flag html_errors Off
# Show multiple occurrence of error
# php_flag ignore_repeated_errors Off
# Show same errors from different sources
# php_flag ignore_repeated_source Off
# Size limit for error messages
# php_value log_errors_max_len 1024
# Don't precede error with string (doesn't accept empty string, use whitespace if you need)
# php_value error_prepend_string " "
# Don't prepend to error (doesn't accept empty string, use whitespace if you need)
# php_value error_append_string " "
# Increase cookie security
<IfModule php5_module>
php_value session.cookie_httponly true
</IfModule>

68
.jscsrc Normal file
View File

@@ -0,0 +1,68 @@
{
"disallowEmptyBlocks": true,
"disallowKeywords": [
"with"
],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true,
"disallowSpaceAfterPrefixUnaryOperators": [
"!",
"+",
"++",
"-",
"--",
"~"
],
"disallowSpaceBeforeBinaryOperators": [
","
],
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": true,
"requireDotNotation": true,
"requireLineFeedAtFileEnd": true,
"requireParenthesesAroundIIFE": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterKeywords": [
"catch",
"do",
"else",
"for",
"if",
"return",
"switch",
"try",
"while"
],
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInConditionalExpression": true,
"requireSpacesInFunctionDeclaration": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInNamedFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInsideObjectBrackets": "allButNested",
"validateIndentation": 4,
"validateLineBreaks": "LF",
"validateParameterSeparator": ", ",
"validateQuoteMarks": "'"
}

16
.travis.yml Normal file
View File

@@ -0,0 +1,16 @@
# For more information about the configurations used
# in this file, please see the Travis CI documentation:
# https://docs.travis-ci.com
git:
depth: 10
language: node_js
node_js:
- 6
- 8
- 9
dist: trusty
sudo: false

Binary file not shown.

View File

@@ -1,44 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Not Found :(</title>
<style>
::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
::selection { background: #fe57a1; color: #fff; text-shadow: none; }
html { padding: 30px 10px; font-size: 20px; line-height: 1.4; color: #737373; background: #f0f0f0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
html, input { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
body { max-width: 500px; _width: 500px; padding: 30px 20px 50px; border: 1px solid #b3b3b3; border-radius: 4px; margin: 0 auto; box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff; background: #fcfcfc; }
h1 { margin: 0 10px; font-size: 50px; text-align: center; }
h1 span { color: #bbb; }
h3 { margin: 1.5em 0 0.5em; }
p { margin: 1em 0; }
ul { padding: 0 0 0 40px; margin: 1em 0; }
.container { max-width: 380px; _width: 380px; margin: 0 auto; }
/* google search */
#goog-fixurl ul { list-style: none; padding: 0; margin: 0; }
#goog-fixurl form { margin: 0; }
#goog-wm-qt, #goog-wm-sb { border: 1px solid #bbb; font-size: 16px; line-height: normal; vertical-align: top; color: #444; border-radius: 2px; }
#goog-wm-qt { width: 220px; height: 20px; padding: 5px; margin: 5px 10px 0 0; box-shadow: inset 0 1px 1px #ccc; }
#goog-wm-sb { display: inline-block; height: 32px; padding: 0 10px; margin: 5px 0 0; white-space: nowrap; cursor: pointer; background-color: #f5f5f5; background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1); background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1); background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1); background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1); -webkit-appearance: none; -moz-appearance: none; appearance: none; *overflow: visible; *display: inline; *zoom: 1; }
#goog-wm-sb:hover, #goog-wm-sb:focus { border-color: #aaa; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); background-color: #f8f8f8; }
#goog-wm-qt:focus, #goog-wm-sb:focus { border-color: #105cb6; outline: 0; color: #222; }
input::-moz-focus-inner { padding: 0; border: 0; }
</style>
</head>
<body>
<div class="container">
<h1>Not found <span>:(</span></h1>
<p>Sorry, but the page you were trying to view does not exist.</p>
<p>It looks like this was the result of either:</p>
<ul>
<li>a mistyped address</li>
<li>an out-of-date link</li>
</ul>
<script>
var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
</script>
<script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
</div>
</body>
</html>

344
CHANGELOG.md Normal file
View File

@@ -0,0 +1,344 @@
### 7.1.0 (March 18, 2019)
* Update Modernizr to 3.7.1 ([#2121](https://github.com/h5bp/html5-boilerplate/pull/2121))
* Update Analytics docs and snippet ([#2118](https://github.com/h5bp/html5-boilerplate/pull/2118))
* Minor docs updates ([#2115](https://github.com/h5bp/html5-boilerplate/pull/2115))
* Minor devdeps updates ([#2114](https://github.com/h5bp/html5-boilerplate/pull/2114))
* More succinct way of writing the IE conditional statement ([#2113](https://github.com/h5bp/html5-boilerplate/pull/2113))
### 7.0.1 (February 11, 2019)
* Bumps main.css to current version ([#2112](https://github.com/h5bp/html5-boilerplate/pull/2112))
### 7.0.0 (February 8, 2019)
* Drop support for IE9/IE10 (usage of these versions is tiny and Microsoft officially ended support back in 2016. ([#2074](https://github.com/h5bp/html5-boilerplate/pull/2074))
* Move the CSS to a separate repo ([#2066](https://github.com/h5bp/html5-boilerplate/pull/2066))
* Add theme-color meta tag to index.html ([#2074](https://github.com/h5bp/html5-boilerplate/pull/2074))
* Add 'install with yarn' steps to README ([#2063](https://github.com/h5bp/html5-boilerplate/pull/2063))
* Improved Webmanifest ([#2060](https://github.com/h5bp/html5-boilerplate/pull/2060))
* Upgrade Normalize to 8.0.1 ([#2104](https://github.com/h5bp/html5-boilerplate/pull/2104))
* Update .htaccess ([#2110](https://github.com/h5bp/html5-boilerplate/pull/2110))
* Remove instances of `shrink-to-fit=no` ([#2103](https://github.com/h5bp/html5-boilerplate/pull/2103))
* Removes "display": "standalone" from manifest ([#2096](https://github.com/h5bp/html5-boilerplate/pull/2096))
* Big Docs update - Fixed links, removed IE9/IE10 specific info, made touch icons section more concise, add details on security.txt and more tidying up ([#2074](https://github.com/h5bp/html5-boilerplate/pull/2031), [#2065](https://github.com/h5bp/html5-boilerplate/pull/2065), [#2062](https://github.com/h5bp/html5-boilerplate/pull/2062))
### 6.1.0 (May 1, 2018)
* [Update Apache Server Configs to `v3.0.0`.](https://github.com/h5bp/html5-boilerplate/pull/2042)
* Migrate to eslint ([#2037](https://github.com/h5bp/html5-boilerplate/pull/2037))
* Update to jQuery 3.3.1 ([#2018](https://github.com/h5bp/html5-boilerplate/pull/2018))
* Update to Modernizr v3.6 and Normalize v8 ([#2028](https://github.com/h5bp/html5-boilerplate/pull/2028))
* Update Dev Dependencies ([#2032](https://github.com/h5bp/html5-boilerplate/pull/2032)) ([#2017](https://github.com/h5bp/html5-boilerplate/pull/2017)) ([#2010](https://github.com/h5bp/html5-boilerplate/pull/2010)) ([#2009](https://github.com/h5bp/html5-boilerplate/pull/2009))
* Replace 'node-sri' with 'ssri' ([#2031](https://github.com/h5bp/html5-boilerplate/pull/2031))
* Add .babelrc and .prettierrc to .gitattributes ([#2030](https://github.com/h5bp/html5-boilerplate/pull/2030))
* Update .htaccess ([#2003](https://github.com/h5bp/html5-boilerplate/pull/2003))
* Fixed JSHint errors ([#1994](https://github.com/h5bp/html5-boilerplate/pull/1994))
* Add CODE_OF_CONDUCT.md ([#2011](https://github.com/h5bp/html5-boilerplate/pull/2011))
* Update Documentation ([#2029](https://github.com/h5bp/html5-boilerplate/pull/2029)) ([#2015](https://github.com/h5bp/html5-boilerplate/pull/2015)) ([#2007](https://github.com/h5bp/html5-boilerplate/pull/2007)) ([#2006](https://github.com/h5bp/html5-boilerplate/pull/2006)) ([#1996](https://github.com/h5bp/html5-boilerplate/pull/1996))
### 6.0.1 (August 20, 2017)
* Reverts .visuallyhidden (see [#1985](https://github.com/h5bp/html5-boilerplate/issues/1985))
### 6.0.0 (August 17, 2017)
* Fix Bug: .visuallyhidden on macOS VO fixes #1985 ([#1989](https://github.com/h5bp/html5-boilerplate/pull/1989))
* Adds web app manifest file ([#1963](https://github.com/h5bp/html5-boilerplate/pull/1963))
* Update to jQuery 3.2.1 ([#1942](https://github.com/h5bp/html5-boilerplate/pull/1942))
* Improve ::selection documentation which became confusing after c7057be ([#1955](https://github.com/h5bp/html5-boilerplate/pull/1955))
* refactor(html): update browsehappy to https instead of http ([#1952](https://github.com/h5bp/html5-boilerplate/pull/1952))
* Fix links to CONTRIBUTING.md ([#1951](https://github.com/h5bp/html5-boilerplate/pull/1951))
* Adds .github folder and contents Fixes ([#1948](https://github.com/h5bp/html5-boilerplate/pull/1948))
* Modernizr 3, modernizr.config and ([#1940](https://github.com/h5bp/html5-boilerplate/pull/1940))
* Housekeeping by @coliff (#1968 #1969 #1965 #1964 #1958 #1957 #1956)
* Update .gitattributes for Web Projects ([#1935](https://github.com/h5bp/html5-boilerplate/pull/1935))
* Add the link for useful .gitignore templates ([#1936](https://github.com/h5bp/html5-boilerplate/pull/1936))
* Node plumbing updated ([#1925](https://github.com/h5bp/html5-boilerplate/pull/1925)) ([#1928](https://github.com/h5bp/html5-boilerplate/pull/1928)) ([#1931](https://github.com/h5bp/html5-boilerplate/pull/1931))
* Use es2015 syntax in mocha tests ([#1788](https://github.com/h5bp/html5-boilerplate/pull/1788))
* Scope :first-letter selector for print styles ([#1904](https://github.com/h5bp/html5-boilerplate/pull/1904))
* Add SRI Hash for jQuery ([#1904](https://github.com/h5bp/html5-boilerplate/pull/1904))
* Update .jshintrc ([#1903](https://github.com/h5bp/html5-boilerplate/pull/1903))
* Improve accessibility with visuallyhidden content ([#1900](https://github.com/h5bp/html5-boilerplate/pull/1900))
* Tell users that IE 8 and 9 are outdated
([#1747](https://github.com/h5bp/html5-boilerplate/issues/1747)).
* Removed IE8 Support (upgrades jQuery and normalize.css to latest)
([#1524](https://github.com/h5bp/html5-boilerplate/issues/1524)).
* Fix print styles for Internet Explorer 11
([#1799](https://github.com/h5bp/html5-boilerplate/issues/1799)).
* Update doc links to https
([#1889](https://github.com/h5bp/html5-boilerplate/issues/1889)).
* Delete crossdomain.xml
([#1881](https://github.com/h5bp/html5-boilerplate/issues/1881)).
* Adds pre-wrap to PRE
([#1742](https://github.com/h5bp/html5-boilerplate/issues/1742)).
* Change license format to SPDX format
([#1814](https://github.com/h5bp/html5-boilerplate/pull/1814)).
* Simplify the Google Analytics snippet using `async` & `defer` ([#1660](https://github.com/h5bp/html5-boilerplate/pull/1660#issuecomment-89285678)).
### 5.3.0 (January 12, 2016)
* Update jQuery to `v1.12.0`.
* Fetch `jQuery` from jQuery's CDN instead of Google's
([#1737](https://github.com/h5bp/html5-boilerplate/issues/1737),
[#1739](https://github.com/h5bp/html5-boilerplate/issues/1739)).
* Change print color for `:first-letter` and `:first-line`
pseudo-elements
([#1715](https://github.com/h5bp/html5-boilerplate/pull/1715)).
### 5.2.0 (May 1, 2015)
* Update jQuery to `v1.11.3`
([#1699](https://github.com/h5bp/html5-boilerplate/issues/1699)).
* Deprecate protocol-relative URLs
([#1694](https://github.com/h5bp/html5-boilerplate/issues/1694)).
* Update high resolution media query
([#1474](https://github.com/h5bp/html5-boilerplate/issues/1474)).
* Update Apache Server Configs to `v2.14.0`.
### 5.1.0 (April 1, 2015)
* Update Normalize.css to `v3.0.3`.
* Use `https://` in the Google Universal Analytics snippet
([eee759b](https://github.com/h5bp/html5-boilerplate/commit/eee759bfe175e850bbc8e4ad0682ec4fe4bd05d6)).
* Remove the `visibility: hidden` declaration from `.hidden`
([#1663](https://github.com/h5bp/html5-boilerplate/issues/1663)).
* Use `<meta http-equiv="x-ua-compatible" content="ie=edge">`<br>
instead of `<meta http-equiv="X-UA-Compatible" content="IE=edge">`
([#1656](https://github.com/h5bp/html5-boilerplate/issues/1656)).
* Update Apache Server Configs to `v2.13.0`.
### 5.0.0 (February 1, 2015)
* Update to jQuery 1.11.2.
* Update Apache Server Configs to v2.11.0.
* Rename Apple touch icon to `apple-touch-icon.png` and add
`<link>` in `index.html`
([#1622](https://github.com/h5bp/html5-boilerplate/issues/1622)).
* Add vertical centering for `iframe`
([#1613](https://github.com/h5bp/html5-boilerplate/issues/1613)).
* Change the outdated browser prompt classname to `browserupgrade`
([#1608](https://github.com/h5bp/html5-boilerplate/issues/1608)).
* Update to Normalize.css 3.0.2.
([#1050](https://github.com/h5bp/html5-boilerplate/issues/1050)).
* Update `apple-touch-icon-precomposed.png` and the _"Apple touch
icons"_ related documentation
([#1599](https://github.com/h5bp/html5-boilerplate/pull/1599)).
* Add pseudo-elements to universal selector in print media query
([#1585](https://github.com/h5bp/html5-boilerplate/pull/1585)).
* Update to Modernizr 2.8.3.
* Remove need to readjust margins in `404.html`
([#1567](https://github.com/h5bp/html5-boilerplate/pull/1567)).
* Add `/.editorconfig` file
([#1561](https://github.com/h5bp/html5-boilerplate/issues/1561),
[#1564](https://github.com/h5bp/html5-boilerplate/issues/1564)).
* Add `auto` to the Google Universal Analytics tracker create method
([#1562](https://github.com/h5bp/html5-boilerplate/issues/1562)).
* Add `timeline` and `timelineEnd` to the list of `console` methods
([#1559](https://github.com/h5bp/html5-boilerplate/issues/1559)).
* Add `lang=""` to `<html>`
([#1542](https://github.com/h5bp/html5-boilerplate/issues/1542)).
* Use `<!doctype html>` instead of `<!DOCTYPE html>`
([#1522](https://github.com/h5bp/html5-boilerplate/issues/1522)).
* Add `/browserconfig.xml` file and tile images
([#1481](https://github.com/h5bp/html5-boilerplate/issues/1481)).
* Add `Disallow:` to `robots.txt`
([#1487](https://github.com/h5bp/html5-boilerplate/issues/1487)).
* Remove default foreground color from form elements
([#1390](https://github.com/h5bp/html5-boilerplate/issues/1390)).
* Remove default margin from print styles
([#1477](https://github.com/h5bp/html5-boilerplate/issues/1477)).
* Remove image replacement helper class `.ir`
([#1472](https://github.com/h5bp/html5-boilerplate/issues/1472),
[#1475](https://github.com/h5bp/html5-boilerplate/issues/1475)).
* Add vertical centering for `svg`
([#1453](https://github.com/h5bp/html5-boilerplate/issues/1453)).
* Redesign 404 page
([#1443](https://github.com/h5bp/html5-boilerplate/pull/1443)).
* Remove IE 6/7 hacks from `main.css`
([#1050](https://github.com/h5bp/html5-boilerplate/issues/1050)).
* Remove IE conditional classes
([#1187](https://github.com/h5bp/html5-boilerplate/issues/1187),
[#1290](https://github.com/h5bp/html5-boilerplate/issues/1290)).
### 4.3.0 (September 10, 2013)
* Use one `apple-touch-icon` instead of six
([#1367](https://github.com/h5bp/html5-boilerplate/issues/1367)).
* Move font-related declarations from `body` to `html`
([#1411](https://github.com/h5bp/html5-boilerplate/issues/1411)).
* Update to Apache Server Configs 1.1.0.
* Add `initial-scale=1` to the viewport `meta`
([#1398](https://github.com/h5bp/html5-boilerplate/pull/1398)).
* Vertical centering for audio-, canvas- and video-tags
([#1326](https://github.com/h5bp/html5-boilerplate/issues/1326)).
* Remove Google Chrome Frame related code
([#1379](https://github.com/h5bp/html5-boilerplate/pull/1379),
[#1396](https://github.com/h5bp/html5-boilerplate/pull/1396)).
* Update to Google Universal Analytics
([#1347](https://github.com/h5bp/html5-boilerplate/issues/1347)).
* Update to jQuery 1.10.2.
* Update to Normalize.css 1.1.3.
### 4.2.0 (April 8, 2013)
* Remove Google Analytics protocol check
([#1319](https://github.com/h5bp/html5-boilerplate/pull/1319)).
* Update to Normalize.css 1.1.1.
* Update Apache configurations to include the latest changes in the
canonical [`.htaccess`](https://github.com/h5bp/server-configs-apache)
file.
* Use a protocol relative URL for the 404 template script.
* Update to jQuery 1.9.1.
### 4.1.0 (January 21, 2013)
* Update to Normalize.css 1.1.0.
* Update to jQuery 1.9.0.
### 4.0.3 (January 12, 2013)
* Use 32x32 favicon.ico
([#1286](https://github.com/h5bp/html5-boilerplate/pull/1286)).
* Remove named function expression in plugins.js
([#1280](https://github.com/h5bp/html5-boilerplate/pull/1280)).
* Adjust CSS image-replacement code
([#1239](https://github.com/h5bp/html5-boilerplate/issues/1239)).
* Update HiDPI example media query
([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)).
### 4.0.2 (December 9, 2012)
* Update placeholder icons.
* Update to Normalize.css 1.0.2.
* Update to jQuery 1.8.3.
### 4.0.1 (October 20, 2012)
* Further improvements to `console` method stubbing
([#1206](https://github.com/h5bp/html5-boilerplate/issues/1206),
[#1229](https://github.com/h5bp/html5-boilerplate/pull/1229)).
* Update to jQuery 1.8.2.
* Update to Modernizr 2.6.2.
* Minor additions to the documentation.
### 4.0.0 (August 28, 2012)
* Improve the Apache compression configuration
([#1012](https://github.com/h5bp/html5-boilerplate/issues/1012),
[#1173](https://github.com/h5bp/html5-boilerplate/issues/1173)).
* Add a HiDPI example media query
([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)).
* Add bundled docs
([#1154](https://github.com/h5bp/html5-boilerplate/issues/1154)).
* Add MIT license
([#1139](https://github.com/h5bp/html5-boilerplate/issues/1139)).
* Update to Normalize.css 1.0.1.
* Separate Normalize.css from the rest of the CSS
([#1160](https://github.com/h5bp/html5-boilerplate/issues/1160)).
* Improve `console.log` protection
([#1107](https://github.com/h5bp/html5-boilerplate/issues/1107)).
* Replace hot pink text selection color with a neutral color.
* Change image replacement technique
([#1149](https://github.com/h5bp/html5-boilerplate/issues/1149)).
* Code format and consistency changes
([#1112](https://github.com/h5bp/html5-boilerplate/issues/1112)).
* Rename CSS file and rename JS files and subdirectories.
* Update to jQuery 1.8
([#1161](https://github.com/h5bp/html5-boilerplate/issues/1161)).
* Update to Modernizr 2.6.1
([#1086](https://github.com/h5bp/html5-boilerplate/issues/1086)).
* Remove uncompressed jQuery
([#1153](https://github.com/h5bp/html5-boilerplate/issues/1153)).
* Remove superfluous inline comments
([#1150](https://github.com/h5bp/html5-boilerplate/issues/1150)).
### 3.0.2 (February 19, 2012)
* Update to Modernizr 2.5.3.
### 3.0.1 (February 08, 2012)
* Update to Modernizr 2.5.2 (includes html5shiv 3.3).
### 3.0.0 (February 06, 2012)
* Improvements to `.htaccess`.
* Improve 404 design.
* Simplify JS folder structure.
* Change `html` IE class names changed to target ranges rather than
specific versions of IE.
* Update CSS to include latest normalize.css changes and better
typographic defaults
([#825](https://github.com/h5bp/html5-boilerplate/issues/825)).
* Update to Modernizr 2.5 (includes yepnope 1.5 and html5shiv 3.2).
* Update to jQuery 1.7.1.
* Revert to async snippet for the Google Analytics script.
* Remove the ant build script
([#826](https://github.com/h5bp/html5-boilerplate/issues/826)).
* Remove Respond.js
([#816](https://github.com/h5bp/html5-boilerplate/issues/816)).
* Remove the `demo/` directory
([#808](https://github.com/h5bp/html5-boilerplate/issues/808)).
* Remove the `test/` directory
([#808](https://github.com/h5bp/html5-boilerplate/issues/808)).
* Remove Google Chrome Frame script for IE6 users; replace with links
to Chrome Frame and options for alternative browsers.
* Remove `initial-scale=1` from the viewport `meta`
([#824](https://github.com/h5bp/html5-boilerplate/issues/824)).
* Remove `defer` from all scripts to avoid legacy IE bugs.
* Remove explicit Site Speed tracking for Google Analytics. It's now
enabled by default.
### 2.0.0 (August 10, 2011)
* Change starting CSS to be based on normalize.css instead of reset.css
([#500](https://github.com/h5bp/html5-boilerplate/issues/500)).
* Add Respond.js media query polyfill.
* Add Google Chrome Frame script prompt for IE6 users.
* Simplify the `html` conditional comments for modern browsers and add
an `oldie` class.
* Update clearfix to use "micro clearfix".
* Add placeholder CSS MQs for mobile-first approach.
* Add `textarea { resize: vertical; }` to only allow vertical resizing.
* Add `img { max-width: 100%; }` to the print styles; prevents images
being truncated.
* Add Site Speed tracking for Google Analytics.
* Update to jQuery 1.6.2 (and use minified by default).
* Update to Modernizr 2.0 Complete, Production minified (includes
yepnope, html5shiv, and Respond.js).
* Use `Modernizr.load()` to load the Google Analytics script.
* Much faster build process.
* Add build script options for CSSLint, JSLint, JSHint tools.
* Build script now compresses all images in subfolders.
* Build script now versions files by SHA hash.
* Many `.htaccess` improvements including: disable directory browsing,
improved support for all versions of Apache, more robust and extensive
HTTP compression rules.
* Remove `handheld.css` as it has very poor device support.
* Remove touch-icon `link` elements from the HTML and include improved
touch-icon support.
* Remove the cache-busting query parameters from files references in
the HTML.
* Remove IE6 PNGFix.
### 1.0.0 (March 21, 2011)
* Rewrite build script to make it more customizable and flexible.
* Add a humans.txt.
* Numerous `.htaccess` improvements (including inline documentation).
* Move the alternative server configurations to the H5BP server configs
repo.
* Use a protocol-relative url to reference jQuery and prevent mixed
content warnings.
* Optimize the Google Analytics snippet.
* Use Eric Meyer's recent CSS reset update and the HTML5 Doctor reset.
* More robust `sub`/`sup` CSS styles.
* Add keyboard `.focusable` helper class that extends `.visuallyhidden`.
* Print styles no longer print hash or JavaScript links.
* Add a print reset for IE's proprietary filters.
* Remove IE9-specific conditional class on the `html` element.
* Remove margins from lists within `nav` elements.
* Remove YUI profiling.

19
LICENSE.txt Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) HTML5 Boilerplate
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

92
README.md Normal file
View File

@@ -0,0 +1,92 @@
# [HTML5 Boilerplate](https://html5boilerplate.com/)
[![Build Status](https://travis-ci.org/h5bp/html5-boilerplate.svg)](https://travis-ci.org/h5bp/html5-boilerplate)
[![devDependency Status](https://david-dm.org/h5bp/html5-boilerplate/dev-status.svg)](https://david-dm.org/h5bp/html5-boilerplate#info=devDependencies)
HTML5 Boilerplate is a professional front-end template for building
fast, robust, and adaptable web apps or sites.
This project is the product of years of iterative development and
community knowledge. It does not impose a specific development
philosophy or framework, so you're free to architect your code in the
way that you want.
* Homepage: [https://html5boilerplate.com/](https://html5boilerplate.com/)
* Source: [https://github.com/h5bp/html5-boilerplate](https://github.com/h5bp/html5-boilerplate)
* Twitter: [@h5bp](https://twitter.com/h5bp)
## Quick start
Choose one of the following options:
- Download the latest stable release from
[html5boilerplate.com](https://html5boilerplate.com/).
- Clone the git repo — `git clone
https://github.com/h5bp/html5-boilerplate.git` - and checkout the
[tagged release](https://github.com/h5bp/html5-boilerplate/releases)
you'd like to use.
- Install with [npm](https://www.npmjs.com/): `npm install html5-boilerplate` and pull in what you need from the resulting `node_modules/html5-boilerplate/dist`
- Install with [yarn](https://yarnpkg.com/): `yarn add html5-boilerplate`
## Features
* HTML5 ready. Use the new elements with confidence.
* Designed with progressive enhancement in mind.
* Includes:
* [`Normalize.css`](https://necolas.github.com/normalize.css/)
for CSS normalizations and common bug fixes
* [`jQuery`](https://jquery.com/) via CDN with [SRI Hash](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) and a local fallback
* A custom build of [`Modernizr`](https://modernizr.com/) for feature
detection
* [`Apache Server Configs`](https://github.com/h5bp/server-configs-apache)
that, among other, improve the web site's performance and security
* Placeholder CSS Media Queries.
* Useful CSS helper classes.
* Default print styles, performance optimized.
* An optimized version of the Google Universal Analytics snippet.
* Protection against any stray `console` statements causing JavaScript
errors in older browsers.
* "Delete-key friendly." Easy to strip out parts you don't need.
* Extensive inline and accompanying documentation.
## Browser support
* Chrome *(latest 2)*
* Edge *(latest 2)*
* Firefox *(latest 2)*
* Internet Explorer 11
* Opera *(latest 2)*
* Safari *(latest 2)*
*This doesn't mean that HTML5 Boilerplate cannot be used in older browsers,
just that we'll ensure compatibility with the ones mentioned above.*
If you need legacy browser support you can use [HTML5 Boilerplate v6](https://github.com/h5bp/html5-boilerplate/releases/tag/6.1.0) (IE9/IE10)
or [HTML5 Boilerplate v5](https://github.com/h5bp/html5-boilerplate/releases/tag/5.3.0) (IE 8). They are no longer actively developed.
## Documentation
Take a look at the [documentation table of contents](dist/doc/TOC.md).
This documentation is bundled with the project which makes it
available for offline reading and provides a useful starting point for
any documentation you want to write about your project.
## Contributing
Hundreds of developers have helped to make the HTML5 Boilerplate. Anyone is welcome to [contribute](.github/CONTRIBUTING.md),
however, if you decide to get involved, please take a moment to review
the [guidelines](.github/CONTRIBUTING.md):
* [Bug reports](.github/CONTRIBUTING.md#bugs)
* [Feature requests](.github/CONTRIBUTING.md#features)
* [Pull requests](.github/CONTRIBUTING.md#pull-requests)
## License
The code is available under the [MIT license](LICENSE.txt).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 747 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

View File

@@ -1,25 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<!-- Read this: www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html -->
<!-- Most restrictive policy: -->
<site-control permitted-cross-domain-policies="none"/>
<!-- Least restrictive policy: -->
<!--
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
-->
<!--
If you host a crossdomain.xml file with allow-access-from domain="*"
and dont understand all of the points described here, you probably
have a nasty security vulnerability. ~ simon willison
-->
</cross-domain-policy>

View File

@@ -1,293 +0,0 @@
/*
* HTML5 Boilerplate
*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*
* Detailed information about this CSS: h5bp.com/css
*
* ==|== normalize ==========================================================
*/
/* =============================================================================
HTML5 display definitions
========================================================================== */
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; }
[hidden] { display: none; }
/* =============================================================================
Base
========================================================================== */
/*
* 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
* 2. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
*/
html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
html, button, input, select, textarea { font-family: sans-serif; color: #222; }
body { margin: 0; font-size: 1em; line-height: 1.4; }
/*
* Remove text-shadow in selection highlight: h5bp.com/i
* These selection declarations have to be separate
* Also: hot pink! (or customize the background color to match your design)
*/
::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
::selection { background: #fe57a1; color: #fff; text-shadow: none; }
/* =============================================================================
Links
========================================================================== */
a { color: #00e; }
a:visited { color: #551a8b; }
a:hover { color: #06e; }
a:focus { outline: thin dotted; }
/* Improve readability when focused and hovered in all browsers: h5bp.com/h */
a:hover, a:active { outline: 0; }
/* =============================================================================
Typography
========================================================================== */
abbr[title] { border-bottom: 1px dotted; }
b, strong { font-weight: bold; }
blockquote { margin: 1em 40px; }
dfn { font-style: italic; }
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
ins { background: #ff9; color: #000; text-decoration: none; }
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
/* Redeclare monospace font family: h5bp.com/j */
pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; }
/* Improve readability of pre-formatted text in all browsers */
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
q { quotes: none; }
q:before, q:after { content: ""; content: none; }
small { font-size: 85%; }
/* Position subscript and superscript content without affecting line-height: h5bp.com/k */
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }
/* =============================================================================
Lists
========================================================================== */
ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
dd { margin: 0 0 0 40px; }
nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }
/* =============================================================================
Embedded content
========================================================================== */
/*
* 1. Improve image quality when scaled in IE7: h5bp.com/d
* 2. Remove the gap between images and borders on image containers: h5bp.com/i/440
*/
img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
/*
* Correct overflow not hidden in IE9
*/
svg:not(:root) { overflow: hidden; }
/* =============================================================================
Figures
========================================================================== */
figure { margin: 0; }
/* =============================================================================
Forms
========================================================================== */
form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; }
/* Indicate that 'label' will shift focus to the associated form element */
label { cursor: pointer; }
/*
* 1. Correct color not inheriting in IE6/7/8/9
* 2. Correct alignment displayed oddly in IE6/7
*/
legend { border: 0; *margin-left: -7px; padding: 0; white-space: normal; }
/*
* 1. Correct font-size not inheriting in all browsers
* 2. Remove margins in FF3/4 S5 Chrome
* 3. Define consistent vertical alignment display in all browsers
*/
button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
/*
* 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
*/
button, input { line-height: normal; }
/*
* 1. Display hand cursor for clickable form elements
* 2. Allow styling of clickable form elements in iOS
* 3. Correct inner spacing displayed oddly in IE7 (doesn't effect IE6)
*/
button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; *overflow: visible; }
/*
* Re-set default cursor for disabled elements
*/
button[disabled], input[disabled] { cursor: default; }
/*
* Consistent box sizing and appearance
*/
input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; *width: 13px; *height: 13px; }
input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
/*
* Remove inner padding and border in FF3/4: h5bp.com/l
*/
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
/*
* 1. Remove default vertical scrollbar in IE6/7/8/9
* 2. Allow only vertical resizing
*/
textarea { overflow: auto; vertical-align: top; resize: vertical; }
/* Colors for form validity */
input:valid, textarea:valid { }
input:invalid, textarea:invalid { background-color: #f0dddd; }
/* =============================================================================
Tables
========================================================================== */
table { border-collapse: collapse; border-spacing: 0; }
td { vertical-align: top; }
/* =============================================================================
Chrome Frame Prompt
========================================================================== */
.chromeframe { margin: 0.2em 0; background: #ccc; color: black; padding: 0.2em 0; }
/* ==|== primary styles =====================================================
Author:
========================================================================== */
/* ==|== media queries ======================================================
EXAMPLE Media Query for Responsive Design.
This example overrides the primary ('mobile first') styles
Modify as content requires.
========================================================================== */
@media only screen and (min-width: 35em) {
/* Style adjustments for viewports that meet the condition */
}
/* ==|== non-semantic helper classes ========================================
Please define your styles before this section.
========================================================================== */
/* For image replacement */
.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
.ir br { display: none; }
/* Hide from both screenreaders and browsers: h5bp.com/u */
.hidden { display: none !important; visibility: hidden; }
/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
/* Hide visually and from screenreaders, but maintain layout */
.invisible { visibility: hidden; }
/* Contain floats: h5bp.com/q */
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }
/* ==|== print styles =======================================================
Print styles.
Inlined to avoid required HTTP connection: h5bp.com/r
========================================================================== */
@media print {
* { background: transparent !important; color: black !important; box-shadow:none !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
a, a:visited { text-decoration: underline; }
a[href]:after { content: " (" attr(href) ")"; }
abbr[title]:after { content: " (" attr(title) ")"; }
.ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
thead { display: table-header-group; } /* h5bp.com/t */
tr, img { page-break-inside: avoid; }
img { max-width: 100% !important; }
@page { margin: 0.5cm; }
p, h2, h3 { orphans: 3; widows: 3; }
h2, h3 { page-break-after: avoid; }
}

13
dist/.editorconfig vendored Normal file
View File

@@ -0,0 +1,13 @@
# editorconfig.org
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

194
dist/.gitattributes vendored Normal file
View File

@@ -0,0 +1,194 @@
## GITATTRIBUTES FOR WEB PROJECTS
#
# These settings are for any web project.
#
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).
# binary These files are binary and should be left untouched.
#
# Note that binary is a macro for -text -diff.
######################################################################
## AUTO-DETECT
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto
## SOURCE CODE
*.bat text eol=crlf
*.coffee text
*.css text
*.htm text
*.html text
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.od text
*.onlydata text
*.php text
*.pl text
*.py text
*.rb text
*.sass text
*.scm text
*.scss text
*.sh text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.xml text
*.xhtml text
## DOCKER
*.dockerignore text
Dockerfile text
## DOCUMENTATION
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text
## TEMPLATES
*.dot text
*.ejs text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.tmpl text
*.tpl text
*.twig text
## LINTERS
.babelrc text
.csslintrc text
.eslintrc text
.htmlhintrc text
.jscsrc text
.jshintrc text
.jshintignore text
.prettierrc text
.stylelintrc text
## CONFIGS
*.bowerrc text
*.cnf text
*.conf text
*.config text
.browserslistrc text
.editorconfig text
.gitattributes text
.gitconfig text
.gitignore text
.htaccess text
*.npmignore text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text
## HEROKU
Procfile text
.slugignore text
## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary
## AUDIO
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary
## VIDEO
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.ogv binary
*.swc binary
*.swf binary
*.webm binary
## ARCHIVES
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary
## FONTS
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary
## EXECUTABLES
*.exe binary
*.pyc binary

3
dist/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# Include your project-specific ignores in this file
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
# Useful .gitignore templates: https://github.com/github/gitignore

1224
dist/.htaccess vendored Normal file

File diff suppressed because it is too large Load Diff

60
dist/404.html vendored Normal file
View File

@@ -0,0 +1,60 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
line-height: 1.2;
margin: 0;
}
html {
color: #888;
display: table;
font-family: sans-serif;
height: 100%;
text-align: center;
width: 100%;
}
body {
display: table-cell;
vertical-align: middle;
margin: 2em auto;
}
h1 {
color: #555;
font-size: 2em;
font-weight: 400;
}
p {
margin: 0 auto;
width: 280px;
}
@media only screen and (max-width: 280px) {
body, p {
width: 95%;
}
h1 {
font-size: 1.5em;
margin: 0 0 0.3em;
}
}
</style>
</head>
<body>
<h1>Page Not Found</h1>
<p>Sorry, but the page you were trying to view does not exist.</p>
</body>
</html>
<!-- IE needs 512+ bytes: https://blogs.msdn.microsoft.com/ieinternals/2010/08/18/friendly-http-error-pages/ -->

19
dist/LICENSE.txt vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) HTML5 Boilerplate
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

12
dist/browserconfig.xml vendored Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Please read: https://msdn.microsoft.com/en-us/library/ie/dn455106.aspx -->
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="tile.png"/>
<square150x150logo src="tile.png"/>
<wide310x150logo src="tile-wide.png"/>
<square310x310logo src="tile.png"/>
</tile>
</msapplication>
</browserconfig>

295
dist/css/main.css vendored Normal file
View File

@@ -0,0 +1,295 @@
/*! HTML5 Boilerplate v7.1.0 | MIT License | https://html5boilerplate.com/ */
/* main.css 1.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/
/* ==========================================================================
Base styles: opinionated defaults
========================================================================== */
html {
color: #222;
font-size: 1em;
line-height: 1.4;
}
/*
* Remove text-shadow in selection highlight:
* https://twitter.com/miketaylr/status/12228805301
*
* Vendor-prefixed and regular ::selection selectors cannot be combined:
* https://stackoverflow.com/a/16982510/7133471
*
* Customize the background color to match your design.
*/
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
/*
* A better looking default horizontal rule
*/
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
/*
* Remove the gap between audio, canvas, iframes,
* images, videos and the bottom of their containers:
* https://github.com/h5bp/html5-boilerplate/issues/440
*/
audio,
canvas,
iframe,
img,
svg,
video {
vertical-align: middle;
}
/*
* Remove default fieldset styles.
*/
fieldset {
border: 0;
margin: 0;
padding: 0;
}
/*
* Allow only vertical resizing of textareas.
*/
textarea {
resize: vertical;
}
/* ==========================================================================
Browser Upgrade Prompt
========================================================================== */
.browserupgrade {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
/* ==========================================================================
Author's custom styles
========================================================================== */
/* ==========================================================================
Helper classes
========================================================================== */
/*
* Hide visually and from screen readers
*/
.hidden {
display: none !important;
}
/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
* causes content to wrap 1 word per line:
* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap; /* 1 */
}
/*
* Extends the .visuallyhidden class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
white-space: inherit;
}
/*
* Hide visually and from screen readers, but maintain layout
*/
.invisible {
visibility: hidden;
}
/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.clearfix:after {
clear: both;
}
/* ==========================================================================
EXAMPLE Media Queries for Responsive Design.
These examples override the primary ('mobile first') styles.
Modify as content requires.
========================================================================== */
@media only screen and (min-width: 35em) {
/* Style adjustments for viewports that meet the condition */
}
@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
/* Style adjustments for high resolution devices */
}
/* ==========================================================================
Print styles.
Inlined to avoid the additional HTTP request:
https://www.phpied.com/delay-loading-your-print-css/
========================================================================== */
@media print {
*,
*:before,
*:after {
background: transparent !important;
color: #000 !important; /* Black prints faster */
-webkit-box-shadow: none !important;
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
/*
* Don't show links that are fragment identifiers,
* or use the `javascript:` pseudo protocol
*/
a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}
pre {
white-space: pre-wrap !important;
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
/*
* Printing Tables:
* http://css-discuss.incutio.com/wiki/Printing_Tables
*/
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}

349
dist/css/normalize.css vendored Normal file
View File

@@ -0,0 +1,349 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

34
dist/doc/TOC.md vendored Normal file
View File

@@ -0,0 +1,34 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/)
## Getting started
* [Usage](usage.md) — Overview of the project contents.
* [FAQ](faq.md) — Frequently asked questions along with their answers.
## HTML5 Boilerplate core
* [HTML](html.md) — Guide to the default HTML.
* [CSS](css.md) — Guide to the default CSS.
* [JavaScript](js.md) — Guide to the default JavaScript.
* [Everything else](misc.md).
## Development
* [Extending and customizing HTML5 Boilerplate](extend.md) — Going further
with the boilerplate.
## Related projects
The [H5BP organization](https://github.com/h5bp) maintains several projects
that complement HTML5 Boilerplate, projects that can help you improve different
aspects of your website/web app (e.g.: the performance, security, etc.).
* [Server Configs](https://github.com/h5bp/server-configs) — Fast and
smart configurations for web servers such as Apache and Nginx.
* [Apache](https://github.com/h5bp/server-configs-apache)
* [Google App Engine (GAE)](https://github.com/h5bp/server-configs-gae)
* [Internet Information Services (IIS)](https://github.com/h5bp/server-configs-iis)
* [lighttpd](https://github.com/h5bp/server-configs-lighttpd)
* [Nginx](https://github.com/h5bp/server-configs-nginx)
* [Node.js](https://github.com/h5bp/server-configs-node)
* [Front-end Developer Interview Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions)

54
dist/doc/css.md vendored Normal file
View File

@@ -0,0 +1,54 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# The CSS
HTML5 Boilerplate's CSS includes:
* [Normalize.css](#normalizecss)
* [Useful defaults](#useful-defaults)
* [Common helpers](#common-helpers)
* [Placeholder media queries](#media-queries)
* [Print styles](#print-styles)
This starting CSS does not rely on the presence of
[conditional class names](https://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/),
[conditional style sheets](https://css-tricks.com/how-to-create-an-ie-only-stylesheet/),
or [Modernizr](https://modernizr.com/), and it is ready to use no matter what
your development preferences happen to be.
## Normalize.css
In order to make browsers render all elements more consistently and in line
with modern standards, we include
[Normalize.css](https://necolas.github.io/normalize.css/) — a modern, HTML5-ready
alternative to CSS resets.
As opposed to CSS resets, Normalize.css:
* targets only the styles that need normalizing
* preserves useful browser defaults rather than erasing them
* corrects bugs and common browser inconsistencies
* improves usability with subtle improvements
* doesn't clutter the debugging tools
* has better documentation
For more information about Normalize.css, please refer to its [project
page](https://necolas.github.com/normalize.css/), as well as this
[blog post](http://nicolasgallagher.com/about-normalize-css/).
## main.css
Several base styles are included that build upon `Normalize.css`. These
styles:
* provide basic typography settings that improve text readability
* protect against unwanted `text-shadow` during text highlighting
* tweak the default alignment of some elements (e.g.: `img`, `video`,
`fieldset`, `textarea`)
* style the prompt that is displayed to users using an outdated browser
* and more...
These styles are included in [main.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css). See the [main.css](https://github.com/h5bp/main.css) project [documentation](https://github.com/h5bp/main.css/blob/master/README.md#features) for a full discussion of these styles.

640
dist/doc/extend.md vendored Normal file
View File

@@ -0,0 +1,640 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com) | [Documentation
table of contents](TOC.md)
# Extend and customise HTML5 Boilerplate
Here is some useful advice for how you can make your project with HTML5
Boilerplate even better. We don't want to include it all by default, as
not everything fits with everyone's needs.
* [App Stores](#app-stores)
* [DNS prefetching](#dns-prefetching)
* [Google Universal Analytics](#google-universal-analytics)
* [Internet Explorer](#internet-explorer)
* [Miscellaneous](#miscellaneous)
* [News Feeds](#news-feeds)
* [Search](#search)
* [Social Networks](#social-networks)
* [URLs](#urls)
* [Web Apps](#web-apps)
* [security.txt](#security.txt)
## App Stores
### Smart App Banners in iOS 6+ Safari
Stop bothering everyone with gross modals advertising your entry in the
App Store. Including the following [meta tag](https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html) will unobtrusively give the user the option to download your iOS app, or open it with some data about the user's current state on the website.
```html
<meta name="apple-itunes-app" content="app-id=APP_ID,app-argument=SOME_TEXT">
```
## DNS prefetching
In short, DNS Prefetching is a method of informing the browser of domain names
referenced on a site so that the client can resolve the DNS for those hosts,
cache them, and when it comes time to use them, have a faster turn around on
the request.
### Implicit prefetches
There is a lot of prefetching done for you automatically by the browser. When
the browser encounters an anchor in your html that does not share the same
domain name as the current location the browser requests, from the client OS,
the IP address for this new domain. The client first checks its cache and
then, lacking a cached copy, makes a request from a DNS server. These requests
happen in the background and are not meant to block the rendering of the
page.
The goal of this is that when the foreign IP address is finally needed it will
already be in the client cache and will not block the loading of the foreign
content. Fewer requests result in faster page load times. The perception of this
is increased on a mobile platform where DNS latency can be greater.
#### Disable implicit prefetching
```html
<meta http-equiv="x-dns-prefetch-control" content="off">
```
Even with X-DNS-Prefetch-Control meta tag (or http header) browsers will still
prefetch any explicit dns-prefetch links.
**_WARNING:_** THIS MAY MAKE YOUR SITE SLOWER IF YOU RELY ON RESOURCES FROM
FOREIGN DOMAINS.
### Explicit prefetches
Typically the browser only scans the HTML for foreign domains. If you have
resources that are outside of your HTML (a javascript request to a remote
server or a CDN that hosts content that may not be present on every page of
your site, for example) then you can queue up a domain name to be prefetched.
```html
<link rel="dns-prefetch" href="//example.com">
<link rel="dns-prefetch" href="https://ajax.googleapis.com">
```
You can use as many of these as you need, but it's best if they are all
immediately after the [Meta
Charset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset)
element (which should go right at the top of the `head`), so the browser can
act on them ASAP.
#### Common Prefetch Links
Amazon S3:
```html
<link rel="dns-prefetch" href="//s3.amazonaws.com">
```
Google APIs:
```html
<link rel="dns-prefetch" href="https://ajax.googleapis.com">
```
Microsoft Ajax Content Delivery Network:
```html
<link rel="dns-prefetch" href="//ajax.microsoft.com">
<link rel="dns-prefetch" href="//ajax.aspnetcdn.com">
```
### Further reading about DNS prefetching
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control
* https://dev.chromium.org/developers/design-documents/dns-prefetching
* https://blogs.msdn.microsoft.com/ie/2011/03/17/internet-explorer-9-network-performance-improvements/
## Google Universal Analytics
### More tracking settings
The [optimized Google Universal Analytics
snippet](https://mathiasbynens.be/notes/async-analytics-snippet#universal-analytics)
included with HTML5 Boilerplate includes something like this:
```js
ga('create', 'UA-XXXXX-X', 'auto'); ga('send', 'pageview');
```
To customize further, see Google's [Advanced
Setup](https://developers.google.com/analytics/devguides/collection/analyticsjs/),
[Pageview](https://developers.google.com/analytics/devguides/collection/analyticsjs/pages),
and [Event](https://developers.google.com/analytics/devguides/collection/analyticsjs/events) Docs.
### Anonymize IP addresses
In some countries, no personal data may be transferred outside jurisdictions
that do not have similarly strict laws (i.e. from Germany to outside the EU).
Thus a webmaster using the Google Universal Analytics may have to ensure that
no personal (trackable) data is transferred to the US. You can do that with
[the `ga('set', 'anonymizeIp', true);`
parameter](https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#anonymizeip)
before sending any events/pageviews. In use it looks like this:
```js
ga('create', 'UA-XXXXX-X', 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
```
### Track jQuery AJAX requests in Google Analytics
An article by @JangoSteve explains how to [track jQuery AJAX requests in Google
Analytics](https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/).
Add this to `plugins.js`:
```js
/*
* Log all jQuery AJAX requests to Google Analytics
* See: https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/
*/
if (typeof ga !== "undefined" && ga !== null) {
$(document).ajaxSend(function(event, xhr, settings){
ga('send', 'pageview', settings.url);
});
}
```
### Track JavaScript errors in Google Analytics
Add this function after `ga` is defined:
```js
(function(window){
var undefined,
link = function (href) {
var a = window.document.createElement('a');
a.href = href;
return a;
};
window.onerror = function (message, file, line, column) {
var host = link(file).hostname;
ga('send', {
'hitType': 'event',
'eventCategory': (host == window.location.hostname || host == undefined || host == '' ? '' : 'external ') + 'error',
'eventAction': message,
'eventLabel': (file + ' LINE: ' + line + (column ? ' COLUMN: ' + column : '')).trim(),
'nonInteraction': 1
});
};
}(window));
```
### Track page scroll
Add this function after `ga` is defined:
```js
$(function(){
var isDuplicateScrollEvent,
scrollTimeStart = new Date,
$window = $(window),
$document = $(document),
scrollPercent;
$window.scroll(function() {
scrollPercent = Math.round(100 * ($window.height() + $window.scrollTop())/$document.height());
if (scrollPercent > 90 && !isDuplicateScrollEvent) { //page scrolled to 90%
isDuplicateScrollEvent = 1;
ga('send', 'event', 'scroll',
'Window: ' + $window.height() + 'px; Document: ' + $document.height() + 'px; Time: ' + Math.round((new Date - scrollTimeStart )/1000,1) + 's'
);
}
});
});
```
## Internet Explorer
### IE Pinned Sites
Enabling your application for pinning will allow IE users to add it to their
Windows Taskbar and Start Menu. This comes with a range of new tools that you
can easily configure with the elements below. See more [documentation on IE
Pinned Sites](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg491731(v%3dvs.85)).
### Name the Pinned Site for Windows
Without this rule, Windows will use the page title as the name for your
application.
```html
<meta name="application-name" content="Sample Title">
```
### Give your Pinned Site a tooltip
You know — a tooltip. A little textbox that appears when the user holds their
mouse over your Pinned Site's icon.
```html
<meta name="msapplication-tooltip" content="A description of what this site does.">
```
### Set a default page for your Pinned Site
If the site should go to a specific URL when it is pinned (such as the
homepage), enter it here. One idea is to send it to a special URL so you can
track the number of pinned users, like so:
`https://www.example.com/index.html?pinned=true`
```html
<meta name="msapplication-starturl" content="https://www.example.com/index.html?pinned=true">
```
### Recolor IE's controls manually for a Pinned Site
IE will automatically use the overall color of your Pinned Site's favicon to
shade its browser buttons. UNLESS you give it another color here. Only use
named colors (`red`) or hex colors (`#ff0000`).
```html
<meta name="msapplication-navbutton-color" content="#ff0000">
```
### Manually set the window size of a Pinned Site
If the site should open at a certain window size once pinned, you can specify
the dimensions here. It only supports static pixel dimensions. 800x600
minimum.
```html
<meta name="msapplication-window" content="width=800;height=600">
```
### Jump List "Tasks" for Pinned Sites
Add Jump List Tasks that will appear when the Pinned Site's icon gets a
right-click. Each Task goes to the specified URL, and gets its own mini icon
(essentially a favicon, a 16x16 .ICO). You can add as many of these as you
need.
```html
<meta name="msapplication-task" content="name=Task 1;action-uri=http://host/Page1.html;icon-uri=http://host/icon1.ico">
<meta name="msapplication-task" content="name=Task 2;action-uri=http://microsoft.com/Page2.html;icon-uri=http://host/icon2.ico">
```
### (Windows 8) High quality visuals for Pinned Sites
Windows 8 adds the ability for you to provide a PNG tile image and specify the
tile's background color. [Full details on the IE
blog](https://blogs.msdn.microsoft.com/ie/2012/06/08/high-quality-visuals-for-pinned-sites-in-windows-8/).
* Create a 144x144 image of your site icon, filling all of the canvas, and
using a transparent background.
* Save this image as a 32-bit PNG and optimize it without reducing
colour-depth. It can be named whatever you want (e.g. `metro-tile.png`).
* To reference the tile and its color, add the HTML `meta` elements described
in the IE Blog post.
### (Windows 8) Badges for Pinned Sites
IE will poll an XML document for badge information to display on your app's
tile in the Start screen. The user will be able to receive these badge updates
even when your app isn't actively running. The badge's value can be a number,
or one of a predefined list of glyphs.
* [Tutorial on IEBlog with link to badge XML schema](https://blogs.msdn.microsoft.com/ie/2012/04/03/pinned-sites-in-windows-8/)
* [Available badge values](https://docs.microsoft.com/en-us/uwp/schemas/tiles/badgeschema/element-badge)
```html
<meta name="msapplication-badge" value="frequency=NUMBER_IN_MINUTES;polling-uri=https://www.example.com/path/to/file.xml">
```
### Disable link highlighting upon tap in IE10
Similar to [-webkit-tap-highlight-color](https://davidwalsh.name/mobile-highlight-color)
in iOS Safari. Unlike that CSS property, this is an HTML meta element, and its
value is boolean rather than a color. It's all or nothing.
```html
<meta name="msapplication-tap-highlight" content="no" />
```
You can read about this useful element and more techniques in
[Microsoft's documentation on adapting WebKit-oriented apps for IE10](https://blogs.windows.com/buildingapps/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10/)
## Search
### Direct search spiders to your sitemap
After creating a [sitemap](https://www.sitemaps.org/protocol.html)
Submit it to search engine tool:
* [Google](https://www.google.com/webmasters/tools/sitemap-list)
* [Bing](https://www.bing.com/toolbox/webmaster)
* [Yandex](https://webmaster.yandex.com/)
* [Baidu](https://zhanzhang.baidu.com/)
OR
Insert the following line anywhere in your robots.txt file, specifying the path to your sitemap:
```
Sitemap: https://example.com/sitemap_location.xml
```
### Hide pages from search engines
According to Heather Champ, former community manager at Flickr, you should not
allow search engines to index your "Contact Us" or "Complaints" page if you
value your sanity. This is an HTML-centric way of achieving that.
```html
<meta name="robots" content="noindex">
```
**_WARNING:_** DO NOT INCLUDE ON PAGES THAT SHOULD APPEAR IN SEARCH ENGINES.
### Firefox and IE Search Plugins
Sites with in-site search functionality should be strongly considered for a
browser search plugin. A "search plugin" is an XML file which defines how your
plugin behaves in the browser. [How to make a browser search
plugin](https://www.google.com/search?ie=UTF-8&q=how+to+make+browser+search+plugin).
```html
<link rel="search" title="" type="application/opensearchdescription+xml" href="">
```
## Miscellaneous
* Use [polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills).
* Use [Microformats](http://microformats.org/wiki/Main_Page) (via
[microdata](http://microformats.org/wiki/microdata)) for optimum search
results
[visibility](https://webmasters.googleblog.com/2009/05/introducing-rich-snippets.html).
* If you're building a web app you may want [native style momentum scrolling in
iOS 5+](https://www.johanbrook.com/writings/native-style-momentum-scrolling-to-arrive-in-ios-5/)
using `-webkit-overflow-scrolling: touch`.
* If you want to disable the translation prompt in Chrome or block Google
Translate from translating your web page, use [`<meta name="google"
content="notranslate">`](https://support.google.com/webmasters/answer/79812).
To disable translation for a particular section of the web page, add
[`class="notranslate"`](https://support.google.com/translate/?hl=en#2641276).
* If you want to disable the automatic detection and formatting of possible
phone numbers in Safari on iOS, use [`<meta name="format-detection"
content="telephone=no">`](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html).
* Avoid development/stage websites "leaking" into SERPs (search engine results
page) by [implementing X-Robots-tag
headers](https://github.com/h5bp/html5-boilerplate/issues/804).
## News Feeds
### RSS
Have an RSS feed? Link to it here. Want to [learn how to write an RSS feed from
scratch](http://www.rssboard.org/rss-specification)?
```html
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml">
```
### Atom
Atom is similar to RSS, and you might prefer to use it instead of or in
addition to it. [See what Atom's all
about](https://en.wikipedia.org/wiki/Atom_(Web_standard)).
```html
<link rel="alternate" type="application/atom+xml" title="Atom" href="/atom.xml">
```
### Pingbacks
Your server may be notified when another site links to yours. The href
attribute should contain the location of your pingback service.
```html
<link rel="pingback" href="">
```
* High-level explanation: https://codex.wordpress.org/Introduction_to_Blogging#Pingbacks
* Step-by-step example case: https://www.hixie.ch/specs/pingback/pingback-1.0#TOC5
* PHP pingback service: https://web.archive.org/web/20131211032834/http://blog.perplexedlabs.com/2009/07/15/xmlrpc-pingbacks-using-php/
## Social Networks
### Facebook Open Graph data
You can control the information that Facebook and others display when users
share your site. Below are just the most basic data points you might need. For
specific content types (including "website"), see [Facebook's built-in Open
Graph content
templates](https://developers.facebook.com/docs/sharing/opengraph/using-objects).
Take full advantage of Facebook's support for complex data and activity by
following the [Open Graph
tutorial](https://developers.facebook.com/docs/sharing/webmasters/getting-started).
For a reference of Open Graph's markup and properties, you may check
[Facebook's Open Graph Protocol reference](http://ogp.me/). Finally,
you can validate your markup with the [Facebook Object
Debugger](https://developers.facebook.com/tools/debug/) (needs
registration to Facebook).
```html
<meta property="fb:app_id" content="123456789">
<meta property="og:url" content="https://www.example.com/path/to/page.html">
<meta property="og:type" content="website">
<meta property="og:title" content="">
<meta property="og:image" content="https://www.example.com/path/to/image.jpg">
<meta property="og:description" content="">
<meta property="og:site_name" content="">
<meta property="article:author" content="">
```
### Twitter Cards
Twitter provides a snippet specification that serves a similar purpose to Open
Graph. In fact, Twitter will use Open Graph when Cards is not available. You
can read more about the various snippet formats and application process in the
[official Twitter Cards documentation](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards),
and you can validate your markup with the [Card validator](https://cards-dev.twitter.com/validator)
(needs registration to Twitter).
```html
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@site_account">
<meta name="twitter:creator" content="@individual_account">
<meta name="twitter:url" content="https://www.example.com/path/to/page.html">
<meta name="twitter:title" content="">
<meta name="twitter:description" content="">
<meta name="twitter:image" content="https://www.example.com/path/to/image.jpg">
```
### Google+ / Schema.org
Google also provides a snippet specification that serves a similar
purpose to Facebook's Open Graph or Twitter Cards. While it helps you
to control information displayed on Google+, this metadata is a subset
of [schema.org's microdata vocabulary](https://schema.org/), which
covers many other schemas that can describe the content of your pages
to search engines. For this reason, this metadata is more generic for
SEO, notably for Google's search-engine, although this vocabulary is
also used by Microsoft, Pinterest and Yandex.
You can validate your markup with the [Structured Data Testing
Tool](https://developers.google.com/structured-data/testing-tool/).
Also, please note that this markup requires to add attributes to your
top `html` tag.
```html
<html class="no-js" lang="" itemscope itemtype="http://schema.org/Article">
<head>
<link rel="author" href="">
<link rel="publisher" href="">
<meta itemprop="name" content="">
<meta itemprop="description" content="">
<meta itemprop="image" content="">
```
## URLs
### Canonical URL
Signal to search engines and others "Use this URL for this page!" Useful when
parameters after a `#` or `?` is used to control the display state of a page.
`https://www.example.com/cart.html?shopping-cart-open=true` can be indexed as
the cleaner, more accurate `https://www.example.com/cart.html`.
```html
<link rel="canonical" href="">
```
### Separate mobile URLs
If you use separate URLs for desktop and mobile users, you should consider
helping search engine algorithms better understand the configuration on your
web site.
This can be done by adding the following annotations in your HTML pages:
* on the desktop page, add the `link rel="alternate"` tag pointing to the
corresponding mobile URL, e.g.:
`<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.example.com/page.html" >`
* on the mobile page, add the `link rel="canonical"` tag pointing to the
corresponding desktop URL, e.g.:
`<link rel="canonical" href="https://www.example.com/page.html">`
For more information please see:
* https://developers.google.com/search/mobile-sites/mobile-seo/separate-urls
## Web Apps
There are a couple of meta tags that provide information about a web app when
added to the Home Screen on iOS:
* Adding `apple-mobile-web-app-capable` will make your web app chrome-less and
provide the default iOS app view. You can control the color scheme of the
default view by adding `apple-mobile-web-app-status-bar-style`.
```html
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
```
* You can use `apple-mobile-web-app-title` to add a specific sites name for the
Home Screen icon. This works since iOS 6.
```html
<meta name="apple-mobile-web-app-title" content="">
```
For further information please read the [official
documentation](https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html)
on Apple's site.
### Apple Touch Icons
Apple touch icons are used as icons when a user adds your webapp to the home
screen of aniOS devices.
Though the dimensions of the icon can vary between iOS devices and versions
one `180×180px` touch icon named `icon.png` and including the following in
the `<head>` of the page is enough:
```html
<link rel="apple-touch-icon" href="icon.png">
```
For a more comprehensive overview, please refer to Mathias' [article on Touch
Icons](https://mathiasbynens.be/notes/touch-icons).
### Apple Touch Startup Image
Apart from that it is possible to add start-up screens for web apps on iOS. This
basically works by defining `apple-touch-startup-image` with an according link
to the image. Since iOS devices have different screen resolutions it maybe
necessary to add media queries to detect which image to load. Here is an
example for an iPhone:
```html
<link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" href="img/startup.png">
```
### Chrome Mobile web apps
Chrome Mobile has a specific meta tag for making apps [installable to the
homescreen](https://developer.chrome.com/multidevice/android/installtohomescreen)
which tries to be a more generic replacement to Apple's proprietary meta tag:
```html
<meta name="mobile-web-app-capable" content="yes">
```
Same applies to the touch icons:
```html
<link rel="icon" sizes="192x192" href="highres-icon.png">
```
### Theme Color
You can add the [`theme-color` meta extension](https://html.spec.whatwg.org/multipage/semantics.html#meta-theme-color)
in the `<head>` of your pages to suggest the color that browsers and
OSes should use if they customize the display of individual pages in
their UIs with varying colors.
```html
<meta name="theme-color" content="#ff69b4">
```
The `content` attribute extension can take any valid CSS color.
Currently, the `theme-color` meta extension is supported by [Chrome 39+
for Android Lollipop](https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android).
## security.txt
When security risks in web services are discovered by users they often lack the
channels to disclose them properly. As a result, security issues may be left unreported.
Security.txt defines a standard to help organizations define the process for
users to disclose security vulnerabilities securely. Include a text
file on your server at `.well-known/security.txt` with the relevant contact details.
Check [https://securitytxt.org/](https://securitytxt.org/) for more details.

42
dist/doc/faq.md vendored Normal file
View File

@@ -0,0 +1,42 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# Frequently asked questions
* [Why is the Google Analytics code at the bottom? Google recommends it be
placed in the `<head>`.](#why-is-the-google-analytics-code-at-the-bottom-google-recommends-it-be-placed-in-the-head)
* [How can I integrate Bootstrap with HTML5
Boilerplate?](#how-can-i-integrate-bootstrap-with-html5-boilerplate)
* [Do I need to upgrade my site each time a new version of HTML5 Boilerplate is
released?](#do-i-need-to-upgrade-my-site-each-time-a-new-version-of-html5-boilerplate-is-released)
* [Where can I get help with support
questions?](#where-can-i-get-help-with-support-questions)
---
### Why is the Google Analytics code at the bottom? Google recommends it be placed in the `<head>`.
The main advantage of placing it in the `<head>` is that you will track the
user's `pageview` even if they leave the page before it has been fully loaded.
Here's a handy quote from [Mathias Bynens](https://mathiasbynens.be/notes/async-analytics-snippet#comment-50) about our placement choice.
>I should point out that its Google — not me — recommending to place this
script before all other scripts in the document. The only real advantage is to
catch a pageView call if your page fails to load completely (for example, if
the user aborts loading, or quickly closes the page, etc.). Personally, I
wouldnt count that as a page view, so I actually prefer to place this script
at the bottom, after all other scripts. This keeps all the scripts together and
reinforces that scripts at the bottom are the right move. (Usually I
concatenate and minify all my scripts into one .js file — the GA snippet being
the suffix.)
### Do I need to upgrade my site each time a new version of HTML5 Boilerplate is released?
No, just as you don't normally replace the foundation of a house once it
was built. However, there is nothing stopping you from trying to work in the
latest changes, but you'll have to assess the costs/benefits of doing so.
### Where can I get help with support questions?
Please ask for help on
[StackOverflow](https://stackoverflow.com/questions/tagged/html5boilerplate).

205
dist/doc/html.md vendored Normal file
View File

@@ -0,0 +1,205 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# The HTML
By default, HTML5 Boilerplate provides two `html` pages:
* [`index.html`](#indexhtml) - a default HTML skeleton that should form the
basis of all pages on your website
* `404.html` - a placeholder 404 error page
## `index.html`
### The `no-js` Class
The `no-js` class is provided in order to allow you to more easily and
explicitly add custom styles based on whether JavaScript is disabled
(`.no-js`) or enabled (`.js`). Using this technique also helps [avoid the
FOUC](https://www.paulirish.com/2009/avoiding-the-fouc-v3/).
## Language Attribute
Please consider specifying the language of your content by adding a [value](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) to the `lang`
attribute in the `<html>` as in this example:
```html
<html class="no-js" lang="en">
```
### The order of the `<title>` and `<meta>` tags
The charset declaration (`<meta charset="utf-8">`) must be included completely
within the [first 1024 bytes of the document](https://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset)
and should be specified as early as possible (before any content that could
be controlled by an attacker, such as a `<title>` element) in order to avoid a
potential [encoding-related security issue](https://code.google.com/archive/p/doctype-mirror/wikis/ArticleUtf7.wiki)
in Internet Explorer
## Meta Description
The `description` meta tag provides a short description of the page.
In some situations this description is used as a part of the snippet
shown in the search results.
```html
<meta name="description" content="This is a description">
```
Google's [Create good meta descriptions](https://support.google.com/webmasters/answer/35624?hl=en#meta-descriptions)
documentation has useful tips on creating an effective description.
## Mobile Viewport
There are a few different options that you can use with the [`viewport` meta
tag](https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4 "Viewport and
Media Queries - The Complete Idiot's Guide"). You can find out more in [the
MDN Web Docs](https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag).
HTML5 Boilerplate comes with a simple setup that strikes a good balance for general use cases.
```html
<meta name="viewport" content="width=device-width, initial-scale=1">
```
If you want to take advantage of edge-to-edge displays of iPhone X/XS/XR you can do
so with additional viewport parameters. [Check the WebKit blog](https://webkit.org/blog/7929/designing-websites-for-iphone-x/)
for details.
## Web App Manifest
HTML5 Boilerplate includes a simple web app manifest file.
The web app manifest is a simple JSON file that allows you to control how your
app appears on a device's home screen, what it looks like when it launches
in that context and what happens when it is launched. This allows for much greater
control over the UI of a saved site or web app on a mobile device.
It's linked to from the HTML as follows:
```html
<link rel="manifest" href="site.webmanifest">
```
Our [site.webmanifest](https://github.com/h5bp/html5-boilerplate/blob/master/src/site.webmanifest) contains a very skeletal "app" definition, just to show the basic usage.
You should fill this file out with [more information about your site or application](https://developer.mozilla.org/en-US/docs/Web/Manifest)
## Favicons and Touch Icon
The shortcut icons should be put in the root directory of your site. `favicon.ico`
is automatically picked up by browsers if it's placed in the root. HTML5
Boilerplate comes with a default set of icons (include favicon and one Apple
Touch Icon) that you can use as a baseline to create your own.
Please refer to the more detailed description in the [Extend section](extend.md)
of these docs.
## The Content Area
The central part of the boilerplate template is pretty much empty. This is
intentional, in order to make the boilerplate suitable for both web page and
web app development.
### Browser Upgrade Prompt
The main content area of the boilerplate includes a prompt to install an up to
date browser for users of IE 9 and lower. If you intended to support IE, then you
should edit or remove the snippet of code.
## Modernizr
HTML5 Boilerplate uses a custom build of Modernizr.
[Modernizr](https://modernizr.com/) is a JavaScript library which adds classes to
the `html` element based on the results of feature test and which ensures that
all browsers can make use of HTML5 elements (as it includes the HTML5 Shiv).
This allows you to target parts of your CSS and JavaScript based on the
features supported by a browser.
Starting with version 3 Modernizr can be customized using the [modernizr-config.json](https://github.com/h5bp/html5-boilerplate/blob/master/modernizr-config.json) and the
[Modernizr command line utility](https://www.npmjs.com/package/modernizr-cli).
## What About Polyfills?
If you need to include [polyfills](https://remysharp.com/2010/10/08/what-is-a-polyfill)
in your project, you must make sure those load before any other JavaScript. If you're
using a polyfill CDN service, like [cdn.polyfill.io](https://cdn.polyfill.io/),
just put it before the other scripts in the bottom of the page:
```html
<script src="js/vendor/modernizr-3.6.0.min.js"></script>
<script src="https://cdn.polyfill.io/v3/polyfill.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
</body>
```
If you like to just include the polyfills yourself, you could include them in
`js/plugins.js`. When you have a bunch of polyfills to load in, you could
also create a `polyfills.js` file in the `js/vendor` directory or include the files
individually and combine them using a build tool. Always ensure that the polyfills
are all loaded before any other JavaScript.
There are some misconceptions about Modernizr and polyfills. It's important
to understand that Modernizr just handles feature checking, not polyfilling
itself. The only thing Modernizr does regarding polyfills is that the team
maintains [a huge list of cross Browser polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills).
### jQuery CDN for jQuery
The jQuery CDN version of the jQuery JavaScript library is referenced towards
the bottom of the page. A local fallback of jQuery is included for rare instances
when the CDN version might not be available, and to facilitate offline
development.
The jQuery CDN version was chosen over other potential candidates
([like Google's Hosted Libraries](https://developers.google.com/speed/libraries/))
because it's fast ([comparable or faster than Google by some
measures](https://www.cdnperf.com/#jsdelivr,cdnjs,google,yandex,microsoft,jquery,bootstrapcdn/https/90))
and, (unlike Google's CDN) is available to China's hundreds of millions of internet users.
For many years we [chose](https://github.com/h5bp/html5-boilerplate/issues/1191)
the Google Hosted version over the jQuery CDN because it was available
over HTTPS (the jQuery CDN was not,) and it offered a better chance of
hitting the cache lottery owing to the popularity of the Google CDN.
The first issue is no longer valid and the second is far outweighed by
being able to serve jQuery to users in China.
While the jQuery CDN is a strong default solution your site or application may
require a different configuration. Testing your site with services like
[WebPageTest](https://www.webpagetest.org/) and browser tools like
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) will help you examine the real
world performance of your site and can show where you can optimize your specific
site or application.
### Google Universal Analytics Tracking Code
Finally, an optimized version of the Google Universal Analytics tracking code is
included.
We use `analytics.js` rather than the newer `gtag.js` as
[it's faster and supports tasks and plugins](https://github.com/philipwalton/analyticsjs-boilerplate/issues/19#issuecomment-333714370)
The beacon transport mechanism is used to send all hits [which saves HTTP requests and improves performance](https://philipwalton.com/articles/the-google-analytics-setup-i-use-on-every-site-i-build/#loading-analytics.js).
Google recommends that this script be placed at the top of the page.
Factors to consider: if you place this script at the top of the page, youll
be able to count users who dont fully load the page, and youll incur the max
number of simultaneous connections of the browser.
Further information:
- [Introduction to
Analytics.js](https://developers.google.com/analytics/devguides/collection/analyticsjs/)
- [Google Analytics Demos & Tools](https://ga-dev-tools.appspot.com/)
**N.B.** The Google Analytics snippet is included by default mainly
because Google Analytics is [currently one of the most popular tracking
solutions](https://trends.builtwith.com/analytics/Google-Analytics) out there.
However, its usage isn't set in stone, and you SHOULD consider exploring the
[alternatives](https://en.wikipedia.org/wiki/List_of_web_analytics_software)
and use whatever suits your needs best.

36
dist/doc/js.md vendored Normal file
View File

@@ -0,0 +1,36 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# The JavaScript
Information about the default JavaScript included in the project.
## main.js
This file can be used to contain or reference your site/app JavaScript code.
If you're working on something more advanced you might replace this file
entirely. That's cool.
## plugins.js
This file can be used to contain all your plugins, such as jQuery plugins and
other 3rd party scripts for a simple site.
One approach is to put jQuery plugins inside of a `(function($){ ...
})(jQuery);` closure to make sure they're in the jQuery namespace safety
blanket. Read more about [jQuery plugin
authoring](https://learn.jquery.com/plugins/#Getting_Started).
By default the `plugins.js` file contains a small script to avoid `console`
errors in browsers that lack a `console`. The script will make sure that, if
a console method isn't available, that method will have the value of empty
function, thus, preventing the browser from throwing an error.
## vendor
This directory can be used to contain all 3rd party library code.
Minified versions of the latest jQuery and Modernizr libraries are included by
default. You may wish to create your own [custom Modernizr
build with the online builder](https://www.modernizr.com/download/) or [command
line tool](https://modernizr.com/docs#command-line-config).

173
dist/doc/misc.md vendored Normal file
View File

@@ -0,0 +1,173 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# Miscellaneous
* [.gitignore](#gitignore)
* [.editorconfig](#editorconfig)
* [Server Configuration](#server-configuration)
* [robots.txt](#robotstxt)
* [humans.txt](#humanstxt)
* [browserconfig.xml](#browserconfigxml)
--
## .gitignore
HTML5 Boilerplate includes a basic project-level `.gitignore`. This should
primarily be used to avoid certain project-level files and directories from
being kept under source control. Different development-environments will
benefit from different collections of ignores.
OS-specific and editor-specific files should be ignored using a "global
ignore" that applies to all repositories on your system.
For example, add the following to your `~/.gitconfig`, where the `.gitignore`
in your HOME directory contains the files and directories you'd like to
globally ignore:
```gitignore
[core]
excludesfile = ~/.gitignore
```
* More on global ignores: https://help.github.com/articles/ignoring-files/
* Comprehensive set of ignores on GitHub: https://github.com/github/gitignore
## .editorconfig
The `.editorconfig` file is provided in order to encourage and help you and
your team define and maintain consistent coding styles between different
editors and IDEs.
By default, `.editorconfig` includes some basic
[properties](https://editorconfig.org/#supported-properties) that reflect the
coding styles from the files provided by default, but you can easily change
them to better suit your needs.
In order for your editor/IDE to apply the
[properties](https://editorconfig.org/#supported-properties) from the
`.editorconfig` file, you may need to [install a
plugin]( https://editorconfig.org/#download).
__N.B.__ If you aren't using the server configurations provided by HTML5
Boilerplate, we highly encourage you to configure your server to block
access to `.editorconfig` files, as they can disclose sensitive information!
For more details, please refer to the [EditorConfig
project](https://editorconfig.org/).
## Server Configuration
H5BP includes a [`.htaccess`](#htaccess) file for the [Apache HTTP
server](https://httpd.apache.org/docs/). If you are not using Apache
as your web server, then you are encouraged to download a
[server configuration](https://github.com/h5bp/server-configs) that
corresponds to your web server and environment.
A `.htaccess` (hypertext access) file is an [Apache HTTP server
configuration file](https://github.com/h5bp/server-configs-apache).
The `.htaccess` file is mostly used for:
* Rewriting URLs
* Controlling cache
* Authentication
* Server-side includes
* Redirects
* Gzipping
If you have access to the main server configuration file (usually called
`httpd.conf`), you should add the logic from the `.htaccess` file in, for
example, a <Directory> section in the main configuration file. This is usually
the recommended way, as using .htaccess files slows down Apache!
To enable Apache modules locally, please see:
https://github.com/h5bp/server-configs-apache/wiki/How-to-enable-Apache-modules.
In the repo the `.htaccess` is used for:
* Allowing cross-origin access to web fonts
* CORS header for images when browsers request it
* Enable `404.html` as 404 error document
* Making the website experience better for IE users better
* Media UTF-8 as character encoding for `text/html` and `text/plain`
* Enabling the rewrite URLs engine
* Forcing or removing the `www.` at the begin of a URL
* It blocks access to directories without a default document
* It blocks access to files that can expose sensitive information.
* It reduces MIME type security risks
* It forces compressing (gzipping)
* It tells the browser whether they should request a specific file from the
server or whether they should grab it from the browser's cache
When using `.htaccess` we recommend reading all inline comments (the rules after
a `#`) in the file once. There is a bunch of optional stuff in it.
If you want to know more about the `.htaccess` file check out the
[Apache HTTP server docs](https://httpd.apache.org/docs/) or more
specifically the [htaccess
section](https://httpd.apache.org/docs/current/howto/htaccess.html).
Notice that the original repo for the `.htaccess` file is [this
one](https://github.com/h5bp/server-configs-apache).
## robots.txt
The `robots.txt` file is used to give instructions to web robots on what can
be crawled from the website.
By default, the file provided by this project includes the next two lines:
* `User-agent: *` - the following rules apply to all web robots
* `Disallow:` - everything on the website is allowed to be crawled
If you want to disallow certain pages you will need to specify the path in a
`Disallow` directive (e.g.: `Disallow: /path`) or, if you want to disallow
crawling of all content, use `Disallow: /`.
The `/robots.txt` file is not intended for access control, so don't try to
use it as such. Think of it as a "No Entry" sign, rather than a locked door.
URLs disallowed by the `robots.txt` file might still be indexed without being
crawled, and the content from within the `robots.txt` file can be viewed by
anyone, potentially disclosing the location of your private content! So, if
you want to block access to private content, use proper authentication instead.
For more information about `robots.txt`, please see:
* [robotstxt.org](http://www.robotstxt.org/)
* [How Google handles the `robots.txt` file](https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt)
## humans.txt
The `humans.txt` file is used to provide information about people involved with
the website.
The provided file contains three sections:
* `TEAM` - this is intended to list the group of people responsible for the website
* `THANKS` - this is intended to list the group of people that have contributed
to the website
* `TECHNOLOGY COLOPHON` - the section lists technologies used to make the website
For more information about `humans.txt`, please see: http://humanstxt.org/
## browserconfig.xml
The `browserconfig.xml` file is used to customize the tile displayed when users
pin your site to the Windows 8.1 start screen. In there you can define custom
tile colors, custom images or even [live tiles](https://msdn.microsoft.com/library/dn455106.aspx#CreatingLiveTiles).
By default, the file points to 2 placeholder tile images:
* `tile.png` (558x558px): used for `Small`, `Medium` and `Large` tiles.
This image resizes automatically when necessary.
* `tile-wide.png` (558x270px): user for `Wide` tiles.
Notice that IE11 uses the same images when adding a site to the `favorites`.
For more in-depth information about the `browserconfig.xml` file, please
see [MSDN](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn320426(v=vs.85)).

130
dist/doc/usage.md vendored Normal file
View File

@@ -0,0 +1,130 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# Usage
The most basic usage of HTML5 Boilerplate is to create a static site or simple
app. Once you've downloaded or cloned the project, that process looks something
like this:
1. Set up the basic structure of the site.
2. Add some content, style, and functionality.
3. Run your site locally to see how it looks.
4. Deploy your site.
Cool, right? _It is_. That said, the smart defaults, baseline elements, default
attribute values and various other utilities that HTML5 Boilerplate offers can
serve as the foundation for whatever you're interested in building.
Even the basic use-case of a simple static site can be enhanced by manipulating
the code through an automated build process. Moving up in complexity HTML5
Boilerplate can be integrated with whatever front-end framework, CMS or
e-commerce platform you're working with. Mix-and-match to your heart's content.
Use what you need (toss it in a blender if you need to) and discard the rest.
HTML5 Boilerplate is a starting point, not a destination.
## Basic structure
A basic HTML5 Boilerplate site initially looks something like this:
```
.
├── css
│ ├── main.css
│ └── normalize.css
├── doc
├── img
├── js
│ ├── main.js
│ ├── plugins.js
│ └── vendor
│ ├── jquery.min.js
│ └── modernizr.min.js
├── .editorconfig
├── .htaccess
├── 404.html
├── browserconfig.xml
├── favicon.ico
├── humans.txt
├── icon.png
├── index.html
├── robots.txt
├── site.webmanifest
├── tile.png
└── tile-wide.png
```
What follows is a general overview of each major part and how to use them.
### css
This directory should contain all your project's CSS files. It includes some
initial CSS to help get you started from a solid foundation. [About the
CSS](css.md).
### doc
This directory contains all the HTML5 Boilerplate documentation. You can use it
as the location and basis for your own project's documentation.
### js
This directory should contain all your project's JS files. Libraries, plugins,
and custom code can all be included here. It includes some initial JS to help
get you started. [About the JavaScript](js.md).
### .htaccess
The default web server configs are for Apache. For more information, please
refer to the [Apache Server Configs
repository](https://github.com/h5bp/server-configs-apache).
Host your site on a server other than Apache? You're likely to find the
corresponding server configs project listed in our [Server Configs
](https://github.com/h5bp/server-configs/blob/master/README.md) repository.
### 404.html
A helpful custom 404 to get you started.
### browserconfig.xml
This file contains all settings regarding custom tiles for IE11 and Edge.
For more info on this topic, please refer to
[Microsoft's Docs](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn320426(v=vs.85)).
### .editorconfig
The `.editorconfig` file is provided in order to encourage and help you and
your team to maintain consistent coding styles between different
editors and IDEs. [Read more about the `.editorconfig` file](misc.md#editorconfig).
### index.html
This is the default HTML skeleton that should form the basis of all pages on
your site. If you are using a server-side templating framework, then you will
need to integrate this starting HTML with your setup.
Make sure that you update the URLs for the referenced CSS and JavaScript if you
modify the directory structure at all.
If you are using Google Universal Analytics, make sure that you edit the
corresponding snippet at the bottom to include your analytics ID.
### humans.txt
Edit this file to include the team that worked on your site/app, and the
technology powering it.
### robots.txt
Edit this file to include any pages you need hidden from search engines.
### Icons
Replace the default `favicon.ico`, `tile.png`, `tile-wide.png` and Apple
Touch Icon with your own.
If you want to use different Apple Touch Icons for different resolutions please
refer to the [according documentation](extend.md#apple-touch-icons).

BIN
dist/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

15
dist/humans.txt vendored Normal file
View File

@@ -0,0 +1,15 @@
# humanstxt.org/
# The humans responsible & technology colophon
# TEAM
<name> -- <role> -- <twitter>
# THANKS
<name>
# TECHNOLOGY COLOPHON
CSS3, HTML5
Apache Server Configs, jQuery, Modernizr, Normalize.css

BIN
dist/icon.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

41
dist/index.html vendored Normal file
View File

@@ -0,0 +1,41 @@
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<meta name="theme-color" content="#fafafa">
</head>
<body>
<!--[if IE]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
<![endif]-->
<!-- Add your site or application content here -->
<p>Hello world! This is HTML5 Boilerplate.</p>
<script src="js/vendor/modernizr-3.7.1.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
<script>
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto'); ga('set','transport','beacon'); ga('send', 'pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
</body>
</html>

0
dist/js/main.js vendored Normal file
View File

24
dist/js/plugins.js vendored Normal file
View File

@@ -0,0 +1,24 @@
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn'
];
var length = methods.length;
var console = (window.console = window.console || {});
while (length--) {
method = methods[length];
// Only stub undefined methods.
if (!console[method]) {
console[method] = noop;
}
}
}());
// Place any jQuery/helper plugins in here.

2
dist/js/vendor/jquery-3.3.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

3
dist/js/vendor/modernizr-3.7.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

5
dist/robots.txt vendored Normal file
View File

@@ -0,0 +1,5 @@
# www.robotstxt.org/
# Allow crawling of all content
User-agent: *
Disallow:

12
dist/site.webmanifest vendored Normal file
View File

@@ -0,0 +1,12 @@
{
"short_name": "",
"name": "",
"icons": [{
"src": "icon.png",
"type": "image/png",
"sizes": "192x192"
}],
"start_url": "/?utm_source=homescreen",
"background_color": "#fafafa",
"theme_color": "#fafafa"
}

BIN
dist/tile-wide.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
dist/tile.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

194
gulpfile.babel.js Normal file
View File

@@ -0,0 +1,194 @@
import fs from 'fs';
import path from 'path';
import gulp from 'gulp';
// Load all gulp plugins automatically
// and attach them to the `plugins` object
import plugins from 'gulp-load-plugins';
// Temporary solution until gulp 4
// https://github.com/gulpjs/gulp/issues/355
import runSequence from 'run-sequence';
import archiver from 'archiver';
import glob from 'glob';
import del from 'del';
import ssri from 'ssri';
import modernizr from 'modernizr';
import pkg from './package.json';
import modernizrConfig from './modernizr-config.json';
const dirs = pkg['h5bp-configs'].directories;
// ---------------------------------------------------------------------
// | Helper tasks |
// ---------------------------------------------------------------------
gulp.task('archive:create_archive_dir', () => {
fs.mkdirSync(path.resolve(dirs.archive), '0755');
});
gulp.task('archive:zip', (done) => {
const archiveName = path.resolve(dirs.archive, `${pkg.name}_v${pkg.version}.zip`);
const zip = archiver('zip');
const files = glob.sync('**/*.*', {
'cwd': dirs.dist,
'dot': true // include hidden files
});
const output = fs.createWriteStream(archiveName);
zip.on('error', (error) => {
done();
throw error;
});
output.on('close', done);
files.forEach((file) => {
const filePath = path.resolve(dirs.dist, file);
// `zip.bulk` does not maintain the file
// permissions, so we need to add files individually
zip.append(fs.createReadStream(filePath), {
'name': file,
'mode': fs.statSync(filePath).mode
});
});
zip.pipe(output);
zip.finalize();
});
gulp.task('clean', (done) => {
del([
dirs.archive,
dirs.dist
]).then(() => {
done();
});
});
gulp.task('copy', [
'copy:.htaccess',
'copy:index.html',
'copy:jquery',
'copy:license',
'copy:main.css',
'copy:misc',
'copy:normalize'
]);
gulp.task('copy:.htaccess', () =>
gulp.src('node_modules/apache-server-configs/dist/.htaccess')
.pipe(plugins().replace(/# ErrorDocument/g, 'ErrorDocument'))
.pipe(gulp.dest(dirs.dist))
);
gulp.task('copy:index.html', () => {
const hash = ssri.fromData(
fs.readFileSync('node_modules/jquery/dist/jquery.min.js'),
{algorithms: ['sha256']}
);
let version = pkg.devDependencies.jquery;
let modernizrVersion = pkg.devDependencies.modernizr;
gulp.src(`${dirs.src}/index.html`)
.pipe(plugins().replace(/{{JQUERY_VERSION}}/g, version))
.pipe(plugins().replace(/{{MODERNIZR_VERSION}}/g, modernizrVersion))
.pipe(plugins().replace(/{{JQUERY_SRI_HASH}}/g, hash.toString()))
.pipe(gulp.dest(dirs.dist));
});
gulp.task('copy:jquery', () =>
gulp.src(['node_modules/jquery/dist/jquery.min.js'])
.pipe(plugins().rename(`jquery-${pkg.devDependencies.jquery}.min.js`))
.pipe(gulp.dest(`${dirs.dist}/js/vendor`))
);
gulp.task('copy:license', () =>
gulp.src('LICENSE.txt')
.pipe(gulp.dest(dirs.dist))
);
gulp.task('copy:main.css', () => {
const banner = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n\n`;
gulp.src(`node_modules/main.css/dist/main.css`)
.pipe(plugins().header(banner))
.pipe(plugins().autoprefixer({
browsers: ['last 2 versions', 'ie >= 9', '> 1%'],
cascade: false
}))
.pipe(gulp.dest(`${dirs.dist}/css`));
});
gulp.task('copy:misc', () =>
gulp.src([
// Copy all files
`${dirs.src}/**/*`,
// Exclude the following files
// (other tasks will handle the copying of these files)
`!${dirs.src}/css/main.css`,
`!${dirs.src}/index.html`
], {
// Include hidden files by default
dot: true
}).pipe(gulp.dest(dirs.dist))
);
gulp.task('copy:normalize', () =>
gulp.src('node_modules/normalize.css/normalize.css')
.pipe(gulp.dest(`${dirs.dist}/css`))
);
gulp.task('modernizr', (done) =>{
modernizr.build(modernizrConfig, (code) => {
fs.writeFile(`${dirs.dist}/js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`, code, done);
});
});
gulp.task('lint:js', () =>
gulp.src([
'gulpfile.js',
`${dirs.src}/js/*.js`,
`${dirs.test}/*.js`
]).pipe(plugins().jscs())
.pipe(plugins().eslint())
.pipe(plugins().eslint.failOnError())
);
// ---------------------------------------------------------------------
// | Main tasks |
// ---------------------------------------------------------------------
gulp.task('archive', (done) => {
runSequence(
'build',
'archive:create_archive_dir',
'archive:zip',
done);
});
gulp.task('build', (done) => {
runSequence(
['clean', 'lint:js'],
'copy', 'modernizr',
done);
});
gulp.task('default', ['build']);

View File

@@ -1,43 +0,0 @@
/* the humans responsible & colophon */
/* humanstxt.org */
/* TEAM */
<your title>: <your name>
Site:
Twitter:
Location:
/* THANKS */
Names (& URL):
/* SITE */
Standards: HTML5, CSS3
Components: Modernizr, jQuery
Software:
-o/-
+oo//-
:ooo+//:
-ooooo///-
/oooooo//:
:ooooooo+//-
-+oooooooo///-
-://////////////+oooooooooo++////////////::
:+ooooooooooooooooooooooooooooooooooooo+:::-
-/+ooooooooooooooooooooooooooooooo+/::////:-
-:+oooooooooooooooooooooooooooo/::///////:-
--/+ooooooooooooooooooooo+::://////:-
-:+ooooooooooooooooo+:://////:--
/ooooooooooooooooo+//////:-
-ooooooooooooooooooo////-
/ooooooooo+oooooooooo//:
:ooooooo+/::/+oooooooo+//-
-oooooo/::///////+oooooo///-
/ooo+::://////:---:/+oooo//:
-o+/::///////:- -:/+o+//-
:-:///////:- -:/://
-////:- --//:
-- -:

View File

@@ -1,67 +0,0 @@
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- Use the .htaccess and remove these lines to avoid edge case issues.
More info: h5bp.com/i/378 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<!-- Mobile viewport optimized: h5bp.com/viewport -->
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
<link rel="stylesheet" href="css/style.css">
<!-- More ideas for your <head> here: h5bp.com/d/head-Tips -->
<!-- All JavaScript at the bottom, except this Modernizr build.
Modernizr enables HTML5 elements & feature detects for optimal performance.
Create your own custom Modernizr build: www.modernizr.com/download/ -->
<script src="js/libs/modernizr-2.5.0.min.js"></script>
</head>
<body>
<!-- Prompt IE 6 users to install Chrome Frame. Remove this if you support IE 6.
chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
<header>
</header>
<div role="main">
</div>
<footer>
</footer>
<!-- JavaScript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
<!-- scripts concatenated and minified via build script -->
<script src="js/plugins.js"></script>
<script src="js/script.js"></script>
<!-- end scripts -->
<!-- Asynchronous Google Analytics snippet. Change UA-XXXXX-X to be your site's ID.
mathiasbynens.be/notes/async-analytics-snippet -->
<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>

9266
js/libs/jquery-1.7.1.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,11 +0,0 @@
// usage: log('inside coolFunc', this, arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function f(){ log.history = log.history || []; log.history.push(arguments); if(this.console) { var args = arguments, newarr; args.callee = args.callee.caller; newarr = [].slice.call(args); if (typeof console.log === 'object') log.apply.call(console.log, console, newarr); else console.log.apply(console, newarr);}};
// make it safe to use console.log always
(function(a){function b(){}for(var c="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),d;!!(d=c.pop());){a[d]=a[d]||b;}})
(function(){try{console.log();return window.console;}catch(a){return (window.console={});}}());
// place any jQuery/helper plugins in here, instead of separate, slower script files.

View File

@@ -1,8 +0,0 @@
/* Author:
*/

30
modernizr-config.json Normal file
View File

@@ -0,0 +1,30 @@
{
"minify": true,
"options": [
"domPrefixes",
"prefixes",
"addTest",
"hasEvent",
"mq",
"prefixedCSSValue",
"testAllProps",
"testProp",
"testStyles",
"setClasses"
],
"feature-detects": [
"test/custom-elements",
"test/history",
"test/pointerevents",
"test/postmessage",
"test/webgl",
"test/websockets",
"test/css/animations",
"test/css/columns",
"test/css/flexbox",
"test/elem/picture",
"test/img/sizes",
"test/img/srcset",
"test/workers/webworkers"
]
}

68
package.json Normal file
View File

@@ -0,0 +1,68 @@
{
"devDependencies": {
"apache-server-configs": "^3.1.0",
"archiver": "^3.0.0",
"babel-core": "^6.26.3",
"babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",
"del": "^4.0.0",
"eslint": "^5.15.2",
"eslint-config-recommended": "^4.0.0",
"eslint-plugin-mocha": "^5.3.0",
"glob": "^7.1.3",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^6.0.0",
"gulp-eslint": "^5.0.0",
"gulp-header": "^2.0.7",
"gulp-jscs": "^4.1.0",
"gulp-load-plugins": "^1.5.0",
"gulp-rename": "^1.4.0",
"gulp-replace": "^1.0.0",
"jquery": "3.3.1",
"main.css": "1.0.0",
"mocha": "^5.2.0",
"modernizr": "3.7.1",
"normalize.css": "8.0.1",
"run-sequence": "^2.2.1",
"ssri": "^6.0.1",
"strip-json-comments": "^2.0.1"
},
"engines": {
"node": ">=6",
"npm": ">=3"
},
"babel": {
"presets": [
"env"
]
},
"h5bp-configs": {
"directories": {
"archive": "archive",
"dist": "dist",
"src": "src",
"test": "test"
}
},
"homepage": "https://html5boilerplate.com/",
"license": "MIT",
"name": "html5-boilerplate",
"scripts": {
"build": "gulp build",
"test": "gulp archive && mocha --require babel-core/register --reporter spec --timeout 5000"
},
"version": "7.1.0",
"description": "A professional front-end template for building fast, robust, and adaptable web apps or sites.",
"files": [
"CHANGELOG.md",
"LICENSE.txt",
"package.json",
"dist/",
"modernizr-config.json",
"README.md"
],
"repository": {
"type": "git",
"url": "https://github.com/h5bp/html5-boilerplate.git"
}
}

View File

@@ -1,55 +0,0 @@
# [HTML5 Boilerplate](http://html5boilerplate.com)
HTML5 Boilerplate is a professional front-end template that helps you build fast, robust, adaptable, and future-proof websites. Spend more time developing and less time reinventing the wheel.
This project is the product of many years of iterative development and combined community knowledge. It does not impose a specific development philosophy or framework, so you're free to architect your code in the way that you want.
## Quick start
Clone the git repo - `git clone git://github.com/h5bp/html5-boilerplate.git` - or [download it](https://github.com/h5bp/html5-boilerplate/zipball/master)
## Features
* HTML5 ready. Use the new elements with confidence.
* Cross-browser compatible (Chrome, Opera, Safari, Firefox 3.6+, IE6+).
* Designed with progressive enhancement in mind.
* CSS normalizations and common bug fixes.
* IE-specific classes for easier cross-browser control.
* A default print stylesheet, performance optimized.
* Mobile browser optimizations.
* Protection against any stray `console.log` causing JavaScript errors in IE6/7.
* The latest jQuery via CDN, with a local fallback.
* A custom Modernizr build for feature detection.
* An optimized Google Analytics snippet.
* Apache server caching, compression, and other configuration defaults for Grade-A performance.
* Cross-domain Ajax and Flash.
* "Delete-key friendly." Easy to strip out parts you don't need.
* Extensive inline and accompanying documentation.
## Contributing
Anyone and everyone is welcome to [contribute](https://github.com/h5bp/html5-boilerplate/wiki/contribute). Hundreds of developers have helped make the HTML5 Boilerplate what it is today.
## Project information
* Source: http://github.com/h5bp/html5-boilerplate
* Web: http://html5boilerplate.com
* Docs: http://html5boilerplate.com/docs
* Twitter: http://twitter.com/h5bp
## License
### Major components:
* jQuery: MIT/GPL license
* Modernizr: MIT/BSD license
* Normalize.css: Public Domain
### Everything else:
The Unlicense (aka: public domain)

View File

@@ -1,4 +0,0 @@
# www.robotstxt.org/
# http://code.google.com/web/controlcrawlindex/
User-agent: *

13
src/.editorconfig Normal file
View File

@@ -0,0 +1,13 @@
# editorconfig.org
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

194
src/.gitattributes vendored Normal file
View File

@@ -0,0 +1,194 @@
## GITATTRIBUTES FOR WEB PROJECTS
#
# These settings are for any web project.
#
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).
# binary These files are binary and should be left untouched.
#
# Note that binary is a macro for -text -diff.
######################################################################
## AUTO-DETECT
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto
## SOURCE CODE
*.bat text eol=crlf
*.coffee text
*.css text
*.htm text
*.html text
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.od text
*.onlydata text
*.php text
*.pl text
*.py text
*.rb text
*.sass text
*.scm text
*.scss text
*.sh text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.xml text
*.xhtml text
## DOCKER
*.dockerignore text
Dockerfile text
## DOCUMENTATION
*.markdown text
*.md text
*.mdwn text
*.mdown text
*.mkd text
*.mkdn text
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text
## TEMPLATES
*.dot text
*.ejs text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.tmpl text
*.tpl text
*.twig text
## LINTERS
.babelrc text
.csslintrc text
.eslintrc text
.htmlhintrc text
.jscsrc text
.jshintrc text
.jshintignore text
.prettierrc text
.stylelintrc text
## CONFIGS
*.bowerrc text
*.cnf text
*.conf text
*.config text
.browserslistrc text
.editorconfig text
.gitattributes text
.gitconfig text
.gitignore text
.htaccess text
*.npmignore text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text
## HEROKU
Procfile text
.slugignore text
## GRAPHICS
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary
## AUDIO
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary
## VIDEO
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.ogv binary
*.swc binary
*.swf binary
*.webm binary
## ARCHIVES
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary
## FONTS
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary
## EXECUTABLES
*.exe binary
*.pyc binary

3
src/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# Include your project-specific ignores in this file
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files
# Useful .gitignore templates: https://github.com/github/gitignore

60
src/404.html Normal file
View File

@@ -0,0 +1,60 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
line-height: 1.2;
margin: 0;
}
html {
color: #888;
display: table;
font-family: sans-serif;
height: 100%;
text-align: center;
width: 100%;
}
body {
display: table-cell;
vertical-align: middle;
margin: 2em auto;
}
h1 {
color: #555;
font-size: 2em;
font-weight: 400;
}
p {
margin: 0 auto;
width: 280px;
}
@media only screen and (max-width: 280px) {
body, p {
width: 95%;
}
h1 {
font-size: 1.5em;
margin: 0 0 0.3em;
}
}
</style>
</head>
<body>
<h1>Page Not Found</h1>
<p>Sorry, but the page you were trying to view does not exist.</p>
</body>
</html>
<!-- IE needs 512+ bytes: https://blogs.msdn.microsoft.com/ieinternals/2010/08/18/friendly-http-error-pages/ -->

12
src/browserconfig.xml Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Please read: https://msdn.microsoft.com/en-us/library/ie/dn455106.aspx -->
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="tile.png"/>
<square150x150logo src="tile.png"/>
<wide310x150logo src="tile-wide.png"/>
<square310x310logo src="tile.png"/>
</tile>
</msapplication>
</browserconfig>

34
src/doc/TOC.md Normal file
View File

@@ -0,0 +1,34 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/)
## Getting started
* [Usage](usage.md) — Overview of the project contents.
* [FAQ](faq.md) — Frequently asked questions along with their answers.
## HTML5 Boilerplate core
* [HTML](html.md) — Guide to the default HTML.
* [CSS](css.md) — Guide to the default CSS.
* [JavaScript](js.md) — Guide to the default JavaScript.
* [Everything else](misc.md).
## Development
* [Extending and customizing HTML5 Boilerplate](extend.md) — Going further
with the boilerplate.
## Related projects
The [H5BP organization](https://github.com/h5bp) maintains several projects
that complement HTML5 Boilerplate, projects that can help you improve different
aspects of your website/web app (e.g.: the performance, security, etc.).
* [Server Configs](https://github.com/h5bp/server-configs) — Fast and
smart configurations for web servers such as Apache and Nginx.
* [Apache](https://github.com/h5bp/server-configs-apache)
* [Google App Engine (GAE)](https://github.com/h5bp/server-configs-gae)
* [Internet Information Services (IIS)](https://github.com/h5bp/server-configs-iis)
* [lighttpd](https://github.com/h5bp/server-configs-lighttpd)
* [Nginx](https://github.com/h5bp/server-configs-nginx)
* [Node.js](https://github.com/h5bp/server-configs-node)
* [Front-end Developer Interview Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions)

54
src/doc/css.md Normal file
View File

@@ -0,0 +1,54 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# The CSS
HTML5 Boilerplate's CSS includes:
* [Normalize.css](#normalizecss)
* [Useful defaults](#useful-defaults)
* [Common helpers](#common-helpers)
* [Placeholder media queries](#media-queries)
* [Print styles](#print-styles)
This starting CSS does not rely on the presence of
[conditional class names](https://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/),
[conditional style sheets](https://css-tricks.com/how-to-create-an-ie-only-stylesheet/),
or [Modernizr](https://modernizr.com/), and it is ready to use no matter what
your development preferences happen to be.
## Normalize.css
In order to make browsers render all elements more consistently and in line
with modern standards, we include
[Normalize.css](https://necolas.github.io/normalize.css/) — a modern, HTML5-ready
alternative to CSS resets.
As opposed to CSS resets, Normalize.css:
* targets only the styles that need normalizing
* preserves useful browser defaults rather than erasing them
* corrects bugs and common browser inconsistencies
* improves usability with subtle improvements
* doesn't clutter the debugging tools
* has better documentation
For more information about Normalize.css, please refer to its [project
page](https://necolas.github.com/normalize.css/), as well as this
[blog post](http://nicolasgallagher.com/about-normalize-css/).
## main.css
Several base styles are included that build upon `Normalize.css`. These
styles:
* provide basic typography settings that improve text readability
* protect against unwanted `text-shadow` during text highlighting
* tweak the default alignment of some elements (e.g.: `img`, `video`,
`fieldset`, `textarea`)
* style the prompt that is displayed to users using an outdated browser
* and more...
These styles are included in [main.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css). See the [main.css](https://github.com/h5bp/main.css) project [documentation](https://github.com/h5bp/main.css/blob/master/README.md#features) for a full discussion of these styles.

640
src/doc/extend.md Normal file
View File

@@ -0,0 +1,640 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com) | [Documentation
table of contents](TOC.md)
# Extend and customise HTML5 Boilerplate
Here is some useful advice for how you can make your project with HTML5
Boilerplate even better. We don't want to include it all by default, as
not everything fits with everyone's needs.
* [App Stores](#app-stores)
* [DNS prefetching](#dns-prefetching)
* [Google Universal Analytics](#google-universal-analytics)
* [Internet Explorer](#internet-explorer)
* [Miscellaneous](#miscellaneous)
* [News Feeds](#news-feeds)
* [Search](#search)
* [Social Networks](#social-networks)
* [URLs](#urls)
* [Web Apps](#web-apps)
* [security.txt](#security.txt)
## App Stores
### Smart App Banners in iOS 6+ Safari
Stop bothering everyone with gross modals advertising your entry in the
App Store. Including the following [meta tag](https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html) will unobtrusively give the user the option to download your iOS app, or open it with some data about the user's current state on the website.
```html
<meta name="apple-itunes-app" content="app-id=APP_ID,app-argument=SOME_TEXT">
```
## DNS prefetching
In short, DNS Prefetching is a method of informing the browser of domain names
referenced on a site so that the client can resolve the DNS for those hosts,
cache them, and when it comes time to use them, have a faster turn around on
the request.
### Implicit prefetches
There is a lot of prefetching done for you automatically by the browser. When
the browser encounters an anchor in your html that does not share the same
domain name as the current location the browser requests, from the client OS,
the IP address for this new domain. The client first checks its cache and
then, lacking a cached copy, makes a request from a DNS server. These requests
happen in the background and are not meant to block the rendering of the
page.
The goal of this is that when the foreign IP address is finally needed it will
already be in the client cache and will not block the loading of the foreign
content. Fewer requests result in faster page load times. The perception of this
is increased on a mobile platform where DNS latency can be greater.
#### Disable implicit prefetching
```html
<meta http-equiv="x-dns-prefetch-control" content="off">
```
Even with X-DNS-Prefetch-Control meta tag (or http header) browsers will still
prefetch any explicit dns-prefetch links.
**_WARNING:_** THIS MAY MAKE YOUR SITE SLOWER IF YOU RELY ON RESOURCES FROM
FOREIGN DOMAINS.
### Explicit prefetches
Typically the browser only scans the HTML for foreign domains. If you have
resources that are outside of your HTML (a javascript request to a remote
server or a CDN that hosts content that may not be present on every page of
your site, for example) then you can queue up a domain name to be prefetched.
```html
<link rel="dns-prefetch" href="//example.com">
<link rel="dns-prefetch" href="https://ajax.googleapis.com">
```
You can use as many of these as you need, but it's best if they are all
immediately after the [Meta
Charset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset)
element (which should go right at the top of the `head`), so the browser can
act on them ASAP.
#### Common Prefetch Links
Amazon S3:
```html
<link rel="dns-prefetch" href="//s3.amazonaws.com">
```
Google APIs:
```html
<link rel="dns-prefetch" href="https://ajax.googleapis.com">
```
Microsoft Ajax Content Delivery Network:
```html
<link rel="dns-prefetch" href="//ajax.microsoft.com">
<link rel="dns-prefetch" href="//ajax.aspnetcdn.com">
```
### Further reading about DNS prefetching
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control
* https://dev.chromium.org/developers/design-documents/dns-prefetching
* https://blogs.msdn.microsoft.com/ie/2011/03/17/internet-explorer-9-network-performance-improvements/
## Google Universal Analytics
### More tracking settings
The [optimized Google Universal Analytics
snippet](https://mathiasbynens.be/notes/async-analytics-snippet#universal-analytics)
included with HTML5 Boilerplate includes something like this:
```js
ga('create', 'UA-XXXXX-X', 'auto'); ga('send', 'pageview');
```
To customize further, see Google's [Advanced
Setup](https://developers.google.com/analytics/devguides/collection/analyticsjs/),
[Pageview](https://developers.google.com/analytics/devguides/collection/analyticsjs/pages),
and [Event](https://developers.google.com/analytics/devguides/collection/analyticsjs/events) Docs.
### Anonymize IP addresses
In some countries, no personal data may be transferred outside jurisdictions
that do not have similarly strict laws (i.e. from Germany to outside the EU).
Thus a webmaster using the Google Universal Analytics may have to ensure that
no personal (trackable) data is transferred to the US. You can do that with
[the `ga('set', 'anonymizeIp', true);`
parameter](https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#anonymizeip)
before sending any events/pageviews. In use it looks like this:
```js
ga('create', 'UA-XXXXX-X', 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
```
### Track jQuery AJAX requests in Google Analytics
An article by @JangoSteve explains how to [track jQuery AJAX requests in Google
Analytics](https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/).
Add this to `plugins.js`:
```js
/*
* Log all jQuery AJAX requests to Google Analytics
* See: https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/
*/
if (typeof ga !== "undefined" && ga !== null) {
$(document).ajaxSend(function(event, xhr, settings){
ga('send', 'pageview', settings.url);
});
}
```
### Track JavaScript errors in Google Analytics
Add this function after `ga` is defined:
```js
(function(window){
var undefined,
link = function (href) {
var a = window.document.createElement('a');
a.href = href;
return a;
};
window.onerror = function (message, file, line, column) {
var host = link(file).hostname;
ga('send', {
'hitType': 'event',
'eventCategory': (host == window.location.hostname || host == undefined || host == '' ? '' : 'external ') + 'error',
'eventAction': message,
'eventLabel': (file + ' LINE: ' + line + (column ? ' COLUMN: ' + column : '')).trim(),
'nonInteraction': 1
});
};
}(window));
```
### Track page scroll
Add this function after `ga` is defined:
```js
$(function(){
var isDuplicateScrollEvent,
scrollTimeStart = new Date,
$window = $(window),
$document = $(document),
scrollPercent;
$window.scroll(function() {
scrollPercent = Math.round(100 * ($window.height() + $window.scrollTop())/$document.height());
if (scrollPercent > 90 && !isDuplicateScrollEvent) { //page scrolled to 90%
isDuplicateScrollEvent = 1;
ga('send', 'event', 'scroll',
'Window: ' + $window.height() + 'px; Document: ' + $document.height() + 'px; Time: ' + Math.round((new Date - scrollTimeStart )/1000,1) + 's'
);
}
});
});
```
## Internet Explorer
### IE Pinned Sites
Enabling your application for pinning will allow IE users to add it to their
Windows Taskbar and Start Menu. This comes with a range of new tools that you
can easily configure with the elements below. See more [documentation on IE
Pinned Sites](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/gg491731(v%3dvs.85)).
### Name the Pinned Site for Windows
Without this rule, Windows will use the page title as the name for your
application.
```html
<meta name="application-name" content="Sample Title">
```
### Give your Pinned Site a tooltip
You know — a tooltip. A little textbox that appears when the user holds their
mouse over your Pinned Site's icon.
```html
<meta name="msapplication-tooltip" content="A description of what this site does.">
```
### Set a default page for your Pinned Site
If the site should go to a specific URL when it is pinned (such as the
homepage), enter it here. One idea is to send it to a special URL so you can
track the number of pinned users, like so:
`https://www.example.com/index.html?pinned=true`
```html
<meta name="msapplication-starturl" content="https://www.example.com/index.html?pinned=true">
```
### Recolor IE's controls manually for a Pinned Site
IE will automatically use the overall color of your Pinned Site's favicon to
shade its browser buttons. UNLESS you give it another color here. Only use
named colors (`red`) or hex colors (`#ff0000`).
```html
<meta name="msapplication-navbutton-color" content="#ff0000">
```
### Manually set the window size of a Pinned Site
If the site should open at a certain window size once pinned, you can specify
the dimensions here. It only supports static pixel dimensions. 800x600
minimum.
```html
<meta name="msapplication-window" content="width=800;height=600">
```
### Jump List "Tasks" for Pinned Sites
Add Jump List Tasks that will appear when the Pinned Site's icon gets a
right-click. Each Task goes to the specified URL, and gets its own mini icon
(essentially a favicon, a 16x16 .ICO). You can add as many of these as you
need.
```html
<meta name="msapplication-task" content="name=Task 1;action-uri=http://host/Page1.html;icon-uri=http://host/icon1.ico">
<meta name="msapplication-task" content="name=Task 2;action-uri=http://microsoft.com/Page2.html;icon-uri=http://host/icon2.ico">
```
### (Windows 8) High quality visuals for Pinned Sites
Windows 8 adds the ability for you to provide a PNG tile image and specify the
tile's background color. [Full details on the IE
blog](https://blogs.msdn.microsoft.com/ie/2012/06/08/high-quality-visuals-for-pinned-sites-in-windows-8/).
* Create a 144x144 image of your site icon, filling all of the canvas, and
using a transparent background.
* Save this image as a 32-bit PNG and optimize it without reducing
colour-depth. It can be named whatever you want (e.g. `metro-tile.png`).
* To reference the tile and its color, add the HTML `meta` elements described
in the IE Blog post.
### (Windows 8) Badges for Pinned Sites
IE will poll an XML document for badge information to display on your app's
tile in the Start screen. The user will be able to receive these badge updates
even when your app isn't actively running. The badge's value can be a number,
or one of a predefined list of glyphs.
* [Tutorial on IEBlog with link to badge XML schema](https://blogs.msdn.microsoft.com/ie/2012/04/03/pinned-sites-in-windows-8/)
* [Available badge values](https://docs.microsoft.com/en-us/uwp/schemas/tiles/badgeschema/element-badge)
```html
<meta name="msapplication-badge" value="frequency=NUMBER_IN_MINUTES;polling-uri=https://www.example.com/path/to/file.xml">
```
### Disable link highlighting upon tap in IE10
Similar to [-webkit-tap-highlight-color](https://davidwalsh.name/mobile-highlight-color)
in iOS Safari. Unlike that CSS property, this is an HTML meta element, and its
value is boolean rather than a color. It's all or nothing.
```html
<meta name="msapplication-tap-highlight" content="no" />
```
You can read about this useful element and more techniques in
[Microsoft's documentation on adapting WebKit-oriented apps for IE10](https://blogs.windows.com/buildingapps/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10/)
## Search
### Direct search spiders to your sitemap
After creating a [sitemap](https://www.sitemaps.org/protocol.html)
Submit it to search engine tool:
* [Google](https://www.google.com/webmasters/tools/sitemap-list)
* [Bing](https://www.bing.com/toolbox/webmaster)
* [Yandex](https://webmaster.yandex.com/)
* [Baidu](https://zhanzhang.baidu.com/)
OR
Insert the following line anywhere in your robots.txt file, specifying the path to your sitemap:
```
Sitemap: https://example.com/sitemap_location.xml
```
### Hide pages from search engines
According to Heather Champ, former community manager at Flickr, you should not
allow search engines to index your "Contact Us" or "Complaints" page if you
value your sanity. This is an HTML-centric way of achieving that.
```html
<meta name="robots" content="noindex">
```
**_WARNING:_** DO NOT INCLUDE ON PAGES THAT SHOULD APPEAR IN SEARCH ENGINES.
### Firefox and IE Search Plugins
Sites with in-site search functionality should be strongly considered for a
browser search plugin. A "search plugin" is an XML file which defines how your
plugin behaves in the browser. [How to make a browser search
plugin](https://www.google.com/search?ie=UTF-8&q=how+to+make+browser+search+plugin).
```html
<link rel="search" title="" type="application/opensearchdescription+xml" href="">
```
## Miscellaneous
* Use [polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills).
* Use [Microformats](http://microformats.org/wiki/Main_Page) (via
[microdata](http://microformats.org/wiki/microdata)) for optimum search
results
[visibility](https://webmasters.googleblog.com/2009/05/introducing-rich-snippets.html).
* If you're building a web app you may want [native style momentum scrolling in
iOS 5+](https://www.johanbrook.com/writings/native-style-momentum-scrolling-to-arrive-in-ios-5/)
using `-webkit-overflow-scrolling: touch`.
* If you want to disable the translation prompt in Chrome or block Google
Translate from translating your web page, use [`<meta name="google"
content="notranslate">`](https://support.google.com/webmasters/answer/79812).
To disable translation for a particular section of the web page, add
[`class="notranslate"`](https://support.google.com/translate/?hl=en#2641276).
* If you want to disable the automatic detection and formatting of possible
phone numbers in Safari on iOS, use [`<meta name="format-detection"
content="telephone=no">`](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html).
* Avoid development/stage websites "leaking" into SERPs (search engine results
page) by [implementing X-Robots-tag
headers](https://github.com/h5bp/html5-boilerplate/issues/804).
## News Feeds
### RSS
Have an RSS feed? Link to it here. Want to [learn how to write an RSS feed from
scratch](http://www.rssboard.org/rss-specification)?
```html
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml">
```
### Atom
Atom is similar to RSS, and you might prefer to use it instead of or in
addition to it. [See what Atom's all
about](https://en.wikipedia.org/wiki/Atom_(Web_standard)).
```html
<link rel="alternate" type="application/atom+xml" title="Atom" href="/atom.xml">
```
### Pingbacks
Your server may be notified when another site links to yours. The href
attribute should contain the location of your pingback service.
```html
<link rel="pingback" href="">
```
* High-level explanation: https://codex.wordpress.org/Introduction_to_Blogging#Pingbacks
* Step-by-step example case: https://www.hixie.ch/specs/pingback/pingback-1.0#TOC5
* PHP pingback service: https://web.archive.org/web/20131211032834/http://blog.perplexedlabs.com/2009/07/15/xmlrpc-pingbacks-using-php/
## Social Networks
### Facebook Open Graph data
You can control the information that Facebook and others display when users
share your site. Below are just the most basic data points you might need. For
specific content types (including "website"), see [Facebook's built-in Open
Graph content
templates](https://developers.facebook.com/docs/sharing/opengraph/using-objects).
Take full advantage of Facebook's support for complex data and activity by
following the [Open Graph
tutorial](https://developers.facebook.com/docs/sharing/webmasters/getting-started).
For a reference of Open Graph's markup and properties, you may check
[Facebook's Open Graph Protocol reference](http://ogp.me/). Finally,
you can validate your markup with the [Facebook Object
Debugger](https://developers.facebook.com/tools/debug/) (needs
registration to Facebook).
```html
<meta property="fb:app_id" content="123456789">
<meta property="og:url" content="https://www.example.com/path/to/page.html">
<meta property="og:type" content="website">
<meta property="og:title" content="">
<meta property="og:image" content="https://www.example.com/path/to/image.jpg">
<meta property="og:description" content="">
<meta property="og:site_name" content="">
<meta property="article:author" content="">
```
### Twitter Cards
Twitter provides a snippet specification that serves a similar purpose to Open
Graph. In fact, Twitter will use Open Graph when Cards is not available. You
can read more about the various snippet formats and application process in the
[official Twitter Cards documentation](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards),
and you can validate your markup with the [Card validator](https://cards-dev.twitter.com/validator)
(needs registration to Twitter).
```html
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@site_account">
<meta name="twitter:creator" content="@individual_account">
<meta name="twitter:url" content="https://www.example.com/path/to/page.html">
<meta name="twitter:title" content="">
<meta name="twitter:description" content="">
<meta name="twitter:image" content="https://www.example.com/path/to/image.jpg">
```
### Google+ / Schema.org
Google also provides a snippet specification that serves a similar
purpose to Facebook's Open Graph or Twitter Cards. While it helps you
to control information displayed on Google+, this metadata is a subset
of [schema.org's microdata vocabulary](https://schema.org/), which
covers many other schemas that can describe the content of your pages
to search engines. For this reason, this metadata is more generic for
SEO, notably for Google's search-engine, although this vocabulary is
also used by Microsoft, Pinterest and Yandex.
You can validate your markup with the [Structured Data Testing
Tool](https://developers.google.com/structured-data/testing-tool/).
Also, please note that this markup requires to add attributes to your
top `html` tag.
```html
<html class="no-js" lang="" itemscope itemtype="http://schema.org/Article">
<head>
<link rel="author" href="">
<link rel="publisher" href="">
<meta itemprop="name" content="">
<meta itemprop="description" content="">
<meta itemprop="image" content="">
```
## URLs
### Canonical URL
Signal to search engines and others "Use this URL for this page!" Useful when
parameters after a `#` or `?` is used to control the display state of a page.
`https://www.example.com/cart.html?shopping-cart-open=true` can be indexed as
the cleaner, more accurate `https://www.example.com/cart.html`.
```html
<link rel="canonical" href="">
```
### Separate mobile URLs
If you use separate URLs for desktop and mobile users, you should consider
helping search engine algorithms better understand the configuration on your
web site.
This can be done by adding the following annotations in your HTML pages:
* on the desktop page, add the `link rel="alternate"` tag pointing to the
corresponding mobile URL, e.g.:
`<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.example.com/page.html" >`
* on the mobile page, add the `link rel="canonical"` tag pointing to the
corresponding desktop URL, e.g.:
`<link rel="canonical" href="https://www.example.com/page.html">`
For more information please see:
* https://developers.google.com/search/mobile-sites/mobile-seo/separate-urls
## Web Apps
There are a couple of meta tags that provide information about a web app when
added to the Home Screen on iOS:
* Adding `apple-mobile-web-app-capable` will make your web app chrome-less and
provide the default iOS app view. You can control the color scheme of the
default view by adding `apple-mobile-web-app-status-bar-style`.
```html
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
```
* You can use `apple-mobile-web-app-title` to add a specific sites name for the
Home Screen icon. This works since iOS 6.
```html
<meta name="apple-mobile-web-app-title" content="">
```
For further information please read the [official
documentation](https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html)
on Apple's site.
### Apple Touch Icons
Apple touch icons are used as icons when a user adds your webapp to the home
screen of aniOS devices.
Though the dimensions of the icon can vary between iOS devices and versions
one `180×180px` touch icon named `icon.png` and including the following in
the `<head>` of the page is enough:
```html
<link rel="apple-touch-icon" href="icon.png">
```
For a more comprehensive overview, please refer to Mathias' [article on Touch
Icons](https://mathiasbynens.be/notes/touch-icons).
### Apple Touch Startup Image
Apart from that it is possible to add start-up screens for web apps on iOS. This
basically works by defining `apple-touch-startup-image` with an according link
to the image. Since iOS devices have different screen resolutions it maybe
necessary to add media queries to detect which image to load. Here is an
example for an iPhone:
```html
<link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" href="img/startup.png">
```
### Chrome Mobile web apps
Chrome Mobile has a specific meta tag for making apps [installable to the
homescreen](https://developer.chrome.com/multidevice/android/installtohomescreen)
which tries to be a more generic replacement to Apple's proprietary meta tag:
```html
<meta name="mobile-web-app-capable" content="yes">
```
Same applies to the touch icons:
```html
<link rel="icon" sizes="192x192" href="highres-icon.png">
```
### Theme Color
You can add the [`theme-color` meta extension](https://html.spec.whatwg.org/multipage/semantics.html#meta-theme-color)
in the `<head>` of your pages to suggest the color that browsers and
OSes should use if they customize the display of individual pages in
their UIs with varying colors.
```html
<meta name="theme-color" content="#ff69b4">
```
The `content` attribute extension can take any valid CSS color.
Currently, the `theme-color` meta extension is supported by [Chrome 39+
for Android Lollipop](https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android).
## security.txt
When security risks in web services are discovered by users they often lack the
channels to disclose them properly. As a result, security issues may be left unreported.
Security.txt defines a standard to help organizations define the process for
users to disclose security vulnerabilities securely. Include a text
file on your server at `.well-known/security.txt` with the relevant contact details.
Check [https://securitytxt.org/](https://securitytxt.org/) for more details.

42
src/doc/faq.md Normal file
View File

@@ -0,0 +1,42 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# Frequently asked questions
* [Why is the Google Analytics code at the bottom? Google recommends it be
placed in the `<head>`.](#why-is-the-google-analytics-code-at-the-bottom-google-recommends-it-be-placed-in-the-head)
* [How can I integrate Bootstrap with HTML5
Boilerplate?](#how-can-i-integrate-bootstrap-with-html5-boilerplate)
* [Do I need to upgrade my site each time a new version of HTML5 Boilerplate is
released?](#do-i-need-to-upgrade-my-site-each-time-a-new-version-of-html5-boilerplate-is-released)
* [Where can I get help with support
questions?](#where-can-i-get-help-with-support-questions)
---
### Why is the Google Analytics code at the bottom? Google recommends it be placed in the `<head>`.
The main advantage of placing it in the `<head>` is that you will track the
user's `pageview` even if they leave the page before it has been fully loaded.
Here's a handy quote from [Mathias Bynens](https://mathiasbynens.be/notes/async-analytics-snippet#comment-50) about our placement choice.
>I should point out that its Google — not me — recommending to place this
script before all other scripts in the document. The only real advantage is to
catch a pageView call if your page fails to load completely (for example, if
the user aborts loading, or quickly closes the page, etc.). Personally, I
wouldnt count that as a page view, so I actually prefer to place this script
at the bottom, after all other scripts. This keeps all the scripts together and
reinforces that scripts at the bottom are the right move. (Usually I
concatenate and minify all my scripts into one .js file — the GA snippet being
the suffix.)
### Do I need to upgrade my site each time a new version of HTML5 Boilerplate is released?
No, just as you don't normally replace the foundation of a house once it
was built. However, there is nothing stopping you from trying to work in the
latest changes, but you'll have to assess the costs/benefits of doing so.
### Where can I get help with support questions?
Please ask for help on
[StackOverflow](https://stackoverflow.com/questions/tagged/html5boilerplate).

205
src/doc/html.md Normal file
View File

@@ -0,0 +1,205 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# The HTML
By default, HTML5 Boilerplate provides two `html` pages:
* [`index.html`](#indexhtml) - a default HTML skeleton that should form the
basis of all pages on your website
* `404.html` - a placeholder 404 error page
## `index.html`
### The `no-js` Class
The `no-js` class is provided in order to allow you to more easily and
explicitly add custom styles based on whether JavaScript is disabled
(`.no-js`) or enabled (`.js`). Using this technique also helps [avoid the
FOUC](https://www.paulirish.com/2009/avoiding-the-fouc-v3/).
## Language Attribute
Please consider specifying the language of your content by adding a [value](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) to the `lang`
attribute in the `<html>` as in this example:
```html
<html class="no-js" lang="en">
```
### The order of the `<title>` and `<meta>` tags
The charset declaration (`<meta charset="utf-8">`) must be included completely
within the [first 1024 bytes of the document](https://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset)
and should be specified as early as possible (before any content that could
be controlled by an attacker, such as a `<title>` element) in order to avoid a
potential [encoding-related security issue](https://code.google.com/archive/p/doctype-mirror/wikis/ArticleUtf7.wiki)
in Internet Explorer
## Meta Description
The `description` meta tag provides a short description of the page.
In some situations this description is used as a part of the snippet
shown in the search results.
```html
<meta name="description" content="This is a description">
```
Google's [Create good meta descriptions](https://support.google.com/webmasters/answer/35624?hl=en#meta-descriptions)
documentation has useful tips on creating an effective description.
## Mobile Viewport
There are a few different options that you can use with the [`viewport` meta
tag](https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4 "Viewport and
Media Queries - The Complete Idiot's Guide"). You can find out more in [the
MDN Web Docs](https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag).
HTML5 Boilerplate comes with a simple setup that strikes a good balance for general use cases.
```html
<meta name="viewport" content="width=device-width, initial-scale=1">
```
If you want to take advantage of edge-to-edge displays of iPhone X/XS/XR you can do
so with additional viewport parameters. [Check the WebKit blog](https://webkit.org/blog/7929/designing-websites-for-iphone-x/)
for details.
## Web App Manifest
HTML5 Boilerplate includes a simple web app manifest file.
The web app manifest is a simple JSON file that allows you to control how your
app appears on a device's home screen, what it looks like when it launches
in that context and what happens when it is launched. This allows for much greater
control over the UI of a saved site or web app on a mobile device.
It's linked to from the HTML as follows:
```html
<link rel="manifest" href="site.webmanifest">
```
Our [site.webmanifest](https://github.com/h5bp/html5-boilerplate/blob/master/src/site.webmanifest) contains a very skeletal "app" definition, just to show the basic usage.
You should fill this file out with [more information about your site or application](https://developer.mozilla.org/en-US/docs/Web/Manifest)
## Favicons and Touch Icon
The shortcut icons should be put in the root directory of your site. `favicon.ico`
is automatically picked up by browsers if it's placed in the root. HTML5
Boilerplate comes with a default set of icons (include favicon and one Apple
Touch Icon) that you can use as a baseline to create your own.
Please refer to the more detailed description in the [Extend section](extend.md)
of these docs.
## The Content Area
The central part of the boilerplate template is pretty much empty. This is
intentional, in order to make the boilerplate suitable for both web page and
web app development.
### Browser Upgrade Prompt
The main content area of the boilerplate includes a prompt to install an up to
date browser for users of IE 9 and lower. If you intended to support IE, then you
should edit or remove the snippet of code.
## Modernizr
HTML5 Boilerplate uses a custom build of Modernizr.
[Modernizr](https://modernizr.com/) is a JavaScript library which adds classes to
the `html` element based on the results of feature test and which ensures that
all browsers can make use of HTML5 elements (as it includes the HTML5 Shiv).
This allows you to target parts of your CSS and JavaScript based on the
features supported by a browser.
Starting with version 3 Modernizr can be customized using the [modernizr-config.json](https://github.com/h5bp/html5-boilerplate/blob/master/modernizr-config.json) and the
[Modernizr command line utility](https://www.npmjs.com/package/modernizr-cli).
## What About Polyfills?
If you need to include [polyfills](https://remysharp.com/2010/10/08/what-is-a-polyfill)
in your project, you must make sure those load before any other JavaScript. If you're
using a polyfill CDN service, like [cdn.polyfill.io](https://cdn.polyfill.io/),
just put it before the other scripts in the bottom of the page:
```html
<script src="js/vendor/modernizr-3.6.0.min.js"></script>
<script src="https://cdn.polyfill.io/v3/polyfill.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
</body>
```
If you like to just include the polyfills yourself, you could include them in
`js/plugins.js`. When you have a bunch of polyfills to load in, you could
also create a `polyfills.js` file in the `js/vendor` directory or include the files
individually and combine them using a build tool. Always ensure that the polyfills
are all loaded before any other JavaScript.
There are some misconceptions about Modernizr and polyfills. It's important
to understand that Modernizr just handles feature checking, not polyfilling
itself. The only thing Modernizr does regarding polyfills is that the team
maintains [a huge list of cross Browser polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills).
### jQuery CDN for jQuery
The jQuery CDN version of the jQuery JavaScript library is referenced towards
the bottom of the page. A local fallback of jQuery is included for rare instances
when the CDN version might not be available, and to facilitate offline
development.
The jQuery CDN version was chosen over other potential candidates
([like Google's Hosted Libraries](https://developers.google.com/speed/libraries/))
because it's fast ([comparable or faster than Google by some
measures](https://www.cdnperf.com/#jsdelivr,cdnjs,google,yandex,microsoft,jquery,bootstrapcdn/https/90))
and, (unlike Google's CDN) is available to China's hundreds of millions of internet users.
For many years we [chose](https://github.com/h5bp/html5-boilerplate/issues/1191)
the Google Hosted version over the jQuery CDN because it was available
over HTTPS (the jQuery CDN was not,) and it offered a better chance of
hitting the cache lottery owing to the popularity of the Google CDN.
The first issue is no longer valid and the second is far outweighed by
being able to serve jQuery to users in China.
While the jQuery CDN is a strong default solution your site or application may
require a different configuration. Testing your site with services like
[WebPageTest](https://www.webpagetest.org/) and browser tools like
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) will help you examine the real
world performance of your site and can show where you can optimize your specific
site or application.
### Google Universal Analytics Tracking Code
Finally, an optimized version of the Google Universal Analytics tracking code is
included.
We use `analytics.js` rather than the newer `gtag.js` as
[it's faster and supports tasks and plugins](https://github.com/philipwalton/analyticsjs-boilerplate/issues/19#issuecomment-333714370)
The beacon transport mechanism is used to send all hits [which saves HTTP requests and improves performance](https://philipwalton.com/articles/the-google-analytics-setup-i-use-on-every-site-i-build/#loading-analytics.js).
Google recommends that this script be placed at the top of the page.
Factors to consider: if you place this script at the top of the page, youll
be able to count users who dont fully load the page, and youll incur the max
number of simultaneous connections of the browser.
Further information:
- [Introduction to
Analytics.js](https://developers.google.com/analytics/devguides/collection/analyticsjs/)
- [Google Analytics Demos & Tools](https://ga-dev-tools.appspot.com/)
**N.B.** The Google Analytics snippet is included by default mainly
because Google Analytics is [currently one of the most popular tracking
solutions](https://trends.builtwith.com/analytics/Google-Analytics) out there.
However, its usage isn't set in stone, and you SHOULD consider exploring the
[alternatives](https://en.wikipedia.org/wiki/List_of_web_analytics_software)
and use whatever suits your needs best.

36
src/doc/js.md Normal file
View File

@@ -0,0 +1,36 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# The JavaScript
Information about the default JavaScript included in the project.
## main.js
This file can be used to contain or reference your site/app JavaScript code.
If you're working on something more advanced you might replace this file
entirely. That's cool.
## plugins.js
This file can be used to contain all your plugins, such as jQuery plugins and
other 3rd party scripts for a simple site.
One approach is to put jQuery plugins inside of a `(function($){ ...
})(jQuery);` closure to make sure they're in the jQuery namespace safety
blanket. Read more about [jQuery plugin
authoring](https://learn.jquery.com/plugins/#Getting_Started).
By default the `plugins.js` file contains a small script to avoid `console`
errors in browsers that lack a `console`. The script will make sure that, if
a console method isn't available, that method will have the value of empty
function, thus, preventing the browser from throwing an error.
## vendor
This directory can be used to contain all 3rd party library code.
Minified versions of the latest jQuery and Modernizr libraries are included by
default. You may wish to create your own [custom Modernizr
build with the online builder](https://www.modernizr.com/download/) or [command
line tool](https://modernizr.com/docs#command-line-config).

173
src/doc/misc.md Normal file
View File

@@ -0,0 +1,173 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# Miscellaneous
* [.gitignore](#gitignore)
* [.editorconfig](#editorconfig)
* [Server Configuration](#server-configuration)
* [robots.txt](#robotstxt)
* [humans.txt](#humanstxt)
* [browserconfig.xml](#browserconfigxml)
--
## .gitignore
HTML5 Boilerplate includes a basic project-level `.gitignore`. This should
primarily be used to avoid certain project-level files and directories from
being kept under source control. Different development-environments will
benefit from different collections of ignores.
OS-specific and editor-specific files should be ignored using a "global
ignore" that applies to all repositories on your system.
For example, add the following to your `~/.gitconfig`, where the `.gitignore`
in your HOME directory contains the files and directories you'd like to
globally ignore:
```gitignore
[core]
excludesfile = ~/.gitignore
```
* More on global ignores: https://help.github.com/articles/ignoring-files/
* Comprehensive set of ignores on GitHub: https://github.com/github/gitignore
## .editorconfig
The `.editorconfig` file is provided in order to encourage and help you and
your team define and maintain consistent coding styles between different
editors and IDEs.
By default, `.editorconfig` includes some basic
[properties](https://editorconfig.org/#supported-properties) that reflect the
coding styles from the files provided by default, but you can easily change
them to better suit your needs.
In order for your editor/IDE to apply the
[properties](https://editorconfig.org/#supported-properties) from the
`.editorconfig` file, you may need to [install a
plugin]( https://editorconfig.org/#download).
__N.B.__ If you aren't using the server configurations provided by HTML5
Boilerplate, we highly encourage you to configure your server to block
access to `.editorconfig` files, as they can disclose sensitive information!
For more details, please refer to the [EditorConfig
project](https://editorconfig.org/).
## Server Configuration
H5BP includes a [`.htaccess`](#htaccess) file for the [Apache HTTP
server](https://httpd.apache.org/docs/). If you are not using Apache
as your web server, then you are encouraged to download a
[server configuration](https://github.com/h5bp/server-configs) that
corresponds to your web server and environment.
A `.htaccess` (hypertext access) file is an [Apache HTTP server
configuration file](https://github.com/h5bp/server-configs-apache).
The `.htaccess` file is mostly used for:
* Rewriting URLs
* Controlling cache
* Authentication
* Server-side includes
* Redirects
* Gzipping
If you have access to the main server configuration file (usually called
`httpd.conf`), you should add the logic from the `.htaccess` file in, for
example, a <Directory> section in the main configuration file. This is usually
the recommended way, as using .htaccess files slows down Apache!
To enable Apache modules locally, please see:
https://github.com/h5bp/server-configs-apache/wiki/How-to-enable-Apache-modules.
In the repo the `.htaccess` is used for:
* Allowing cross-origin access to web fonts
* CORS header for images when browsers request it
* Enable `404.html` as 404 error document
* Making the website experience better for IE users better
* Media UTF-8 as character encoding for `text/html` and `text/plain`
* Enabling the rewrite URLs engine
* Forcing or removing the `www.` at the begin of a URL
* It blocks access to directories without a default document
* It blocks access to files that can expose sensitive information.
* It reduces MIME type security risks
* It forces compressing (gzipping)
* It tells the browser whether they should request a specific file from the
server or whether they should grab it from the browser's cache
When using `.htaccess` we recommend reading all inline comments (the rules after
a `#`) in the file once. There is a bunch of optional stuff in it.
If you want to know more about the `.htaccess` file check out the
[Apache HTTP server docs](https://httpd.apache.org/docs/) or more
specifically the [htaccess
section](https://httpd.apache.org/docs/current/howto/htaccess.html).
Notice that the original repo for the `.htaccess` file is [this
one](https://github.com/h5bp/server-configs-apache).
## robots.txt
The `robots.txt` file is used to give instructions to web robots on what can
be crawled from the website.
By default, the file provided by this project includes the next two lines:
* `User-agent: *` - the following rules apply to all web robots
* `Disallow:` - everything on the website is allowed to be crawled
If you want to disallow certain pages you will need to specify the path in a
`Disallow` directive (e.g.: `Disallow: /path`) or, if you want to disallow
crawling of all content, use `Disallow: /`.
The `/robots.txt` file is not intended for access control, so don't try to
use it as such. Think of it as a "No Entry" sign, rather than a locked door.
URLs disallowed by the `robots.txt` file might still be indexed without being
crawled, and the content from within the `robots.txt` file can be viewed by
anyone, potentially disclosing the location of your private content! So, if
you want to block access to private content, use proper authentication instead.
For more information about `robots.txt`, please see:
* [robotstxt.org](http://www.robotstxt.org/)
* [How Google handles the `robots.txt` file](https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt)
## humans.txt
The `humans.txt` file is used to provide information about people involved with
the website.
The provided file contains three sections:
* `TEAM` - this is intended to list the group of people responsible for the website
* `THANKS` - this is intended to list the group of people that have contributed
to the website
* `TECHNOLOGY COLOPHON` - the section lists technologies used to make the website
For more information about `humans.txt`, please see: http://humanstxt.org/
## browserconfig.xml
The `browserconfig.xml` file is used to customize the tile displayed when users
pin your site to the Windows 8.1 start screen. In there you can define custom
tile colors, custom images or even [live tiles](https://msdn.microsoft.com/library/dn455106.aspx#CreatingLiveTiles).
By default, the file points to 2 placeholder tile images:
* `tile.png` (558x558px): used for `Small`, `Medium` and `Large` tiles.
This image resizes automatically when necessary.
* `tile-wide.png` (558x270px): user for `Wide` tiles.
Notice that IE11 uses the same images when adding a site to the `favorites`.
For more in-depth information about the `browserconfig.xml` file, please
see [MSDN](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn320426(v=vs.85)).

130
src/doc/usage.md Normal file
View File

@@ -0,0 +1,130 @@
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
table of contents](TOC.md)
# Usage
The most basic usage of HTML5 Boilerplate is to create a static site or simple
app. Once you've downloaded or cloned the project, that process looks something
like this:
1. Set up the basic structure of the site.
2. Add some content, style, and functionality.
3. Run your site locally to see how it looks.
4. Deploy your site.
Cool, right? _It is_. That said, the smart defaults, baseline elements, default
attribute values and various other utilities that HTML5 Boilerplate offers can
serve as the foundation for whatever you're interested in building.
Even the basic use-case of a simple static site can be enhanced by manipulating
the code through an automated build process. Moving up in complexity HTML5
Boilerplate can be integrated with whatever front-end framework, CMS or
e-commerce platform you're working with. Mix-and-match to your heart's content.
Use what you need (toss it in a blender if you need to) and discard the rest.
HTML5 Boilerplate is a starting point, not a destination.
## Basic structure
A basic HTML5 Boilerplate site initially looks something like this:
```
.
├── css
│ ├── main.css
│ └── normalize.css
├── doc
├── img
├── js
│ ├── main.js
│ ├── plugins.js
│ └── vendor
│ ├── jquery.min.js
│ └── modernizr.min.js
├── .editorconfig
├── .htaccess
├── 404.html
├── browserconfig.xml
├── favicon.ico
├── humans.txt
├── icon.png
├── index.html
├── robots.txt
├── site.webmanifest
├── tile.png
└── tile-wide.png
```
What follows is a general overview of each major part and how to use them.
### css
This directory should contain all your project's CSS files. It includes some
initial CSS to help get you started from a solid foundation. [About the
CSS](css.md).
### doc
This directory contains all the HTML5 Boilerplate documentation. You can use it
as the location and basis for your own project's documentation.
### js
This directory should contain all your project's JS files. Libraries, plugins,
and custom code can all be included here. It includes some initial JS to help
get you started. [About the JavaScript](js.md).
### .htaccess
The default web server configs are for Apache. For more information, please
refer to the [Apache Server Configs
repository](https://github.com/h5bp/server-configs-apache).
Host your site on a server other than Apache? You're likely to find the
corresponding server configs project listed in our [Server Configs
](https://github.com/h5bp/server-configs/blob/master/README.md) repository.
### 404.html
A helpful custom 404 to get you started.
### browserconfig.xml
This file contains all settings regarding custom tiles for IE11 and Edge.
For more info on this topic, please refer to
[Microsoft's Docs](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn320426(v=vs.85)).
### .editorconfig
The `.editorconfig` file is provided in order to encourage and help you and
your team to maintain consistent coding styles between different
editors and IDEs. [Read more about the `.editorconfig` file](misc.md#editorconfig).
### index.html
This is the default HTML skeleton that should form the basis of all pages on
your site. If you are using a server-side templating framework, then you will
need to integrate this starting HTML with your setup.
Make sure that you update the URLs for the referenced CSS and JavaScript if you
modify the directory structure at all.
If you are using Google Universal Analytics, make sure that you edit the
corresponding snippet at the bottom to include your analytics ID.
### humans.txt
Edit this file to include the team that worked on your site/app, and the
technology powering it.
### robots.txt
Edit this file to include any pages you need hidden from search engines.
### Icons
Replace the default `favicon.ico`, `tile.png`, `tile-wide.png` and Apple
Touch Icon with your own.
If you want to use different Apple Touch Icons for different resolutions please
refer to the [according documentation](extend.md#apple-touch-icons).

BIN
src/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

15
src/humans.txt Normal file
View File

@@ -0,0 +1,15 @@
# humanstxt.org/
# The humans responsible & technology colophon
# TEAM
<name> -- <role> -- <twitter>
# THANKS
<name>
# TECHNOLOGY COLOPHON
CSS3, HTML5
Apache Server Configs, jQuery, Modernizr, Normalize.css

BIN
src/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

0
src/img/.gitignore vendored Normal file
View File

41
src/index.html Normal file
View File

@@ -0,0 +1,41 @@
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<meta name="theme-color" content="#fafafa">
</head>
<body>
<!--[if IE]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
<![endif]-->
<!-- Add your site or application content here -->
<p>Hello world! This is HTML5 Boilerplate.</p>
<script src="js/vendor/modernizr-{{MODERNIZR_VERSION}}.min.js"></script>
<script src="https://code.jquery.com/jquery-{{JQUERY_VERSION}}.min.js" integrity="{{JQUERY_SRI_HASH}}" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-{{JQUERY_VERSION}}.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
<script>
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto'); ga('set','transport','beacon'); ga('send', 'pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
</body>
</html>

0
src/js/main.js Normal file
View File

24
src/js/plugins.js Normal file
View File

@@ -0,0 +1,24 @@
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn'
];
var length = methods.length;
var console = (window.console = window.console || {});
while (length--) {
method = methods[length];
// Only stub undefined methods.
if (!console[method]) {
console[method] = noop;
}
}
}());
// Place any jQuery/helper plugins in here.

5
src/robots.txt Normal file
View File

@@ -0,0 +1,5 @@
# www.robotstxt.org/
# Allow crawling of all content
User-agent: *
Disallow:

12
src/site.webmanifest Normal file
View File

@@ -0,0 +1,12 @@
{
"short_name": "",
"name": "",
"icons": [{
"src": "icon.png",
"type": "image/png",
"sizes": "192x192"
}],
"start_url": "/?utm_source=homescreen",
"background_color": "#fafafa",
"theme_color": "#fafafa"
}

BIN
src/tile-wide.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/tile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

83
test/file_content.js Normal file
View File

@@ -0,0 +1,83 @@
import assert from 'assert';
import fs from 'fs';
import path from 'path';
import pkg from './../package.json';
const dirs = pkg['h5bp-configs'].directories;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function checkString(file, string, done) {
let character = '';
let matchFound = false;
let matchedPositions = 0;
const readStream = fs.createReadStream(file, {'encoding': 'utf8'});
readStream.on('close', done);
readStream.on('error', done);
readStream.on('readable', function () {
// Read file until the string is found
// or the whole file has been read
while (matchFound !== true &&
(character = readStream.read(1)) !== null) {
if (character === string.charAt(matchedPositions)) {
matchedPositions += 1;
} else {
matchedPositions = 0;
}
if (matchedPositions === string.length) {
matchFound = true;
}
}
assert.equal(true, matchFound);
this.close();
});
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function runTests() {
const dir = dirs.dist;
describe(`Test if the files from the "${dir}" directory have the expected content`, () => {
it('".htaccess" should have the "ErrorDocument..." line uncommented', (done) => {
const string = '\n\nErrorDocument 404 /404.html\n\n';
checkString(path.resolve(dir, '.htaccess'), string, done);
});
it('"index.html" should contain the correct jQuery version in the CDN URL', (done) => {
const string = `code.jquery.com/jquery-${pkg.devDependencies.jquery}.min.js`;
checkString(path.resolve(dir, 'index.html'), string, done);
});
it('"index.html" should contain the correct jQuery version in the local URL', (done) => {
const string = `js/vendor/jquery-${pkg.devDependencies.jquery}.min.js`;
checkString(path.resolve(dir, 'index.html'), string, done);
});
it('"index.html" should contain the correct Modernizr version in the local URL', (done) => {
const string = `js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`;
checkString(path.resolve(dir, 'index.html'), string, done);
});
it('"main.css" should contain a custom banner', function (done) {
const string = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n`;
checkString(path.resolve(dir, 'css/main.css'), string, done);
});
});
}
runTests();

133
test/file_existence.js Normal file
View File

@@ -0,0 +1,133 @@
import assert from 'assert';
import fs from 'fs';
import path from 'path';
import glob from 'glob';
import pkg from './../package.json';
const dirs = pkg['h5bp-configs'].directories;
const expectedFilesInArchiveDir = [
`${pkg.name}_v${pkg.version}.zip`
];
const expectedFilesInDistDir = [
'.editorconfig',
'.gitattributes',
'.gitignore',
'.htaccess',
'404.html',
'browserconfig.xml',
'css/', // for directories, a `/` character
// should be included at the end
'css/main.css',
'css/normalize.css',
'doc/',
'doc/TOC.md',
'doc/css.md',
'doc/extend.md',
'doc/faq.md',
'doc/html.md',
'doc/js.md',
'doc/misc.md',
'doc/usage.md',
'favicon.ico',
'humans.txt',
'icon.png',
'img/',
'img/.gitignore',
'index.html',
'js/',
'js/main.js',
'js/plugins.js',
'js/vendor/',
`js/vendor/jquery-${pkg.devDependencies.jquery}.min.js`,
`js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`,
'LICENSE.txt',
'robots.txt',
'site.webmanifest',
'tile-wide.png',
'tile.png'
];
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function checkFiles(directory, expectedFiles) {
// Get the list of files from the specified directory
const files = glob.sync('**/*', {
'cwd': directory,
'dot': true, // include hidden files
'mark': true // add a `/` character to directory matches
});
// Check if all expected files are present in the
// specified directory, and are of the expected type
expectedFiles.forEach((file) => {
let ok = false;
const expectedFileType = (file.slice(-1) !== '/' ? 'regular file' : 'directory');
// If file exists
if (files.indexOf(file) !== -1) {
// Check if the file is of the correct type
if (file.slice(-1) !== '/') {
// Check if the file is really a regular file
ok = fs.statSync(path.resolve(directory, file)).isFile();
} else {
// Check if the file is a directory
// (Since glob adds the `/` character to directory matches,
// we can simply check if the `/` character is present)
ok = (files[files.indexOf(file)].slice(-1) === '/');
}
}
it(`"${file}" should be present and it should be a ${expectedFileType}`, () =>{
assert.equal(true, ok);
});
});
// List all files that should be NOT
// be present in the specified directory
(files.filter((file) => {
return expectedFiles.indexOf(file) === -1;
})).forEach((file) => {
it(`"${file}" should NOT be present`, () => {
assert(false);
});
});
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function runTests() {
describe('Test if all the expected files, and only them, are present in the build directories', () => {
describe(dirs.archive, () => {
checkFiles(dirs.archive, expectedFilesInArchiveDir);
});
describe(dirs.dist, () => {
checkFiles(dirs.dist, expectedFilesInDistDir);
});
});
}
runTests();