mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-13 08:38:03 -05:00
Compare commits
1172 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
091a357382 | ||
|
|
88ce8763fc | ||
|
|
83ba9d23ff | ||
|
|
c3a1e71d98 | ||
|
|
17f5731912 | ||
|
|
97367a94f4 | ||
|
|
b99ebd644a | ||
|
|
94f79e4c17 | ||
|
|
f814431eea | ||
|
|
1fd0124ecd | ||
|
|
1e01d6e47f | ||
|
|
15bf5543c3 | ||
|
|
a0db7c3c5d | ||
|
|
ac08a17cb6 | ||
|
|
ec50fce6be | ||
|
|
2eb593dfaa | ||
|
|
28417fd11d | ||
|
|
9a9f4e1990 | ||
|
|
fdd2d89351 | ||
|
|
d833efb44e | ||
|
|
a51c70150f | ||
|
|
01e7f51b1d | ||
|
|
5a7751fef3 | ||
|
|
acb43472fc | ||
|
|
345287ef46 | ||
|
|
fefdbc555e | ||
|
|
7541d5bb3b | ||
|
|
b8e133b851 | ||
|
|
789b7197fe | ||
|
|
c37e7b7e06 | ||
|
|
401b4426e7 | ||
|
|
e5a7112cff | ||
|
|
2051e7f47e | ||
|
|
c4610f373e | ||
|
|
16a8a07b2f | ||
|
|
a545d58fd9 | ||
|
|
92602749bf | ||
|
|
859dad015b | ||
|
|
250757e847 | ||
|
|
8228b2adc2 | ||
|
|
ba99a1360b | ||
|
|
0ba9d75e12 | ||
|
|
218f5270cf | ||
|
|
7aad29bfb4 | ||
|
|
1ebdce9a80 | ||
|
|
3deb82a9c6 | ||
|
|
07e9dc66b9 | ||
|
|
90066899f3 | ||
|
|
519966c30c | ||
|
|
72a8f610c8 | ||
|
|
38cf0f0c60 | ||
|
|
d00a4b9fda | ||
|
|
6782409daf | ||
|
|
494a239936 | ||
|
|
8bd981261d | ||
|
|
c4f57fa9c0 | ||
|
|
01f2040e99 | ||
|
|
307cef7a75 | ||
|
|
e750b328a2 | ||
|
|
e99a501a25 | ||
|
|
583c8052d2 | ||
|
|
3a9bcc4a24 | ||
|
|
633c1b5b40 | ||
|
|
6419ff990d | ||
|
|
0a9423c178 | ||
|
|
b54d707e88 | ||
|
|
67d2f0d7ff | ||
|
|
f3689b927a | ||
|
|
a7292d023b | ||
|
|
ed6a205abb | ||
|
|
8bd9b58d82 | ||
|
|
64126bb84d | ||
|
|
8e6ff2be8d | ||
|
|
4c3245a33e | ||
|
|
9a1f33befb | ||
|
|
c2472e2839 | ||
|
|
4093ecbffc | ||
|
|
438511b56a | ||
|
|
a479681283 | ||
|
|
c13d2f6633 | ||
|
|
0a23f3d882 | ||
|
|
e0689d1e8f | ||
|
|
2789ddbfee | ||
|
|
8ee4acf6cf | ||
|
|
11c518df0f | ||
|
|
1bbe026c9f | ||
|
|
1837792897 | ||
|
|
704af3874f | ||
|
|
5385abea1a | ||
|
|
5f06577f8e | ||
|
|
082f7ef8ba | ||
|
|
1c4aed9410 | ||
|
|
c2a5395d73 | ||
|
|
b2013140ad | ||
|
|
496430dc48 | ||
|
|
db76cfb022 | ||
|
|
6276a7d1f5 | ||
|
|
0a9f716d8f | ||
|
|
87bdc80ab9 | ||
|
|
0b408df3ec | ||
|
|
ce1134a099 | ||
|
|
608b3eb16d | ||
|
|
decc19c619 | ||
|
|
895dc03cc2 | ||
|
|
64f68bed46 | ||
|
|
8fc00713b6 | ||
|
|
2a9ab05318 | ||
|
|
b6a8eba7a1 | ||
|
|
5ce6157cc1 | ||
|
|
b86d1ae39f | ||
|
|
91a1249d84 | ||
|
|
cbd5b8b6d3 | ||
|
|
29d7d8054b | ||
|
|
c0084e2c57 | ||
|
|
571f79a300 | ||
|
|
17073f50b0 | ||
|
|
17f1e1b3cd | ||
|
|
22d800ad31 | ||
|
|
7e8b7e9c03 | ||
|
|
0836867337 | ||
|
|
47923c6c03 | ||
|
|
ec56510b85 | ||
|
|
f697484509 | ||
|
|
bc68f051db | ||
|
|
022ca602b9 | ||
|
|
3aa591f0cf | ||
|
|
5df316b86b | ||
|
|
706d83295c | ||
|
|
a51acfd751 | ||
|
|
67161aad27 | ||
|
|
e72ee24696 | ||
|
|
c4552f46a1 | ||
|
|
84aff4aeb9 | ||
|
|
9dd302c428 | ||
|
|
ddeaf2f274 | ||
|
|
efd800aed6 | ||
|
|
07eafac459 | ||
|
|
3f3f268ca4 | ||
|
|
7ff88d3091 | ||
|
|
2fe70fc216 | ||
|
|
fc1083057a | ||
|
|
4217501f22 | ||
|
|
85140ad1d8 | ||
|
|
6b6bd4f841 | ||
|
|
315edc436f | ||
|
|
15c24031e9 | ||
|
|
3d7f584df7 | ||
|
|
5d236da368 | ||
|
|
4046ea2db0 | ||
|
|
ceee6b4d63 | ||
|
|
e3d623d3d9 | ||
|
|
71ccf57f05 | ||
|
|
d4f5285c21 | ||
|
|
327aaf83f0 | ||
|
|
575d40a64b | ||
|
|
3895c535be | ||
|
|
2154114f92 | ||
|
|
48f92c41cd | ||
|
|
e4b20602a8 | ||
|
|
77fd13bb43 | ||
|
|
416029aafb | ||
|
|
f6bce9eae3 | ||
|
|
21a06810e0 | ||
|
|
92f0b47a3e | ||
|
|
2d48b248f6 | ||
|
|
9d45473ab4 | ||
|
|
a7820f1264 | ||
|
|
3d6e26758a | ||
|
|
4059730aec | ||
|
|
69f8552131 | ||
|
|
af3e9fa3ca | ||
|
|
380d3c6eb8 | ||
|
|
a4acaef1e8 | ||
|
|
0c60def832 | ||
|
|
37638d8ff8 | ||
|
|
c7d7e574f9 | ||
|
|
9f68e84c76 | ||
|
|
2022ddc112 | ||
|
|
245ce8f40d | ||
|
|
4a7d2d68aa | ||
|
|
f4805dbb9c | ||
|
|
48a86758e1 | ||
|
|
9a167746db | ||
|
|
ae385e65f3 | ||
|
|
cc1db3ba90 | ||
|
|
a34a3954e7 | ||
|
|
1389d6dfa4 | ||
|
|
4c5a98efbe | ||
|
|
49b7a12469 | ||
|
|
97fc780b52 | ||
|
|
6f8ac7034c | ||
|
|
b9fe248da4 | ||
|
|
93bd017b8f | ||
|
|
1649133c71 | ||
|
|
d21678fca4 | ||
|
|
961dfce7ff | ||
|
|
aabdc35149 | ||
|
|
90bf18fb4a | ||
|
|
72ab0b203d | ||
|
|
681965f82e | ||
|
|
3e0f43bf99 | ||
|
|
e1c825d925 | ||
|
|
3e14cdc87b | ||
|
|
90ac248bd6 | ||
|
|
62e7373888 | ||
|
|
a523fb6c2e | ||
|
|
ed66bae54e | ||
|
|
7b7dac6149 | ||
|
|
7532b85789 | ||
|
|
542c5b7408 | ||
|
|
2bcb17900f | ||
|
|
6e3a0c48fc | ||
|
|
7224437430 | ||
|
|
ae5ae38473 | ||
|
|
2c50b9d1e6 | ||
|
|
aeb836759c | ||
|
|
284cdd632d | ||
|
|
3a7fa13852 | ||
|
|
082bac8e2a | ||
|
|
c4050e7b6a | ||
|
|
490876ac12 | ||
|
|
f0f8369df7 | ||
|
|
683afeca4a | ||
|
|
9d1a370296 | ||
|
|
aa46df4c16 | ||
|
|
4ab180a44d | ||
|
|
47ed18fa44 | ||
|
|
ea7b1f1ce4 | ||
|
|
a5084f2b93 | ||
|
|
f17a4b8ff0 | ||
|
|
7fd4dab138 | ||
|
|
6d83edca9b | ||
|
|
f49826f759 | ||
|
|
75cd7282e2 | ||
|
|
f13f847c64 | ||
|
|
702a88ed7e | ||
|
|
aa38141137 | ||
|
|
f6d8f7bdc7 | ||
|
|
58f76aaa44 | ||
|
|
5ce3cc8e5d | ||
|
|
140fe31e5a | ||
|
|
d4f88e8e29 | ||
|
|
8953f3bfae | ||
|
|
b2d54a1137 | ||
|
|
ef114b1e49 | ||
|
|
4382b19b13 | ||
|
|
7180ba0e3f | ||
|
|
ccd7f455da | ||
|
|
761070f47b | ||
|
|
4354661369 | ||
|
|
a1d3ea3505 | ||
|
|
eee5d70a3c | ||
|
|
cc58f42990 | ||
|
|
2f9dc0dd4a | ||
|
|
9f8e64ff8a | ||
|
|
4875a0bbc0 | ||
|
|
f7c5ebc3b9 | ||
|
|
bea6a9c97b | ||
|
|
e3bbb1bdbb | ||
|
|
4e6180c978 | ||
|
|
7fd57012c7 | ||
|
|
afca09de04 | ||
|
|
8fdb6565da | ||
|
|
06d5795150 | ||
|
|
b6f3a0a576 | ||
|
|
4a600dc41e | ||
|
|
7ced9d92d7 | ||
|
|
4ba76e39ae | ||
|
|
e5d043bf19 | ||
|
|
e78d165b3e | ||
|
|
8d9a7d45e0 | ||
|
|
5382f78315 | ||
|
|
33bab66994 | ||
|
|
647c4992f0 | ||
|
|
d039b2ce5e | ||
|
|
106ee55f2f | ||
|
|
3743365f8c | ||
|
|
86e96036f3 | ||
|
|
5ff5aad134 | ||
|
|
e8ad8779d2 | ||
|
|
6c0a31f199 | ||
|
|
a4651c3f51 | ||
|
|
4027924b39 | ||
|
|
5b7387ee55 | ||
|
|
3c5f05b23b | ||
|
|
b59983de51 | ||
|
|
d9f34cb5c3 | ||
|
|
593ff2d394 | ||
|
|
ad158346ea | ||
|
|
225dad4a73 | ||
|
|
1352b9305a | ||
|
|
7eac6929bd | ||
|
|
1028eb19b3 | ||
|
|
1b6f24e927 | ||
|
|
71044b0bb4 | ||
|
|
f4390eb9f2 | ||
|
|
b1017ee4e9 | ||
|
|
7fbb7b57dc | ||
|
|
c3bbe3df8b | ||
|
|
53cf67d8f2 | ||
|
|
01889180e8 | ||
|
|
5bf88f21f7 | ||
|
|
17b41218a0 | ||
|
|
68ed3e4955 | ||
|
|
ec9167757c | ||
|
|
33604c33c2 | ||
|
|
20ff3c0a1c | ||
|
|
8f9f256fed | ||
|
|
8110c79a5f | ||
|
|
76449f520a | ||
|
|
4391b7d93f | ||
|
|
87ab07da52 | ||
|
|
7e37efd204 | ||
|
|
9a13b6035e | ||
|
|
b3cde06804 | ||
|
|
770a2b5fff | ||
|
|
5df2aee315 | ||
|
|
28521df009 | ||
|
|
c69c4a7ce7 | ||
|
|
ee3ae1b3e9 | ||
|
|
c8c777b0cc | ||
|
|
b43ea38f62 | ||
|
|
60b111b120 | ||
|
|
e64c4a5203 | ||
|
|
79b210880e | ||
|
|
00a2838d94 | ||
|
|
6e79f531e9 | ||
|
|
248c2c8bd5 | ||
|
|
789626dcc6 | ||
|
|
c41f02611b | ||
|
|
262c3c23f4 | ||
|
|
4ba393a940 | ||
|
|
b3e6165157 | ||
|
|
f762610710 | ||
|
|
fd8a146dce | ||
|
|
7610e19f51 | ||
|
|
0126beff97 | ||
|
|
7b642496ac | ||
|
|
33c3ed54f5 | ||
|
|
b1af30e561 | ||
|
|
75d9674a8d | ||
|
|
1eed2b1478 | ||
|
|
b9d70de859 | ||
|
|
7ccdb421bd | ||
|
|
41fa730bcc | ||
|
|
a8a19cb287 | ||
|
|
ede0733fd4 | ||
|
|
141ce984c0 | ||
|
|
56995b14d3 | ||
|
|
bd9544f895 | ||
|
|
938e083545 | ||
|
|
80987cf063 | ||
|
|
623320525a | ||
|
|
96dae40021 | ||
|
|
67cc73e850 | ||
|
|
900be8b65b | ||
|
|
8b953be4ec | ||
|
|
4ebe7d9559 | ||
|
|
f08040ce51 | ||
|
|
7d4a34691c | ||
|
|
1984dca2de | ||
|
|
baac9b3010 | ||
|
|
a333adefb3 | ||
|
|
83ea1b55c2 | ||
|
|
acdfd886be | ||
|
|
a9508a510e | ||
|
|
6ba647827f | ||
|
|
d904956162 | ||
|
|
39c9fa1bdd | ||
|
|
dcf5c54689 | ||
|
|
1b4ebea289 | ||
|
|
223f2bf801 | ||
|
|
35bc701875 | ||
|
|
4401dba445 | ||
|
|
704c9d59f8 | ||
|
|
8860e8542c | ||
|
|
587f5e1cb1 | ||
|
|
89863bab79 | ||
|
|
b4d6cdd765 | ||
|
|
82d35f28a5 | ||
|
|
1cae43ec90 | ||
|
|
a00d0365c2 | ||
|
|
1adf68c34b | ||
|
|
a4604550a7 | ||
|
|
899fb0b411 | ||
|
|
425b39b98e | ||
|
|
cc6785ebe5 | ||
|
|
e87f11bff8 | ||
|
|
36864878bb | ||
|
|
4d9af8c364 | ||
|
|
9a7b6065c4 | ||
|
|
9b422952a6 | ||
|
|
063d768b6d | ||
|
|
d7d872af91 | ||
|
|
5944818bb6 | ||
|
|
0fc6689f73 | ||
|
|
0b9b57bc1c | ||
|
|
1238da8297 | ||
|
|
095eb6ce3f | ||
|
|
81bfc44462 | ||
|
|
1e54989216 | ||
|
|
fba6c345d1 | ||
|
|
84043984bd | ||
|
|
82160729f3 | ||
|
|
096541ef1c | ||
|
|
1b3daa1a7a | ||
|
|
c484a0bb66 | ||
|
|
999732ddbc | ||
|
|
5a7f59382d | ||
|
|
7c635491aa | ||
|
|
9e5bdfeaf5 | ||
|
|
2784d93b38 | ||
|
|
4ff9b3deee | ||
|
|
40bf27f9bf | ||
|
|
c1111d88ce | ||
|
|
a6f2a4cba8 | ||
|
|
fa1a527095 | ||
|
|
1acc900b54 | ||
|
|
437d44e297 | ||
|
|
e853413124 | ||
|
|
a1bf10c196 | ||
|
|
748ead7798 | ||
|
|
f8fadd5e32 | ||
|
|
fffce26624 | ||
|
|
79ff3be180 | ||
|
|
8bcdd253de | ||
|
|
28e093e455 | ||
|
|
fb92e53224 | ||
|
|
87399662a9 | ||
|
|
26302a5ec2 | ||
|
|
3bf872a5e2 | ||
|
|
5007fc167d | ||
|
|
1b73fd9d60 | ||
|
|
1ac3b984d7 | ||
|
|
d54266c5f2 | ||
|
|
863374335a | ||
|
|
b2237d7ded | ||
|
|
342b9706f3 | ||
|
|
68f93fade7 | ||
|
|
3cd1d92fe8 | ||
|
|
992161c79d | ||
|
|
6ad9f1d7f3 | ||
|
|
a03f1a6a8a | ||
|
|
81170d86b9 | ||
|
|
57550135ae | ||
|
|
457fe041a6 | ||
|
|
1a987d4585 | ||
|
|
ec84e931e0 | ||
|
|
d5dd15049e | ||
|
|
508b4fadc8 | ||
|
|
3f8bd7e679 | ||
|
|
19ede6465e | ||
|
|
41b5b92f22 | ||
|
|
32c0ceab5a | ||
|
|
c672850c4a | ||
|
|
c1eaee5c25 | ||
|
|
81b60091e3 | ||
|
|
109b773255 | ||
|
|
730c9d08db | ||
|
|
ca25fc9a83 | ||
|
|
36bdd37f25 | ||
|
|
be09d98531 | ||
|
|
541e683449 | ||
|
|
2bb5c0bdc5 | ||
|
|
51c64ae9ce | ||
|
|
3d5723ef54 | ||
|
|
9b161f124e | ||
|
|
1d1c8da1d6 | ||
|
|
d25b3b7cc3 | ||
|
|
365adaa900 | ||
|
|
b1ceadddba | ||
|
|
3428b6d090 | ||
|
|
1a623bd8a4 | ||
|
|
bf7092d0a9 | ||
|
|
0f49bc96cb | ||
|
|
7885503c42 | ||
|
|
fcfd5f16ea | ||
|
|
26c864a711 | ||
|
|
1859d7996b | ||
|
|
c796751e20 | ||
|
|
419e8a28f4 | ||
|
|
d88493b795 | ||
|
|
909f1fb102 | ||
|
|
e5d49a8089 | ||
|
|
44fbe4716c | ||
|
|
07112cbada | ||
|
|
3f1009f416 | ||
|
|
b10ffba67d | ||
|
|
23426bef04 | ||
|
|
8041c49815 | ||
|
|
e460abb30c | ||
|
|
ba1a01c7dd | ||
|
|
58ff566542 | ||
|
|
6f45d34b20 | ||
|
|
615b6790c2 | ||
|
|
3172b1be3e | ||
|
|
8573e89dfd | ||
|
|
a20f49b721 | ||
|
|
1f900046e9 | ||
|
|
73866f1ed7 | ||
|
|
cc2a702133 | ||
|
|
5dfb284f12 | ||
|
|
f99c6695c6 | ||
|
|
fd4ae81073 | ||
|
|
8ed4932332 | ||
|
|
a305acff17 | ||
|
|
693a4e2351 | ||
|
|
4f91384343 | ||
|
|
03300bd66e | ||
|
|
03a15e111f | ||
|
|
5f9e1ab94d | ||
|
|
bd4a8c1bb9 | ||
|
|
18b3f61d1e | ||
|
|
7ba5c17eaf | ||
|
|
e3c5776973 | ||
|
|
767fd9d776 | ||
|
|
c706d94eed | ||
|
|
be70b186c7 | ||
|
|
2df8da18d7 | ||
|
|
646121ec05 | ||
|
|
40c89e8632 | ||
|
|
162154e6a1 | ||
|
|
7bcf4b2e73 | ||
|
|
e77020c904 | ||
|
|
d7c9883387 | ||
|
|
2682582b7e | ||
|
|
caa3d9a295 | ||
|
|
fe6785b84f | ||
|
|
bee54bfc85 | ||
|
|
16312189f1 | ||
|
|
b93995c548 | ||
|
|
0bbf8e5d17 | ||
|
|
621c41691a | ||
|
|
0e7936af8b | ||
|
|
b1bee0814c | ||
|
|
c75aa14fe6 | ||
|
|
b2d86e0be3 | ||
|
|
1df92157a5 | ||
|
|
14d2e8f0e0 | ||
|
|
1ea22b4382 | ||
|
|
0209b391cc | ||
|
|
f22e8de2a3 | ||
|
|
91c2d8b71f | ||
|
|
93095cb756 | ||
|
|
3d41eb26df | ||
|
|
02d99840c3 | ||
|
|
c9f88cc79d | ||
|
|
a5a3c1c26e | ||
|
|
011350de1b | ||
|
|
d4d8fb25e6 | ||
|
|
7e00085be7 | ||
|
|
be26c24f14 | ||
|
|
2768f43d11 | ||
|
|
9326305fb3 | ||
|
|
705a5300f0 | ||
|
|
a59b88d79b | ||
|
|
7766ff8cc9 | ||
|
|
c3177a45d9 | ||
|
|
5d2a281610 | ||
|
|
517119b1d1 | ||
|
|
95cfc38250 | ||
|
|
e83a1ef1f2 | ||
|
|
fd9f88e846 | ||
|
|
9e672b9b8f | ||
|
|
0e58751ebd | ||
|
|
d9e16f79d9 | ||
|
|
8e59a72e36 | ||
|
|
16bc107b21 | ||
|
|
2215a110db | ||
|
|
6b63622e9f | ||
|
|
4fc049fe43 | ||
|
|
f93ffd4caa | ||
|
|
0ebf00b4c2 | ||
|
|
e5a0b21224 | ||
|
|
00dfa96f2e | ||
|
|
b3f902f3c6 | ||
|
|
8f5f88892e | ||
|
|
3bed333943 | ||
|
|
f48d6f82f0 | ||
|
|
de096b2ad5 | ||
|
|
7a440c12e1 | ||
|
|
595ce4a272 | ||
|
|
dd1c9d1c04 | ||
|
|
fc63cae73c | ||
|
|
5e48aef401 | ||
|
|
7a643ae652 | ||
|
|
aaa999ba0f | ||
|
|
6521812f55 | ||
|
|
4d7ba64d57 | ||
|
|
183af7146d | ||
|
|
a419cda34a | ||
|
|
a73e1ee689 | ||
|
|
0dcf712002 | ||
|
|
8e4b09ad86 | ||
|
|
777636e264 | ||
|
|
1a60521ec6 | ||
|
|
434eaec505 | ||
|
|
e70f56c2af | ||
|
|
cf2ee8c57c | ||
|
|
22e8e349e4 | ||
|
|
1f166cf733 | ||
|
|
2eed2603dc | ||
|
|
138f2dea54 | ||
|
|
388ea6ee85 | ||
|
|
657b043d91 | ||
|
|
6cb6124090 | ||
|
|
cbb14e1250 | ||
|
|
a46185ef9b | ||
|
|
ec399867ad | ||
|
|
a91b81167f | ||
|
|
3de1b1eba2 | ||
|
|
260fab73ef | ||
|
|
bd760bd1fe | ||
|
|
873195f2ed | ||
|
|
6f13a19d1c | ||
|
|
203db83a45 | ||
|
|
da2f26102e | ||
|
|
557473c1b4 | ||
|
|
6bc342cf87 | ||
|
|
149bc8ce95 | ||
|
|
8de65afb51 | ||
|
|
5401ecfdbf | ||
|
|
b87a208d7f | ||
|
|
575ae1b4c5 | ||
|
|
e990ffeffd | ||
|
|
3b35b766b9 | ||
|
|
26d17c4020 | ||
|
|
7f0a9912ef | ||
|
|
6fadb53b49 | ||
|
|
26d66ad35c | ||
|
|
389b5ac9f3 | ||
|
|
d961e5a785 | ||
|
|
b0abfaeec7 | ||
|
|
4b0e558466 | ||
|
|
87b6ce8033 | ||
|
|
52dad01f1d | ||
|
|
0dba47c4bc | ||
|
|
68e8a46339 | ||
|
|
91d960b7b0 | ||
|
|
f6bb3119e6 | ||
|
|
c55b5c2fbb | ||
|
|
5406f918c4 | ||
|
|
d9f9f1d769 | ||
|
|
1e945a65c0 | ||
|
|
e44c66051d | ||
|
|
e317857fcb | ||
|
|
aa08b9306b | ||
|
|
119fa0db3f | ||
|
|
d507f7731b | ||
|
|
8a54f6ea32 | ||
|
|
6baf5da378 | ||
|
|
eec3973e19 | ||
|
|
26d3afa332 | ||
|
|
1d927ae2f5 | ||
|
|
531294aa88 | ||
|
|
7eb0d235a6 | ||
|
|
44b67db96e | ||
|
|
ced0cec2f0 | ||
|
|
eeb2b13b43 | ||
|
|
d7296299c7 | ||
|
|
7e3b023f1b | ||
|
|
e512c330f3 | ||
|
|
877ab138ab | ||
|
|
c637e3b4bb | ||
|
|
72711ed978 | ||
|
|
aab1e01865 | ||
|
|
b894bdfe95 | ||
|
|
63c3abaad0 | ||
|
|
8df6207de4 | ||
|
|
1f26dfb2dd | ||
|
|
379789fb77 | ||
|
|
8f0adb5ded | ||
|
|
1d510970ed | ||
|
|
757663d647 | ||
|
|
7e67f887d3 | ||
|
|
323b497e0f | ||
|
|
7746ab93ef | ||
|
|
bacef801c4 | ||
|
|
f82d6c7c46 | ||
|
|
77b9b85625 | ||
|
|
066628ab84 | ||
|
|
6fc4e0ed86 | ||
|
|
5a7c3d2c52 | ||
|
|
6f3119834f | ||
|
|
ee30a60bac | ||
|
|
5f0505976a | ||
|
|
1db1a6ba4b | ||
|
|
6b8cd9438c | ||
|
|
10f04fed9a | ||
|
|
f3e3a0b3e7 | ||
|
|
ba781e3a42 | ||
|
|
5a8764c392 | ||
|
|
deb17466ee | ||
|
|
f5d325b041 | ||
|
|
cf04c1a0f0 | ||
|
|
03afe921b1 | ||
|
|
2fd71516e5 | ||
|
|
728cc9f401 | ||
|
|
c9bf7a8da0 | ||
|
|
c285e3b9aa | ||
|
|
f72584eee4 | ||
|
|
e7aa9ae17c | ||
|
|
bbec716e94 | ||
|
|
6f3e843be1 | ||
|
|
a5b95b3d15 | ||
|
|
0883cce9ea | ||
|
|
fbb4530ad0 | ||
|
|
b30e16755e | ||
|
|
3e6675d543 | ||
|
|
377c7961eb | ||
|
|
fc4c882575 | ||
|
|
844dc5bbd4 | ||
|
|
8d3573f82d | ||
|
|
cc4b8c4c8d | ||
|
|
7cf64633d0 | ||
|
|
69d7e1adb6 | ||
|
|
11893b969b | ||
|
|
7b0968b4d7 | ||
|
|
eaaf4dc5d5 | ||
|
|
d3d392b221 | ||
|
|
603fcd78bc | ||
|
|
fc04f19da2 | ||
|
|
7c14457725 | ||
|
|
49fd2dc361 | ||
|
|
e28b39818a | ||
|
|
c897ee7b6a | ||
|
|
d5b8504405 | ||
|
|
a555431619 | ||
|
|
dbcfc4a489 | ||
|
|
cab7f57cd3 | ||
|
|
27483d535b | ||
|
|
a7ac2e8860 | ||
|
|
f397ad930f | ||
|
|
c8878b8be7 | ||
|
|
03f5a9d8a8 | ||
|
|
d5514ce088 | ||
|
|
438314d6fc | ||
|
|
2a71f5e29b | ||
|
|
bd248abc01 | ||
|
|
ae7cf8ad15 | ||
|
|
b0f4a1eb02 | ||
|
|
a6345bb70e | ||
|
|
a104932cec | ||
|
|
77cef6f962 | ||
|
|
3cfc4fb760 | ||
|
|
6181040a91 | ||
|
|
fad46bc7d6 | ||
|
|
af52219576 | ||
|
|
052f9244b1 | ||
|
|
6a6ff9765c | ||
|
|
c91d13d4dd | ||
|
|
51a3007f6d | ||
|
|
085af42ec5 | ||
|
|
62e1292f00 | ||
|
|
dc026508cd | ||
|
|
94a39e43ce | ||
|
|
c3189a6c0b | ||
|
|
6401b65692 | ||
|
|
d5b8e56240 | ||
|
|
3bb9b72319 | ||
|
|
c8e1b188d4 | ||
|
|
1835470792 | ||
|
|
28fcf17fe0 | ||
|
|
bf41cf74b4 | ||
|
|
5dfd2c3110 | ||
|
|
01b5cd0792 | ||
|
|
e060848f71 | ||
|
|
f9bfe5b8e0 | ||
|
|
14f8653428 | ||
|
|
1898b5ea50 | ||
|
|
f19c89a0c0 | ||
|
|
96bfe286fa | ||
|
|
e069405fb5 | ||
|
|
4305529ecc | ||
|
|
bdcf054082 | ||
|
|
70e24fa6a3 | ||
|
|
5662eafeb9 | ||
|
|
ef92d2fa3f | ||
|
|
743b6a3f2a | ||
|
|
1d4a17b16e | ||
|
|
21054e29bb | ||
|
|
eca1f4e1c8 | ||
|
|
530209e3f7 | ||
|
|
a207e3f327 | ||
|
|
bddb444b0e | ||
|
|
7f5741a205 | ||
|
|
1d802261b7 | ||
|
|
ec414cd2fc | ||
|
|
007914d75b | ||
|
|
19833a7a93 | ||
|
|
5f4039d7ec | ||
|
|
a48497df9e | ||
|
|
4a8d981273 | ||
|
|
fa9a016eef | ||
|
|
af9ef8a91d | ||
|
|
aaae9f9992 | ||
|
|
06f0561a0d | ||
|
|
84ae9cc911 | ||
|
|
aa23e9aa08 | ||
|
|
190b2d31f5 | ||
|
|
97c6616367 | ||
|
|
7d88f3551b | ||
|
|
195ef9fc3e | ||
|
|
231e047d27 | ||
|
|
6862fd310d | ||
|
|
87acc19836 | ||
|
|
7e102a6ff0 | ||
|
|
1d2b155cc5 | ||
|
|
805d619a0d | ||
|
|
e006c01033 | ||
|
|
274bab1cf4 | ||
|
|
177a9f3bd6 | ||
|
|
15aa62d2d1 | ||
|
|
af86a9033b | ||
|
|
b1ead4be75 | ||
|
|
23c4112db0 | ||
|
|
137141307b | ||
|
|
5fc11a7f2d | ||
|
|
a95d264c0f | ||
|
|
0b1bca02cc | ||
|
|
f565fbe57b | ||
|
|
f50e7a97e5 | ||
|
|
ffd36de013 | ||
|
|
65dd1529ca | ||
|
|
63afbe79aa | ||
|
|
5ee99abc34 | ||
|
|
3d8ba581b3 | ||
|
|
36c8988392 | ||
|
|
a3e7302c47 | ||
|
|
e1c4afe46a | ||
|
|
106a575359 | ||
|
|
d403a0d6d9 | ||
|
|
04e14e29e5 | ||
|
|
95e3bd5928 | ||
|
|
c6872a598e | ||
|
|
f4409d6845 | ||
|
|
7bc43bd391 | ||
|
|
e7ae4b371c | ||
|
|
fb3b47212d | ||
|
|
2b2bb45391 | ||
|
|
551f0675c5 | ||
|
|
f4cc1f2c52 | ||
|
|
ff475a0bcb | ||
|
|
e3949f38dd | ||
|
|
2aa0d1e4ff | ||
|
|
603b8c733c | ||
|
|
0d7d807322 | ||
|
|
00e40b8d4e | ||
|
|
859f2759c7 | ||
|
|
666c6fd992 | ||
|
|
c79799382f | ||
|
|
f1dd1c55ee | ||
|
|
04a90d7918 | ||
|
|
1cdbbd1cac | ||
|
|
a2edf757ca | ||
|
|
3d055ba802 | ||
|
|
cf06e83c34 | ||
|
|
1335de667b | ||
|
|
d2abd41f4c | ||
|
|
8bf8ef7f10 | ||
|
|
6aad78be96 | ||
|
|
e7790563e7 | ||
|
|
60beb6f1ea | ||
|
|
f5aa308399 | ||
|
|
ceb4620c78 | ||
|
|
b1afbb7736 | ||
|
|
d1fe0cae18 | ||
|
|
4c9a2757ce | ||
|
|
978b1e3599 | ||
|
|
2d1a17aa53 | ||
|
|
ef39fca315 | ||
|
|
87e2c1762d | ||
|
|
fd5466914b | ||
|
|
0fe68e9ef0 | ||
|
|
abe20877fd | ||
|
|
cec65d5b04 | ||
|
|
d809a3118a | ||
|
|
5f00e40672 | ||
|
|
6d925f6bbd | ||
|
|
70c8822eb9 | ||
|
|
65911df321 | ||
|
|
d6d7941c76 | ||
|
|
5e369556ed | ||
|
|
733e0b95e9 | ||
|
|
ec96be3eb8 | ||
|
|
f3edff262b | ||
|
|
374d8f64d5 | ||
|
|
77ee3d23f3 | ||
|
|
4c5a0e4ecc | ||
|
|
e0850d4fa2 | ||
|
|
0376ff1206 | ||
|
|
0562cf78d2 | ||
|
|
836b8b4a32 | ||
|
|
05a34396ed | ||
|
|
d260b75a49 | ||
|
|
a9f034bb5a | ||
|
|
bb95d69ce4 | ||
|
|
e942f9c383 | ||
|
|
d3515538a9 | ||
|
|
49c1bb2173 | ||
|
|
0b3b843008 | ||
|
|
c5fff142db | ||
|
|
f52376f9bf | ||
|
|
035fa6554e | ||
|
|
6badd51420 | ||
|
|
7293770809 | ||
|
|
b846ed928d | ||
|
|
7bd9a8b4e9 | ||
|
|
f38338068d | ||
|
|
2ef1629a5b | ||
|
|
58618a202e | ||
|
|
8372416cba | ||
|
|
751dc34d02 | ||
|
|
c9a3d57b8d | ||
|
|
ec1a2165ba | ||
|
|
95557efa65 | ||
|
|
de8c28334e | ||
|
|
fe815176cb | ||
|
|
b91f2a95a1 | ||
|
|
81cd508b4d | ||
|
|
09729c6899 | ||
|
|
409309c31e | ||
|
|
32b38722c2 | ||
|
|
7069a1b789 | ||
|
|
61a8e30d74 | ||
|
|
81a3fef3d3 | ||
|
|
34dbedf293 | ||
|
|
81537a3827 | ||
|
|
45ae13440f | ||
|
|
2c4c508a8a | ||
|
|
9eae72a59b | ||
|
|
d186e2c98f | ||
|
|
26c4c0f8c7 | ||
|
|
36b68af67d | ||
|
|
bbe9e8ad10 | ||
|
|
bad98c453e | ||
|
|
49130f6cfe | ||
|
|
cfc5f3a92c | ||
|
|
c8767e30c9 | ||
|
|
3170d21177 | ||
|
|
570a5ef6ac | ||
|
|
41d8f945af | ||
|
|
a37fcc3dec | ||
|
|
e1e7277024 | ||
|
|
85f99b9d5b | ||
|
|
c6b5f62d58 | ||
|
|
35c6157f34 | ||
|
|
db6a08d4f6 | ||
|
|
b6cf4c1bb6 | ||
|
|
b3d07b191b | ||
|
|
a75c3a394f | ||
|
|
e7adcb40bc | ||
|
|
c52802b540 | ||
|
|
05314199f3 | ||
|
|
2805813d1e | ||
|
|
a139645651 | ||
|
|
11d70553eb | ||
|
|
1200a880cf | ||
|
|
64d90afde8 | ||
|
|
2e754d881c | ||
|
|
59961d6431 | ||
|
|
b6248446ed | ||
|
|
31fa69f21d | ||
|
|
26316e0643 | ||
|
|
24c8fb2059 | ||
|
|
2e32b433f7 | ||
|
|
60198fa998 | ||
|
|
7e74f27208 | ||
|
|
9dcf42b2a1 | ||
|
|
7737439ab9 | ||
|
|
269f72796f | ||
|
|
1b96f0fc4d | ||
|
|
1debe1a9b0 | ||
|
|
c7780e2a69 | ||
|
|
b191874842 | ||
|
|
f121b53023 | ||
|
|
2c8c4ea3c2 | ||
|
|
475424abe2 | ||
|
|
0922cc62af | ||
|
|
44f71e7e60 | ||
|
|
7523c41733 | ||
|
|
d6561f2c47 | ||
|
|
d2f1bba395 | ||
|
|
ec30531d64 | ||
|
|
39cb6359da | ||
|
|
24d1a3287d | ||
|
|
33648c2e21 | ||
|
|
86df1ead6f | ||
|
|
1359bb9322 | ||
|
|
7e7460e904 | ||
|
|
23f2322ec5 | ||
|
|
698776558f | ||
|
|
76f6b7d953 | ||
|
|
0ca2bc2f55 | ||
|
|
33e0d7613a | ||
|
|
6180cd90fc | ||
|
|
9a176f57af | ||
|
|
b831c7621f | ||
|
|
37871286b4 | ||
|
|
4eb36b3c79 | ||
|
|
f11f2fe2ab | ||
|
|
7db4ba338d | ||
|
|
dbc3ed9735 | ||
|
|
bfdc2c5ccd | ||
|
|
40080b5689 | ||
|
|
9f13695d21 | ||
|
|
7bff68fa57 | ||
|
|
d22220590b | ||
|
|
f91a9253d3 | ||
|
|
a0aa8370a6 | ||
|
|
826f5f05d8 | ||
|
|
14d3756b42 | ||
|
|
0be93d5ffc | ||
|
|
1dcd1e524e | ||
|
|
6f0eaec0ba | ||
|
|
bad87b9f54 | ||
|
|
83ee10314c | ||
|
|
4d593d15cb | ||
|
|
a9a271c999 | ||
|
|
026c50c1f3 | ||
|
|
0ab739989e | ||
|
|
67b8cd63f2 | ||
|
|
a0fd4b4b6b | ||
|
|
0cb11dc50a | ||
|
|
ac39d02090 | ||
|
|
a05250d121 | ||
|
|
89b15a6506 | ||
|
|
57b3983500 | ||
|
|
9bd483882f | ||
|
|
14d990e270 | ||
|
|
0dd2a66702 | ||
|
|
bc2710e047 | ||
|
|
efa3db1cd0 | ||
|
|
fb6cb8d198 | ||
|
|
487c64fa78 | ||
|
|
e7fe855a44 | ||
|
|
957f9f3f66 | ||
|
|
76bafcf5c5 | ||
|
|
8b35e707b7 | ||
|
|
591b2f6194 | ||
|
|
5505ef0133 | ||
|
|
907918637c | ||
|
|
2ad7077517 | ||
|
|
9888a8f5b4 | ||
|
|
e0114f377e | ||
|
|
220937b1ac | ||
|
|
f86189a254 | ||
|
|
024b8a05ee | ||
|
|
6f21d78a21 | ||
|
|
29fd4124f4 | ||
|
|
9d6176a26c | ||
|
|
abc64efcb7 | ||
|
|
f888d9611b | ||
|
|
4ded8b5ce0 | ||
|
|
2ea87deb35 | ||
|
|
41b63975e5 | ||
|
|
f14024b9b3 | ||
|
|
6d22bdb02b | ||
|
|
5425efa538 | ||
|
|
3937c41d91 | ||
|
|
754268a347 | ||
|
|
fea7f22aef | ||
|
|
76baba6a16 | ||
|
|
f1ed892389 | ||
|
|
dff0e5ea33 | ||
|
|
2f9d2a41fc | ||
|
|
a2356c1cbf | ||
|
|
5b894fbc5e | ||
|
|
4ebe939594 | ||
|
|
b0ce6c4b77 | ||
|
|
98c8f99b38 | ||
|
|
9c98cfaffb | ||
|
|
b0aad4fd9c | ||
|
|
7eb61d80bd | ||
|
|
5400e04fb2 | ||
|
|
88b3eefff6 | ||
|
|
71b062d38a | ||
|
|
274cd56646 | ||
|
|
a4200355e9 | ||
|
|
58a2ba81d2 | ||
|
|
a90685e01d | ||
|
|
59d0ce0e87 | ||
|
|
b840bebeaf | ||
|
|
a7fd7c0e96 | ||
|
|
908c6b6344 | ||
|
|
a1f549f9f6 | ||
|
|
c7081f3700 | ||
|
|
3bc2193384 | ||
|
|
47004043d4 | ||
|
|
76aa339a23 | ||
|
|
e5e11481d2 | ||
|
|
b5d6e7b161 | ||
|
|
4c52f6e669 | ||
|
|
a2bf312950 | ||
|
|
55d0985e6f | ||
|
|
296d301e27 | ||
|
|
0ffd0cb79c | ||
|
|
67ffc91d03 | ||
|
|
5f4d2d8e08 | ||
|
|
00419696c2 | ||
|
|
b22de5dcb2 | ||
|
|
2dfb90309f | ||
|
|
1dc011fe7e | ||
|
|
72823a97b6 | ||
|
|
31047ecc30 | ||
|
|
7f456c96f2 | ||
|
|
10fb130e76 | ||
|
|
d3be5f3730 | ||
|
|
7bad82c97b | ||
|
|
03ddc0d696 | ||
|
|
959ee8229d | ||
|
|
daece9bdc0 | ||
|
|
800a806f2b | ||
|
|
952f0352c3 | ||
|
|
8c91bb4a28 | ||
|
|
77c09009f6 | ||
|
|
4b089a3a76 | ||
|
|
340b012a1f | ||
|
|
438b8a7eef | ||
|
|
181c98ca75 | ||
|
|
97b04f4f4e | ||
|
|
7ac0465aa1 | ||
|
|
e8b9a8be39 | ||
|
|
3b215df3ec | ||
|
|
7df016247c | ||
|
|
fa840f07ef | ||
|
|
0c8b71eb88 | ||
|
|
1cf48987f5 | ||
|
|
a6a9094eba | ||
|
|
9fb12e846a | ||
|
|
50e4ffa3cf | ||
|
|
8dd98e8fc1 | ||
|
|
fc05bc82ab | ||
|
|
85d79ed6cc | ||
|
|
fee2238978 | ||
|
|
a91fea4cd6 | ||
|
|
bf141af507 | ||
|
|
c0665f0989 | ||
|
|
dd6ec22ea5 | ||
|
|
2de99b2ba3 | ||
|
|
d35a8e9020 | ||
|
|
7463646b48 | ||
|
|
0d9f00826a | ||
|
|
6ee34e1ced | ||
|
|
907838737b | ||
|
|
1c93f0a056 | ||
|
|
0c32a937e0 | ||
|
|
735b9ad706 | ||
|
|
f4d731e23c | ||
|
|
9581cf3a81 | ||
|
|
c7057bef0c | ||
|
|
4f6a87f985 | ||
|
|
29af44ef9c | ||
|
|
eee759bfe1 | ||
|
|
57342272e6 | ||
|
|
2431333b63 | ||
|
|
422537b96c | ||
|
|
0a40054b7e | ||
|
|
b07c91dad6 | ||
|
|
57639ee786 | ||
|
|
356e141ec9 | ||
|
|
c8165a6da0 | ||
|
|
c0de8e873a | ||
|
|
2a6bb8d219 | ||
|
|
b4bbee5468 | ||
|
|
6443483dd2 | ||
|
|
192d7fed39 | ||
|
|
e7465be638 | ||
|
|
3575a69db6 | ||
|
|
3be7fe5c01 | ||
|
|
78c84ce701 | ||
|
|
ad26878202 |
20
.cspell.json
Normal file
20
.cspell.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"version": "0.2",
|
||||
"words": [
|
||||
"codeql",
|
||||
"devdeps",
|
||||
"FOUC",
|
||||
"lighttpd",
|
||||
"mkdir",
|
||||
"modernizr",
|
||||
"robotstxt",
|
||||
"vuejs",
|
||||
"cpina"
|
||||
],
|
||||
"language": "en,en-GB,en-US",
|
||||
"allowCompoundWords": true,
|
||||
"files": ["**/*.md"],
|
||||
"ignoreRegExpList": ["\\_\\w+", "\\#\\w+"],
|
||||
"ignorePaths": [".cspell.json"],
|
||||
"useGitignore": true
|
||||
}
|
||||
@@ -1,22 +1,16 @@
|
||||
# For more information about the properties used in
|
||||
# this file, please see the EditorConfig documentation:
|
||||
# http://editorconfig.org/
|
||||
# https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
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
|
||||
|
||||
8
.gitattributes
vendored
8
.gitattributes
vendored
@@ -1,17 +1,23 @@
|
||||
# Automatically normalize line endings for all text-based files
|
||||
# http://git-scm.com/docs/gitattributes#_end_of_line_conversion
|
||||
# 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
|
||||
*.mjs text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.txt text eol=lf
|
||||
*.xml text eol=lf
|
||||
*.yml text eol=lf
|
||||
|
||||
46
.github/CODE_OF_CONDUCT.md
vendored
Normal file
46
.github/CODE_OF_CONDUCT.md
vendored
Normal 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/
|
||||
84
CONTRIBUTING.md → .github/CONTRIBUTING.md
vendored
84
CONTRIBUTING.md → .github/CONTRIBUTING.md
vendored
@@ -1,7 +1,8 @@
|
||||
# Contributing to HTML5 Boilerplate
|
||||
|
||||
♥ [HTML5 Boilerplate](http://html5boilerplate.com) and want to get involved?
|
||||
Thanks! There are plenty of ways you can help!
|
||||
♥ [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.
|
||||
@@ -11,7 +12,6 @@ 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
|
||||
@@ -19,21 +19,14 @@ 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
|
||||
- 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
|
||||
- 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.
|
||||
@@ -45,10 +38,10 @@ Guidelines for bug reports:
|
||||
reported.
|
||||
|
||||
2. **Check if the issue has been fixed** — try to reproduce it using the
|
||||
latest `master` or development branch in the repository.
|
||||
latest `main` or development branch in the repository.
|
||||
|
||||
3. **Isolate the problem** — ideally create a [reduced test
|
||||
case](http://css-tricks.com/6263-reduced-test-cases/) and a live example.
|
||||
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
|
||||
@@ -74,17 +67,17 @@ Example:
|
||||
> 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
|
||||
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
|
||||
@@ -102,7 +95,7 @@ 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
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your
|
||||
fork, and configure the remotes:
|
||||
|
||||
```bash
|
||||
@@ -117,8 +110,8 @@ included in the project:
|
||||
2. If you cloned a while ago, get the latest changes from upstream:
|
||||
|
||||
```bash
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
git checkout main
|
||||
git pull upstream main
|
||||
```
|
||||
|
||||
3. Create a new topic branch (off the main project development branch) to
|
||||
@@ -128,26 +121,51 @@ included in the project:
|
||||
git checkout -b <topic-branch-name>
|
||||
```
|
||||
|
||||
4. Commit your changes in logical chunks. Please adhere to these [git commit
|
||||
message guidelines](http://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:
|
||||
4. Install locked dependencies:
|
||||
|
||||
```bash
|
||||
git pull [--rebase] upstream master
|
||||
npm ci
|
||||
```
|
||||
|
||||
6. Push your topic branch up to your fork:
|
||||
Ensure that your `node` and `npm` versions are compatible with the `engines`
|
||||
specification in `package.json`.
|
||||
|
||||
5. 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.
|
||||
|
||||
6. Locally merge (or rebase) the upstream development branch into your topic branch:
|
||||
|
||||
```bash
|
||||
git pull [--rebase] upstream main
|
||||
```
|
||||
|
||||
7. Update any applicable test cases and run tests:
|
||||
|
||||
```bash
|
||||
npm run test
|
||||
```
|
||||
|
||||
Tests must cover changes and pass to be accepted.
|
||||
|
||||
8. Run build and commit changes to dist:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
git add dist/
|
||||
git commit
|
||||
```
|
||||
|
||||
9. 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/)
|
||||
10. [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.md).
|
||||
**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).
|
||||
61
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
61
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: Report a bug
|
||||
description: Tell us about a bug or issue you may have identified in HTML5 Boilerplate.
|
||||
title: "Provide a general summary of the issue"
|
||||
labels: [bug]
|
||||
assignees: "-"
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Prerequisites
|
||||
description: Take a couple minutes to help our maintainers work faster.
|
||||
options:
|
||||
- label: I have [searched](https://github.com/h5bp/html5-boilerplate/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed issues
|
||||
required: true
|
||||
- label: I have read the [contributing guidelines](https://github.com/h5bp/html5-boilerplate/blob/main/.github/CONTRIBUTING.md)
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Describe the issue
|
||||
description: Provide a summary of the issue and what you expected to happen, including specific steps to reproduce.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reduced-test-case
|
||||
attributes:
|
||||
label: Reduced test cases
|
||||
description: Include links [reduced test case](https://css-tricks.com/reduced-test-cases/) links.
|
||||
validations:
|
||||
required: false
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: What operating system(s) are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- Windows
|
||||
- macOS
|
||||
- Android
|
||||
- iOS
|
||||
- Linux
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: browser
|
||||
attributes:
|
||||
label: What browser(s) are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- Chrome
|
||||
- Safari
|
||||
- Firefox
|
||||
- Microsoft Edge
|
||||
- Opera
|
||||
- Development Environment
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: What version of HTML% Boilerplate are you using?
|
||||
placeholder: "e.g., v8.0.0 or v7.1.0"
|
||||
validations:
|
||||
required: true
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Ask the community
|
||||
url: https://github.com/h5bp/html5-boilerplate/discussions/new
|
||||
about: Ask and discuss questions with other HTML5 Boilerplate community members.
|
||||
29
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
29
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Feature request
|
||||
description: Suggest new or updated features to include in HTML5 Boilerplate.
|
||||
title: "Suggest a new feature"
|
||||
labels: [feature]
|
||||
assignees: []
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Prerequisites
|
||||
description: Take a couple minutes to help our maintainers work faster.
|
||||
options:
|
||||
- label: I have [searched](https://github.com/h5bp/html5-boilerplate/issues?utf8=%E2%9C%93&q=is%3Aissue) for duplicate or closed issues
|
||||
required: true
|
||||
- label: I have read the [contributing guidelines](https://github.com/h5bp/html5-boilerplate/blob/main/.github/CONTRIBUTING.md)
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: Proposal
|
||||
description: Provide detailed information for what we should add, including relevant links to prior art, screenshots, or live demos whenever possible.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: motivation
|
||||
attributes:
|
||||
label: Motivation and context
|
||||
description: Tell us why this change is needed or helpful, and what problems it may help solve.
|
||||
validations:
|
||||
required: true
|
||||
23
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
23
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## 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](https://github.com/h5bp/html5-boilerplate/blob/main/.github/CONTRIBUTING.md)** 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!
|
||||
5
.github/SUPPORT.md
vendored
Normal file
5
.github/SUPPORT.md
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# Support
|
||||
|
||||
For personal support requests with HTML5 Boilerplate please use Stack Overflow
|
||||
([`html5boilerplate`](https://stackoverflow.com/questions/tagged/html5boilerplate)
|
||||
tag).
|
||||
16
.github/dependabot.yml
vendored
Normal file
16
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: monthly
|
||||
versioning-strategy: increase
|
||||
- package-ecosystem: npm
|
||||
directory: "/src/"
|
||||
schedule:
|
||||
interval: monthly
|
||||
versioning-strategy: increase
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: monthly
|
||||
47
.github/workflows/build-dist.yml
vendored
Normal file
47
.github/workflows/build-dist.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Build and PR dist changes
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-pr-dist:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build project
|
||||
run: npm run build
|
||||
|
||||
- name: Check for dist changes
|
||||
id: git-diff
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add dist
|
||||
if git diff --cached --quiet; then
|
||||
echo "changed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Create Pull Request for dist changes
|
||||
if: steps.git-diff.outputs.changed == 'true'
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
commit-message: "chore(dist): update dist folder after build"
|
||||
title: "chore(dist): update dist folder after build"
|
||||
body: "This PR updates the dist folder with the latest build output."
|
||||
branch: update-dist-after-build
|
||||
add-paths: dist
|
||||
36
.github/workflows/codeql-analysis.yml
vendored
Normal file
36
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- "!dependabot/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- "!dependabot/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
|
||||
with:
|
||||
languages: "javascript"
|
||||
queries: +security-and-quality
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
|
||||
17
.github/workflows/dependency-review.yml
vendored
Normal file
17
.github/workflows/dependency-review.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
name: "Dependency Review"
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Repository"
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Dependency Review"
|
||||
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3
|
||||
43
.github/workflows/ossf-scorecard.yml
vendored
Normal file
43
.github/workflows/ossf-scorecard.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Scorecard supply-chain security
|
||||
on:
|
||||
branch_protection_rule:
|
||||
schedule:
|
||||
- cron: '27 12 * * 2'
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
|
||||
permissions:
|
||||
security-events: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
publish_results: true
|
||||
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
56
.github/workflows/publish.yml
vendored
Normal file
56
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
contents: write # for actions/create-release to create a release
|
||||
name: Upload Release Asset
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Get tag
|
||||
id: get_version
|
||||
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3) >> "$GITHUB_OUTPUT"
|
||||
- name: Create Zip Folder
|
||||
working-directory: dist
|
||||
run: zip -r ../html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip ./
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip
|
||||
asset_name: html5-boilerplate_${{ steps.get_version.outputs.VERSION }}.zip
|
||||
asset_content_type: application/zip
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: publish npm
|
||||
run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
||||
45
.github/workflows/push-to-template.yml
vendored
Normal file
45
.github/workflows/push-to-template.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Push to template repository
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get npm cache directory
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Pushes to another repository
|
||||
uses: cpina/github-action-push-to-another-repository@main
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
with:
|
||||
source-directory: "dist"
|
||||
destination-github-username: "h5bp"
|
||||
destination-repository-name: "html5-boilerplate-template"
|
||||
user-name: "roblarsen"
|
||||
user-email: rob@htmlcssjavascript.com
|
||||
commit-message: "The latest and greatest from HTML5 Boilerplate"
|
||||
23
.github/workflows/spellcheck.yml
vendored
Normal file
23
.github/workflows/spellcheck.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: "Check spelling"
|
||||
on: # rebuild any PRs and main branch changes
|
||||
push:
|
||||
branches-ignore:
|
||||
- "dependabot/**"
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
spellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- uses: streetsidesoftware/cspell-action@dcd03dc3e8a59ec2e360d0c62db517baa0b4bb6d # v7.2.0
|
||||
with:
|
||||
inline: warning
|
||||
strict: false
|
||||
incremental_files_only: true
|
||||
41
.github/workflows/test.yml
vendored
Normal file
41
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Build status
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
node-version:
|
||||
- 20
|
||||
- 22
|
||||
- 24
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- name: Get npm cache directory
|
||||
id: npm-cache
|
||||
run: |
|
||||
echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3.4.3
|
||||
with:
|
||||
path: ${{ steps.npm-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
- name: Run tests ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,2 +1,6 @@
|
||||
**/.DS_Store
|
||||
archive
|
||||
node_modules
|
||||
packages
|
||||
dist/package-lock.json
|
||||
src/package-lock.json
|
||||
|
||||
68
.jscsrc
68
.jscsrc
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"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": "'"
|
||||
}
|
||||
32
.jshintrc
32
.jshintrc
@@ -1,32 +0,0 @@
|
||||
{
|
||||
|
||||
// Enforcing options
|
||||
// http://www.jshint.com/docs/options/#enforcing-options
|
||||
|
||||
"bitwise": true,
|
||||
"eqeqeq": true,
|
||||
"forin": true,
|
||||
"latedef": true,
|
||||
"noarg": true,
|
||||
"nonbsp": true,
|
||||
"nonew": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// Relaxing options
|
||||
// http://www.jshint.com/docs/options/#relaxing-options
|
||||
|
||||
"esnext": true,
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
// Environments
|
||||
// http://www.jshint.com/docs/options/#environments
|
||||
|
||||
"browser": true,
|
||||
"jquery": true,
|
||||
"node": true
|
||||
|
||||
}
|
||||
2
.npmrc
Normal file
2
.npmrc
Normal file
@@ -0,0 +1,2 @@
|
||||
lockfile-version = 3
|
||||
registry = "https://registry.npmjs.org/"
|
||||
1
.prettierignore
Normal file
1
.prettierignore
Normal file
@@ -0,0 +1 @@
|
||||
dist/
|
||||
13
.prettierrc.json
Normal file
13
.prettierrc.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"bracketSameLine": true,
|
||||
"embeddedLanguageFormatting": "off",
|
||||
"singleQuote": true,
|
||||
"overrides": [
|
||||
{
|
||||
"files": "**/*.yml",
|
||||
"options": {
|
||||
"singleQuote": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
62
.travis.yml
62
.travis.yml
@@ -1,62 +0,0 @@
|
||||
# For more information about the configurations used
|
||||
# in this file, please see the Travis CI documentation:
|
||||
# http://docs.travis-ci.com
|
||||
|
||||
after_success:
|
||||
|
||||
# If the tests past, Travis will automatically download and execute
|
||||
# the following script(s).
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# The `commit_build_changes.sh` script will run `npm run build`,
|
||||
# and if that generates changes, it will commit them to the `master`
|
||||
# branch:
|
||||
#
|
||||
# * 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)
|
||||
#
|
||||
# Note: The `commit_build_changes.sh` script will only run if the
|
||||
# commit was made to the `master` branch.
|
||||
|
||||
- curl -sSL "https://raw.githubusercontent.com/h5bp-bot/scripts/0.6.0/commit_build_changes.sh" |
|
||||
bash -s -- --branch "master"
|
||||
--commands "npm install && npm run build"
|
||||
--commit-message "Update content from the \`dist\` directory [skip ci]"
|
||||
|
||||
env:
|
||||
global:
|
||||
|
||||
# The `secure` key contains three encrypted environment variables
|
||||
# (GH_TOKEN, GH_USER_EMAIL and GH_USER_NAME), the values of which
|
||||
# are used by the scripts that are automatically executed by Travis.
|
||||
#
|
||||
# Note: The `secure` key will only work for this repository, so if
|
||||
# you create your own fork, you will need to generate your own key:
|
||||
#
|
||||
# travis encrypt -r "<username>/<repository>" \
|
||||
# GH_TOKEN="<your_github_access_token>" \
|
||||
# GH_USER_EMAIL="<your_email>" \
|
||||
# GH_USER_NAME="<your_name>"
|
||||
#
|
||||
# To learn more about how to generate the:
|
||||
#
|
||||
# * `secure` key, see:
|
||||
# http://docs.travis-ci.com/user/encryption-keys/
|
||||
#
|
||||
# * GitHub access token, see:
|
||||
# https://help.github.com/articles/creating-an-access-token-for-command-line-use/
|
||||
|
||||
- secure: "mkLhS1ajE7gYNUdHsAfcW6vU9THb2DmPA01PQlXz2y/F3Ld0IwEpqrGGLWyg9ZSYr0g7xq+M46pPiZsfZgCYSLv0flA/RFLmiXcVQfap3BZf8sqTtE3M9AHuy9sxUgus2M9GA7Wupws2KC2PXZM0OT12GSSOCYQCLD3ySD4b4mE="
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- "0.10"
|
||||
8
.vscode/extensions.json
vendored
Normal file
8
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"editorconfig.editorconfig",
|
||||
"esbenp.prettier-vscode",
|
||||
"streetsidesoftware.code-spell-checker"
|
||||
]
|
||||
}
|
||||
15
.vscode/settings.json
vendored
Normal file
15
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"[javascript][typescript][json][jsonc][markdown][yaml]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[javascript][typescript]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": "explicit"
|
||||
}
|
||||
},
|
||||
"eslint.validate": ["javascript", "typescript"],
|
||||
"editor.formatOnSave": true,
|
||||
"editor.renderWhitespace": "all",
|
||||
"files.trimTrailingWhitespace": true
|
||||
}
|
||||
447
CHANGELOG.md
447
CHANGELOG.md
@@ -1,232 +1,403 @@
|
||||
### 5.0
|
||||
# Changelog
|
||||
|
||||
* 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
|
||||
## 9.0.1 (April 11, 2024)
|
||||
|
||||
- Fixed tests on Windows, adds Windows Testing Action [#3110](https://github.com/h5bp/html5-boilerplate/pull/3110)
|
||||
- Add og:image:alt for accessibility [#3066](https://github.com/h5bp/html5-boilerplate/pull/3066)
|
||||
- Upgrade to Gulp 5 [#3100](https://github.com/h5bp/html5-boilerplate/pull/3100) [#3105](https://github.com/h5bp/html5-boilerplate/pull/3105)
|
||||
- ci: Use GITHUB_OUTPUT envvar instead of set-output command [#3068](https://github.com/h5bp/html5-boilerplate/pull/3068)
|
||||
- Readme and Changelog updates [#3055](https://github.com/h5bp/html5-boilerplate/pull/3055) [#3057](https://github.com/h5bp/html5-boilerplate/pull/3057) [#3064](https://github.com/h5bp/html5-boilerplate/pull/3064)
|
||||
|
||||
## 9.0.0 (December 6, 2023)
|
||||
|
||||
- Removing tile images [#3023](https://github.com/h5bp/html5-boilerplate/pull/3023)
|
||||
- Add Prettier [#3011](https://github.com/h5bp/html5-boilerplate/pull/3011)
|
||||
- Remove Modernizr [#3002](https://github.com/h5bp/html5-boilerplate/issues/3002)
|
||||
- Drop Normalize.css [#2960](https://github.com/h5bp/html5-boilerplate/pull/2960)
|
||||
- Create WebPack build to ship with the project [#2650](https://github.com/h5bp/html5-boilerplate/issues/2650)
|
||||
- Sets package to private by default [#2888](https://github.com/h5bp/html5-boilerplate/pull/2888)
|
||||
- Removes Babel and upgrades our gulpfile to use ES Modules [#2831](https://github.com/h5bp/html5-boilerplate/pull/2831)
|
||||
- Farewell Internet Explorer! [#2773](https://github.com/h5bp/html5-boilerplate/issues/2773)
|
||||
- Remove apache-server-configs/.htaccess [#2779](https://github.com/h5bp/html5-boilerplate/pull/2779)
|
||||
- Moving docs out of src and dist [#2655](https://github.com/h5bp/html5-boilerplate/pull/2655)
|
||||
- Replace Parcel with Webpack [#2641](https://github.com/h5bp/html5-boilerplate/pull/2641)
|
||||
- Add SVG Favicon [#2554](https://github.com/h5bp/html5-boilerplate/issues/2554)
|
||||
- Remove Google Analytics [#2547](https://github.com/h5bp/html5-boilerplate/issues/2547)
|
||||
- Rename master branch to main [#2583](https://github.com/h5bp/html5-boilerplate/issues/2583)
|
||||
- Remove humans.txt [#2584](https://github.com/h5bp/html5-boilerplate/pull/2584)
|
||||
- Add a template repository [#2391](https://github.com/h5bp/html5-boilerplate/pull/2391)
|
||||
- Remove plugins js [#2346](https://github.com/h5bp/html5-boilerplate/pull/2346)
|
||||
- Rename CSS file [#2342](https://github.com/h5bp/html5-boilerplate/pull/2342) and JS file [#2341](https://github.com/h5bp/html5-boilerplate/pull/2341)
|
||||
|
||||
## 8.0.0 (June 04, 2020)
|
||||
|
||||
- Add a sample package.json with basic Parcel commands ([#2227](https://github.com/h5bp/html5-boilerplate/pull/2229)), ([231e047](https://github.com/h5bp/html5-boilerplate/commit/231e047d270316b454156dc261e6e04da660e2a2))
|
||||
- Add sample Open Graph metadata ([#2235](https://github.com/h5bp/html5-boilerplate/pull/2235))
|
||||
- Update Modernizr to 3.11.2 ([84ae9cc](https://github.com/h5bp/html5-boilerplate/commit/84ae9cc91188bea4edb8ec91e2a25a2a7f7837a6))
|
||||
- Remove jQuery ([#2225](https://github.com/h5bp/html5-boilerplate/pull/2225))
|
||||
- Set anonymizeIp to true in Google Analytics snippet ([#2219](https://github.com/h5bp/html5-boilerplate/pull/2219))
|
||||
- Update main.css to 2.1.0 ([#2234](https://github.com/h5bp/html5-boilerplate/pull/2234))
|
||||
- Remove Browser Upgrade Prompt ([23c4112](https://github.com/h5bp/html5-boilerplate/commit/23c4112db067262c715ebad861ec892c29c3cdaa))
|
||||
- Create new publish action ([#2260](https://github.com/h5bp/html5-boilerplate/pull/2260)), ([#2241](https://github.com/h5bp/html5-boilerplate/pull/2241))
|
||||
- Docs updates ([#2251](https://github.com/h5bp/html5-boilerplate/pull/2251)), ([#2253](https://github.com/h5bp/html5-boilerplate/pull/2253)), ([#2245](https://github.com/h5bp/html5-boilerplate/pull/2245)), ([#2220](https://github.com/h5bp/html5-boilerplate/pull/2220)), ([#2263](https://github.com/h5bp/html5-boilerplate/pull/2263)), ([#2262](https://github.com/h5bp/html5-boilerplate/pull/2262))
|
||||
|
||||
## 7.3.0 (November 19, 2019)
|
||||
|
||||
- Update Modernizr to 3.8 ([2b2bb45](https://github.com/h5bp/html5-boilerplate/commit/2b2bb453916b4b09a6f0929340290dc2505f7ce9))
|
||||
- Update to Gulp 4 ([#2151](https://github.com/h5bp/html5-boilerplate/pull/2151))
|
||||
- Update package.json ([#2162](https://github.com/h5bp/html5-boilerplate/pull/#2162)) and enable package-lock.json ([abe2087](https://github.com/h5bp/html5-boilerplate/commit/abe20877fdb569c84aa0a1f8ae12c51c51e41250)),([#2145](https://github.com/h5bp/html5-boilerplate/pull/#2145))
|
||||
- Remove redundant rules from .editorconfig ([#2157](https://github.com/h5bp/html5-boilerplate/pull/2157))
|
||||
- Small docs maintenance updates ([#2155](https://github.com/h5bp/html5-boilerplate/pull/2155)), ([#2164](https://github.com/h5bp/html5-boilerplate/pull/2164)), ([#2165](https://github.com/h5bp/html5-boilerplate/pull/2165)), ([#2167](https://github.com/h5bp/html5-boilerplate/pull/2167)) & ([#2168](https://github.com/h5bp/html5-boilerplate/pull/2168))
|
||||
- Bump lowest supported version of node to 8.x ([#2142](https://github.com/h5bp/html5-boilerplate/pull/2142))
|
||||
- Remove .jscsrc config and remove gulp-jscs from package.json ([#2153](https://github.com/h5bp/html5-boilerplate/pull/2153))
|
||||
|
||||
## 7.2.0 (June 4, 2019)
|
||||
|
||||
- Remove `defer` from Google Analytics snippet ([#2132](https://github.com/h5bp/html5-boilerplate/pull/2132))
|
||||
- Update jQuery to v3.4.1 ([#2126](https://github.com/h5bp/html5-boilerplate/pull/2126))
|
||||
- Update Apache Server Configs to 3.2.1 ([#2128](https://github.com/h5bp/html5-boilerplate/pull/2128))
|
||||
- Update main.css to v2.0.0 ([#2135](https://github.com/h5bp/html5-boilerplate/pull/2135))
|
||||
- Docs updates ([#2122](https://github.com/h5bp/html5-boilerplate/pull/2122)), ([#2125](https://github.com/h5bp/html5-boilerplate/pull/2125)), ([#2134](https://github.com/h5bp/html5-boilerplate/pull/2134)), ([#2137](https://github.com/h5bp/html5-boilerplate/pull/2137)), ([#2138](https://github.com/h5bp/html5-boilerplate/pull/2138))
|
||||
|
||||
## 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`
|
||||
- Add vertical centering for `iframe`
|
||||
([#1613](https://github.com/h5bp/html5-boilerplate/issues/1613)).
|
||||
* Change the outdated browser prompt classname to `browserupgrade`
|
||||
- Change the outdated browser prompt classname to `browserupgrade`
|
||||
([#1608](https://github.com/h5bp/html5-boilerplate/issues/1608)).
|
||||
* Update to Normalize.css 3.0.2.
|
||||
- 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
|
||||
- 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
|
||||
- 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`
|
||||
- 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
|
||||
- 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
|
||||
[#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
|
||||
- Add `timeline` and `timelineEnd` to the list of `console` methods
|
||||
([#1559](https://github.com/h5bp/html5-boilerplate/issues/1559)).
|
||||
* Add `lang=""` to `<html>`
|
||||
- Add `lang=""` to `<html>`
|
||||
([#1542](https://github.com/h5bp/html5-boilerplate/issues/1542)).
|
||||
* Use `<!doctype html>` instead of `<!DOCTYPE html>`
|
||||
- Use `<!doctype html>` instead of `<!DOCTYPE html>`
|
||||
([#1522](https://github.com/h5bp/html5-boilerplate/issues/1522)).
|
||||
* Add `/browserconfig.xml` file and tile images
|
||||
- Add `/browserconfig.xml` file and tile images
|
||||
([#1481](https://github.com/h5bp/html5-boilerplate/issues/1481)).
|
||||
* Add `Disallow:` to `robots.txt`
|
||||
- Add `Disallow:` to `robots.txt`
|
||||
([#1487](https://github.com/h5bp/html5-boilerplate/issues/1487)).
|
||||
* Remove default foreground color from form elements
|
||||
- Remove default foreground color from form elements
|
||||
([#1390](https://github.com/h5bp/html5-boilerplate/issues/1390)).
|
||||
* Remove default margin from print styles
|
||||
- Remove default margin from print styles
|
||||
([#1477](https://github.com/h5bp/html5-boilerplate/issues/1477)).
|
||||
* Remove image replacement helper class `.ir`
|
||||
- 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`
|
||||
[#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
|
||||
- Redesign 404 page
|
||||
([#1443](https://github.com/h5bp/html5-boilerplate/pull/1443)).
|
||||
* Remove IE 6/7 hacks from `main.css`
|
||||
- Remove IE 6/7 hacks from `main.css`
|
||||
([#1050](https://github.com/h5bp/html5-boilerplate/issues/1050)).
|
||||
* Remove IE conditional classes
|
||||
- Remove IE conditional classes
|
||||
([#1187](https://github.com/h5bp/html5-boilerplate/issues/1187),
|
||||
[#1290](https://github.com/h5bp/html5-boilerplate/issues/1290)).
|
||||
[#1290](https://github.com/h5bp/html5-boilerplate/issues/1290)).
|
||||
|
||||
### 4.3.0 (September 10, 2013)
|
||||
## 4.3.0 (September 10, 2013)
|
||||
|
||||
* Use one `apple-touch-icon` instead of six
|
||||
- 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`
|
||||
- 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`
|
||||
- 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
|
||||
- Vertical centering for audio, canvas and video-tags
|
||||
([#1326](https://github.com/h5bp/html5-boilerplate/issues/1326)).
|
||||
* Remove Google Chrome Frame related code
|
||||
- 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
|
||||
[#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.
|
||||
- Update to jQuery 1.10.2.
|
||||
- Update to Normalize.css 1.1.3.
|
||||
|
||||
### 4.2.0 (April 8, 2013)
|
||||
## 4.2.0 (April 8, 2013)
|
||||
|
||||
* Remove Google Analytics protocol check
|
||||
- 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
|
||||
- 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.
|
||||
- Use a protocol relative URL for the 404 template script.
|
||||
- Update to jQuery 1.9.1.
|
||||
|
||||
### 4.1.0 (January 21, 2013)
|
||||
## 4.1.0 (January 21, 2013)
|
||||
|
||||
* Update to Normalize.css 1.1.0.
|
||||
* Update to jQuery 1.9.0.
|
||||
- Update to Normalize.css 1.1.0.
|
||||
- Update to jQuery 1.9.0.
|
||||
|
||||
### 4.0.3 (January 12, 2013)
|
||||
## 4.0.3 (January 12, 2013)
|
||||
|
||||
* Use 32x32 favicon.ico
|
||||
- Use 32x32 favicon.ico
|
||||
([#1286](https://github.com/h5bp/html5-boilerplate/pull/1286)).
|
||||
* Remove named function expression in plugins.js
|
||||
- Remove named function expression in plugins.js
|
||||
([#1280](https://github.com/h5bp/html5-boilerplate/pull/1280)).
|
||||
* Adjust CSS image-replacement code
|
||||
- Adjust CSS image-replacement code
|
||||
([#1239](https://github.com/h5bp/html5-boilerplate/issues/1239)).
|
||||
* Update HiDPI example media query
|
||||
- Update HiDPI example media query
|
||||
([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)).
|
||||
|
||||
### 4.0.2 (December 9, 2012)
|
||||
## 4.0.2 (December 9, 2012)
|
||||
|
||||
* Update placeholder icons.
|
||||
* Update to Normalize.css 1.0.2.
|
||||
* Update to jQuery 1.8.3.
|
||||
- Update placeholder icons.
|
||||
- Update to Normalize.css 1.0.2.
|
||||
- Update to jQuery 1.8.3.
|
||||
|
||||
### 4.0.1 (October 20, 2012)
|
||||
## 4.0.1 (October 20, 2012)
|
||||
|
||||
* Further improvements to `console` method stubbing
|
||||
- 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.
|
||||
[#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)
|
||||
## 4.0.0 (August 28, 2012)
|
||||
|
||||
* Improve the Apache compression configuration
|
||||
- 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
|
||||
[#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
|
||||
- Add bundled docs
|
||||
([#1154](https://github.com/h5bp/html5-boilerplate/issues/1154)).
|
||||
* Add MIT license
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- Update to Modernizr 2.6.1
|
||||
([#1086](https://github.com/h5bp/html5-boilerplate/issues/1086)).
|
||||
* Remove uncompressed jQuery
|
||||
- Remove uncompressed jQuery
|
||||
([#1153](https://github.com/h5bp/html5-boilerplate/issues/1153)).
|
||||
* Remove superfluous inline comments
|
||||
- Remove superfluous inline comments
|
||||
([#1150](https://github.com/h5bp/html5-boilerplate/issues/1150)).
|
||||
|
||||
### 3.0.2 (February 19, 2012)
|
||||
## 3.0.2 (February 19, 2012)
|
||||
|
||||
* Update to Modernizr 2.5.3.
|
||||
- Update to Modernizr 2.5.3.
|
||||
|
||||
### 3.0.1 (February 08, 2012).
|
||||
## 3.0.1 (February 08, 2012)
|
||||
|
||||
* Update to Modernizr 2.5.2 (includes html5shiv 3.3).
|
||||
- Update to Modernizr 2.5.2 (includes html5shiv 3.3).
|
||||
|
||||
### 3.0.0 (February 06, 2012)
|
||||
## 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
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- Remove Respond.js
|
||||
([#816](https://github.com/h5bp/html5-boilerplate/issues/816)).
|
||||
* Remove the `demo/` directory
|
||||
- Remove the `demo/` directory
|
||||
([#808](https://github.com/h5bp/html5-boilerplate/issues/808)).
|
||||
* Remove the `test/` directory
|
||||
- Remove the `test/` directory
|
||||
([#808](https://github.com/h5bp/html5-boilerplate/issues/808)).
|
||||
* Remove Google Chrome Frame script for IE6 users; replace with links
|
||||
- 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`
|
||||
- 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
|
||||
- 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)
|
||||
## 2.0.0 (August 10, 2011)
|
||||
|
||||
* Change starting CSS to be based on normalize.css instead of reset.css
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- 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,
|
||||
- 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
|
||||
- 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 paramaters from files references in
|
||||
- Remove the cache-busting query parameters from files references in
|
||||
the HTML.
|
||||
* Remove IE6 PNGFix.
|
||||
- Remove IE6 PNGFix.
|
||||
|
||||
### 1.0.0 (March 21, 2011)
|
||||
## 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
|
||||
- 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
|
||||
- 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.
|
||||
- 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.
|
||||
|
||||
147
README.md
147
README.md
@@ -1,66 +1,121 @@
|
||||
# [HTML5 Boilerplate](http://html5boilerplate.com)
|
||||
# [HTML5 Boilerplate](https://html5boilerplate.com/)
|
||||
|
||||
[](https://travis-ci.org/h5bp/html5-boilerplate)
|
||||
[](https://david-dm.org/h5bp/html5-boilerplate#info=devDependencies)
|
||||
[](https://github.com/h5bp/html5-boilerplate/actions?query=workflow%3A%22Build+status%22+branch%3Amain)
|
||||
[](https://github.com/h5bp/html5-boilerplate/blob/main/LICENSE.txt)
|
||||
[](https://www.npmjs.com/package/html5-boilerplate)
|
||||
[](https://github.com/h5bp/html5-boilerplate)
|
||||
|
||||
HTML5 Boilerplate is a professional front-end template for building fast,
|
||||
robust, and adaptable web apps or sites.
|
||||
HTML5 Boilerplate is a professional front-end template for building
|
||||
fast, robust, and adaptable web apps or sites.
|
||||
|
||||
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.
|
||||
This project is the product of over 10 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.
|
||||
|
||||
* Source: [https://github.com/h5bp/html5-boilerplate](https://github.com/h5bp/html5-boilerplate)
|
||||
* Homepage: [http://html5boilerplate.com](http://html5boilerplate.com)
|
||||
* Twitter: [@h5bp](https://twitter.com/h5bp)
|
||||
- [Homepage](https://html5boilerplate.com/)
|
||||
- [Source Code](https://github.com/h5bp/html5-boilerplate)
|
||||
|
||||
## About This Repository
|
||||
|
||||
## Quick start
|
||||
This repository is where HTML5-Boilerplate is authored. Some of the tools,
|
||||
files and processes that you see here are solely for the _production_ of
|
||||
HTML5 Boilerplate and are not _part_ of HTML5 Boilerplate. For one example, the
|
||||
[gulpfile.mjs](https://github.com/h5bp/html5-boilerplate/blob/main/gulpfile.mjs)
|
||||
script is used to _build_ the project. It's not part of the project itself.
|
||||
|
||||
The project we publish is represented by the contents of the `/dist/`
|
||||
folder. Everything else in this repository is used to author the project.
|
||||
|
||||
Think of it this way, in the same way that you don't clone [vuejs/core](https://github.com/vuejs/core)
|
||||
to create a Vue.js app, you don't need to clone this repository to start a new
|
||||
site or app based on HTML5 Boilerplate.
|
||||
|
||||
So, if you're looking for a quick start template to build a website or
|
||||
application, look at the options in the
|
||||
[Quick Start](https://github.com/h5bp/html5-boilerplate#quick-start) section of this document.
|
||||
|
||||
If you want to help us _improve_ HTML5 Boilerplate then you can start with the documentation [here](.github/CONTRIBUTING.md), which includes steps to clone this repo in order to get it set up for development.
|
||||
|
||||
## Quick Start
|
||||
|
||||
Choose one of the following options:
|
||||
|
||||
1. Download the latest stable release from
|
||||
[html5boilerplate.com](http://html5boilerplate.com/) or a custom build from
|
||||
[Initializr](http://www.initializr.com).
|
||||
2. 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.
|
||||
- Using the [create-html5-boilerplate](https://github.com/h5bp/create-html5-boilerplate)
|
||||
script, instantly fetch the latest npm published package (or any version
|
||||
available on npm) with `npx`, `npm init` or `yarn create` without having to
|
||||
install any dependencies. Running the following `npx` command installs the
|
||||
latest version into a folder called `new-site`
|
||||
|
||||
```bash
|
||||
npx create-html5-boilerplate new-site
|
||||
cd new-site
|
||||
npm install
|
||||
npm run start
|
||||
```
|
||||
|
||||
- Using our new [Template Repository](https://github.com/h5bp/html5-boilerplate-template)
|
||||
create a new GitHub repository based on the latest code from the main branch of HTML5
|
||||
Boilerplate.
|
||||
|
||||
- Install with [npm](https://www.npmjs.com/): `npm install html5-boilerplate`
|
||||
or [yarn](https://yarnpkg.com/): `yarn add html5-boilerplate`. The resulting
|
||||
`node_modules/html5-boilerplate/dist` folder represents the latest version of
|
||||
the project for end users. Depending on what you want to use and how you want
|
||||
to use it, you may have to copy and paste the contents of that folder into
|
||||
your project directory.
|
||||
|
||||
- Download the latest stable release from
|
||||
[here](https://github.com/h5bp/html5-boilerplate/releases/download/v9.0.0/html5-boilerplate_v9.0.0.zip). This zip file is a
|
||||
snapshot of the `dist` folder. On Windows, Mac and from the file manager on
|
||||
Linux unzipping this folder will output to a folder named something like
|
||||
`html5-boilerplate_v9.0.0`. From the command-line, you will need to create a
|
||||
folder and unzip the contents into that folder.
|
||||
|
||||
```bash
|
||||
mkdir html5-boilerplate
|
||||
unzip html5-boilerplate*.zip -d html5-boilerplate
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
* HTML5 ready. Use the new elements with confidence.
|
||||
* Cross-browser compatible (Chrome, Firefox, IE8+, Opera, Safari).
|
||||
* Designed with progressive enhancement in mind.
|
||||
* Includes [Normalize.css](http://necolas.github.com/normalize.css/) for CSS
|
||||
normalizations and common bug fixes.
|
||||
* The latest [jQuery](https://jquery.com/) via CDN, with a local fallback.
|
||||
* The latest [Modernizr](http://modernizr.com/) build for feature detection.
|
||||
* Placeholder CSS Media Queries.
|
||||
* Useful CSS helpers.
|
||||
* Default print CSS, performance optimized.
|
||||
* Protection against any stray `console` statements causing JavaScript errors
|
||||
in older browsers.
|
||||
* An optimized Google Analytics snippet.
|
||||
* Apache server caching, compression, and other configuration defaults for
|
||||
Grade-A performance.
|
||||
* "Delete-key friendly." Easy to strip out parts you don't need.
|
||||
* Extensive inline and accompanying documentation.
|
||||
- A finely-tuned starter template: Reap the benefits of 10 years of analysis,
|
||||
research and experimentation by over 200 contributors.
|
||||
- Designed with progressive enhancement in mind.
|
||||
- Includes:
|
||||
- Placeholder Open Graph elements and attributes.
|
||||
- An example package.json file with [WebPack](https://webpack.js.org/) commands
|
||||
built in to jumpstart application development.
|
||||
- Placeholder CSS Media Queries.
|
||||
- Useful CSS helper classes.
|
||||
- Default print styles, performance optimized.
|
||||
- "Delete-key friendly." Easy to strip out parts you don't need.
|
||||
- Extensive documentation.
|
||||
|
||||
[HTML5 Boilerplate v4 provides legacy browser
|
||||
support](https://github.com/h5bp/html5-boilerplate/tree/v4) (IE 6+, Firefox
|
||||
3.6+, Safari 4+), but is no longer actively developed.
|
||||
## Browser Support
|
||||
|
||||
HTML5-Boilerplate supports the latest, stable releases of all major browsers.
|
||||
|
||||
Check the `default` configuration from [Browserslist](https://browsersl.ist/#q=defaults)
|
||||
for more details on browsers and versions covered.
|
||||
|
||||
## Documentation
|
||||
|
||||
Take a look at the [documentation table of contents](dist/doc/TOC.md). This
|
||||
documentation is bundled with the project, which makes it readily available for
|
||||
offline reading and provides a useful starting point for any documentation you
|
||||
want to write about your project.
|
||||
|
||||
Take a look at the [documentation table of contents](docs/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
|
||||
|
||||
Anyone and everyone is welcome to [contribute](CONTRIBUTING.md). Hundreds of
|
||||
developers have helped make the HTML5 Boilerplate what it is today.
|
||||
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).
|
||||
|
||||
6
dist/.editorconfig
vendored
6
dist/.editorconfig
vendored
@@ -4,10 +4,8 @@ root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
193
dist/.gitattributes
vendored
193
dist/.gitattributes
vendored
@@ -1 +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
|
||||
|
||||
4
dist/.gitignore
vendored
4
dist/.gitignore
vendored
@@ -1,2 +1,6 @@
|
||||
# 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
|
||||
node_modules
|
||||
dist
|
||||
.cache
|
||||
935
dist/.htaccess
vendored
935
dist/.htaccess
vendored
@@ -1,935 +0,0 @@
|
||||
# Apache Server Configs v2.11.0 | MIT License
|
||||
# https://github.com/h5bp/server-configs-apache
|
||||
|
||||
# (!) Using `.htaccess` files slows down Apache, therefore, if you have
|
||||
# access to the main server configuration file (which is usually called
|
||||
# `httpd.conf`), you should add this logic there.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/howto/htaccess.html.
|
||||
|
||||
# ######################################################################
|
||||
# # CROSS-ORIGIN #
|
||||
# ######################################################################
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Cross-origin requests |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Allow cross-origin requests.
|
||||
#
|
||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
|
||||
# http://enable-cors.org/
|
||||
# http://www.w3.org/TR/cors/
|
||||
|
||||
# <IfModule mod_headers.c>
|
||||
# Header set Access-Control-Allow-Origin "*"
|
||||
# </IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Cross-origin images |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Send the CORS header for images when browsers request it.
|
||||
#
|
||||
# https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image
|
||||
# https://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
|
||||
|
||||
<IfModule mod_setenvif.c>
|
||||
<IfModule mod_headers.c>
|
||||
<FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
|
||||
SetEnvIf Origin ":" IS_CORS
|
||||
Header set Access-Control-Allow-Origin "*" env=IS_CORS
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Cross-origin web fonts |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Allow cross-origin access to web fonts.
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
<FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Cross-origin resource timing |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Allow cross-origin access to the timing information for all resources.
|
||||
#
|
||||
# If a resource isn't served with a `Timing-Allow-Origin` header that
|
||||
# would allow its timing information to be shared with the document,
|
||||
# some of the attributes of the `PerformanceResourceTiming` object will
|
||||
# be set to zero.
|
||||
#
|
||||
# http://www.w3.org/TR/resource-timing/
|
||||
# http://www.stevesouders.com/blog/2014/08/21/resource-timing-practical-tips/
|
||||
|
||||
# <IfModule mod_headers.c>
|
||||
# Header set Timing-Allow-Origin: "*"
|
||||
# </IfModule>
|
||||
|
||||
|
||||
# ######################################################################
|
||||
# # ERRORS #
|
||||
# ######################################################################
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Custom error messages/pages |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Customize what Apache returns to the client in case of an error.
|
||||
# https://httpd.apache.org/docs/current/mod/core.html#errordocument
|
||||
|
||||
ErrorDocument 404 /404.html
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Error prevention |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Disable the pattern matching based on filenames.
|
||||
#
|
||||
# This setting prevents Apache from returning a 404 error as the result
|
||||
# of a rewrite when the directory with the same name does not exist.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/content-negotiation.html#multiviews
|
||||
|
||||
Options -MultiViews
|
||||
|
||||
|
||||
# ######################################################################
|
||||
# # INTERNET EXPLORER #
|
||||
# ######################################################################
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Document modes |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Force Internet Explorer 8/9/10 to render pages in the highest mode
|
||||
# available in the various cases when it may not.
|
||||
#
|
||||
# https://hsivonen.fi/doctype/#ie8
|
||||
#
|
||||
# (!) Starting with Internet Explorer 11, document modes are deprecated.
|
||||
# If your business still relies on older web apps and services that were
|
||||
# designed for older versions of Internet Explorer, you might want to
|
||||
# consider enabling `Enterprise Mode` throughout your company.
|
||||
#
|
||||
# http://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode
|
||||
# http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
Header set X-UA-Compatible "IE=edge"
|
||||
# `mod_headers` cannot match based on the content-type, however,
|
||||
# the `X-UA-Compatible` response header should be send only for
|
||||
# HTML documents and not for the other resources.
|
||||
<FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
|
||||
Header unset X-UA-Compatible
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Iframes cookies |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Allow cookies to be set from iframes in Internet Explorer.
|
||||
#
|
||||
# http://msdn.microsoft.com/en-us/library/ms537343.aspx
|
||||
# http://www.w3.org/TR/2000/CR-P3P-20001215/
|
||||
|
||||
# <IfModule mod_headers.c>
|
||||
# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
|
||||
# </IfModule>
|
||||
|
||||
|
||||
# ######################################################################
|
||||
# # MEDIA TYPES AND CHARACTER ENCODINGS #
|
||||
# ######################################################################
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Media types |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Serve resources with the proper media types (f.k.a. MIME types).
|
||||
#
|
||||
# https://www.iana.org/assignments/media-types/media-types.xhtml
|
||||
# https://httpd.apache.org/docs/current/mod/mod_mime.html#addtype
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
|
||||
# Data interchange
|
||||
|
||||
AddType application/json json map topojson
|
||||
AddType application/ld+json jsonld
|
||||
AddType application/vnd.geo+json geojson
|
||||
AddType application/xml atom rdf rss xml
|
||||
|
||||
|
||||
# JavaScript
|
||||
|
||||
# Normalize to standard type.
|
||||
# https://tools.ietf.org/html/rfc4329#section-7.2
|
||||
|
||||
AddType application/javascript js
|
||||
|
||||
|
||||
# Manifest files
|
||||
|
||||
# If you are providing a web application manifest file (see
|
||||
# the specification: https://w3c.github.io/manifest/), it is
|
||||
# recommended that you serve it with the `application/manifest+json`
|
||||
# media type.
|
||||
#
|
||||
# Because the web application manifest file doesn't have its
|
||||
# own unique file extension, you can set its media type either
|
||||
# by matching:
|
||||
#
|
||||
# 1) the exact location of the file (this can be done using a
|
||||
# directive such as `<Location>`, but it will NOT work in
|
||||
# the `.htaccess` file, so you will have to do it in the main
|
||||
# server configuration file or inside of a `<VirtualHost>`
|
||||
# container)
|
||||
#
|
||||
# e.g.:
|
||||
#
|
||||
# <Location "/.well-known/manifest.json">
|
||||
# AddType application/manifest+json json
|
||||
# </Location>
|
||||
#
|
||||
# 2) the filename (this can be problematic as you will need to
|
||||
# ensure that you don't have any other file with the same name
|
||||
# as the one you gave to your web application manifest file)
|
||||
#
|
||||
# e.g.:
|
||||
#
|
||||
# <Files "manifest.json">
|
||||
# AddType application/manifest+json json
|
||||
# </Files>
|
||||
|
||||
AddType application/x-web-app-manifest+json webapp
|
||||
AddType text/cache-manifest appcache manifest
|
||||
|
||||
|
||||
# Media files
|
||||
|
||||
AddType audio/mp4 f4a f4b m4a
|
||||
AddType audio/ogg oga ogg opus
|
||||
AddType image/bmp bmp
|
||||
AddType image/webp webp
|
||||
AddType video/mp4 f4v f4p m4v mp4
|
||||
AddType video/ogg ogv
|
||||
AddType video/webm webm
|
||||
AddType video/x-flv flv
|
||||
AddType image/svg+xml svg svgz
|
||||
|
||||
# Serving `.ico` image files with a different media type
|
||||
# prevents Internet Explorer from displaying then as images:
|
||||
# https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee
|
||||
|
||||
AddType image/x-icon cur ico
|
||||
|
||||
|
||||
# Web fonts
|
||||
|
||||
AddType application/font-woff woff
|
||||
AddType application/font-woff2 woff2
|
||||
AddType application/vnd.ms-fontobject eot
|
||||
|
||||
# Browsers usually ignore the font media types and simply sniff
|
||||
# the bytes to figure out the font type.
|
||||
# https://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern
|
||||
#
|
||||
# However, Blink and WebKit based browsers will show a warning
|
||||
# in the console if the following font types are served with any
|
||||
# other media types.
|
||||
|
||||
AddType application/x-font-ttf ttc ttf
|
||||
AddType font/opentype otf
|
||||
|
||||
|
||||
# Other
|
||||
|
||||
AddType application/octet-stream safariextz
|
||||
AddType application/x-bb-appworld bbaw
|
||||
AddType application/x-chrome-extension crx
|
||||
AddType application/x-opera-extension oex
|
||||
AddType application/x-xpinstall xpi
|
||||
AddType text/vcard vcard vcf
|
||||
AddType text/vnd.rim.location.xloc xloc
|
||||
AddType text/vtt vtt
|
||||
AddType text/x-component htc
|
||||
|
||||
</IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Character encodings |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Serve all resources labeled as `text/html` or `text/plain`
|
||||
# with the media type `charset` parameter set to `UTF-8`.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset
|
||||
|
||||
AddDefaultCharset utf-8
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Serve the following file types with the media type `charset`
|
||||
# parameter set to `UTF-8`.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddCharset utf-8 .atom \
|
||||
.bbaw \
|
||||
.css \
|
||||
.geojson \
|
||||
.js \
|
||||
.json \
|
||||
.jsonld \
|
||||
.rdf \
|
||||
.rss \
|
||||
.topojson \
|
||||
.vtt \
|
||||
.webapp \
|
||||
.xloc \
|
||||
.xml
|
||||
</IfModule>
|
||||
|
||||
|
||||
# ######################################################################
|
||||
# # REWRITES #
|
||||
# ######################################################################
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Rewrite engine |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# (1) Turn on the rewrite engine (this is necessary in order for
|
||||
# the `RewriteRule` directives to work).
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteEngine
|
||||
#
|
||||
# (2) Enable the `FollowSymLinks` option if it isn't already.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/core.html#options
|
||||
#
|
||||
# (3) If your web host doesn't allow the `FollowSymlinks` option,
|
||||
# you need to comment it out or remove it, and then uncomment
|
||||
# the `Options +SymLinksIfOwnerMatch` line (4), but be aware
|
||||
# of the performance impact.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
|
||||
#
|
||||
# (4) Some cloud hosting services will require you set `RewriteBase`.
|
||||
#
|
||||
# http://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-modrewrite-not-working-on-my-site
|
||||
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
|
||||
#
|
||||
# (5) Depending on how your server is set up, you may also need to
|
||||
# use the `RewriteOptions` directive to enable some options for
|
||||
# the rewrite engine.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
|
||||
# (1)
|
||||
RewriteEngine On
|
||||
|
||||
# (2)
|
||||
Options +FollowSymlinks
|
||||
|
||||
# (3)
|
||||
# Options +SymLinksIfOwnerMatch
|
||||
|
||||
# (4)
|
||||
# RewriteBase /
|
||||
|
||||
# (5)
|
||||
# RewriteOptions <options>
|
||||
|
||||
</IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Forcing `https://` |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Redirect from the `http://` to the `https://` version of the URL.
|
||||
# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
|
||||
|
||||
# <IfModule mod_rewrite.c>
|
||||
# RewriteEngine On
|
||||
# RewriteCond %{HTTPS} !=on
|
||||
# RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
||||
# </IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Suppressing / Forcing 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.
|
||||
# This can cause SEO problems (duplicate content), and therefore,
|
||||
# you should choose one of the alternatives and redirect the other
|
||||
# one.
|
||||
#
|
||||
# By default `Option 1` (no `www.`) is activated.
|
||||
# http://no-www.org/faq.php?q=class_b
|
||||
#
|
||||
# If you would prefer to use `Option 2`, just comment out all the
|
||||
# lines from `Option 1` and uncomment the ones from `Option 2`.
|
||||
#
|
||||
# (!) NEVER USE BOTH RULES AT THE SAME TIME!
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Option 1: rewrite www.example.com → example.com
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} !=on
|
||||
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
||||
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
|
||||
</IfModule>
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Option 2: rewrite example.com → www.example.com
|
||||
#
|
||||
# Be aware that the following might not be a good idea if you use "real"
|
||||
# subdomains for certain parts of your website.
|
||||
|
||||
# <IfModule mod_rewrite.c>
|
||||
# RewriteEngine On
|
||||
# RewriteCond %{HTTPS} !=on
|
||||
# RewriteCond %{HTTP_HOST} !^www\. [NC]
|
||||
# RewriteCond %{SERVER_ADDR} !=127.0.0.1
|
||||
# RewriteCond %{SERVER_ADDR} !=::1
|
||||
# RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
||||
# </IfModule>
|
||||
|
||||
|
||||
# ######################################################################
|
||||
# # SECURITY #
|
||||
# ######################################################################
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Clickjacking |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Protect website against clickjacking.
|
||||
#
|
||||
# The example below sends the `X-Frame-Options` response header with
|
||||
# the value `DENY`, informing browsers not to display the content of
|
||||
# the web page in any frame.
|
||||
#
|
||||
# This might not be the best setting for everyone. You should read
|
||||
# about the other two possible values the `X-Frame-Options` header
|
||||
# field can have: `SAMEORIGIN` and `ALLOW-FROM`.
|
||||
# https://tools.ietf.org/html/rfc7034#section-2.1.
|
||||
#
|
||||
# Keep in mind that while you could send the `X-Frame-Options` header
|
||||
# for all of your website’s pages, this has the potential downside that
|
||||
# it forbids even non-malicious framing of your content (e.g.: when
|
||||
# users visit your website using a Google Image Search results page).
|
||||
#
|
||||
# Nonetheless, you should ensure that you send the `X-Frame-Options`
|
||||
# header for all pages that allow a user to make a state changing
|
||||
# operation (e.g: pages that contain one-click purchase links, checkout
|
||||
# or bank-transfer confirmation pages, pages that make permanent
|
||||
# configuration changes, etc.).
|
||||
#
|
||||
# Sending the `X-Frame-Options` header can also protect your website
|
||||
# against more than just clickjacking attacks:
|
||||
# https://cure53.de/xfo-clickjacking.pdf.
|
||||
#
|
||||
# https://tools.ietf.org/html/rfc7034
|
||||
# http://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-clickjacking-with-x-frame-options.aspx
|
||||
# https://www.owasp.org/index.php/Clickjacking
|
||||
|
||||
# <IfModule mod_headers.c>
|
||||
# Header set X-Frame-Options "DENY"
|
||||
# # `mod_headers` cannot match based on the content-type, however,
|
||||
# # the `X-Frame-Options` response header should be send only for
|
||||
# # HTML documents and not for the other resources.
|
||||
# <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
|
||||
# Header unset X-Frame-Options
|
||||
# </FilesMatch>
|
||||
# </IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Content Security Policy (CSP) |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Mitigate the risk of cross-site scripting and other content-injection
|
||||
# attacks.
|
||||
#
|
||||
# This can be done by setting a `Content Security Policy` which
|
||||
# whitelists trusted sources of content for your website.
|
||||
#
|
||||
# The example header below allows ONLY scripts that are loaded from the
|
||||
# current website's origin (no inline scripts, no CDN, etc). That almost
|
||||
# certainly won't work as-is for your website!
|
||||
#
|
||||
# For more details on how to craft a reasonable policy for your website,
|
||||
# read: http://www.html5rocks.com/en/tutorials/security/content-security-policy/
|
||||
# (or the specification: http://www.w3.org/TR/CSP11/). Also, to make
|
||||
# things easier, you can use an online CSP header generator such as:
|
||||
# http://cspisawesome.com/.
|
||||
|
||||
# <IfModule mod_headers.c>
|
||||
# Header set Content-Security-Policy "script-src 'self'; object-src 'self'"
|
||||
# # `mod_headers` cannot match based on the content-type, however,
|
||||
# # the `Content-Security-Policy` response header should be send
|
||||
# # only for HTML documents and not for the other resources.
|
||||
# <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
|
||||
# Header unset Content-Security-Policy
|
||||
# </FilesMatch>
|
||||
# </IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | File access |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Block access to directories without a default document.
|
||||
#
|
||||
# You should leave the following uncommented, as you shouldn't allow
|
||||
# anyone to surf through every directory on your server (which may
|
||||
# includes rather private places such as the CMS's directories).
|
||||
|
||||
<IfModule mod_autoindex.c>
|
||||
Options -Indexes
|
||||
</IfModule>
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Block access to all hidden files and directories with the exception of
|
||||
# the visible content from within the `/.well-known/` hidden directory.
|
||||
#
|
||||
# These types of files usually contain user preferences or the preserved
|
||||
# state of an utility, and can include rather private places like, for
|
||||
# example, the `.git` or `.svn` directories.
|
||||
#
|
||||
# The `/.well-known/` directory represents the standard (RFC 5785) path
|
||||
# prefix for "well-known locations" (e.g.: `/.well-known/manifest.json`,
|
||||
# `/.well-known/keybase.txt`), and therefore, access to its visible
|
||||
# content should not be blocked.
|
||||
#
|
||||
# https://www.mnot.net/blog/2010/04/07/well-known
|
||||
# https://tools.ietf.org/html/rfc5785
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
|
||||
RewriteCond %{SCRIPT_FILENAME} -d [OR]
|
||||
RewriteCond %{SCRIPT_FILENAME} -f
|
||||
RewriteRule "(^|/)\." - [F]
|
||||
</IfModule>
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Block access to files that can expose sensitive information.
|
||||
#
|
||||
# By default, block access to backup and source files that may be
|
||||
# left by some text editors and can pose a security risk when anyone
|
||||
# has access to them.
|
||||
#
|
||||
# http://feross.org/cmsploit/
|
||||
#
|
||||
# (!) Update the `<FilesMatch>` regular expression from below to
|
||||
# include any files that might end up on your production server and
|
||||
# can expose sensitive information about your website. These files may
|
||||
# include: configuration files, files that contain metadata about the
|
||||
# project (e.g.: project dependencies), build scripts, etc..
|
||||
|
||||
<FilesMatch "(^#.*#|\.(bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$">
|
||||
|
||||
# Apache < 2.3
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</IfModule>
|
||||
|
||||
# Apache ≥ 2.3
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
|
||||
</FilesMatch>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | HTTP Strict Transport Security (HSTS) |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Force client-side SSL redirection.
|
||||
#
|
||||
# If a user types `example.com` in their browser, even if the server
|
||||
# redirects them to the secure version of the website, that still leaves
|
||||
# a window of opportunity (the initial HTTP connection) for an attacker
|
||||
# to downgrade or redirect the request.
|
||||
#
|
||||
# The following header ensures that browser will ONLY connect to your
|
||||
# server via HTTPS, regardless of what the users type in the browser's
|
||||
# address bar.
|
||||
#
|
||||
# (!) Remove the `includeSubDomains` optional directive if the website's
|
||||
# subdomains are not using HTTPS.
|
||||
#
|
||||
# http://www.html5rocks.com/en/tutorials/security/transport-layer-security/
|
||||
# https://tools.ietf.org/html/draft-ietf-websec-strict-transport-sec-14#section-6.1
|
||||
# http://blogs.msdn.com/b/ieinternals/archive/2014/08/18/hsts-strict-transport-security-attacks-mitigations-deployment-https.aspx
|
||||
|
||||
# <IfModule mod_headers.c>
|
||||
# Header set Strict-Transport-Security "max-age=16070400; includeSubDomains"
|
||||
# </IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Reducing MIME type security risks |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Prevent some browsers from MIME-sniffing the response.
|
||||
#
|
||||
# This reduces exposure to drive-by download attacks and cross-origin
|
||||
# data leaks, and should be left uncommented, especially if the server
|
||||
# is serving user-uploaded content or content that could potentially be
|
||||
# treated as executable by the browser.
|
||||
#
|
||||
# http://www.slideshare.net/hasegawayosuke/owasp-hasegawa
|
||||
# http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx
|
||||
# http://msdn.microsoft.com/en-us/library/ie/gg622941.aspx
|
||||
# https://mimesniff.spec.whatwg.org/
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
Header set X-Content-Type-Options "nosniff"
|
||||
</IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Reflected Cross-Site Scripting (XSS) attacks |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# (1) Try to re-enable the cross-site scripting (XSS) filter built
|
||||
# into most web browsers.
|
||||
#
|
||||
# The filter is usually enabled by default, but in some cases it
|
||||
# may be disabled by the user. However, in Internet Explorer for
|
||||
# example, it can be re-enabled just by sending the
|
||||
# `X-XSS-Protection` header with the value of `1`.
|
||||
#
|
||||
# (2) Prevent web browsers from rendering the web page if a potential
|
||||
# reflected (a.k.a non-persistent) XSS attack is detected by the
|
||||
# filter.
|
||||
#
|
||||
# By default, if the filter is enabled and browsers detect a
|
||||
# reflected XSS attack, they will attempt to block the attack
|
||||
# by making the smallest possible modifications to the returned
|
||||
# web page.
|
||||
#
|
||||
# Unfortunately, in some browsers (e.g.: Internet Explorer),
|
||||
# this default behavior may allow the XSS filter to be exploited,
|
||||
# thereby, it's better to inform browsers to prevent the rendering
|
||||
# of the page altogether, instead of attempting to modify it.
|
||||
#
|
||||
# http://hackademix.net/2009/11/21/ies-xss-filter-creates-xss-vulnerabilities
|
||||
#
|
||||
# (!) Do not rely on the XSS filter to prevent XSS attacks! Ensure that
|
||||
# you are taking all possible measures to prevent XSS attacks, the
|
||||
# most obvious being: validating and sanitizing your website's inputs.
|
||||
#
|
||||
# http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-iv-the-xss-filter.aspx
|
||||
# http://blogs.msdn.com/b/ieinternals/archive/2011/01/31/controlling-the-internet-explorer-xss-filter-with-the-x-xss-protection-http-header.aspx
|
||||
# https://www.owasp.org/index.php/Cross-site_Scripting_%28XSS%29
|
||||
|
||||
# <IfModule mod_headers.c>
|
||||
# # (1) (2)
|
||||
# Header set X-XSS-Protection "1; mode=block"
|
||||
# # `mod_headers` cannot match based on the content-type, however,
|
||||
# # the `X-XSS-Protection` response header should be send only for
|
||||
# # HTML documents and not for the other resources.
|
||||
# <FilesMatch "\.(appcache|atom|bbaw|bmp|crx|css|cur|eot|f4[abpv]|flv|geojson|gif|htc|ico|jpe?g|js|json(ld)?|m4[av]|manifest|map|mp4|oex|og[agv]|opus|otf|pdf|png|rdf|rss|safariextz|svgz?|swf|topojson|tt[cf]|txt|vcard|vcf|vtt|webapp|web[mp]|woff2?|xloc|xml|xpi)$">
|
||||
# Header unset X-XSS-Protection
|
||||
# </FilesMatch>
|
||||
# </IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Server software information |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Prevent Apache from sending in the `Server` response header its
|
||||
# exact version number, the description of the generic OS-type or
|
||||
# information about its compiled-in modules.
|
||||
#
|
||||
# (!) The `ServerTokens` directive will only work in the main server
|
||||
# configuration file, so don't try to enable it in the `.htaccess` file!
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/core.html#servertokens
|
||||
|
||||
# ServerTokens Prod
|
||||
|
||||
|
||||
# ######################################################################
|
||||
# # WEB PERFORMANCE #
|
||||
# ######################################################################
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Compression |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
|
||||
# Force compression for mangled `Accept-Encoding` request headers
|
||||
# https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html
|
||||
|
||||
<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>
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Compress all output labeled with one of the following media types.
|
||||
#
|
||||
# (!) For Apache versions below version 2.3.7 you don't need to
|
||||
# enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
|
||||
# and `</IfModule>` lines as `AddOutputFilterByType` is still in
|
||||
# the core directives.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
|
||||
|
||||
<IfModule mod_filter.c>
|
||||
AddOutputFilterByType DEFLATE "application/atom+xml" \
|
||||
"application/javascript" \
|
||||
"application/json" \
|
||||
"application/ld+json" \
|
||||
"application/manifest+json" \
|
||||
"application/rdf+xml" \
|
||||
"application/rss+xml" \
|
||||
"application/schema+json" \
|
||||
"application/vnd.geo+json" \
|
||||
"application/vnd.ms-fontobject" \
|
||||
"application/x-font-ttf" \
|
||||
"application/x-javascript" \
|
||||
"application/x-web-app-manifest+json" \
|
||||
"application/xhtml+xml" \
|
||||
"application/xml" \
|
||||
"font/eot" \
|
||||
"font/opentype" \
|
||||
"image/bmp" \
|
||||
"image/svg+xml" \
|
||||
"image/vnd.microsoft.icon" \
|
||||
"image/x-icon" \
|
||||
"text/cache-manifest" \
|
||||
"text/css" \
|
||||
"text/html" \
|
||||
"text/javascript" \
|
||||
"text/plain" \
|
||||
"text/vcard" \
|
||||
"text/vnd.rim.location.xloc" \
|
||||
"text/vtt" \
|
||||
"text/x-component" \
|
||||
"text/x-cross-domain-policy" \
|
||||
"text/xml"
|
||||
|
||||
</IfModule>
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Map the following filename extensions to the specified
|
||||
# encoding type in order to make Apache serve the file types
|
||||
# with the appropriate `Content-Encoding` response header
|
||||
# (do note that this will NOT make Apache compress them!).
|
||||
#
|
||||
# If these files types would be served without an appropriate
|
||||
# `Content-Enable` response header, client applications (e.g.:
|
||||
# browsers) wouldn't know that they first need to uncompress
|
||||
# the response, and thus, wouldn't be able to understand the
|
||||
# content.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/mod_mime.html#addencoding
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddEncoding gzip svgz
|
||||
</IfModule>
|
||||
|
||||
</IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Content transformation |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Prevent intermediate caches or proxies (e.g.: such as the ones
|
||||
# used by mobile network providers) from modifying the website's
|
||||
# content.
|
||||
#
|
||||
# https://tools.ietf.org/html/rfc2616#section-14.9.5
|
||||
#
|
||||
# (!) If you are using `mod_pagespeed`, please note that setting
|
||||
# the `Cache-Control: no-transform` response header will prevent
|
||||
# `PageSpeed` from rewriting `HTML` files, and, if the
|
||||
# `ModPagespeedDisableRewriteOnNoTransform` directive isn't set
|
||||
# to `off`, also from rewriting other resources.
|
||||
#
|
||||
# https://developers.google.com/speed/pagespeed/module/configuration#notransform
|
||||
|
||||
# <IfModule mod_headers.c>
|
||||
# Header merge Cache-Control "no-transform"
|
||||
# </IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | ETags |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Remove `ETags` as resources are sent with far-future expires headers.
|
||||
#
|
||||
# https://developer.yahoo.com/performance/rules.html#etags
|
||||
# https://tools.ietf.org/html/rfc7232#section-2.3
|
||||
|
||||
# `FileETag None` doesn't work in all cases.
|
||||
<IfModule mod_headers.c>
|
||||
Header unset ETag
|
||||
</IfModule>
|
||||
|
||||
FileETag None
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Expires headers |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Serve resources with far-future expires headers.
|
||||
#
|
||||
# (!) If you don't control versioning with filename-based
|
||||
# cache busting, you should consider lowering the cache times
|
||||
# to something like one week.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/mod_expires.html
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
|
||||
ExpiresActive on
|
||||
ExpiresDefault "access plus 1 month"
|
||||
|
||||
# CSS
|
||||
ExpiresByType text/css "access plus 1 year"
|
||||
|
||||
# Data interchange
|
||||
ExpiresByType application/atom+xml "access plus 1 hour"
|
||||
ExpiresByType application/rdf+xml "access plus 1 hour"
|
||||
ExpiresByType application/rss+xml "access plus 1 hour"
|
||||
|
||||
ExpiresByType application/json "access plus 0 seconds"
|
||||
ExpiresByType application/ld+json "access plus 0 seconds"
|
||||
ExpiresByType application/schema+json "access plus 0 seconds"
|
||||
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
|
||||
ExpiresByType application/xml "access plus 0 seconds"
|
||||
ExpiresByType text/xml "access plus 0 seconds"
|
||||
|
||||
# Favicon (cannot be renamed!) and cursor images
|
||||
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
|
||||
ExpiresByType image/x-icon "access plus 1 week"
|
||||
|
||||
# HTML
|
||||
ExpiresByType text/html "access plus 0 seconds"
|
||||
|
||||
# JavaScript
|
||||
ExpiresByType application/javascript "access plus 1 year"
|
||||
ExpiresByType application/x-javascript "access plus 1 year"
|
||||
ExpiresByType text/javascript "access plus 1 year"
|
||||
|
||||
# Manifest files
|
||||
ExpiresByType application/manifest+json "access plus 1 year"
|
||||
|
||||
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
|
||||
ExpiresByType text/cache-manifest "access plus 0 seconds"
|
||||
|
||||
# Media files
|
||||
ExpiresByType audio/ogg "access plus 1 month"
|
||||
ExpiresByType image/bmp "access plus 1 month"
|
||||
ExpiresByType image/gif "access plus 1 month"
|
||||
ExpiresByType image/jpeg "access plus 1 month"
|
||||
ExpiresByType image/png "access plus 1 month"
|
||||
ExpiresByType image/svg+xml "access plus 1 month"
|
||||
ExpiresByType video/mp4 "access plus 1 month"
|
||||
ExpiresByType video/ogg "access plus 1 month"
|
||||
ExpiresByType video/webm "access plus 1 month"
|
||||
|
||||
# Web fonts
|
||||
|
||||
# Embedded OpenType (EOT)
|
||||
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
|
||||
ExpiresByType font/eot "access plus 1 month"
|
||||
|
||||
# OpenType
|
||||
ExpiresByType font/opentype "access plus 1 month"
|
||||
|
||||
# TrueType
|
||||
ExpiresByType application/x-font-ttf "access plus 1 month"
|
||||
|
||||
# Web Open Font Format (WOFF) 1.0
|
||||
ExpiresByType application/font-woff "access plus 1 month"
|
||||
ExpiresByType application/x-font-woff "access plus 1 month"
|
||||
ExpiresByType font/woff "access plus 1 month"
|
||||
|
||||
# Web Open Font Format (WOFF) 2.0
|
||||
ExpiresByType application/font-woff2 "access plus 1 month"
|
||||
|
||||
# Other
|
||||
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
|
||||
|
||||
</IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | File concatenation |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Allow concatenation from within specific files.
|
||||
#
|
||||
# e.g.:
|
||||
#
|
||||
# If you have the following lines in a file called, for
|
||||
# example, `main.combined.js`:
|
||||
#
|
||||
# <!--#include file="js/jquery.js" -->
|
||||
# <!--#include file="js/jquery.timer.js" -->
|
||||
#
|
||||
# Apache will replace those lines with the content of the
|
||||
# specified files.
|
||||
|
||||
# <IfModule mod_include.c>
|
||||
# <FilesMatch "\.combined\.js$">
|
||||
# Options +Includes
|
||||
# AddOutputFilterByType INCLUDES application/javascript \
|
||||
# application/x-javascript \
|
||||
# text/javascript
|
||||
# SetOutputFilter INCLUDES
|
||||
# </FilesMatch>
|
||||
# <FilesMatch "\.combined\.css$">
|
||||
# Options +Includes
|
||||
# AddOutputFilterByType INCLUDES text/css
|
||||
# SetOutputFilter INCLUDES
|
||||
# </FilesMatch>
|
||||
# </IfModule>
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# | Filename-based cache busting |
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# If you're not using a build process to manage your filename version
|
||||
# revving, you might want to consider enabling the following directives
|
||||
# to route all requests such as `/style.12345.css` to `/style.css`.
|
||||
#
|
||||
# To understand why this is important and even a better solution than
|
||||
# using something like `*.css?v231`, please see:
|
||||
# http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
|
||||
|
||||
# <IfModule mod_rewrite.c>
|
||||
# RewriteEngine On
|
||||
# RewriteCond %{REQUEST_FILENAME} !-f
|
||||
# RewriteRule ^(.+)\.(\d+)\.(bmp|css|cur|gif|ico|jpe?g|js|png|svgz?|webp)$ $1.$3 [L]
|
||||
# </IfModule>
|
||||
92
dist/404.html
vendored
92
dist/404.html
vendored
@@ -1,60 +1,62 @@
|
||||
<!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>
|
||||
<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;
|
||||
}
|
||||
|
||||
* {
|
||||
line-height: 1.2;
|
||||
margin: 0;
|
||||
}
|
||||
html {
|
||||
color: #888;
|
||||
display: table;
|
||||
font-family: sans-serif;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
body {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
margin: 2em auto;
|
||||
}
|
||||
h1 {
|
||||
color: #555;
|
||||
font-size: 2em;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #555;
|
||||
font-size: 2em;
|
||||
font-weight: 400;
|
||||
}
|
||||
p {
|
||||
margin: 0 auto;
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 auto;
|
||||
width: 280px;
|
||||
}
|
||||
@media only screen and (max-width: 280px) {
|
||||
|
||||
@media only screen and (max-width: 280px) {
|
||||
body,
|
||||
p {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
body, p {
|
||||
width: 95%;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
margin: 0 0 0.3em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
margin: 0 0 0.3em;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Page Not Found</h1>
|
||||
<p>Sorry, but the page you were trying to view does not exist.</p>
|
||||
<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: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx -->
|
||||
<!-- IE needs 512+ bytes: https://docs.microsoft.com/archive/blogs/ieinternals/friendly-http-error-pages -->
|
||||
|
||||
19
dist/LICENSE.txt
vendored
Normal file
19
dist/LICENSE.txt
vendored
Normal 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.
|
||||
BIN
dist/apple-touch-icon.png
vendored
BIN
dist/apple-touch-icon.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 KiB |
12
dist/browserconfig.xml
vendored
12
dist/browserconfig.xml
vendored
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Please read: http://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>
|
||||
15
dist/crossdomain.xml
vendored
15
dist/crossdomain.xml
vendored
@@ -1,15 +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: https://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"/>
|
||||
-->
|
||||
</cross-domain-policy>
|
||||
282
dist/css/main.css
vendored
282
dist/css/main.css
vendored
@@ -1,282 +0,0 @@
|
||||
/*! HTML5 Boilerplate v5.0.0 | MIT License | http://h5bp.com/ */
|
||||
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
* These selection rule sets have to be separate.
|
||||
* 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:
|
||||
* http://juicystudio.com/article/screen-readers-display-none.php
|
||||
*/
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide only visually, but have it available for screen readers:
|
||||
* http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
|
||||
*/
|
||||
|
||||
.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:
|
||||
* https://www.drupal.org/node/897638
|
||||
*/
|
||||
|
||||
.visuallyhidden.focusable:active,
|
||||
.visuallyhidden.focusable:focus {
|
||||
clip: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: static;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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,
|
||||
(-o-min-device-pixel-ratio: 5/4),
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 120dpi) {
|
||||
/* Style adjustments for high resolution devices */
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Print styles.
|
||||
Inlined to avoid the additional HTTP request:
|
||||
http://www.phpied.com/delay-loading-your-print-css/
|
||||
========================================================================== */
|
||||
|
||||
@media print {
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
background: transparent !important;
|
||||
color: #000 !important; /* Black prints faster:
|
||||
http://www.sanbeiji.com/archives/953 */
|
||||
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,
|
||||
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;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
427
dist/css/normalize.css
vendored
427
dist/css/normalize.css
vendored
@@ -1,427 +0,0 @@
|
||||
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
||||
|
||||
/**
|
||||
* 1. Set default font family to sans-serif.
|
||||
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||
* user zoom.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default margin.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* HTML5 display definitions
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
||||
* Correct `block` display not defined for `details` or `summary` in IE 10/11
|
||||
* and Firefox.
|
||||
* Correct `block` display not defined for `main` in IE 11.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
menu,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `inline-block` display not defined in IE 8/9.
|
||||
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent modern browsers from displaying `audio` without controls.
|
||||
* Remove excess height in iOS 5 devices.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `[hidden]` styling not present in IE 8/9/10.
|
||||
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
||||
*/
|
||||
|
||||
[hidden],
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Links
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background color from active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve readability when focused and also mouse hovered in all browsers.
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in Safari and Chrome.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address variable `h1` font-size and margin within `section` and `article`
|
||||
* contexts in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent and variable font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove border when inside `a` element in IE 8/9/10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct overflow not hidden in IE 9/10/11.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address margin not present in IE 8/9 and Safari.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address differences between Firefox and other browsers.
|
||||
*/
|
||||
|
||||
hr {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contain overflow in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address odd `em`-unit font size rendering in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
||||
* styling of `select`, unless a `border` property is set.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 1. Correct color not being inherited.
|
||||
* Known issue: affects color of disabled elements.
|
||||
* 2. Correct font properties not being inherited.
|
||||
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
color: inherit; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
margin: 0; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
||||
*/
|
||||
|
||||
button {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||
* All other form control elements do not inherit `text-transform` values.
|
||||
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
||||
* Correct `select` style inheritance in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||
* and `video` controls.
|
||||
* 2. Correct inability to style clickable `input` types in iOS.
|
||||
* 3. Improve usability and consistency of cursor style between image-type
|
||||
* `input` and others.
|
||||
*/
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-set default cursor for disabled elements.
|
||||
*/
|
||||
|
||||
button[disabled],
|
||||
html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and border in Firefox 4+.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
*/
|
||||
|
||||
input {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
/**
|
||||
* It's recommended that you don't attempt to style these elements.
|
||||
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
||||
*
|
||||
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||
* 2. Remove excess padding in IE 8/9/10.
|
||||
*/
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
||||
* `font-size` values of the `input`, it causes the cursor style of the
|
||||
* decrement button to change from `default` to `text`.
|
||||
*/
|
||||
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
||||
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
||||
* (include `-moz` to future-proof).
|
||||
*/
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box; /* 2 */
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
||||
* Safari (but not Chrome) clips the cancel button when the search input has
|
||||
* padding (and `textfield` appearance).
|
||||
*/
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define consistent border, margin, and padding.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove default vertical scrollbar in IE 8/9/10/11.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't inherit the `font-weight` (applied by a rule above).
|
||||
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
||||
*/
|
||||
|
||||
optgroup {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Tables
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove most spacing between table cells.
|
||||
*/
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 0;
|
||||
}
|
||||
247
dist/css/style.css
vendored
Normal file
247
dist/css/style.css
vendored
Normal file
@@ -0,0 +1,247 @@
|
||||
/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */
|
||||
|
||||
/* main.css 3.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
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Author's custom styles
|
||||
========================================================================== */
|
||||
|
||||
/* ==========================================================================
|
||||
Helper classes
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers
|
||||
*/
|
||||
|
||||
.hidden,
|
||||
[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
|
||||
*/
|
||||
|
||||
.visually-hidden {
|
||||
border: 0;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
width: 1px;
|
||||
/* 1 */
|
||||
}
|
||||
|
||||
/*
|
||||
* Extends the .visually-hidden class to allow the element
|
||||
* to be focusable when navigated to via the keyboard:
|
||||
* https://www.drupal.org/node/897638
|
||||
*/
|
||||
|
||||
.visually-hidden.focusable:active,
|
||||
.visually-hidden.focusable:focus {
|
||||
clip: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: static;
|
||||
white-space: inherit;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers, but maintain layout
|
||||
*/
|
||||
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clearfix: contain floats
|
||||
*
|
||||
* 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: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.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: #fff !important;
|
||||
color: #000 !important;
|
||||
/* Black prints faster */
|
||||
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;
|
||||
}
|
||||
|
||||
tr,
|
||||
img {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
|
||||
29
dist/doc/TOC.md
vendored
29
dist/doc/TOC.md
vendored
@@ -1,29 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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 & smart
|
||||
configurations for web servers, like Apache and Nginx
|
||||
* [Ant Build Script](https://github.com/h5bp/ant-build-script) — Apache Ant
|
||||
based build script.
|
||||
162
dist/doc/css.md
vendored
162
dist/doc/css.md
vendored
@@ -1,162 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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](http://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/),
|
||||
[conditional style sheets](http://css-tricks.com/how-to-create-an-ie-only-stylesheet/),
|
||||
or [Modernizr](http://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/).
|
||||
|
||||
|
||||
## Useful defaults
|
||||
|
||||
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
|
||||
|
||||
You are free and even encouraged to modify or add to these base styles as your
|
||||
project requires.
|
||||
|
||||
|
||||
## Common helpers
|
||||
|
||||
Along with the base styles, we also provide some commonly used helper classes.
|
||||
|
||||
#### `.hidden`
|
||||
|
||||
The `hidden` class can be added to any element that you want to hide visually
|
||||
and from screen readers. It could be an element that will be populated and
|
||||
displayed later, or an element you will hide with JavaScript.
|
||||
|
||||
#### `.visuallyhidden`
|
||||
|
||||
The `visuallyhidden` class can be added to any element that you want to hide
|
||||
visually, while still have its content accessible to screen readers.
|
||||
|
||||
See also:
|
||||
|
||||
* [CSS in Action: Invisible Content Just for Screen Reader
|
||||
Users](http://www.webaim.org/techniques/css/invisiblecontent/)
|
||||
* [Hiding content for
|
||||
accessibility](http://snook.ca/archives/html_and_css/hiding-content-for-accessibility)
|
||||
* [HTML5 Boilerplate - Issue #194](https://github.com/h5bp/html5-boilerplate/issues/194/).
|
||||
|
||||
#### `.invisible`
|
||||
|
||||
The `invisible` class can be added to any element that you want to hide
|
||||
visually and from screen readers, but without affecting the layout.
|
||||
|
||||
As opposed to the `hidden` class that effectively removes the element from the
|
||||
layout, the `invisible` class will simply make the element invisible while
|
||||
keeping it in the flow and not affecting the positioning of the surrounding
|
||||
content.
|
||||
|
||||
__N.B.__ Try to stay away from, and don't use the classes specified above for
|
||||
[keyword stuffing](https://en.wikipedia.org/wiki/Keyword_stuffing) as you will
|
||||
harm your site's ranking!
|
||||
|
||||
#### `.clearfix`
|
||||
|
||||
The `clearfix` class can be added to any element to ensure that it always fully
|
||||
contains its floated children.
|
||||
|
||||
Over the years there have been many variants of the clearfix hack, but currently,
|
||||
we use the [micro clearfix](http://nicolasgallagher.com/micro-clearfix-hack/).
|
||||
|
||||
|
||||
## Media Queries
|
||||
|
||||
HTML5 Boilerplate makes it easy for you to get started with a
|
||||
[_mobile first_](http://www.lukew.com/presos/preso.asp?26) and [_responsive web
|
||||
design_](http://www.alistapart.com/articles/responsive-web-design/) approach to
|
||||
development. But it's worth remembering that there are [no silver
|
||||
bullets](http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/).
|
||||
|
||||
We include placeholder media queries to help you build up your mobile styles for
|
||||
wider viewports and high-resolution displays. It's recommended that you adapt
|
||||
these media queries based on the content of your site rather than mirroring the
|
||||
fixed dimensions of specific devices.
|
||||
|
||||
If you do not want to take the _mobile first_ approach, you can simply edit or
|
||||
remove these placeholder media queries. One possibility would be to work from
|
||||
wide viewports down, and use `max-width` media queries instead (e.g.:
|
||||
`@media only screen and (max-width: 480px)`).
|
||||
|
||||
For more features that can help you in your mobile web development, take a look
|
||||
into our [Mobile Boilerplate](https://github.com/h5bp/mobile-boilerplate).
|
||||
|
||||
|
||||
## Print styles
|
||||
|
||||
Lastly, we provide some useful print styles that will optimize the printing
|
||||
process, as well as make the printed pages easier to read.
|
||||
|
||||
At printing time, these styles will:
|
||||
|
||||
* strip all background colors, change the font color to black, and remove the
|
||||
`text-shadow` — done in order to [help save printer ink and speed up the
|
||||
printing process](http://www.sanbeiji.com/archives/953)
|
||||
* underline and expand links to include the URL — done in order to allow users
|
||||
to know where to refer to<br>
|
||||
(exceptions to this are: the links that are
|
||||
[fragment identifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href),
|
||||
or use the
|
||||
[`javascript:` pseudo protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void#JavaScript_URIs))
|
||||
* expand abbreviations to include the full description — done in order to allow
|
||||
users to know what the abbreviations stands for
|
||||
* provide instructions on how browsers should break the content into pages and
|
||||
on [orphans/widows](https://en.wikipedia.org/wiki/Widows_and_orphans), namely,
|
||||
we instruct
|
||||
[supporting browsers](https://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28Cascading_Style_Sheets%29#Grammar_and_rules)
|
||||
that they should:
|
||||
|
||||
* ensure the table header (`<thead>`) is [printed on each page spanned by the
|
||||
table](http://css-discuss.incutio.com/wiki/Printing_Tables)
|
||||
* prevent block quotations, preformatted text, images and table rows from
|
||||
being split onto two different pages
|
||||
* ensure that headings never appear on a different page than the text they
|
||||
are associated with
|
||||
* ensure that
|
||||
[orphans and widows](https://en.wikipedia.org/wiki/Widows_and_orphans) do
|
||||
[not appear on printed pages](http://css-tricks.com/almanac/properties/o/orphans/)
|
||||
|
||||
The print styles are included along with the other `css` to [avoid the
|
||||
additional HTTP request](http://www.phpied.com/delay-loading-your-print-css/).
|
||||
Also, they should always be included last, so that the other styles can be
|
||||
overwritten.
|
||||
645
dist/doc/extend.md
vendored
645
dist/doc/extend.md
vendored
@@ -1,645 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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)
|
||||
|
||||
|
||||
## App Stores
|
||||
|
||||
### Install a Chrome Web Store app
|
||||
|
||||
Users can install a Chrome app directly from your website, as long as
|
||||
the app and site have been associated via Google's Webmaster Tools.
|
||||
Read more on [Chrome Web Store's Inline Installation
|
||||
docs](https://developer.chrome.com/webstore/inline_installation).
|
||||
|
||||
```html
|
||||
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/APP_ID">
|
||||
```
|
||||
|
||||
### Smart App Banners in iOS 6+ Safari
|
||||
|
||||
Stop bothering everyone with gross modals advertising your entry in the
|
||||
App Store. Include the following [meta tag](https://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html#//apple_ref/doc/uid/TP40002051-CH6-SW2)
|
||||
will unintrusively allow 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="//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="//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/Controlling_DNS_prefetching
|
||||
* https://dev.chromium.org/developers/design-documents/dns-prefetching
|
||||
* http://blogs.msdn.com/b/ie/archive/2011/03/17/internet-explorer-9-network-performance-improvements.aspx
|
||||
* http://dayofjs.com/videos/22158462/web-browsers_alex-russel
|
||||
|
||||
|
||||
## 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/advanced),
|
||||
[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](http://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: http://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
|
||||
|
||||
### Prompt users to switch to "Desktop Mode" in IE10 Metro
|
||||
|
||||
IE10 does not support plugins, such as Flash, in Metro mode. If your site
|
||||
requires plugins, you can let users know that via the X-UA-Compatible meta
|
||||
element, which will prompt them to switch to Desktop Mode.
|
||||
|
||||
```html
|
||||
<meta http-equiv="X-UA-Compatible" content="requiresActiveX=true">
|
||||
```
|
||||
|
||||
Here's what it looks like alongside H5BP's default X-UA-Compatible values:
|
||||
|
||||
```html
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,requiresActiveX=true">
|
||||
```
|
||||
|
||||
You can find more information in [Microsoft's IEBlog post about prompting for
|
||||
plugin use in IE10 Metro
|
||||
Mode](http://blogs.msdn.com/b/ie/archive/2012/01/31/web-sites-and-a-plug-in-free-web.aspx).
|
||||
|
||||
### IE Pinned Sites (IE9+)
|
||||
|
||||
Enabling your application for pinning will allow IE9 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 IE9
|
||||
Pinned Sites](http://msdn.microsoft.com/en-us/library/gg131029.aspx).
|
||||
|
||||
### 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:
|
||||
`http://www.example.com/index.html?pinned=true`
|
||||
|
||||
```html
|
||||
<meta name="msapplication-starturl" content="http://www.example.com/index.html?pinned=true">
|
||||
```
|
||||
|
||||
### Recolor IE's controls manually for a Pinned Site
|
||||
|
||||
IE9+ 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](http://blogs.msdn.com/b/ie/archive/2012/06/08/high-quality-visuals-for-pinned-sites-in-windows-8.aspx).
|
||||
|
||||
* 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
|
||||
|
||||
IE10 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](http://blogs.msdn.com/b/ie/archive/2012/04/03/pinned-sites-in-windows-8.aspx)
|
||||
* [Available badge values](http://msdn.microsoft.com/en-us/library/ie/br212849.aspx)
|
||||
|
||||
```html
|
||||
<meta name="msapplication-badge" value="frequency=NUMBER_IN_MINUTES;polling-uri=http://www.example.com/path/to/file.xml">
|
||||
```
|
||||
|
||||
### Disable link highlighting upon tap in IE10
|
||||
|
||||
Similar to [-webkit-tap-highlight-color](http://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](http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10.aspx).
|
||||
|
||||
|
||||
## Search
|
||||
|
||||
### Direct search spiders to your sitemap
|
||||
|
||||
[Learn how to make a sitemap](http://www.sitemaps.org/protocol.html)
|
||||
|
||||
```html
|
||||
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.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](http://googlewebmastercentral.blogspot.com/2009/05/introducing-rich-snippets.html).
|
||||
|
||||
* If you're building a web app you may want [native style momentum scrolling in
|
||||
iOS 5+](http://www.johanbrook.com/articles/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"
|
||||
value="notranslate">`](https://support.google.com/translate/?hl=en#2641276).
|
||||
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/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html/#//apple_ref/doc/uid/TP40008193-SW5).
|
||||
|
||||
* 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).
|
||||
|
||||
* Screen readers currently have less-than-stellar support for HTML5 but the JS
|
||||
script [accessifyhtml5.js](https://github.com/yatil/accessifyhtml5.js) can
|
||||
help increase accessibility by adding ARIA roles to HTML5 elements.
|
||||
|
||||
|
||||
## 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](http://www.atomenabled.org/developers/syndication/).
|
||||
|
||||
```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: http://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/opengraph/objects/builtin/).
|
||||
Take full advantage of Facebook's support for complex data and activity by
|
||||
following the [Open Graph
|
||||
tutorial](https://developers.facebook.com/docs/opengraph/tutorial/).
|
||||
|
||||
```html
|
||||
<meta property="og:title" content="">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:image" 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. Note
|
||||
that, as of this writing, Twitter requires that app developers activate Cards
|
||||
on a per-domain basis. You can read more about the various snippet formats
|
||||
and application process in the [official Twitter Cards
|
||||
documentation](https://dev.twitter.com/docs/cards).
|
||||
|
||||
```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="http://www.example.com/path/to/page.html">
|
||||
<meta name="twitter:title" content="">
|
||||
<meta name="twitter:description" content="">
|
||||
<meta name="twitter:image" content="http://www.example.com/path/to/image.jpg">
|
||||
```
|
||||
|
||||
|
||||
## 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.
|
||||
`http://www.example.com/cart.html?shopping-cart-open=true` can be indexed as
|
||||
the cleaner, more accurate `http://www.example.com/cart.html`.
|
||||
|
||||
```html
|
||||
<link rel="canonical" href="">
|
||||
```
|
||||
|
||||
### Official shortlink
|
||||
|
||||
Signal to the world "This is the shortened URL to use this page!" Poorly
|
||||
supported at this time. Learn more by reading the [article about shortlinks on
|
||||
the Microformats wiki](http://microformats.org/wiki/rel-shortlink).
|
||||
|
||||
```html
|
||||
<link rel="shortlink" href="h5bp.com">
|
||||
```
|
||||
|
||||
### 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="http://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="http://www.example.com/page.html">`
|
||||
|
||||
For more information please see:
|
||||
|
||||
* https://developers.google.com/webmasters/smartphone-sites/details#separateurls
|
||||
* https://developers.google.com/webmasters/smartphone-sites/feature-phones
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
The Apple touch icons can be seen as the favicons of iOS devices.
|
||||
|
||||
The main sizes of the Apple touch icons are:
|
||||
|
||||
* `57×57px` – iPhone with @1x display and iPod Touch
|
||||
* `72×72px` – iPad and iPad mini with @1x display running iOS ≤ 6
|
||||
* `76×76px` – iPad and iPad mini with @1x display running iOS ≥ 7
|
||||
* `114×114px` – iPhone with @2x display running iOS ≤ 6
|
||||
* `120×120px` – iPhone with @2x and @3x display running iOS ≥ 7
|
||||
* `144×144px` – iPad and iPad mini with @2x display running iOS ≤ 6
|
||||
* `152×152px` – iPad and iPad mini with @2x display running iOS 7
|
||||
* `180×180px` – iPad and iPad mini with @2x display running iOS 8
|
||||
|
||||
Displays meaning:
|
||||
|
||||
* @1x - non-Retina
|
||||
* @2x - Retina
|
||||
* @3x - Retina HD
|
||||
|
||||
More information about the displays of iOS devices can be found
|
||||
[here](https://en.wikipedia.org/wiki/List_of_iOS_devices#Display).
|
||||
|
||||
In most cases, one `180×180px` touch icon named `apple-touch-icon.png`
|
||||
and including:
|
||||
|
||||
```html
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
```
|
||||
|
||||
in the `<head>` of the page is enough. If you use art-direction and/or
|
||||
want to have different content for each device, you can add more touch
|
||||
icons as written above.
|
||||
|
||||
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 is
|
||||
necessary to add media queries to detect which image to load. Here is an
|
||||
example for a retina iPhone:
|
||||
|
||||
```html
|
||||
<link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" href="img/startup-retina.png">
|
||||
```
|
||||
|
||||
However, it is possible to detect which start-up image to use with JavaScript.
|
||||
The Mobile Boilerplate provides a useful function for this. Please see
|
||||
[helpers.js](https://github.com/h5bp/mobile-boilerplate/blob/v4.1.0/js/helper.js#L336-L383)
|
||||
for the implementation.
|
||||
|
||||
|
||||
### 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">
|
||||
```
|
||||
93
dist/doc/faq.md
vendored
93
dist/doc/faq.md
vendored
@@ -1,93 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Frequently asked questions
|
||||
|
||||
* [Why is the URL for jQuery without
|
||||
`http`?](#why-is-the-url-for-jquery-without-http)
|
||||
* [Why don't you automatically load the latest version of jQuery from the Google
|
||||
CDN?](#why-dont-you-automatically-load-the-latest-version-of-jquery-from-the-google-cdn)
|
||||
* [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 URL for jQuery without `http`?
|
||||
|
||||
It is because of the use of [protocol-relative
|
||||
URLs](http://paulirish.com/2010/the-protocol-relative-url/).
|
||||
|
||||
**N.B.** If you try to view the local web page directly in the browser, the
|
||||
browser will fail to load the assets specified using protocol-relative URLs
|
||||
as it will attempt to fetch them from the local file system. We recommend you
|
||||
use a local HTTP server to test your web pages, or a file hosting service that
|
||||
allows you to preview your web pages online (e.g.
|
||||
[Dropbox](https://www.dropbox.com/)).
|
||||
|
||||
Setting up a local HTTP server can be done using there various
|
||||
[one-liners](https://gist.github.com/willurd/5720255):
|
||||
|
||||
* PHP 5.4.0+ by running
|
||||
[`php -S localhost:8080`](https://php.net/manual/en/features.commandline.webserver.php)
|
||||
from your local directory
|
||||
* Python 2.x by running `python -m SimpleHTTPServer` from your local directory
|
||||
* Python 3.x by running `python -m http.server` from your local directory
|
||||
* Ruby 1.9.2+ by running `ruby -run -ehttpd . -p8080` from your local directory
|
||||
* Node.js by installing and running either
|
||||
[`static -p 8080`](https://www.npmjs.org/package/node-static)
|
||||
or [`http-server -p 8080`](https://www.npmjs.org/package/http-server)
|
||||
|
||||
A list of more complex HTTP servers can be found
|
||||
[here](misc.md#servers-and-stacks).
|
||||
|
||||
|
||||
### Why don't you automatically load the latest version of jQuery from the Google CDN?
|
||||
|
||||
The [file](https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js) to which
|
||||
the Google [CDN](https://en.wikipedia.org/wiki/Content_delivery_network) points
|
||||
to is [no longer updated and will stay locked at version `1.11.1` in order to
|
||||
prevent inadvertent web
|
||||
breakage](http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/).
|
||||
|
||||
In general, version updating should be an intentional decision! You shouldn't
|
||||
include a URL that will always point to the latest version, as that version:
|
||||
|
||||
* may not be compatible with the existing plugins/code on the site
|
||||
* will have a very short cache time compare to the specific version,
|
||||
which means that users won't get the benefits of long-term caching
|
||||
|
||||
### 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.
|
||||
However, having the code at the bottom of the page [helps improve
|
||||
performance](http://stevesouders.com/efws/inline-scripts-bottom.php).
|
||||
|
||||
|
||||
### How can I integrate [Bootstrap](http://getbootstrap.com/) with HTML5 Boilerplate?
|
||||
|
||||
One simple way is to use [Initializr](http://initializr.com) and create a
|
||||
custom build that includes both HTML5 Boilerplate and
|
||||
[Bootstrap](http://getbootstrap.com/).
|
||||
|
||||
Read more about how [HTML5 Boilerplate and Bootstrap complement each
|
||||
other](https://www.quora.com/Is-Bootstrap-a-complement-or-an-alternative-to-HTML5-Boilerplate-or-viceversa/answer/Nicolas-Gallagher).
|
||||
|
||||
|
||||
### Do I need to upgrade my site each time a new version of HTML5 Boilerplate is released?
|
||||
|
||||
No, same 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).
|
||||
223
dist/doc/html.md
vendored
223
dist/doc/html.md
vendored
@@ -1,223 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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`](#404html) - 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](http://paulirish.com/2009/avoiding-the-fouc-v3/).
|
||||
|
||||
|
||||
## Language attribute
|
||||
|
||||
Please consider specifying the language of your content by adding the `lang`
|
||||
attribute to `<html>` as in this example:
|
||||
|
||||
```html
|
||||
<html class="no-js" lang="en">
|
||||
```
|
||||
|
||||
### The order of the `<title>` and `<meta>` tags
|
||||
|
||||
The order in which the `<title>` and the `<meta>` tags are specified is
|
||||
important because:
|
||||
|
||||
1) 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)
|
||||
|
||||
* 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/p/doctype-mirror/wiki/ArticleUtf7) in
|
||||
Internet Explorer
|
||||
|
||||
2) the meta tag for compatibility mode
|
||||
(`<meta http-equiv="X-UA-Compatible" content="IE=edge">`):
|
||||
|
||||
* [needs to be included before all other tags except for the `<title>` and
|
||||
the other `<meta>`
|
||||
tags](http://msdn.microsoft.com/en-us/library/cc288325.aspx)
|
||||
|
||||
|
||||
### `X-UA-Compatible`
|
||||
|
||||
Internet Explorer 8/9/10 support [document compatibility
|
||||
modes](http://msdn.microsoft.com/en-us/library/cc288325.aspx) that affect the
|
||||
way webpages are interpreted and displayed. Because of this, even if your site's
|
||||
visitor is using, let's say, Internet Explorer 9, it's possible that IE will not
|
||||
use the latest rendering engine, and instead, decide to render your page using
|
||||
the Internet Explorer 5.5 rendering engine.
|
||||
|
||||
Specifying the `X-UA-Compatible` meta tag:
|
||||
|
||||
```html
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
```
|
||||
|
||||
or sending the page with the following HTTP response header
|
||||
|
||||
```
|
||||
X-UA-Compatible: IE=edge
|
||||
```
|
||||
|
||||
will force Internet Explorer 8/9/10 to render the webpage in the highest
|
||||
available mode in [the various cases when it may
|
||||
not](https://hsivonen.fi/doctype/#ie8), and therefore, ensure that anyone
|
||||
browsing your site is treated to the best possible user experience that
|
||||
browser can offer.
|
||||
|
||||
If possible, we recommend that you remove the `meta` tag and send only the
|
||||
HTTP response header as the `meta` tag will not always work if your site is
|
||||
served on a non-standard port, as Internet Explorer's preference option
|
||||
`Display intranet sites in Compatibility View` is checked by default.
|
||||
|
||||
If you are using Apache as your webserver, including the
|
||||
[`.htaccess`](https://github.com/h5bp/server-configs-apache) file takes care of
|
||||
the HTTP header. If you are using a different server, check out our [other
|
||||
server config](https://github.com/h5bp/server-configs).
|
||||
|
||||
Starting with Internet Explorer 11, [document modes are
|
||||
deprecated](http://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode).
|
||||
If your business still relies on older web apps and services that were
|
||||
designed for older versions of Internet Explorer, you might want to consider
|
||||
enabling [Enterprise Mode](http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx) throughout your company.
|
||||
|
||||
|
||||
## 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
|
||||
Apple developer docs](https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html).
|
||||
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">
|
||||
```
|
||||
|
||||
## Favicons and Touch Icon
|
||||
|
||||
The shortcut icons should be put in the root directory of your site. 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.
|
||||
|
||||
## Modernizr
|
||||
|
||||
HTML5 Boilerplate uses a custom build of Modernizr.
|
||||
|
||||
[Modernizr](http://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.
|
||||
|
||||
In general, in order to keep page load times to a minimum, it's best to call
|
||||
any JavaScript at the end of the page because if a script is slow to load
|
||||
from an external server it may cause the whole page to hang. That said, the
|
||||
Modernizr script *needs* to run *before* the browser begins rendering the page,
|
||||
so that browsers lacking support for some of the new HTML5 elements are able to
|
||||
handle them properly. Therefore the Modernizr script is the only JavaScript
|
||||
file synchronously loaded at the top of the document.
|
||||
|
||||
## 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 some polyfill CDN service, like [cdn.polyfill.io](http://cdn.polyfill.io/),
|
||||
just put it before the other scripts in the bottom of the page:
|
||||
|
||||
```html
|
||||
<script src="//cdn.polyfill.io/v1/polyfill.min.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.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. Also using
|
||||
this technique, make sure 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).
|
||||
|
||||
## 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 6/7. If you intended to support IE 6/7, then you
|
||||
should remove the snippet of code.
|
||||
|
||||
### Google CDN for jQuery
|
||||
|
||||
The Google CDN version of the jQuery JavaScript library is referenced towards
|
||||
the bottom of the page using a protocol-independent path (read more about this
|
||||
in the [FAQ](faq.md)). A local fallback of jQuery is included for rare instances
|
||||
when the CDN version might not be available, and to facilitate offline
|
||||
development.
|
||||
|
||||
The Google CDN version is chosen over other [potential candidates (like the
|
||||
jQuery CDN](https://jquery.com/download/#using-jquery-with-a-cdn)) because
|
||||
it's fast in absolute terms and it has the best overall
|
||||
[penetration](http://httparchive.org/trends.php#perGlibs) which increases the
|
||||
odds of having a copy of the library in your user's browser cache.
|
||||
|
||||
While the Google CDN is a strong default solution your site or application may
|
||||
require a different configuration. Testing your site with services like
|
||||
[WebPageTest](http://www.webpagetest.org/) and browser tools like
|
||||
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) or
|
||||
[YSlow](https://developer.yahoo.com/yslow/) 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. 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, you’ll
|
||||
be able to count users who don’t fully load the page, and you’ll incur the max
|
||||
number of simultaneous connections of the browser.
|
||||
|
||||
Further information:
|
||||
|
||||
* [Optimizing the Google Universal Analytics
|
||||
Snippet](https://mathiasbynens.be/notes/async-analytics-snippet#universal-analytics)
|
||||
* [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 Universal 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!
|
||||
37
dist/doc/js.md
vendored
37
dist/doc/js.md
vendored
@@ -1,37 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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.
|
||||
For larger projects, you can make use of a JavaScript module loader, like
|
||||
[Require.js](http://requirejs.org/), to load any other scripts you need to
|
||||
run.
|
||||
|
||||
## plugins.js
|
||||
|
||||
This file can be used to contain all your plugins, such as jQuery plugins and
|
||||
other 3rd party scripts.
|
||||
|
||||
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](http://docs.jquery.com/Plugins/Authoring#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](http://www.modernizr.com/download/).
|
||||
198
dist/doc/misc.md
vendored
198
dist/doc/misc.md
vendored
@@ -1,198 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
* [.gitignore](#gitignore)
|
||||
* [.editorconfig](#editorconfig)
|
||||
* [Server Configuration](#server-configuration)
|
||||
* [crossdomain.xml](#crossdomainxml)
|
||||
* [robots.txt](#robotstxt)
|
||||
* [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](http://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](http://editorconfig.org/#supported-properties) from the
|
||||
`.editorconfig` file, you will need to [install a
|
||||
plugin]( http://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](http://editorconfig.org/).
|
||||
|
||||
|
||||
## Server Configuration
|
||||
|
||||
H5BP includes a [`.htaccess`](#htaccess) file for the Apache HTTP server. 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.
|
||||
|
||||
|
||||
### Servers and Stacks
|
||||
|
||||
A comprehensive list of web servers and stacks are beyond the scope of this
|
||||
documentation, but some common ones include:
|
||||
|
||||
* [Apache HTTP Server](https://httpd.apache.org/docs/trunk/getting-started.html)
|
||||
* [LAMP](https://en.wikipedia.org/wiki/LAMP_%28software_bundle%29)
|
||||
(Linux, Apache, MySQL, and PHP).
|
||||
Other variants include [MAMP](https://www.mamp.info/en/index.html),
|
||||
[WAMP](http://www.wampserver.com/en/),
|
||||
or [XAMPP](https://www.apachefriends.org/index.html).
|
||||
* LAPP uses PostgreSQL instead of MySQL
|
||||
* [Nginx](http://wiki.nginx.org/GettingStarted)
|
||||
* [LEMP](http://www.chrisjohnston.org/ubuntu-tutorials/setting-up-a-lemp-stack-ubuntu-904)
|
||||
is similar to the LAMP stack but uses Nginx
|
||||
* [IIS](https://en.wikipedia.org/wiki/Internet_Information_Services)
|
||||
* [ASP.NET](http://www.asp.net/get-started)
|
||||
* [MEAN](http://mean.io/) (MongoDB, Express, AngularJS, Node.js)
|
||||
|
||||
|
||||
### .htaccess
|
||||
|
||||
A `.htaccess` (hypertext access) file is a
|
||||
[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
|
||||
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).
|
||||
|
||||
|
||||
## crossdomain.xml
|
||||
|
||||
The _cross-domain policy file_ is an XML document that gives a web client —
|
||||
such as Adobe Flash Player, Adobe Reader, etc. — permission to handle data
|
||||
across multiple domains, by:
|
||||
|
||||
* granting read access to data
|
||||
* permitting the client to include custom headers in cross-domain requests
|
||||
* granting permissions for socket-based connections
|
||||
|
||||
__e.g.__ If a client hosts content from a particular source domain and that
|
||||
content makes requests directed towards a domain other than its own, the remote
|
||||
domain would need to host a cross-domain policy file in order to grant access
|
||||
to the source domain and allow the client to continue with the transaction.
|
||||
|
||||
For more in-depth information, please see Adobe's [cross-domain policy file
|
||||
specification](https://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html).
|
||||
|
||||
|
||||
## 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)
|
||||
|
||||
|
||||
## 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](http://msdn.microsoft.com/en-us/library/ie/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](http://msdn.microsoft.com/en-us/library/ie/dn320426%28v=vs.85%29.aspx).
|
||||
130
dist/doc/usage.md
vendored
130
dist/doc/usage.md
vendored
@@ -1,130 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Usage
|
||||
|
||||
Once you have cloned or downloaded HTML5 Boilerplate, creating a site or app
|
||||
usually involves the following:
|
||||
|
||||
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. (Optionally run a build script to automate the optimization of your site -
|
||||
e.g. [ant build script](https://github.com/h5bp/ant-build-script))
|
||||
5. Deploy your site.
|
||||
|
||||
|
||||
## 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
|
||||
├── apple-touch-icon.png
|
||||
├── browserconfig.xml
|
||||
├── index.html
|
||||
├── humans.txt
|
||||
├── robots.txt
|
||||
├── crossdomain.xml
|
||||
├── favicon.ico
|
||||
├── tile-wide.png
|
||||
└── tile.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.
|
||||
|
||||
For more info on this topic, please refer to
|
||||
[MSDN](http://msdn.microsoft.com/en-us/library/ie/dn455106.aspx).
|
||||
|
||||
### .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.
|
||||
|
||||
### crossdomain.xml
|
||||
|
||||
A template for working with cross-domain requests. [About
|
||||
crossdomain.xml](misc.md#crossdomainxml).
|
||||
|
||||
### 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).
|
||||
|
||||
You might want to check out Hans' handy [HTML5 Boilerplate Favicon and Apple
|
||||
Touch Icon
|
||||
PSD-Template](https://drublic.de/blog/html5-boilerplate-favicons-psd-template/).
|
||||
15
dist/humans.txt
vendored
15
dist/humans.txt
vendored
@@ -1,15 +0,0 @@
|
||||
# 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
BIN
dist/icon.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
1
dist/icon.svg
vendored
Normal file
1
dist/icon.svg
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 192 192"><path fill="#e08524" d="M75.3 73.4H18.4l45.3 34.3L48.3 163l46.1-32.3 48.2 34.6-16.9-58.3 44.9-33.6H115l-20.5-55-19.2 55z"/><path d="m96.7 18.8 18.2 8.2 16.5 44.3h-15.1L96.7 18.8zm-47 146 18.7 9.9 42.6-29.9-16.5-11.4-44.8 31.4zm79.1-56.8 17.4 9.4 18.6 60.1-19.7-11.3-16.3-58.2z"/><path d="m173.1 74.3 17.8 9.2-44.7 34-17.4-9.4 44.3-33.8z"/></svg>
|
||||
|
After Width: | Height: | Size: 429 B |
0
dist/img/.gitignore → dist/img/.gitkeep
vendored
0
dist/img/.gitignore → dist/img/.gitkeep
vendored
59
dist/index.html
vendored
59
dist/index.html
vendored
@@ -1,40 +1,33 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title></title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<html lang="">
|
||||
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
<!-- Place favicon.ico in the root directory -->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<meta name="description" content="">
|
||||
|
||||
<link rel="stylesheet" href="css/normalize.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 8]>
|
||||
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
|
||||
<![endif]-->
|
||||
<meta property="og:title" content="">
|
||||
<meta property="og:type" content="">
|
||||
<meta property="og:url" content="">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:image:alt" content="">
|
||||
|
||||
<!-- Add your site or application content here -->
|
||||
<p>Hello world! This is HTML5 Boilerplate.</p>
|
||||
<link rel="icon" href="/favicon.ico" sizes="any">
|
||||
<link rel="icon" href="/icon.svg" type="image/svg+xml">
|
||||
<link rel="apple-touch-icon" href="icon.png">
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.min.js"><\/script>')</script>
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
<link rel="manifest" href="site.webmanifest">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Add your site or application content here -->
|
||||
<p>Hello world! This is HTML5 Boilerplate.</p>
|
||||
<script src="js/app.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
|
||||
<script>
|
||||
(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-XXXXX-X','auto');ga('send','pageview');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
0
dist/js/main.js → dist/js/app.js
vendored
0
dist/js/main.js → dist/js/app.js
vendored
24
dist/js/plugins.js
vendored
24
dist/js/plugins.js
vendored
@@ -1,24 +0,0 @@
|
||||
// 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
dist/js/vendor/jquery-1.11.2.min.js
vendored
5
dist/js/vendor/jquery-1.11.2.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/vendor/modernizr-2.8.3.min.js
vendored
4
dist/js/vendor/modernizr-2.8.3.min.js
vendored
File diff suppressed because one or more lines are too long
24
dist/package.json
vendored
Normal file
24
dist/package.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": " ",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"keywords": [
|
||||
""
|
||||
],
|
||||
"license": "",
|
||||
"author": "",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "webpack serve --open --config webpack.config.dev.js",
|
||||
"build": "webpack --config webpack.config.prod.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^13.0.1",
|
||||
"html-webpack-plugin": "^5.6.4",
|
||||
"webpack": "^5.101.3",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.2",
|
||||
"webpack-merge": "^6.0.1"
|
||||
}
|
||||
}
|
||||
2
dist/robots.txt
vendored
2
dist/robots.txt
vendored
@@ -1,4 +1,4 @@
|
||||
# www.robotstxt.org/
|
||||
# https://www.robotstxt.org/
|
||||
|
||||
# Allow crawling of all content
|
||||
User-agent: *
|
||||
|
||||
12
dist/site.webmanifest
vendored
Normal file
12
dist/site.webmanifest
vendored
Normal 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
BIN
dist/tile-wide.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
BIN
dist/tile.png
vendored
BIN
dist/tile.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB |
12
dist/webpack.common.js
vendored
Normal file
12
dist/webpack.common.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: './js/app.js',
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
clean: true,
|
||||
filename: './js/app.js',
|
||||
},
|
||||
};
|
||||
13
dist/webpack.config.dev.js
vendored
Normal file
13
dist/webpack.config.dev.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'inline-source-map',
|
||||
devServer: {
|
||||
liveReload: true,
|
||||
hot: true,
|
||||
open: true,
|
||||
static: ['./'],
|
||||
},
|
||||
});
|
||||
26
dist/webpack.config.prod.js
vendored
Normal file
26
dist/webpack.config.prod.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: './index.html',
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{ from: 'img', to: 'img' },
|
||||
{ from: 'css', to: 'css' },
|
||||
{ from: 'js/vendor', to: 'js/vendor' },
|
||||
{ from: 'icon.svg', to: 'icon.svg' },
|
||||
{ from: 'favicon.ico', to: 'favicon.ico' },
|
||||
{ from: 'robots.txt', to: 'robots.txt' },
|
||||
{ from: 'icon.png', to: 'icon.png' },
|
||||
{ from: '404.html', to: '404.html' },
|
||||
{ from: 'site.webmanifest', to: 'site.webmanifest' },
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
||||
37
docs/TOC.md
Normal file
37
docs/TOC.md
Normal file
@@ -0,0 +1,37 @@
|
||||
[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)
|
||||
- [create-html5-boilerplate](https://github.com/h5bp/create-html5-boilerplate) — Quick start HTML5 Boilerplate development.
|
||||
- [main.css](https://github.com/h5bp/main.css) — the main.css file included (as style.css) with HTML5 Boilerplate.
|
||||
115
docs/about-this-repo.md
Normal file
115
docs/about-this-repo.md
Normal file
@@ -0,0 +1,115 @@
|
||||
# About This Repo
|
||||
|
||||
This document outlines the configuration of this repo as well as the basic
|
||||
process we use to manage the project. As GitHub has matured as a platform
|
||||
and HTML5 Boilerplate has matured as a project there are a lot of lessons
|
||||
to be learned from the way we run the show here.
|
||||
|
||||
## GitHub configuration
|
||||
|
||||
This section will go through the way we configure the repo in GitHub.
|
||||
Open source projects get the full power of the platform and as a project
|
||||
we like to experiment with new GitHub features. Our current configuration
|
||||
might help you figure out some things you want to do in your own projects.
|
||||
|
||||
### General Configuration
|
||||
|
||||
This section outlines the basic configuration options we use.
|
||||
|
||||
- We have a stub of a Wiki still, so we have wikis turned on. The most
|
||||
interesting page that remains is a history of the project written several
|
||||
years ago.
|
||||
- We use the Issues feature heavily. We don't yet have Issue Templates set
|
||||
up, but we do have adding them as an issue, so we'll take advantage of them
|
||||
at some point.
|
||||
- Discussions are enabled, but they haven't been very useful so far.
|
||||
|
||||
### Pull Requests
|
||||
|
||||
The most visible portion of our configuration is the way we handle pull
|
||||
requests. At the most basic level, we require pull requests to add code
|
||||
to the repo and require a review to merge code. In addition we run several
|
||||
code quality checks on every pull request to make sure we're not introducing
|
||||
anything we don't want into the codebase.
|
||||
|
||||
We take advantage of the "draft" feature for PRs. This way we have visibility
|
||||
throughout the life of the PR.
|
||||
|
||||
Let's take a look at how we configure our `main` branch.
|
||||
|
||||
#### `main`
|
||||
|
||||
`main` is the default branch and is our only protected branch. We use feature
|
||||
branches to add features and/or fix issues in the codebase. Other project
|
||||
configurations might require a long-running, similarly protected, `development`
|
||||
branch but for us the single protected `main` branch is enough for our
|
||||
purposes.
|
||||
|
||||
Our branch protection rules are as follows:
|
||||
|
||||
- We require a pull request (PR) with one approving reviewer to merge code
|
||||
- In addition to the PR and approving reviewer, we require three status checks
|
||||
to pass before code can be merged
|
||||
_ Build with Node 20
|
||||
_ Build with Node 22
|
||||
_ Build with Node 24
|
||||
- We _allow_ force pushes for project admins. While force pushes can create
|
||||
some head scratching moments for people who have cloned the repo and update
|
||||
before and after the force push, the ability to clean up the `HEAD` of a
|
||||
public branch like this in an emergency is useful.
|
||||
|
||||
#### GitHub Actions and Other Checks That Run on `main`
|
||||
|
||||
- We run a simple _build status_ check. This is the most basic test you can run
|
||||
and is absolutely vital. If you can't build your project you're in trouble.
|
||||
Currently we're testing against Node 16 and 18.
|
||||
- We take advantage of our access to _CodeQL analysis_ Free for research and
|
||||
open source don't you know :) We don't have a ton of surface area to cover,
|
||||
but it's nice to have this powerful code scanning tool available to us.
|
||||
- We run a _dependency review_ scan to see if any newly added dependencies add
|
||||
known security flaws. This is important for even us, but for a project that
|
||||
uses a larger number of third party dependencies, this sort of check is vital.
|
||||
- We also run a CodeQL scans to check for security issues and problems.
|
||||
- We push any changes to `main` to our [HTML5\-Boilerplate Template Repo](https://github.com/h5bp/html5-boilerplate-template)
|
||||
|
||||
Since we've talked about some of our Actions, let's look at the full configuration
|
||||
of our `.github` folder.
|
||||
|
||||
### .github Folder
|
||||
|
||||
- workflows
|
||||
- `build-dist.yml` is currently broken. We can't push to `main` without a
|
||||
code review, so this task is blocked. What I would like, (are you there,
|
||||
GitHub, it's me, Rob) is to allow Actions to bypass branch protection
|
||||
rules. I think we'll have to basically write a mini-bot that opens a PR
|
||||
whenever there are changes to `main` and then pushes to the same branch
|
||||
until the PR is closed. In some ways that will be better as it will be less
|
||||
noisy in terms of bot pushes to main.
|
||||
- `codeql-analysis.yml` controls our CodeQL action. We use the defaults. If
|
||||
you're building something with more JavaScript footprint, you can tweak
|
||||
the settings for this job.
|
||||
- `dependency-review.yml` does what it says on the tin- it tests newly
|
||||
introduced dependencies for vulnerabilities.
|
||||
- `publish.yml` is the action that publishes all the various versions of
|
||||
the project. When we create a new tag and push it to GitHub, this script
|
||||
publishes our npm package and creates a GitHub release and attaches a zip
|
||||
file of our `dist` folder.
|
||||
- `push-to-template.yml` pushes the `HEAD` of `main` to our template repo
|
||||
- `spellcheck.yml` automatically checks markdown files for typos with cSpell.
|
||||
- `test.yml` runs our test suite on Ubuntu.
|
||||
- `test-windows.yml` runs our test suite on Windows.
|
||||
- `CODE_OF_CONDUCT.md` is our Code of Conduct, based on
|
||||
[Contributor Covenant.](https://www.contributor-covenant.org/)
|
||||
- `CONTRIBUTING.md` contains our contribution guidelines.
|
||||
- `ISSUE_TEMPLATE.md` is our new issue boilerplate.
|
||||
- `PULL_REQUEST_TEMPLATE.md` is our new PR boilerplate.
|
||||
- `SUPPORT.md` points people to different (non-HTML5-Boilerplate) support
|
||||
resources
|
||||
- `dependabot.yml` is our Dependabot configuration. We do `npm`, monthly on
|
||||
two separate `package.json` files, one in `src` and one in project root.
|
||||
|
||||
---
|
||||
|
||||
That covers most of the interesting GitHub features and functionality that we
|
||||
use. We're going to continue to keep this document up to date as we change
|
||||
things or new GitHub features.
|
||||
22
docs/css.md
Normal file
22
docs/css.md
Normal file
@@ -0,0 +1,22 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# The CSS
|
||||
|
||||
HTML5 Boilerplate's CSS includes:
|
||||
|
||||
- [style.css](#stylecss)
|
||||
|
||||
## style.css
|
||||
|
||||
Several base styles are included. 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
|
||||
[style.css](https://github.com/h5bp/html5-boilerplate/blob/main/dist/css/style.css).
|
||||
363
docs/extend.md
Normal file
363
docs/extend.md
Normal file
@@ -0,0 +1,363 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Extend and customize 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.
|
||||
|
||||
- [Server Configuration](#server-configuration)
|
||||
- [App Stores](#app-stores)
|
||||
- [DNS prefetching](#dns-prefetching)
|
||||
- [Miscellaneous](#miscellaneous)
|
||||
- [News Feeds](#news-feeds)
|
||||
- [Search](#search)
|
||||
- [Social Networks](#social-networks)
|
||||
- [URLs](#urls)
|
||||
- [Web Apps](#web-apps)
|
||||
- [security.txt](#securitytxt)
|
||||
|
||||
## Server Configuration
|
||||
|
||||
We no longer include a [`.htaccess`](#htaccess) file for the [Apache HTTP
|
||||
server](https://httpd.apache.org/docs/) in HTML5 Boilerplate by default, however if you are
|
||||
using a web server, then we encourage you to checkout out the [server configuration](https://github.com/h5bp/server-configs)
|
||||
that corresponds to your web server and environment.
|
||||
|
||||
These repos offer a collection of configuration snippets that can help your server improve the
|
||||
website's performance and security, while also ensuring that resources are served with the
|
||||
correct content-type and are accessible, if needed, even cross-domain.
|
||||
|
||||
## 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/documentation/webkit/promoting_apps_with_smart_app_banners)
|
||||
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.
|
||||
|
||||
### 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.
|
||||
|
||||
### 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
|
||||
|
||||
## 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.
|
||||
|
||||
### 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://developer.mozilla.org/en-US/docs/Web/OpenSearch).
|
||||
|
||||
```html
|
||||
<link rel="search" title="" type="application/opensearchdescription+xml" href="">
|
||||
```
|
||||
|
||||
## Miscellaneous
|
||||
|
||||
- Use [Microformats](https://microformats.org/wiki/Main_Page) (via
|
||||
[microdata](https://microformats.org/wiki/microdata)) for optimum search
|
||||
results
|
||||
[visibility](https://developers.google.com/search/blog/2009/05/introducing-rich-snippets).
|
||||
|
||||
- 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://developers.google.com/search/docs/crawling-indexing/special-tags).
|
||||
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).
|
||||
|
||||
- Apply JavaScript-dependent CSS styles using [the `scripting` media
|
||||
feature](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/scripting).
|
||||
Use `@media (scripting: none) { ... }` to target browsers with JavaScript
|
||||
disabled, or `@media (scripting: enabled) { ... }` to target browsers with
|
||||
JavaScript enabled. Using this technique also helps [avoid the
|
||||
FOUC](https://www.paulirish.com/2009/avoiding-the-fouc-v3/).
|
||||
|
||||
## News Feeds
|
||||
|
||||
### RSS
|
||||
|
||||
Have an RSS feed? Link to it here. Want to [learn how to write an RSS feed from
|
||||
scratch](https://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](https://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">
|
||||
<!-- Empty for decorative images. -->
|
||||
<meta property="og:image:alt" content="Example image depicting...">
|
||||
<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 in the
|
||||
[official Twitter Cards
|
||||
documentation](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards).
|
||||
|
||||
```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">
|
||||
```
|
||||
|
||||
### Schema.org
|
||||
|
||||
Google also provides a snippet specification that serves a similar purpose to
|
||||
Facebook's Open Graph or Twitter Cards. 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/search/docs/appearance/structured-data). Also, please
|
||||
note that this markup requires to add attributes to your top `html` tag.
|
||||
|
||||
```html
|
||||
<html lang="" itemscope itemtype="https://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="">
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
```html
|
||||
<meta name="apple-mobile-web-app-title" content="">
|
||||
```
|
||||
|
||||
For further information please read the [official
|
||||
documentation](https://developer.apple.com/library/archive/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 an iOS 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">
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
For browser support details, refer to [Can I Use](https://caniuse.com/meta-theme-color).
|
||||
|
||||
### 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.
|
||||
15
docs/faq.md
Normal file
15
docs/faq.md
Normal file
@@ -0,0 +1,15 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Frequently asked questions
|
||||
|
||||
## 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
|
||||
[Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate).
|
||||
132
docs/html.md
Normal file
132
docs/html.md
Normal file
@@ -0,0 +1,132 @@
|
||||
[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`
|
||||
|
||||
### 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 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://html.spec.whatwg.org/multipage/semantics.html#charset)
|
||||
and should be specified as early as possible.
|
||||
|
||||
### 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/Web/HTML/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.
|
||||
|
||||
### Open Graph Metadata
|
||||
|
||||
The [Open Graph Protocol](https://ogp.me) allows you to define the way your
|
||||
site is presented when referenced on third party sites and applications
|
||||
(Facebook, Twitter, LinkedIn). The protocol provides a series of meta elements
|
||||
that define the details of your site. The required attributes define the title,
|
||||
preview image, URL, and [type](https://ogp.me/#types) (e.g., video, music,
|
||||
website, article).
|
||||
|
||||
```html
|
||||
<meta property="og:title" content="">
|
||||
<meta property="og:type" content="">
|
||||
<meta property="og:url" content="">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:image:alt" content="">
|
||||
```
|
||||
|
||||
In addition to these four attributes there are many more attributes you can use
|
||||
to add more richness to the description of your site. This just represents the
|
||||
most basic implementation.
|
||||
|
||||
To see a working example, the following is the open graph metadata for the HTML5
|
||||
Boilerplate site. In addition to the required fields we add `og:description` to
|
||||
describe the site in more detail.
|
||||
|
||||
```html
|
||||
<meta property="og:url" content="https://html5boilerplate.com/">
|
||||
<meta property="og:title" content="HTML5 ★ BOILERPLATE">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:description" content="The web’s most popular front-end template which helps you build fast, robust, and adaptable web apps or sites.">
|
||||
<meta property="og:image" content="https://html5boilerplate.com/icon.png">
|
||||
<!-- Empty for decorative images. -->
|
||||
<meta property="og:image:alt" content="">
|
||||
```
|
||||
|
||||
### 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/main/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.
|
||||
16
docs/js.md
Normal file
16
docs/js.md
Normal file
@@ -0,0 +1,16 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# The JavaScript
|
||||
|
||||
Information about the default JavaScript included in the project.
|
||||
|
||||
## app.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.
|
||||
|
||||
## vendor
|
||||
|
||||
This directory can be used to contain all third-party library code.
|
||||
113
docs/misc.md
Normal file
113
docs/misc.md
Normal file
@@ -0,0 +1,113 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
- [.gitignore](#gitignore)
|
||||
- [.editorconfig](#editorconfig)
|
||||
- [robots.txt](#robotstxt)
|
||||
- [package.json](#packagejson)
|
||||
|
||||
--
|
||||
|
||||
## .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/](https://help.github.com/en/github/using-git/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/).
|
||||
|
||||
## 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](https://www.robotstxt.org/)
|
||||
- [How Google handles the `robots.txt` file](https://developers.google.com/search/reference/robots_txt)
|
||||
|
||||
## package.json
|
||||
|
||||
`package.json` is used to define attributes of your site or application for
|
||||
use in modern JavaScript development. [The full documentation is available](https://docs.npmjs.com/files/package.json)
|
||||
if you're interested. The fields we provide are as follows:
|
||||
|
||||
- `title` - the title of your project. If you expect to publish your application
|
||||
to npm, then the name needs to follow [certain guidelines](https://docs.npmjs.com/files/package.json#name)
|
||||
and be unique.
|
||||
- `version` - indicates the version of your site application using semantic
|
||||
versioning ([SemVer](https://semver.org/))
|
||||
- `description` - describes your site.
|
||||
- `scripts` - is a JavaScript object containing commands that can be run in a
|
||||
node environment. There are many [built-in keys](https://docs.npmjs.com/misc/scripts)
|
||||
related to the package lifecycle that node understands automatically. You can
|
||||
also define custom scripts for use with your application development. We
|
||||
provide three custom scripts that work with webpack to get you up and running
|
||||
quickly with a bundler for your assets and a simple development server.
|
||||
|
||||
- `start` serves your `index.html` with a simple development server
|
||||
|
||||
- `keywords` - an array of keywords used to discover your app in the npm
|
||||
registry
|
||||
- `author` - defines the author of a package. There is also an alternative
|
||||
[contributors](https://docs.npmjs.com/files/package.json#people-fields-author-contributors)
|
||||
field if there's more than one author.
|
||||
- `license` - the license for your application. Must conform to
|
||||
[specific rules](https://docs.npmjs.com/files/package.json#license)
|
||||
- `devDependencies` - development dependencies for your package. In our case
|
||||
we have several dependencies used by webpack, which we use as a simple development server.
|
||||
160
docs/usage.md
Normal file
160
docs/usage.md
Normal file
@@ -0,0 +1,160 @@
|
||||
[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
|
||||
│ └── style.css
|
||||
├── doc
|
||||
├── img
|
||||
├── js
|
||||
│ ├── app.js
|
||||
└── vendor
|
||||
├── .editorconfig
|
||||
├── 404.html
|
||||
├── favicon.ico
|
||||
├── icon.png
|
||||
├── icon.svg
|
||||
├── index.html
|
||||
├── package.json
|
||||
├── robots.txt
|
||||
├── site.webmanifest
|
||||
└── webpack.common.js
|
||||
└── webpack.config.dev.js
|
||||
└── webpack.config.prod.js
|
||||
```
|
||||
|
||||
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).
|
||||
|
||||
### 404.html
|
||||
|
||||
A helpful custom 404 to get you started.
|
||||
|
||||
### .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.
|
||||
|
||||
### package.json
|
||||
|
||||
Edit this file to describe your application, add dependencies, scripts and
|
||||
other properties related to node based development and the npm registry
|
||||
|
||||
### robots.txt
|
||||
|
||||
Edit this file to include any pages you need hidden from search engines.
|
||||
|
||||
### Icons
|
||||
|
||||
Replace the default `favicon.ico` 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).
|
||||
|
||||
### Webpack
|
||||
|
||||
The project contains a simple [webpack](https://webpack.js.org/) configuration.
|
||||
|
||||
To get started developing a site with a development server, run the following
|
||||
commands from within the `/dist/` folder in the project's repo or within the
|
||||
root folder of the dowloaded project files, the folder created by `npm install`
|
||||
or the project folder created by running [create\-html5\-boilerplate](https://github.com/h5bp/create-html5-boilerplate)
|
||||
|
||||
```
|
||||
npm install
|
||||
npm run start
|
||||
```
|
||||
|
||||
This will start a Webpack development server with hot reloading of edited files.
|
||||
|
||||
To package a site for production run
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
This command will bundle up the site's JavaScript and copy over static assets to
|
||||
the newly created `dist` folder.
|
||||
|
||||
There are three files:
|
||||
|
||||
#### webpack.common.js
|
||||
|
||||
Both the production and development scripts inherit from this common script.
|
||||
|
||||
#### webpack.config.dev.js
|
||||
|
||||
This development configuration defines the behavior of development server.
|
||||
|
||||
#### webpack.config.prod.js
|
||||
|
||||
This production configuration defines the behavior of the production build.
|
||||
|
||||
It copies the following files and folders to the dist folder:
|
||||
|
||||
- css
|
||||
- img
|
||||
- js/vendor
|
||||
- 404.html
|
||||
- favicon.ico
|
||||
- icon.png
|
||||
- icon.svg
|
||||
- index.html
|
||||
- robots.txt
|
||||
- site.webmanifest
|
||||
|
||||
`js/vendor` is copied over in order to allow you to use unprocessed JS files
|
||||
in addition to the files bundled based on the project's entry point `app.js.`
|
||||
30
eslint.config.mjs
Normal file
30
eslint.config.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
import globals from 'globals';
|
||||
import js from '@eslint/js';
|
||||
import mocha from 'eslint-plugin-mocha';
|
||||
import { defineConfig } from 'eslint/config';
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
plugins: {
|
||||
js,
|
||||
mocha,
|
||||
},
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
...globals.mocha,
|
||||
},
|
||||
},
|
||||
extends: ['js/recommended'],
|
||||
rules: {
|
||||
// Your custom rules
|
||||
indent: ['error', 2],
|
||||
quotes: ['error', 'single'],
|
||||
semi: ['error', 'always'],
|
||||
},
|
||||
},
|
||||
]);
|
||||
159
gulpfile.js
159
gulpfile.js
@@ -1,159 +0,0 @@
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
var gulp = require('gulp');
|
||||
var plugins = require('gulp-load-plugins')(); // Load all gulp plugins
|
||||
// automatically and attach
|
||||
// them to the `plugins` object
|
||||
|
||||
var runSequence = require('run-sequence'); // Temporary solution until gulp 4
|
||||
// https://github.com/gulpjs/gulp/issues/355
|
||||
|
||||
var pkg = require('./package.json');
|
||||
var dirs = pkg['h5bp-configs'].directories;
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// | Helper tasks |
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
gulp.task('archive:create_archive_dir', function () {
|
||||
fs.mkdirSync(path.resolve(dirs.archive), '0755');
|
||||
});
|
||||
|
||||
gulp.task('archive:zip', function (done) {
|
||||
|
||||
var archiveName = path.resolve(dirs.archive, pkg.name + '_v' + pkg.version + '.zip');
|
||||
var archiver = require('archiver')('zip');
|
||||
var files = require('glob').sync('**/*.*', {
|
||||
'cwd': dirs.dist,
|
||||
'dot': true // include hidden files
|
||||
});
|
||||
var output = fs.createWriteStream(archiveName);
|
||||
|
||||
archiver.on('error', function (error) {
|
||||
done();
|
||||
throw error;
|
||||
});
|
||||
|
||||
output.on('close', done);
|
||||
|
||||
files.forEach(function (file) {
|
||||
|
||||
var filePath = path.resolve(dirs.dist, file);
|
||||
|
||||
// `archiver.bulk` does not maintain the file
|
||||
// permissions, so we need to add files individually
|
||||
archiver.append(fs.createReadStream(filePath), {
|
||||
'name': file,
|
||||
'mode': fs.statSync(filePath)
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
archiver.pipe(output);
|
||||
archiver.finalize();
|
||||
|
||||
});
|
||||
|
||||
gulp.task('clean', function (done) {
|
||||
require('del')([
|
||||
dirs.archive,
|
||||
dirs.dist
|
||||
], done);
|
||||
});
|
||||
|
||||
gulp.task('copy', [
|
||||
'copy:.htaccess',
|
||||
'copy:index.html',
|
||||
'copy:jquery',
|
||||
'copy:main.css',
|
||||
'copy:misc',
|
||||
'copy:normalize'
|
||||
]);
|
||||
|
||||
gulp.task('copy:.htaccess', function () {
|
||||
return 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', function () {
|
||||
return gulp.src(dirs.src + '/index.html')
|
||||
.pipe(plugins.replace(/{{JQUERY_VERSION}}/g, pkg.devDependencies.jquery))
|
||||
.pipe(gulp.dest(dirs.dist));
|
||||
});
|
||||
|
||||
gulp.task('copy:jquery', function () {
|
||||
return 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:main.css', function () {
|
||||
|
||||
var banner = '/*! HTML5 Boilerplate v' + pkg.version +
|
||||
' | ' + pkg.license.type + ' License' +
|
||||
' | ' + pkg.homepage + ' */\n\n';
|
||||
|
||||
return gulp.src(dirs.src + '/css/main.css')
|
||||
.pipe(plugins.header(banner))
|
||||
.pipe(gulp.dest(dirs.dist + '/css'));
|
||||
|
||||
});
|
||||
|
||||
gulp.task('copy:misc', function () {
|
||||
return 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', function () {
|
||||
return gulp.src('node_modules/normalize.css/normalize.css')
|
||||
.pipe(gulp.dest(dirs.dist + '/css'));
|
||||
});
|
||||
|
||||
gulp.task('lint:js', function () {
|
||||
return gulp.src([
|
||||
'gulpfile.js',
|
||||
dirs.src + '/js/*.js',
|
||||
dirs.test + '/*.js'
|
||||
]).pipe(plugins.jscs())
|
||||
.pipe(plugins.jshint())
|
||||
.pipe(plugins.jshint.reporter('jshint-stylish'))
|
||||
.pipe(plugins.jshint.reporter('fail'));
|
||||
});
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// | Main tasks |
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
gulp.task('archive', function (done) {
|
||||
runSequence(
|
||||
'build',
|
||||
'archive:create_archive_dir',
|
||||
'archive:zip',
|
||||
done);
|
||||
});
|
||||
|
||||
gulp.task('build', function (done) {
|
||||
runSequence(
|
||||
['clean', 'lint:js'],
|
||||
'copy',
|
||||
done);
|
||||
});
|
||||
|
||||
gulp.task('default', ['build']);
|
||||
143
gulpfile.mjs
Normal file
143
gulpfile.mjs
Normal file
@@ -0,0 +1,143 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import gulp from 'gulp';
|
||||
import gulpAutoPrefixer from 'gulp-autoprefixer';
|
||||
import gulpEslint from 'gulp-eslint-new';
|
||||
import gulpHeader from 'gulp-header';
|
||||
import gulpRename from 'gulp-rename';
|
||||
import archiver from 'archiver';
|
||||
import { globSync } from 'glob';
|
||||
import { deleteSync } from 'del';
|
||||
import { createRequire } from 'module';
|
||||
const require = createRequire(import.meta.url);
|
||||
const pkg = require('./package.json');
|
||||
|
||||
const dirs = pkg['h5bp-configs'].directories;
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// | Helper tasks |
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
gulp.task('archive:create_archive_dir', (done) => {
|
||||
fs.mkdirSync(path.resolve(dirs.archive), '0755');
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task('archive:zip', (done) => {
|
||||
const archiveName = path.resolve(
|
||||
dirs.archive,
|
||||
`${pkg.name}_v${pkg.version}.zip`,
|
||||
);
|
||||
const zip = archiver('zip');
|
||||
const files = globSync('**/*.*', {
|
||||
cwd: dirs.dist,
|
||||
ignore: [
|
||||
'**/node_modules/**',
|
||||
'package-lock.json',
|
||||
'**/dist/**',
|
||||
'**/.cache/**',
|
||||
],
|
||||
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();
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task('clean', (done) => {
|
||||
deleteSync([dirs.archive, dirs.dist]);
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task('copy:index.html', () => {
|
||||
return gulp.src(`${dirs.src}/index.html`).pipe(gulp.dest(dirs.dist));
|
||||
});
|
||||
|
||||
gulp.task('copy:license', () =>
|
||||
gulp.src('LICENSE.txt').pipe(gulp.dest(dirs.dist)),
|
||||
);
|
||||
|
||||
gulp.task('copy:style', () => {
|
||||
const banner = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n\n`;
|
||||
|
||||
return gulp
|
||||
.src('node_modules/main.css/dist/main.css')
|
||||
.pipe(gulpHeader(banner))
|
||||
.pipe(
|
||||
gulpAutoPrefixer({
|
||||
cascade: false,
|
||||
}),
|
||||
)
|
||||
.pipe(
|
||||
gulpRename({
|
||||
basename: 'style',
|
||||
}),
|
||||
)
|
||||
.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`,
|
||||
`!**/.DS_Store`,
|
||||
],
|
||||
{
|
||||
encoding: false,
|
||||
// Include hidden files by default
|
||||
dot: true,
|
||||
},
|
||||
)
|
||||
.pipe(gulp.dest(dirs.dist)),
|
||||
);
|
||||
|
||||
gulp.task('lint:js', () =>
|
||||
gulp
|
||||
.src([`${dirs.src}/js/*.js`, `${dirs.src}/*.js`, `${dirs.test}/*.mjs`])
|
||||
.pipe(gulpEslint())
|
||||
.pipe(gulpEslint.failOnError()),
|
||||
);
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// | Main tasks |
|
||||
// ---------------------------------------------------------------------
|
||||
gulp.task(
|
||||
'copy',
|
||||
gulp.series('copy:index.html', 'copy:license', 'copy:style', 'copy:misc'),
|
||||
);
|
||||
|
||||
gulp.task('build', gulp.series(gulp.parallel('clean', 'lint:js'), 'copy'));
|
||||
|
||||
gulp.task(
|
||||
'archive',
|
||||
gulp.series('build', 'archive:create_archive_dir', 'archive:zip'),
|
||||
);
|
||||
|
||||
gulp.task('default', gulp.series('build'));
|
||||
4601
package-lock.json
generated
Normal file
4601
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
79
package.json
79
package.json
@@ -1,24 +1,55 @@
|
||||
{
|
||||
"name": "html5-boilerplate",
|
||||
"version": "9.0.1",
|
||||
"description": "A professional front-end template for building fast, robust, and adaptable web apps or sites.",
|
||||
"keywords": [
|
||||
"h5bp",
|
||||
"template",
|
||||
"front-end"
|
||||
],
|
||||
"homepage": "https://html5boilerplate.com/",
|
||||
"bugs": {
|
||||
"url": "https://github.com/h5bp/html5-boilerplate/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/h5bp/html5-boilerplate.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"CHANGELOG.md",
|
||||
"LICENSE.txt",
|
||||
"package.json",
|
||||
"dist/",
|
||||
"README.md"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "gulp build",
|
||||
"prettier": "prettier --write ./**/*.{js,json,md,mjs,yml}",
|
||||
"test": "gulp archive && mocha --reporter spec --timeout 5000"
|
||||
},
|
||||
"devDependencies": {
|
||||
"apache-server-configs": "2.11.0",
|
||||
"archiver": "^0.13.0",
|
||||
"del": "^1.1.0",
|
||||
"glob": "^4.2.1",
|
||||
"gulp": "^3.8.10",
|
||||
"gulp-header": "^1.2.2",
|
||||
"gulp-jscs": "^1.3.1",
|
||||
"gulp-jshint": "^1.9.0",
|
||||
"gulp-load-plugins": "^0.8.0",
|
||||
"gulp-rename": "^1.2.0",
|
||||
"gulp-replace": "^0.5.0",
|
||||
"jquery": "1.11.2",
|
||||
"jshint-stylish": "^1.0.0",
|
||||
"mocha": "^2.0.1",
|
||||
"normalize.css": "3.0.2",
|
||||
"run-sequence": "^1.0.2"
|
||||
"@eslint/js": "^9.35.0",
|
||||
"archiver": "^7.0.1",
|
||||
"del": "^8.0.1",
|
||||
"eslint": "^9.35.0",
|
||||
"eslint-plugin-mocha": "^11.1.0",
|
||||
"glob": "^11.1.0",
|
||||
"globals": "^16.4.0",
|
||||
"gulp": "^5.0.1",
|
||||
"gulp-autoprefixer": "^9.0.0",
|
||||
"gulp-eslint-new": "^2.4.0",
|
||||
"gulp-header": "^2.0.9",
|
||||
"gulp-rename": "^2.1.0",
|
||||
"main.css": "3.0.0",
|
||||
"mocha": "^11.7.2",
|
||||
"prettier": "3.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
"node": ">=20"
|
||||
},
|
||||
"volta": {
|
||||
"node": "20.19.1"
|
||||
},
|
||||
"h5bp-configs": {
|
||||
"directories": {
|
||||
@@ -27,17 +58,5 @@
|
||||
"src": "src",
|
||||
"test": "test"
|
||||
}
|
||||
},
|
||||
"homepage": "http://h5bp.com/",
|
||||
"license": {
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/h5bp/html5-boilerplate/blob/master/LICENSE.md"
|
||||
},
|
||||
"name": "html5-boilerplate",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "gulp build",
|
||||
"test": "gulp archive && mocha --reporter spec --timeout 5000"
|
||||
},
|
||||
"version": "5.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,8 @@ root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
193
src/.gitattributes
vendored
193
src/.gitattributes
vendored
@@ -1 +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
|
||||
|
||||
4
src/.gitignore
vendored
4
src/.gitignore
vendored
@@ -1,2 +1,6 @@
|
||||
# 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
|
||||
node_modules
|
||||
dist
|
||||
.cache
|
||||
92
src/404.html
92
src/404.html
@@ -1,60 +1,62 @@
|
||||
<!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>
|
||||
<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;
|
||||
}
|
||||
|
||||
* {
|
||||
line-height: 1.2;
|
||||
margin: 0;
|
||||
}
|
||||
html {
|
||||
color: #888;
|
||||
display: table;
|
||||
font-family: sans-serif;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
body {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
margin: 2em auto;
|
||||
}
|
||||
h1 {
|
||||
color: #555;
|
||||
font-size: 2em;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #555;
|
||||
font-size: 2em;
|
||||
font-weight: 400;
|
||||
}
|
||||
p {
|
||||
margin: 0 auto;
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 auto;
|
||||
width: 280px;
|
||||
}
|
||||
@media only screen and (max-width: 280px) {
|
||||
|
||||
@media only screen and (max-width: 280px) {
|
||||
body,
|
||||
p {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
body, p {
|
||||
width: 95%;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
margin: 0 0 0.3em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
margin: 0 0 0.3em;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Page Not Found</h1>
|
||||
<p>Sorry, but the page you were trying to view does not exist.</p>
|
||||
<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: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx -->
|
||||
<!-- IE needs 512+ bytes: https://docs.microsoft.com/archive/blogs/ieinternals/friendly-http-error-pages -->
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 KiB |
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Please read: http://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>
|
||||
@@ -1,15 +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: https://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"/>
|
||||
-->
|
||||
</cross-domain-policy>
|
||||
280
src/css/main.css
280
src/css/main.css
@@ -1,280 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
* These selection rule sets have to be separate.
|
||||
* 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:
|
||||
* http://juicystudio.com/article/screen-readers-display-none.php
|
||||
*/
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide only visually, but have it available for screen readers:
|
||||
* http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
|
||||
*/
|
||||
|
||||
.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:
|
||||
* https://www.drupal.org/node/897638
|
||||
*/
|
||||
|
||||
.visuallyhidden.focusable:active,
|
||||
.visuallyhidden.focusable:focus {
|
||||
clip: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: static;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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,
|
||||
(-o-min-device-pixel-ratio: 5/4),
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 120dpi) {
|
||||
/* Style adjustments for high resolution devices */
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Print styles.
|
||||
Inlined to avoid the additional HTTP request:
|
||||
http://www.phpied.com/delay-loading-your-print-css/
|
||||
========================================================================== */
|
||||
|
||||
@media print {
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
background: transparent !important;
|
||||
color: #000 !important; /* Black prints faster:
|
||||
http://www.sanbeiji.com/archives/953 */
|
||||
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,
|
||||
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;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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 & smart
|
||||
configurations for web servers, like Apache and Nginx
|
||||
* [Ant Build Script](https://github.com/h5bp/ant-build-script) — Apache Ant
|
||||
based build script.
|
||||
162
src/doc/css.md
162
src/doc/css.md
@@ -1,162 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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](http://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/),
|
||||
[conditional style sheets](http://css-tricks.com/how-to-create-an-ie-only-stylesheet/),
|
||||
or [Modernizr](http://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/).
|
||||
|
||||
|
||||
## Useful defaults
|
||||
|
||||
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
|
||||
|
||||
You are free and even encouraged to modify or add to these base styles as your
|
||||
project requires.
|
||||
|
||||
|
||||
## Common helpers
|
||||
|
||||
Along with the base styles, we also provide some commonly used helper classes.
|
||||
|
||||
#### `.hidden`
|
||||
|
||||
The `hidden` class can be added to any element that you want to hide visually
|
||||
and from screen readers. It could be an element that will be populated and
|
||||
displayed later, or an element you will hide with JavaScript.
|
||||
|
||||
#### `.visuallyhidden`
|
||||
|
||||
The `visuallyhidden` class can be added to any element that you want to hide
|
||||
visually, while still have its content accessible to screen readers.
|
||||
|
||||
See also:
|
||||
|
||||
* [CSS in Action: Invisible Content Just for Screen Reader
|
||||
Users](http://www.webaim.org/techniques/css/invisiblecontent/)
|
||||
* [Hiding content for
|
||||
accessibility](http://snook.ca/archives/html_and_css/hiding-content-for-accessibility)
|
||||
* [HTML5 Boilerplate - Issue #194](https://github.com/h5bp/html5-boilerplate/issues/194/).
|
||||
|
||||
#### `.invisible`
|
||||
|
||||
The `invisible` class can be added to any element that you want to hide
|
||||
visually and from screen readers, but without affecting the layout.
|
||||
|
||||
As opposed to the `hidden` class that effectively removes the element from the
|
||||
layout, the `invisible` class will simply make the element invisible while
|
||||
keeping it in the flow and not affecting the positioning of the surrounding
|
||||
content.
|
||||
|
||||
__N.B.__ Try to stay away from, and don't use the classes specified above for
|
||||
[keyword stuffing](https://en.wikipedia.org/wiki/Keyword_stuffing) as you will
|
||||
harm your site's ranking!
|
||||
|
||||
#### `.clearfix`
|
||||
|
||||
The `clearfix` class can be added to any element to ensure that it always fully
|
||||
contains its floated children.
|
||||
|
||||
Over the years there have been many variants of the clearfix hack, but currently,
|
||||
we use the [micro clearfix](http://nicolasgallagher.com/micro-clearfix-hack/).
|
||||
|
||||
|
||||
## Media Queries
|
||||
|
||||
HTML5 Boilerplate makes it easy for you to get started with a
|
||||
[_mobile first_](http://www.lukew.com/presos/preso.asp?26) and [_responsive web
|
||||
design_](http://www.alistapart.com/articles/responsive-web-design/) approach to
|
||||
development. But it's worth remembering that there are [no silver
|
||||
bullets](http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/).
|
||||
|
||||
We include placeholder media queries to help you build up your mobile styles for
|
||||
wider viewports and high-resolution displays. It's recommended that you adapt
|
||||
these media queries based on the content of your site rather than mirroring the
|
||||
fixed dimensions of specific devices.
|
||||
|
||||
If you do not want to take the _mobile first_ approach, you can simply edit or
|
||||
remove these placeholder media queries. One possibility would be to work from
|
||||
wide viewports down, and use `max-width` media queries instead (e.g.:
|
||||
`@media only screen and (max-width: 480px)`).
|
||||
|
||||
For more features that can help you in your mobile web development, take a look
|
||||
into our [Mobile Boilerplate](https://github.com/h5bp/mobile-boilerplate).
|
||||
|
||||
|
||||
## Print styles
|
||||
|
||||
Lastly, we provide some useful print styles that will optimize the printing
|
||||
process, as well as make the printed pages easier to read.
|
||||
|
||||
At printing time, these styles will:
|
||||
|
||||
* strip all background colors, change the font color to black, and remove the
|
||||
`text-shadow` — done in order to [help save printer ink and speed up the
|
||||
printing process](http://www.sanbeiji.com/archives/953)
|
||||
* underline and expand links to include the URL — done in order to allow users
|
||||
to know where to refer to<br>
|
||||
(exceptions to this are: the links that are
|
||||
[fragment identifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href),
|
||||
or use the
|
||||
[`javascript:` pseudo protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void#JavaScript_URIs))
|
||||
* expand abbreviations to include the full description — done in order to allow
|
||||
users to know what the abbreviations stands for
|
||||
* provide instructions on how browsers should break the content into pages and
|
||||
on [orphans/widows](https://en.wikipedia.org/wiki/Widows_and_orphans), namely,
|
||||
we instruct
|
||||
[supporting browsers](https://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28Cascading_Style_Sheets%29#Grammar_and_rules)
|
||||
that they should:
|
||||
|
||||
* ensure the table header (`<thead>`) is [printed on each page spanned by the
|
||||
table](http://css-discuss.incutio.com/wiki/Printing_Tables)
|
||||
* prevent block quotations, preformatted text, images and table rows from
|
||||
being split onto two different pages
|
||||
* ensure that headings never appear on a different page than the text they
|
||||
are associated with
|
||||
* ensure that
|
||||
[orphans and widows](https://en.wikipedia.org/wiki/Widows_and_orphans) do
|
||||
[not appear on printed pages](http://css-tricks.com/almanac/properties/o/orphans/)
|
||||
|
||||
The print styles are included along with the other `css` to [avoid the
|
||||
additional HTTP request](http://www.phpied.com/delay-loading-your-print-css/).
|
||||
Also, they should always be included last, so that the other styles can be
|
||||
overwritten.
|
||||
@@ -1,645 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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)
|
||||
|
||||
|
||||
## App Stores
|
||||
|
||||
### Install a Chrome Web Store app
|
||||
|
||||
Users can install a Chrome app directly from your website, as long as
|
||||
the app and site have been associated via Google's Webmaster Tools.
|
||||
Read more on [Chrome Web Store's Inline Installation
|
||||
docs](https://developer.chrome.com/webstore/inline_installation).
|
||||
|
||||
```html
|
||||
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/APP_ID">
|
||||
```
|
||||
|
||||
### Smart App Banners in iOS 6+ Safari
|
||||
|
||||
Stop bothering everyone with gross modals advertising your entry in the
|
||||
App Store. Include the following [meta tag](https://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html#//apple_ref/doc/uid/TP40002051-CH6-SW2)
|
||||
will unintrusively allow 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="//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="//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/Controlling_DNS_prefetching
|
||||
* https://dev.chromium.org/developers/design-documents/dns-prefetching
|
||||
* http://blogs.msdn.com/b/ie/archive/2011/03/17/internet-explorer-9-network-performance-improvements.aspx
|
||||
* http://dayofjs.com/videos/22158462/web-browsers_alex-russel
|
||||
|
||||
|
||||
## 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/advanced),
|
||||
[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](http://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: http://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
|
||||
|
||||
### Prompt users to switch to "Desktop Mode" in IE10 Metro
|
||||
|
||||
IE10 does not support plugins, such as Flash, in Metro mode. If your site
|
||||
requires plugins, you can let users know that via the X-UA-Compatible meta
|
||||
element, which will prompt them to switch to Desktop Mode.
|
||||
|
||||
```html
|
||||
<meta http-equiv="X-UA-Compatible" content="requiresActiveX=true">
|
||||
```
|
||||
|
||||
Here's what it looks like alongside H5BP's default X-UA-Compatible values:
|
||||
|
||||
```html
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,requiresActiveX=true">
|
||||
```
|
||||
|
||||
You can find more information in [Microsoft's IEBlog post about prompting for
|
||||
plugin use in IE10 Metro
|
||||
Mode](http://blogs.msdn.com/b/ie/archive/2012/01/31/web-sites-and-a-plug-in-free-web.aspx).
|
||||
|
||||
### IE Pinned Sites (IE9+)
|
||||
|
||||
Enabling your application for pinning will allow IE9 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 IE9
|
||||
Pinned Sites](http://msdn.microsoft.com/en-us/library/gg131029.aspx).
|
||||
|
||||
### 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:
|
||||
`http://www.example.com/index.html?pinned=true`
|
||||
|
||||
```html
|
||||
<meta name="msapplication-starturl" content="http://www.example.com/index.html?pinned=true">
|
||||
```
|
||||
|
||||
### Recolor IE's controls manually for a Pinned Site
|
||||
|
||||
IE9+ 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](http://blogs.msdn.com/b/ie/archive/2012/06/08/high-quality-visuals-for-pinned-sites-in-windows-8.aspx).
|
||||
|
||||
* 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
|
||||
|
||||
IE10 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](http://blogs.msdn.com/b/ie/archive/2012/04/03/pinned-sites-in-windows-8.aspx)
|
||||
* [Available badge values](http://msdn.microsoft.com/en-us/library/ie/br212849.aspx)
|
||||
|
||||
```html
|
||||
<meta name="msapplication-badge" value="frequency=NUMBER_IN_MINUTES;polling-uri=http://www.example.com/path/to/file.xml">
|
||||
```
|
||||
|
||||
### Disable link highlighting upon tap in IE10
|
||||
|
||||
Similar to [-webkit-tap-highlight-color](http://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](http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10.aspx).
|
||||
|
||||
|
||||
## Search
|
||||
|
||||
### Direct search spiders to your sitemap
|
||||
|
||||
[Learn how to make a sitemap](http://www.sitemaps.org/protocol.html)
|
||||
|
||||
```html
|
||||
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.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](http://googlewebmastercentral.blogspot.com/2009/05/introducing-rich-snippets.html).
|
||||
|
||||
* If you're building a web app you may want [native style momentum scrolling in
|
||||
iOS 5+](http://www.johanbrook.com/articles/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"
|
||||
value="notranslate">`](https://support.google.com/translate/?hl=en#2641276).
|
||||
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/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html/#//apple_ref/doc/uid/TP40008193-SW5).
|
||||
|
||||
* 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).
|
||||
|
||||
* Screen readers currently have less-than-stellar support for HTML5 but the JS
|
||||
script [accessifyhtml5.js](https://github.com/yatil/accessifyhtml5.js) can
|
||||
help increase accessibility by adding ARIA roles to HTML5 elements.
|
||||
|
||||
|
||||
## 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](http://www.atomenabled.org/developers/syndication/).
|
||||
|
||||
```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: http://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/opengraph/objects/builtin/).
|
||||
Take full advantage of Facebook's support for complex data and activity by
|
||||
following the [Open Graph
|
||||
tutorial](https://developers.facebook.com/docs/opengraph/tutorial/).
|
||||
|
||||
```html
|
||||
<meta property="og:title" content="">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:image" 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. Note
|
||||
that, as of this writing, Twitter requires that app developers activate Cards
|
||||
on a per-domain basis. You can read more about the various snippet formats
|
||||
and application process in the [official Twitter Cards
|
||||
documentation](https://dev.twitter.com/docs/cards).
|
||||
|
||||
```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="http://www.example.com/path/to/page.html">
|
||||
<meta name="twitter:title" content="">
|
||||
<meta name="twitter:description" content="">
|
||||
<meta name="twitter:image" content="http://www.example.com/path/to/image.jpg">
|
||||
```
|
||||
|
||||
|
||||
## 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.
|
||||
`http://www.example.com/cart.html?shopping-cart-open=true` can be indexed as
|
||||
the cleaner, more accurate `http://www.example.com/cart.html`.
|
||||
|
||||
```html
|
||||
<link rel="canonical" href="">
|
||||
```
|
||||
|
||||
### Official shortlink
|
||||
|
||||
Signal to the world "This is the shortened URL to use this page!" Poorly
|
||||
supported at this time. Learn more by reading the [article about shortlinks on
|
||||
the Microformats wiki](http://microformats.org/wiki/rel-shortlink).
|
||||
|
||||
```html
|
||||
<link rel="shortlink" href="h5bp.com">
|
||||
```
|
||||
|
||||
### 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="http://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="http://www.example.com/page.html">`
|
||||
|
||||
For more information please see:
|
||||
|
||||
* https://developers.google.com/webmasters/smartphone-sites/details#separateurls
|
||||
* https://developers.google.com/webmasters/smartphone-sites/feature-phones
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
The Apple touch icons can be seen as the favicons of iOS devices.
|
||||
|
||||
The main sizes of the Apple touch icons are:
|
||||
|
||||
* `57×57px` – iPhone with @1x display and iPod Touch
|
||||
* `72×72px` – iPad and iPad mini with @1x display running iOS ≤ 6
|
||||
* `76×76px` – iPad and iPad mini with @1x display running iOS ≥ 7
|
||||
* `114×114px` – iPhone with @2x display running iOS ≤ 6
|
||||
* `120×120px` – iPhone with @2x and @3x display running iOS ≥ 7
|
||||
* `144×144px` – iPad and iPad mini with @2x display running iOS ≤ 6
|
||||
* `152×152px` – iPad and iPad mini with @2x display running iOS 7
|
||||
* `180×180px` – iPad and iPad mini with @2x display running iOS 8
|
||||
|
||||
Displays meaning:
|
||||
|
||||
* @1x - non-Retina
|
||||
* @2x - Retina
|
||||
* @3x - Retina HD
|
||||
|
||||
More information about the displays of iOS devices can be found
|
||||
[here](https://en.wikipedia.org/wiki/List_of_iOS_devices#Display).
|
||||
|
||||
In most cases, one `180×180px` touch icon named `apple-touch-icon.png`
|
||||
and including:
|
||||
|
||||
```html
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
||||
```
|
||||
|
||||
in the `<head>` of the page is enough. If you use art-direction and/or
|
||||
want to have different content for each device, you can add more touch
|
||||
icons as written above.
|
||||
|
||||
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 is
|
||||
necessary to add media queries to detect which image to load. Here is an
|
||||
example for a retina iPhone:
|
||||
|
||||
```html
|
||||
<link rel="apple-touch-startup-image" media="(max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)" href="img/startup-retina.png">
|
||||
```
|
||||
|
||||
However, it is possible to detect which start-up image to use with JavaScript.
|
||||
The Mobile Boilerplate provides a useful function for this. Please see
|
||||
[helpers.js](https://github.com/h5bp/mobile-boilerplate/blob/v4.1.0/js/helper.js#L336-L383)
|
||||
for the implementation.
|
||||
|
||||
|
||||
### 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">
|
||||
```
|
||||
@@ -1,93 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Frequently asked questions
|
||||
|
||||
* [Why is the URL for jQuery without
|
||||
`http`?](#why-is-the-url-for-jquery-without-http)
|
||||
* [Why don't you automatically load the latest version of jQuery from the Google
|
||||
CDN?](#why-dont-you-automatically-load-the-latest-version-of-jquery-from-the-google-cdn)
|
||||
* [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 URL for jQuery without `http`?
|
||||
|
||||
It is because of the use of [protocol-relative
|
||||
URLs](http://paulirish.com/2010/the-protocol-relative-url/).
|
||||
|
||||
**N.B.** If you try to view the local web page directly in the browser, the
|
||||
browser will fail to load the assets specified using protocol-relative URLs
|
||||
as it will attempt to fetch them from the local file system. We recommend you
|
||||
use a local HTTP server to test your web pages, or a file hosting service that
|
||||
allows you to preview your web pages online (e.g.
|
||||
[Dropbox](https://www.dropbox.com/)).
|
||||
|
||||
Setting up a local HTTP server can be done using there various
|
||||
[one-liners](https://gist.github.com/willurd/5720255):
|
||||
|
||||
* PHP 5.4.0+ by running
|
||||
[`php -S localhost:8080`](https://php.net/manual/en/features.commandline.webserver.php)
|
||||
from your local directory
|
||||
* Python 2.x by running `python -m SimpleHTTPServer` from your local directory
|
||||
* Python 3.x by running `python -m http.server` from your local directory
|
||||
* Ruby 1.9.2+ by running `ruby -run -ehttpd . -p8080` from your local directory
|
||||
* Node.js by installing and running either
|
||||
[`static -p 8080`](https://www.npmjs.org/package/node-static)
|
||||
or [`http-server -p 8080`](https://www.npmjs.org/package/http-server)
|
||||
|
||||
A list of more complex HTTP servers can be found
|
||||
[here](misc.md#servers-and-stacks).
|
||||
|
||||
|
||||
### Why don't you automatically load the latest version of jQuery from the Google CDN?
|
||||
|
||||
The [file](https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js) to which
|
||||
the Google [CDN](https://en.wikipedia.org/wiki/Content_delivery_network) points
|
||||
to is [no longer updated and will stay locked at version `1.11.1` in order to
|
||||
prevent inadvertent web
|
||||
breakage](http://blog.jquery.com/2014/07/03/dont-use-jquery-latest-js/).
|
||||
|
||||
In general, version updating should be an intentional decision! You shouldn't
|
||||
include a URL that will always point to the latest version, as that version:
|
||||
|
||||
* may not be compatible with the existing plugins/code on the site
|
||||
* will have a very short cache time compare to the specific version,
|
||||
which means that users won't get the benefits of long-term caching
|
||||
|
||||
### 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.
|
||||
However, having the code at the bottom of the page [helps improve
|
||||
performance](http://stevesouders.com/efws/inline-scripts-bottom.php).
|
||||
|
||||
|
||||
### How can I integrate [Bootstrap](http://getbootstrap.com/) with HTML5 Boilerplate?
|
||||
|
||||
One simple way is to use [Initializr](http://initializr.com) and create a
|
||||
custom build that includes both HTML5 Boilerplate and
|
||||
[Bootstrap](http://getbootstrap.com/).
|
||||
|
||||
Read more about how [HTML5 Boilerplate and Bootstrap complement each
|
||||
other](https://www.quora.com/Is-Bootstrap-a-complement-or-an-alternative-to-HTML5-Boilerplate-or-viceversa/answer/Nicolas-Gallagher).
|
||||
|
||||
|
||||
### Do I need to upgrade my site each time a new version of HTML5 Boilerplate is released?
|
||||
|
||||
No, same 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).
|
||||
223
src/doc/html.md
223
src/doc/html.md
@@ -1,223 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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`](#404html) - 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](http://paulirish.com/2009/avoiding-the-fouc-v3/).
|
||||
|
||||
|
||||
## Language attribute
|
||||
|
||||
Please consider specifying the language of your content by adding the `lang`
|
||||
attribute to `<html>` as in this example:
|
||||
|
||||
```html
|
||||
<html class="no-js" lang="en">
|
||||
```
|
||||
|
||||
### The order of the `<title>` and `<meta>` tags
|
||||
|
||||
The order in which the `<title>` and the `<meta>` tags are specified is
|
||||
important because:
|
||||
|
||||
1) 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)
|
||||
|
||||
* 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/p/doctype-mirror/wiki/ArticleUtf7) in
|
||||
Internet Explorer
|
||||
|
||||
2) the meta tag for compatibility mode
|
||||
(`<meta http-equiv="X-UA-Compatible" content="IE=edge">`):
|
||||
|
||||
* [needs to be included before all other tags except for the `<title>` and
|
||||
the other `<meta>`
|
||||
tags](http://msdn.microsoft.com/en-us/library/cc288325.aspx)
|
||||
|
||||
|
||||
### `X-UA-Compatible`
|
||||
|
||||
Internet Explorer 8/9/10 support [document compatibility
|
||||
modes](http://msdn.microsoft.com/en-us/library/cc288325.aspx) that affect the
|
||||
way webpages are interpreted and displayed. Because of this, even if your site's
|
||||
visitor is using, let's say, Internet Explorer 9, it's possible that IE will not
|
||||
use the latest rendering engine, and instead, decide to render your page using
|
||||
the Internet Explorer 5.5 rendering engine.
|
||||
|
||||
Specifying the `X-UA-Compatible` meta tag:
|
||||
|
||||
```html
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
```
|
||||
|
||||
or sending the page with the following HTTP response header
|
||||
|
||||
```
|
||||
X-UA-Compatible: IE=edge
|
||||
```
|
||||
|
||||
will force Internet Explorer 8/9/10 to render the webpage in the highest
|
||||
available mode in [the various cases when it may
|
||||
not](https://hsivonen.fi/doctype/#ie8), and therefore, ensure that anyone
|
||||
browsing your site is treated to the best possible user experience that
|
||||
browser can offer.
|
||||
|
||||
If possible, we recommend that you remove the `meta` tag and send only the
|
||||
HTTP response header as the `meta` tag will not always work if your site is
|
||||
served on a non-standard port, as Internet Explorer's preference option
|
||||
`Display intranet sites in Compatibility View` is checked by default.
|
||||
|
||||
If you are using Apache as your webserver, including the
|
||||
[`.htaccess`](https://github.com/h5bp/server-configs-apache) file takes care of
|
||||
the HTTP header. If you are using a different server, check out our [other
|
||||
server config](https://github.com/h5bp/server-configs).
|
||||
|
||||
Starting with Internet Explorer 11, [document modes are
|
||||
deprecated](http://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode).
|
||||
If your business still relies on older web apps and services that were
|
||||
designed for older versions of Internet Explorer, you might want to consider
|
||||
enabling [Enterprise Mode](http://blogs.msdn.com/b/ie/archive/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11.aspx) throughout your company.
|
||||
|
||||
|
||||
## 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
|
||||
Apple developer docs](https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html).
|
||||
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">
|
||||
```
|
||||
|
||||
## Favicons and Touch Icon
|
||||
|
||||
The shortcut icons should be put in the root directory of your site. 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.
|
||||
|
||||
## Modernizr
|
||||
|
||||
HTML5 Boilerplate uses a custom build of Modernizr.
|
||||
|
||||
[Modernizr](http://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.
|
||||
|
||||
In general, in order to keep page load times to a minimum, it's best to call
|
||||
any JavaScript at the end of the page because if a script is slow to load
|
||||
from an external server it may cause the whole page to hang. That said, the
|
||||
Modernizr script *needs* to run *before* the browser begins rendering the page,
|
||||
so that browsers lacking support for some of the new HTML5 elements are able to
|
||||
handle them properly. Therefore the Modernizr script is the only JavaScript
|
||||
file synchronously loaded at the top of the document.
|
||||
|
||||
## 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 some polyfill CDN service, like [cdn.polyfill.io](http://cdn.polyfill.io/),
|
||||
just put it before the other scripts in the bottom of the page:
|
||||
|
||||
```html
|
||||
<script src="//cdn.polyfill.io/v1/polyfill.min.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.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. Also using
|
||||
this technique, make sure 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).
|
||||
|
||||
## 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 6/7. If you intended to support IE 6/7, then you
|
||||
should remove the snippet of code.
|
||||
|
||||
### Google CDN for jQuery
|
||||
|
||||
The Google CDN version of the jQuery JavaScript library is referenced towards
|
||||
the bottom of the page using a protocol-independent path (read more about this
|
||||
in the [FAQ](faq.md)). A local fallback of jQuery is included for rare instances
|
||||
when the CDN version might not be available, and to facilitate offline
|
||||
development.
|
||||
|
||||
The Google CDN version is chosen over other [potential candidates (like the
|
||||
jQuery CDN](https://jquery.com/download/#using-jquery-with-a-cdn)) because
|
||||
it's fast in absolute terms and it has the best overall
|
||||
[penetration](http://httparchive.org/trends.php#perGlibs) which increases the
|
||||
odds of having a copy of the library in your user's browser cache.
|
||||
|
||||
While the Google CDN is a strong default solution your site or application may
|
||||
require a different configuration. Testing your site with services like
|
||||
[WebPageTest](http://www.webpagetest.org/) and browser tools like
|
||||
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) or
|
||||
[YSlow](https://developer.yahoo.com/yslow/) 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. 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, you’ll
|
||||
be able to count users who don’t fully load the page, and you’ll incur the max
|
||||
number of simultaneous connections of the browser.
|
||||
|
||||
Further information:
|
||||
|
||||
* [Optimizing the Google Universal Analytics
|
||||
Snippet](https://mathiasbynens.be/notes/async-analytics-snippet#universal-analytics)
|
||||
* [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 Universal 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!
|
||||
@@ -1,37 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://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.
|
||||
For larger projects, you can make use of a JavaScript module loader, like
|
||||
[Require.js](http://requirejs.org/), to load any other scripts you need to
|
||||
run.
|
||||
|
||||
## plugins.js
|
||||
|
||||
This file can be used to contain all your plugins, such as jQuery plugins and
|
||||
other 3rd party scripts.
|
||||
|
||||
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](http://docs.jquery.com/Plugins/Authoring#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](http://www.modernizr.com/download/).
|
||||
198
src/doc/misc.md
198
src/doc/misc.md
@@ -1,198 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
* [.gitignore](#gitignore)
|
||||
* [.editorconfig](#editorconfig)
|
||||
* [Server Configuration](#server-configuration)
|
||||
* [crossdomain.xml](#crossdomainxml)
|
||||
* [robots.txt](#robotstxt)
|
||||
* [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](http://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](http://editorconfig.org/#supported-properties) from the
|
||||
`.editorconfig` file, you will need to [install a
|
||||
plugin]( http://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](http://editorconfig.org/).
|
||||
|
||||
|
||||
## Server Configuration
|
||||
|
||||
H5BP includes a [`.htaccess`](#htaccess) file for the Apache HTTP server. 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.
|
||||
|
||||
|
||||
### Servers and Stacks
|
||||
|
||||
A comprehensive list of web servers and stacks are beyond the scope of this
|
||||
documentation, but some common ones include:
|
||||
|
||||
* [Apache HTTP Server](https://httpd.apache.org/docs/trunk/getting-started.html)
|
||||
* [LAMP](https://en.wikipedia.org/wiki/LAMP_%28software_bundle%29)
|
||||
(Linux, Apache, MySQL, and PHP).
|
||||
Other variants include [MAMP](https://www.mamp.info/en/index.html),
|
||||
[WAMP](http://www.wampserver.com/en/),
|
||||
or [XAMPP](https://www.apachefriends.org/index.html).
|
||||
* LAPP uses PostgreSQL instead of MySQL
|
||||
* [Nginx](http://wiki.nginx.org/GettingStarted)
|
||||
* [LEMP](http://www.chrisjohnston.org/ubuntu-tutorials/setting-up-a-lemp-stack-ubuntu-904)
|
||||
is similar to the LAMP stack but uses Nginx
|
||||
* [IIS](https://en.wikipedia.org/wiki/Internet_Information_Services)
|
||||
* [ASP.NET](http://www.asp.net/get-started)
|
||||
* [MEAN](http://mean.io/) (MongoDB, Express, AngularJS, Node.js)
|
||||
|
||||
|
||||
### .htaccess
|
||||
|
||||
A `.htaccess` (hypertext access) file is a
|
||||
[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
|
||||
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).
|
||||
|
||||
|
||||
## crossdomain.xml
|
||||
|
||||
The _cross-domain policy file_ is an XML document that gives a web client —
|
||||
such as Adobe Flash Player, Adobe Reader, etc. — permission to handle data
|
||||
across multiple domains, by:
|
||||
|
||||
* granting read access to data
|
||||
* permitting the client to include custom headers in cross-domain requests
|
||||
* granting permissions for socket-based connections
|
||||
|
||||
__e.g.__ If a client hosts content from a particular source domain and that
|
||||
content makes requests directed towards a domain other than its own, the remote
|
||||
domain would need to host a cross-domain policy file in order to grant access
|
||||
to the source domain and allow the client to continue with the transaction.
|
||||
|
||||
For more in-depth information, please see Adobe's [cross-domain policy file
|
||||
specification](https://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html).
|
||||
|
||||
|
||||
## 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)
|
||||
|
||||
|
||||
## 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](http://msdn.microsoft.com/en-us/library/ie/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](http://msdn.microsoft.com/en-us/library/ie/dn320426%28v=vs.85%29.aspx).
|
||||
130
src/doc/usage.md
130
src/doc/usage.md
@@ -1,130 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Usage
|
||||
|
||||
Once you have cloned or downloaded HTML5 Boilerplate, creating a site or app
|
||||
usually involves the following:
|
||||
|
||||
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. (Optionally run a build script to automate the optimization of your site -
|
||||
e.g. [ant build script](https://github.com/h5bp/ant-build-script))
|
||||
5. Deploy your site.
|
||||
|
||||
|
||||
## 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
|
||||
├── apple-touch-icon.png
|
||||
├── browserconfig.xml
|
||||
├── index.html
|
||||
├── humans.txt
|
||||
├── robots.txt
|
||||
├── crossdomain.xml
|
||||
├── favicon.ico
|
||||
├── tile-wide.png
|
||||
└── tile.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.
|
||||
|
||||
For more info on this topic, please refer to
|
||||
[MSDN](http://msdn.microsoft.com/en-us/library/ie/dn455106.aspx).
|
||||
|
||||
### .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.
|
||||
|
||||
### crossdomain.xml
|
||||
|
||||
A template for working with cross-domain requests. [About
|
||||
crossdomain.xml](misc.md#crossdomainxml).
|
||||
|
||||
### 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).
|
||||
|
||||
You might want to check out Hans' handy [HTML5 Boilerplate Favicon and Apple
|
||||
Touch Icon
|
||||
PSD-Template](https://drublic.de/blog/html5-boilerplate-favicons-psd-template/).
|
||||
@@ -1,15 +0,0 @@
|
||||
# humanstxt.org/
|
||||
# The humans responsible & technology colophon
|
||||
|
||||
# TEAM
|
||||
|
||||
<name> -- <role> -- <twitter>
|
||||
|
||||
# THANKS
|
||||
|
||||
<name>
|
||||
|
||||
# TECHNOLOGY COLOPHON
|
||||
|
||||
CSS3, HTML5
|
||||
Apache Server Configs, jQuery, Modernizr, Normalize.css
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user