mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-11 15:48:03 -05:00
Compare commits
970 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 |
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,6 +1,6 @@
|
||||
# For more information about the properties used in
|
||||
# this file, please see the EditorConfig documentation:
|
||||
# http://editorconfig.org/
|
||||
# https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
@@ -14,9 +14,3 @@ trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[{.travis.yml,package.json}]
|
||||
# The indent size used in the `package.json` file cannot be changed
|
||||
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
26
.eslintrc.js
26
.eslintrc.js
@@ -1,26 +0,0 @@
|
||||
module.exports = {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"mocha": true
|
||||
},
|
||||
"plugins": ["mocha"],
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"indent": [
|
||||
"error",
|
||||
2
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"always"
|
||||
]
|
||||
}
|
||||
};
|
||||
9
.gitattributes
vendored
9
.gitattributes
vendored
@@ -16,13 +16,8 @@
|
||||
*.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
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
# Exclude the `.htaccess` file from GitHub's language statistics
|
||||
# https://github.com/github/linguist#using-gitattributes
|
||||
|
||||
dist/.htaccess linguist-vendored
|
||||
*.yml text eol=lf
|
||||
|
||||
20
.github/CODE_OF_CONDUCT.md
vendored
20
.github/CODE_OF_CONDUCT.md
vendored
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
|
||||
|
||||
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
|
||||
- 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
|
||||
- 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
|
||||
|
||||
|
||||
63
.github/CONTRIBUTING.md
vendored
63
.github/CONTRIBUTING.md
vendored
@@ -1,7 +1,7 @@
|
||||
# Contributing to HTML5 Boilerplate
|
||||
|
||||
♥ [HTML5 Boilerplate](https://html5boilerplate.com/) and want to get involved?
|
||||
Thanks! We're actively looking for folks interested in helping out and there
|
||||
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
|
||||
@@ -12,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
|
||||
@@ -20,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.
|
||||
@@ -46,7 +38,7 @@ 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](https://css-tricks.com/reduced-test-cases/) and a live example.
|
||||
@@ -75,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
|
||||
@@ -118,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
|
||||
@@ -129,25 +121,50 @@ included in the project:
|
||||
git checkout -b <topic-branch-name>
|
||||
```
|
||||
|
||||
4. Commit your changes in logical chunks. Please adhere to these [git commit
|
||||
4. Install locked dependencies:
|
||||
|
||||
```bash
|
||||
npm ci
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
5. Locally merge (or rebase) the upstream development branch into your topic branch:
|
||||
6. Locally merge (or rebase) the upstream development branch into your topic branch:
|
||||
|
||||
```bash
|
||||
git pull [--rebase] upstream master
|
||||
git pull [--rebase] upstream main
|
||||
```
|
||||
|
||||
6. Push your topic branch up to your fork:
|
||||
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
|
||||
|
||||
74
.github/ISSUE_TEMPLATE.md
vendored
74
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,74 +0,0 @@
|
||||
**I'm submitting a ...**
|
||||
<!-- (check one with "x") -->
|
||||
- [ ] bug report
|
||||
- [ ] feature request
|
||||
- [ ] other (Please do not submit support requests here (below))
|
||||
|
||||
## Notes:
|
||||
|
||||
* Please **do not** use the issue tracker for personal support requests (use
|
||||
[Stack Overflow](https://stackoverflow.com/questions/tagged/html5boilerplate)).
|
||||
|
||||
* Please **do not** derail or troll issues. Keep the discussion on topic and
|
||||
respect the opinions of others.
|
||||
|
||||
* Please **do not** open issues or pull requests regarding the code in
|
||||
[`.htaccess`](https://github.com/h5bp/server-configs-apache),
|
||||
[`jQuery`](https://github.com/jquery/jquery/),
|
||||
[`Modernizr`](https://github.com/Modernizr/Modernizr) or
|
||||
[`Normalize.css`](https://github.com/necolas/normalize.css) (open them in
|
||||
their respective repositories).
|
||||
|
||||
## Bug reports
|
||||
|
||||
A bug is a _demonstrable problem_ that is caused by the code in the repository.
|
||||
Good bug reports are extremely helpful - thank you!
|
||||
|
||||
Guidelines for bug reports:
|
||||
|
||||
1. **Use the GitHub issue search** — check if the issue has already been
|
||||
reported.
|
||||
|
||||
We have a long history of sometimes _very_ detailed discussion of every line of code
|
||||
in the project. We want discussion, so it might still warrant an issue. It
|
||||
just helps to get the (sometimes extensive) context.
|
||||
|
||||
2. **Check if the issue has been fixed** — try to reproduce it using the
|
||||
latest `master` or development branch in the repository.
|
||||
|
||||
3. **Isolate the problem** — ideally create a [reduced test
|
||||
case](https://css-tricks.com/reduced-test-cases/) and a live example.
|
||||
|
||||
A good bug report shouldn't leave others needing to chase you up for more
|
||||
information. Please try to be as detailed as possible in your report. What is
|
||||
your environment? What steps will reproduce the issue? What browser(s) and OS
|
||||
experience the problem? What would you expect to be the outcome? All these
|
||||
details will help people to fix any potential bugs.
|
||||
|
||||
Example:
|
||||
|
||||
> Short and descriptive example bug report title
|
||||
>
|
||||
> A summary of the issue and the browser/OS environment in which it occurs. If
|
||||
> suitable, include the steps required to reproduce the bug.
|
||||
>
|
||||
> 1. This is the first step
|
||||
> 2. This is the second step
|
||||
> 3. Further steps, etc.
|
||||
>
|
||||
> `<url>` - a link to the reduced test case
|
||||
>
|
||||
> Any other information you want to share that is relevant to the issue being
|
||||
> reported. This might include the lines of code that you have identified as
|
||||
> causing the bug, and potential solutions (and your opinions on their
|
||||
> merits).
|
||||
|
||||
|
||||
## Feature requests
|
||||
|
||||
Feature requests are welcome. But take a moment to find out whether your idea
|
||||
fits with the scope and aims of the project. It's up to *you* to make a strong
|
||||
case to convince the project's developers of the merits of this feature. Please
|
||||
provide as much detail and context as possible.
|
||||
|
||||
|
||||
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
|
||||
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,19 +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** document.
|
||||
- [ ] 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.
|
||||
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!
|
||||
|
||||
9
.github/SUPPORT.md
vendored
9
.github/SUPPORT.md
vendored
@@ -1,10 +1,5 @@
|
||||
# Support
|
||||
|
||||
For personal support requests with HTML5 Boilerplate please use Stack Overflow
|
||||
([`html5boilerplate`](https://stackoverflow.com/questions/tagged/html5boilerplate) tag).
|
||||
|
||||
Please check the respective repository/website for support regarding the code in
|
||||
[`.htaccess`](https://github.com/h5bp/server-configs-apache),
|
||||
[`jQuery`](https://jquery.org/support/),
|
||||
[`Modernizr`](https://modernizr.com/) or
|
||||
[`Normalize.css`](https://github.com/necolas/normalize.css).
|
||||
([`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": "'"
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
33
.travis.yml
33
.travis.yml
@@ -1,33 +0,0 @@
|
||||
# For more information about the configurations used
|
||||
# in this file, please see the Travis CI documentation:
|
||||
# https://docs.travis-ci.com
|
||||
|
||||
after_success:
|
||||
- |
|
||||
|
||||
# Automatically update the content from the `dist/` directory
|
||||
|
||||
$(npm bin)/travis-after-all \
|
||||
&& $(npm bin)/set-up-ssh -k "$encrypted_7289798db853_key" \
|
||||
-iv "$encrypted_7289798db853_iv" \
|
||||
--path-encrypted-key ".travis/github_deploy_key.enc" \
|
||||
&& $(npm bin)/commit-changes --branch "master" \
|
||||
--commands "npm run build" \
|
||||
--commit-message "Update content from the \`dist\` directory [skip ci]"
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: "uZ0R71TG9AR+kbfM9rwa8PPNr3f9E0C4OuA0s6g0Gq15bBcpVxPvus0/eJdW+O2NSzZE1GbzS//hBiP+chK/8X4DyNIRutlGk5RYdnTTFEaZo9jp0BvlvprUYlGgpprR/531zQ9ahkc0STwVvzurGzlcF4NNMiISAJJ1IdQZABc="
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 6
|
||||
- 8
|
||||
- 9
|
||||
|
||||
dist: trusty
|
||||
sudo: false
|
||||
Binary file not shown.
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
|
||||
}
|
||||
472
CHANGELOG.md
472
CHANGELOG.md
@@ -1,319 +1,403 @@
|
||||
### 6.1.0 (May 1, 2018)
|
||||
# Changelog
|
||||
|
||||
* [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))
|
||||
## 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)
|
||||
|
||||
### 6.0.1 (August 20, 2017)
|
||||
## 9.0.0 (December 6, 2023)
|
||||
|
||||
* Reverts .visuallyhidden (see [#1985](https://github.com/h5bp/html5-boilerplate/issues/1985))
|
||||
- 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)
|
||||
|
||||
### 6.0.0 (August 17, 2017)
|
||||
- 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))
|
||||
|
||||
* 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
|
||||
## 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)
|
||||
- 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
|
||||
- Fix print styles for Internet Explorer 11
|
||||
([#1799](https://github.com/h5bp/html5-boilerplate/issues/1799)).
|
||||
* Update doc links to https
|
||||
- Update doc links to https
|
||||
([#1889](https://github.com/h5bp/html5-boilerplate/issues/1889)).
|
||||
* Delete crossdomain.xml
|
||||
- Delete crossdomain.xml
|
||||
([#1881](https://github.com/h5bp/html5-boilerplate/issues/1881)).
|
||||
* Adds pre-wrap to PRE
|
||||
- Adds pre-wrap to PRE
|
||||
([#1742](https://github.com/h5bp/html5-boilerplate/issues/1742)).
|
||||
* Change license format to SPDX format
|
||||
- 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)).
|
||||
- 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)
|
||||
## 5.3.0 (January 12, 2016)
|
||||
|
||||
* Update jQuery to `v1.12.0`.
|
||||
* Fetch `jQuery` from jQuery's CDN instead of Google's
|
||||
- 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`
|
||||
[#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)
|
||||
## 5.2.0 (May 1, 2015)
|
||||
|
||||
* Update jQuery to `v1.11.3`
|
||||
- Update jQuery to `v1.11.3`
|
||||
([#1699](https://github.com/h5bp/html5-boilerplate/issues/1699)).
|
||||
* Deprecate protocol-relative URLs
|
||||
- Deprecate protocol-relative URLs
|
||||
([#1694](https://github.com/h5bp/html5-boilerplate/issues/1694)).
|
||||
* Update high resolution media query
|
||||
- Update high resolution media query
|
||||
([#1474](https://github.com/h5bp/html5-boilerplate/issues/1474)).
|
||||
* Update Apache Server Configs to `v2.14.0`.
|
||||
- Update Apache Server Configs to `v2.14.0`.
|
||||
|
||||
### 5.1.0 (April 1, 2015)
|
||||
## 5.1.0 (April 1, 2015)
|
||||
|
||||
* Update Normalize.css to `v3.0.3`.
|
||||
* Use `https://` in the Google Universal Analytics snippet
|
||||
- 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`
|
||||
- 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>
|
||||
- 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`.
|
||||
- Update Apache Server Configs to `v2.13.0`.
|
||||
|
||||
### 5.0.0 (February 1, 2015)
|
||||
## 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
|
||||
- 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 parameters 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,91 +1,120 @@
|
||||
# [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.
|
||||
|
||||
This project is the product of years of iterative development and
|
||||
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.
|
||||
|
||||
* Homepage: [https://html5boilerplate.com/](https://html5boilerplate.com/)
|
||||
* Source: [https://github.com/h5bp/html5-boilerplate](https://github.com/h5bp/html5-boilerplate)
|
||||
* Twitter: [@h5bp](https://twitter.com/h5bp)
|
||||
- [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](https://html5boilerplate.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.
|
||||
3. Run `npm install html5-boilerplate` and pull in what you need from the resulting `node_modules/html5-boilerplate/dist`
|
||||
- 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.
|
||||
* Designed with progressive enhancement in mind.
|
||||
* Includes:
|
||||
* [`Normalize.css`](https://necolas.github.com/normalize.css/)
|
||||
for CSS normalizations and common bug fixes
|
||||
* [`jQuery`](https://jquery.com/) via CDN with [SRI Hash](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) and a local fallback
|
||||
* A custom build of [`Modernizr`](https://modernizr.com/) for feature
|
||||
detection
|
||||
* [`Apache Server Configs`](https://github.com/h5bp/server-configs-apache)
|
||||
that, among other, improve the web site's performance and security
|
||||
* Placeholder CSS Media Queries.
|
||||
* Useful CSS helper classes.
|
||||
* Default print styles, performance optimized.
|
||||
* An optimized version of the Google Universal Analytics snippet.
|
||||
* Protection against any stray `console` statements causing JavaScript
|
||||
errors in older browsers.
|
||||
* "Delete-key friendly." Easy to strip out parts you don't need.
|
||||
* Extensive inline and accompanying documentation.
|
||||
- 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.
|
||||
|
||||
## Browser Support
|
||||
|
||||
## Browser support
|
||||
|
||||
* Chrome *(latest 2)*
|
||||
* Edge *(latest 2)*
|
||||
* Firefox *(latest 2)*
|
||||
* Internet Explorer 9+
|
||||
* Opera *(latest 2)*
|
||||
* Safari *(latest 2)*
|
||||
|
||||
*This doesn't mean that HTML5 Boilerplate cannot be used in older browsers,
|
||||
just that we'll ensure compatibility with the ones mentioned above.*
|
||||
|
||||
If you need legacy browser support you
|
||||
can use [HTML5 Boilerplate v4](https://github.com/h5bp/html5-boilerplate/tree/v4) (IE 6+, Firefox 3.6+, Safari 4+),
|
||||
or [HTML5 Boilerplate v5](https://github.com/h5bp/html5-boilerplate/tree/v5.0.0) (IE8+). They are no longer actively developed.
|
||||
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
|
||||
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
|
||||
|
||||
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)
|
||||
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
|
||||
|
||||
|
||||
4
dist/.editorconfig
vendored
4
dist/.editorconfig
vendored
@@ -4,10 +4,8 @@ root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
3
dist/.gitignore
vendored
3
dist/.gitignore
vendored
@@ -1,3 +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
|
||||
1177
dist/.htaccess
vendored
1177
dist/.htaccess
vendored
File diff suppressed because it is too large
Load Diff
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: https://blogs.msdn.microsoft.com/ieinternals/2010/08/18/friendly-http-error-pages/ -->
|
||||
<!-- IE needs 512+ bytes: https://docs.microsoft.com/archive/blogs/ieinternals/friendly-http-error-pages -->
|
||||
|
||||
12
dist/browserconfig.xml
vendored
12
dist/browserconfig.xml
vendored
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Please read: https://msdn.microsoft.com/en-us/library/ie/dn455106.aspx -->
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="tile.png"/>
|
||||
<square150x150logo src="tile.png"/>
|
||||
<wide310x150logo src="tile-wide.png"/>
|
||||
<square310x310logo src="tile.png"/>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
287
dist/css/main.css
vendored
287
dist/css/main.css
vendored
@@ -1,287 +0,0 @@
|
||||
/*! HTML5 Boilerplate v6.1.0 | MIT License | https://html5boilerplate.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
|
||||
*
|
||||
* Vendor-prefixed and regular ::selection selectors cannot be combined:
|
||||
* https://stackoverflow.com/a/16982510/7133471
|
||||
*
|
||||
* Customize the background color to match your design.
|
||||
*/
|
||||
|
||||
::-moz-selection {
|
||||
background: #b3d4fc;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: #b3d4fc;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* A better looking default horizontal rule
|
||||
*/
|
||||
|
||||
hr {
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid #ccc;
|
||||
margin: 1em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove the gap between audio, canvas, iframes,
|
||||
* images, videos and the bottom of their containers:
|
||||
* https://github.com/h5bp/html5-boilerplate/issues/440
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
iframe,
|
||||
img,
|
||||
svg,
|
||||
video {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove default fieldset styles.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow only vertical resizing of textareas.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Browser Upgrade Prompt
|
||||
========================================================================== */
|
||||
|
||||
.browserupgrade {
|
||||
margin: 0.2em 0;
|
||||
background: #ccc;
|
||||
color: #000;
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Author's custom styles
|
||||
========================================================================== */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
Helper classes
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers
|
||||
*/
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide only visually, but have it available for screen readers:
|
||||
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
|
||||
*
|
||||
* 1. For long content, line feeds are not interpreted as spaces and small width
|
||||
* causes content to wrap 1 word per line:
|
||||
* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
|
||||
*/
|
||||
|
||||
.visuallyhidden {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
white-space: nowrap; /* 1 */
|
||||
}
|
||||
|
||||
/*
|
||||
* Extends the .visuallyhidden class to allow the element
|
||||
* to be focusable when navigated to via the keyboard:
|
||||
* https://www.drupal.org/node/897638
|
||||
*/
|
||||
|
||||
.visuallyhidden.focusable:active,
|
||||
.visuallyhidden.focusable:focus {
|
||||
clip: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: static;
|
||||
width: auto;
|
||||
white-space: inherit;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers, but maintain layout
|
||||
*/
|
||||
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clearfix: contain floats
|
||||
*
|
||||
* For modern browsers
|
||||
* 1. The space content is one way to avoid an Opera bug when the
|
||||
* `contenteditable` attribute is included anywhere else in the document.
|
||||
* Otherwise it causes space to appear at the top and bottom of elements
|
||||
* that receive the `clearfix` class.
|
||||
* 2. The use of `table` rather than `block` is only necessary if using
|
||||
* `:before` to contain the top-margins of child elements.
|
||||
*/
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " "; /* 1 */
|
||||
display: table; /* 2 */
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
EXAMPLE Media Queries for Responsive Design.
|
||||
These examples override the primary ('mobile first') styles.
|
||||
Modify as content requires.
|
||||
========================================================================== */
|
||||
|
||||
@media only screen and (min-width: 35em) {
|
||||
/* Style adjustments for viewports that meet the condition */
|
||||
}
|
||||
|
||||
@media print,
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 1.25dppx),
|
||||
(min-resolution: 120dpi) {
|
||||
/* Style adjustments for high resolution devices */
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Print styles.
|
||||
Inlined to avoid the additional HTTP request:
|
||||
https://www.phpied.com/delay-loading-your-print-css/
|
||||
========================================================================== */
|
||||
|
||||
@media print {
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
background: transparent !important;
|
||||
color: #000 !important; /* Black prints faster */
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a[href]:after {
|
||||
content: " (" attr(href) ")";
|
||||
}
|
||||
|
||||
abbr[title]:after {
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't show links that are fragment identifiers,
|
||||
* or use the `javascript:` pseudo protocol
|
||||
*/
|
||||
|
||||
a[href^="#"]:after,
|
||||
a[href^="javascript:"]:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
pre,
|
||||
blockquote {
|
||||
border: 1px solid #999;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
/*
|
||||
* Printing Tables:
|
||||
* http://css-discuss.incutio.com/wiki/Printing_Tables
|
||||
*/
|
||||
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
tr,
|
||||
img {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
341
dist/css/normalize.css
vendored
341
dist/css/normalize.css
vendored
@@ -1,341 +0,0 @@
|
||||
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
35
dist/doc/TOC.md
vendored
35
dist/doc/TOC.md
vendored
@@ -1,35 +0,0 @@
|
||||
[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)
|
||||
* [Ant Build Script](https://github.com/h5bp/ant-build-script) — Apache
|
||||
Ant based build script.
|
||||
164
dist/doc/css.md
vendored
164
dist/doc/css.md
vendored
@@ -1,164 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# The CSS
|
||||
|
||||
HTML5 Boilerplate's CSS includes:
|
||||
|
||||
* [Normalize.css](#normalizecss)
|
||||
* [Useful defaults](#useful-defaults)
|
||||
* [Common helpers](#common-helpers)
|
||||
* [Placeholder media queries](#media-queries)
|
||||
* [Print styles](#print-styles)
|
||||
|
||||
This starting CSS does not rely on the presence of
|
||||
[conditional class names](https://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/),
|
||||
[conditional style sheets](https://css-tricks.com/how-to-create-an-ie-only-stylesheet/),
|
||||
or [Modernizr](https://modernizr.com/), and it is ready to use no matter what
|
||||
your development preferences happen to be.
|
||||
|
||||
|
||||
## Normalize.css
|
||||
|
||||
In order to make browsers render all elements more consistently and in line
|
||||
with modern standards, we include
|
||||
[Normalize.css](https://necolas.github.io/normalize.css/) — a modern, HTML5-ready
|
||||
alternative to CSS resets.
|
||||
|
||||
As opposed to CSS resets, Normalize.css:
|
||||
|
||||
* targets only the styles that need normalizing
|
||||
* preserves useful browser defaults rather than erasing them
|
||||
* corrects bugs and common browser inconsistencies
|
||||
* improves usability with subtle improvements
|
||||
* doesn't clutter the debugging tools
|
||||
* has better documentation
|
||||
|
||||
For more information about Normalize.css, please refer to its [project
|
||||
page](https://necolas.github.com/normalize.css/), as well as this
|
||||
[blog post](http://nicolasgallagher.com/about-normalize-css/).
|
||||
|
||||
|
||||
## 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](https://webaim.org/techniques/css/invisiblecontent/)
|
||||
* [Hiding content for
|
||||
accessibility](https://snook.ca/archives/html_and_css/hiding-content-for-accessibility)
|
||||
* [HTML5 Boilerplate - Issue #194](https://github.com/h5bp/html5-boilerplate/issues/194).
|
||||
|
||||
__N.B.__ [The visuallyhidden class can be an accessibility issue for users using high contrast modes.](https://www.paciellogroup.com/blog/2012/08/notes-on-accessible-css-image-sprites/)
|
||||
|
||||
>Use JavaScript to detect when images are disabled and remove the CSS visually hidden display state of the text alternative.
|
||||
Use JavaScript to detect when Windows high contrast mode is enabled and remove the CSS visually hidden display state of the text alternative.
|
||||
|
||||
#### `.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_](https://www.lukew.com/presos/preso.asp?26) and [_responsive web
|
||||
design_](https://alistapart.com/article/responsive-web-design) approach to
|
||||
development. But it's worth remembering that there are [no silver
|
||||
bullets](https://cloudfour.com/thinks/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)`).
|
||||
|
||||
|
||||
## 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](https://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.
|
||||
669
dist/doc/extend.md
vendored
669
dist/doc/extend.md
vendored
@@ -1,669 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Extend and customise HTML5 Boilerplate
|
||||
|
||||
Here is some useful advice for how you can make your project with HTML5
|
||||
Boilerplate even better. We don't want to include it all by default, as
|
||||
not everything fits with everyone's needs.
|
||||
|
||||
|
||||
* [App Stores](#app-stores)
|
||||
* [DNS prefetching](#dns-prefetching)
|
||||
* [Google Universal Analytics](#google-universal-analytics)
|
||||
* [Internet Explorer](#internet-explorer)
|
||||
* [Miscellaneous](#miscellaneous)
|
||||
* [News Feeds](#news-feeds)
|
||||
* [Search](#search)
|
||||
* [Social Networks](#social-networks)
|
||||
* [URLs](#urls)
|
||||
* [Web Apps](#web-apps)
|
||||
|
||||
|
||||
## App Stores
|
||||
|
||||
### Smart App Banners in iOS 6+ Safari
|
||||
|
||||
Stop bothering everyone with gross modals advertising your entry in the
|
||||
App Store. Including the following [meta tag](https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html) will unobtrusively give the user the option to download your iOS app,or open it with some data about the user's current state on the website.
|
||||
|
||||
```html
|
||||
<meta name="apple-itunes-app" content="app-id=APP_ID,app-argument=SOME_TEXT">
|
||||
```
|
||||
|
||||
## DNS prefetching
|
||||
|
||||
In short, DNS Prefetching is a method of informing the browser of domain names
|
||||
referenced on a site so that the client can resolve the DNS for those hosts,
|
||||
cache them, and when it comes time to use them, have a faster turn around on
|
||||
the request.
|
||||
|
||||
### Implicit prefetches
|
||||
|
||||
There is a lot of prefetching done for you automatically by the browser. When
|
||||
the browser encounters an anchor in your html that does not share the same
|
||||
domain name as the current location the browser requests, from the client OS,
|
||||
the IP address for this new domain. The client first checks its cache and
|
||||
then, lacking a cached copy, makes a request from a DNS server. These requests
|
||||
happen in the background and are not meant to block the rendering of the
|
||||
page.
|
||||
|
||||
The goal of this is that when the foreign IP address is finally needed it will
|
||||
already be in the client cache and will not block the loading of the foreign
|
||||
content. Fewer requests result in faster page load times. The perception of this
|
||||
is increased on a mobile platform where DNS latency can be greater.
|
||||
|
||||
#### Disable implicit prefetching
|
||||
|
||||
```html
|
||||
<meta http-equiv="x-dns-prefetch-control" content="off">
|
||||
```
|
||||
|
||||
Even with X-DNS-Prefetch-Control meta tag (or http header) browsers will still
|
||||
prefetch any explicit dns-prefetch links.
|
||||
|
||||
**_WARNING:_** THIS MAY MAKE YOUR SITE SLOWER IF YOU RELY ON RESOURCES FROM
|
||||
FOREIGN DOMAINS.
|
||||
|
||||
### Explicit prefetches
|
||||
|
||||
Typically the browser only scans the HTML for foreign domains. If you have
|
||||
resources that are outside of your HTML (a javascript request to a remote
|
||||
server or a CDN that hosts content that may not be present on every page of
|
||||
your site, for example) then you can queue up a domain name to be prefetched.
|
||||
|
||||
```html
|
||||
<link rel="dns-prefetch" href="//example.com">
|
||||
<link rel="dns-prefetch" href="https://ajax.googleapis.com">
|
||||
```
|
||||
|
||||
You can use as many of these as you need, but it's best if they are all
|
||||
immediately after the [Meta
|
||||
Charset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset)
|
||||
element (which should go right at the top of the `head`), so the browser can
|
||||
act on them ASAP.
|
||||
|
||||
#### Common Prefetch Links
|
||||
|
||||
Amazon S3:
|
||||
|
||||
```html
|
||||
<link rel="dns-prefetch" href="//s3.amazonaws.com">
|
||||
```
|
||||
|
||||
Google APIs:
|
||||
|
||||
```html
|
||||
<link rel="dns-prefetch" href="https://ajax.googleapis.com">
|
||||
```
|
||||
|
||||
Microsoft Ajax Content Delivery Network:
|
||||
|
||||
```html
|
||||
<link rel="dns-prefetch" href="//ajax.microsoft.com">
|
||||
<link rel="dns-prefetch" href="//ajax.aspnetcdn.com">
|
||||
```
|
||||
|
||||
### Further reading about DNS prefetching
|
||||
|
||||
* https://developer.mozilla.org/en-US/docs/Controlling_DNS_prefetching
|
||||
* https://dev.chromium.org/developers/design-documents/dns-prefetching
|
||||
* https://blogs.msdn.microsoft.com/ie/2011/03/17/internet-explorer-9-network-performance-improvements/
|
||||
* 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](https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/).
|
||||
|
||||
Add this to `plugins.js`:
|
||||
|
||||
```js
|
||||
/*
|
||||
* Log all jQuery AJAX requests to Google Analytics
|
||||
* See: https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/
|
||||
*/
|
||||
if (typeof ga !== "undefined" && ga !== null) {
|
||||
$(document).ajaxSend(function(event, xhr, settings){
|
||||
ga('send', 'pageview', settings.url);
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
### Track JavaScript errors in Google Analytics
|
||||
|
||||
Add this function after `ga` is defined:
|
||||
|
||||
```js
|
||||
(function(window){
|
||||
var undefined,
|
||||
link = function (href) {
|
||||
var a = window.document.createElement('a');
|
||||
a.href = href;
|
||||
return a;
|
||||
};
|
||||
window.onerror = function (message, file, line, column) {
|
||||
var host = link(file).hostname;
|
||||
ga('send', {
|
||||
'hitType': 'event',
|
||||
'eventCategory': (host == window.location.hostname || host == undefined || host == '' ? '' : 'external ') + 'error',
|
||||
'eventAction': message,
|
||||
'eventLabel': (file + ' LINE: ' + line + (column ? ' COLUMN: ' + column : '')).trim(),
|
||||
'nonInteraction': 1
|
||||
});
|
||||
};
|
||||
}(window));
|
||||
```
|
||||
|
||||
### Track page scroll
|
||||
|
||||
Add this function after `ga` is defined:
|
||||
|
||||
```js
|
||||
$(function(){
|
||||
var isDuplicateScrollEvent,
|
||||
scrollTimeStart = new Date,
|
||||
$window = $(window),
|
||||
$document = $(document),
|
||||
scrollPercent;
|
||||
|
||||
$window.scroll(function() {
|
||||
scrollPercent = Math.round(100 * ($window.height() + $window.scrollTop())/$document.height());
|
||||
if (scrollPercent > 90 && !isDuplicateScrollEvent) { //page scrolled to 90%
|
||||
isDuplicateScrollEvent = 1;
|
||||
ga('send', 'event', 'scroll',
|
||||
'Window: ' + $window.height() + 'px; Document: ' + $document.height() + 'px; Time: ' + Math.round((new Date - scrollTimeStart )/1000,1) + 's'
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Internet Explorer
|
||||
|
||||
### IE Pinned Sites (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](https://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:
|
||||
`https://www.example.com/index.html?pinned=true`
|
||||
|
||||
```html
|
||||
<meta name="msapplication-starturl" content="https://www.example.com/index.html?pinned=true">
|
||||
```
|
||||
|
||||
### Recolor IE's controls manually for a Pinned Site
|
||||
|
||||
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](https://blogs.msdn.microsoft.com/ie/2012/06/08/high-quality-visuals-for-pinned-sites-in-windows-8/).
|
||||
|
||||
* Create a 144x144 image of your site icon, filling all of the canvas, and
|
||||
using a transparent background.
|
||||
* Save this image as a 32-bit PNG and optimize it without reducing
|
||||
colour-depth. It can be named whatever you want (e.g. `metro-tile.png`).
|
||||
* To reference the tile and its color, add the HTML `meta` elements described
|
||||
in the IE Blog post.
|
||||
|
||||
### (Windows 8) Badges for Pinned Sites
|
||||
|
||||
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](https://blogs.msdn.microsoft.com/ie/2012/04/03/pinned-sites-in-windows-8/)
|
||||
* [Available badge values](https://msdn.microsoft.com/en-us/library/ie/br212849.aspx)
|
||||
|
||||
```html
|
||||
<meta name="msapplication-badge" value="frequency=NUMBER_IN_MINUTES;polling-uri=https://www.example.com/path/to/file.xml">
|
||||
```
|
||||
|
||||
### Disable link highlighting upon tap in IE10
|
||||
|
||||
Similar to [-webkit-tap-highlight-color](https://davidwalsh.name/mobile-highlight-color)
|
||||
in iOS Safari. Unlike that CSS property, this is an HTML meta element, and its
|
||||
value is boolean rather than a color. It's all or nothing.
|
||||
|
||||
```html
|
||||
<meta name="msapplication-tap-highlight" content="no" />
|
||||
```
|
||||
|
||||
You can read about this useful element and more techniques in
|
||||
[Microsoft's documentation on adapting WebKit-oriented apps for IE10](https://blogs.windows.com/buildingapps/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10/)
|
||||
|
||||
## Search
|
||||
|
||||
### Direct search spiders to your sitemap
|
||||
|
||||
After creating a [sitemap](https://www.sitemaps.org/protocol.html)
|
||||
|
||||
Submit it to search engine tool:
|
||||
* [Google](https://www.google.com/webmasters/tools/sitemap-list)
|
||||
* [Bing](https://www.bing.com/toolbox/webmaster)
|
||||
* [Yandex](https://webmaster.yandex.com/)
|
||||
* [Baidu](https://zhanzhang.baidu.com/)
|
||||
OR
|
||||
Insert the following line anywhere in your robots.txt file, specifying the path to your sitemap:
|
||||
```
|
||||
Sitemap: https://example.com/sitemap_location.xml
|
||||
```
|
||||
|
||||
### Hide pages from search engines
|
||||
|
||||
According to Heather Champ, former community manager at Flickr, you should not
|
||||
allow search engines to index your "Contact Us" or "Complaints" page if you
|
||||
value your sanity. This is an HTML-centric way of achieving that.
|
||||
|
||||
```html
|
||||
<meta name="robots" content="noindex">
|
||||
```
|
||||
|
||||
**_WARNING:_** DO NOT INCLUDE ON PAGES THAT SHOULD APPEAR IN SEARCH ENGINES.
|
||||
|
||||
### Firefox and IE Search Plugins
|
||||
|
||||
Sites with in-site search functionality should be strongly considered for a
|
||||
browser search plugin. A "search plugin" is an XML file which defines how your
|
||||
plugin behaves in the browser. [How to make a browser search
|
||||
plugin](https://www.google.com/search?ie=UTF-8&q=how+to+make+browser+search+plugin).
|
||||
|
||||
```html
|
||||
<link rel="search" title="" type="application/opensearchdescription+xml" href="">
|
||||
```
|
||||
|
||||
|
||||
## Miscellaneous
|
||||
|
||||
* Use [polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills).
|
||||
|
||||
* Use [Microformats](http://microformats.org/wiki/Main_Page) (via
|
||||
[microdata](http://microformats.org/wiki/microdata)) for optimum search
|
||||
results
|
||||
[visibility](https://webmasters.googleblog.com/2009/05/introducing-rich-snippets.html).
|
||||
|
||||
* If you're building a web app you may want [native style momentum scrolling in
|
||||
iOS 5+](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).
|
||||
|
||||
|
||||
## News Feeds
|
||||
|
||||
### RSS
|
||||
|
||||
Have an RSS feed? Link to it here. Want to [learn how to write an RSS feed from
|
||||
scratch](http://www.rssboard.org/rss-specification)?
|
||||
|
||||
```html
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml">
|
||||
```
|
||||
|
||||
### Atom
|
||||
|
||||
Atom is similar to RSS, and you might prefer to use it instead of or in
|
||||
addition to it. [See what Atom's all
|
||||
about](https://en.wikipedia.org/wiki/Atom_(Web_standard)).
|
||||
|
||||
```html
|
||||
<link rel="alternate" type="application/atom+xml" title="Atom" href="/atom.xml">
|
||||
```
|
||||
|
||||
### Pingbacks
|
||||
|
||||
Your server may be notified when another site links to yours. The href
|
||||
attribute should contain the location of your pingback service.
|
||||
|
||||
```html
|
||||
<link rel="pingback" href="">
|
||||
```
|
||||
|
||||
* High-level explanation: https://codex.wordpress.org/Introduction_to_Blogging#Pingbacks
|
||||
* Step-by-step example case: 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/).
|
||||
|
||||
For a reference of Open Graph's markup and properties, you may check
|
||||
[Facebook's Open Graph Protocol reference](http://ogp.me/). Finally,
|
||||
you can validate your markup with the [Facebook Object
|
||||
Debugger](https://developers.facebook.com/tools/debug/) (needs
|
||||
registration to Facebook).
|
||||
|
||||
```html
|
||||
<meta property="fb:app_id" content="123456789">
|
||||
<meta property="og:url" content="https://www.example.com/path/to/page.html">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="">
|
||||
<meta property="og:image" content="https://www.example.com/path/to/image.jpg">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:site_name" content="">
|
||||
<meta property="article:author" content="">
|
||||
```
|
||||
|
||||
### Twitter Cards
|
||||
|
||||
Twitter provides a snippet specification that serves a similar purpose to Open
|
||||
Graph. In fact, Twitter will use Open Graph when Cards is not available. 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), and you can validate
|
||||
your markup with the [Card validator](https://cards-dev.twitter.com/validator)
|
||||
(needs registration to Twitter).
|
||||
|
||||
```html
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:site" content="@site_account">
|
||||
<meta name="twitter:creator" content="@individual_account">
|
||||
<meta name="twitter:url" content="https://www.example.com/path/to/page.html">
|
||||
<meta name="twitter:title" content="">
|
||||
<meta name="twitter:description" content="">
|
||||
<meta name="twitter:image" content="https://www.example.com/path/to/image.jpg">
|
||||
```
|
||||
|
||||
### Google+ / Schema.org
|
||||
|
||||
Google also provides a snippet specification that serves a similar
|
||||
purpose to Facebook's Open Graph or Twitter Cards. While it helps you
|
||||
to control information displayed on Google+, this metadata is a subset
|
||||
of [schema.org's microdata vocabulary](https://schema.org/), which
|
||||
covers many other schemas that can describe the content of your pages
|
||||
to search engines. For this reason, this metadata is more generic for
|
||||
SEO, notably for Google's search-engine, although this vocabulary is
|
||||
also used by Microsoft, Pinterest or Yandex.
|
||||
|
||||
You can validate your markup with the [Structured Data Testing
|
||||
Tool](https://developers.google.com/structured-data/testing-tool/).
|
||||
Also, please note that this markup requires to add attributes to your
|
||||
top `html` tag.
|
||||
|
||||
```html
|
||||
<html class="no-js" lang="" itemscope itemtype="http://schema.org/Article">
|
||||
<head>
|
||||
|
||||
<link rel="author" href="">
|
||||
<link rel="publisher" href="">
|
||||
<meta itemprop="name" content="">
|
||||
<meta itemprop="description" content="">
|
||||
<meta itemprop="image" content="">
|
||||
```
|
||||
|
||||
## URLs
|
||||
|
||||
### Canonical URL
|
||||
|
||||
Signal to search engines and others "Use this URL for this page!" Useful when
|
||||
parameters after a `#` or `?` is used to control the display state of a page.
|
||||
`https://www.example.com/cart.html?shopping-cart-open=true` can be indexed as
|
||||
the cleaner, more accurate `https://www.example.com/cart.html`.
|
||||
|
||||
```html
|
||||
<link rel="canonical" href="">
|
||||
```
|
||||
|
||||
### 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="https://m.example.com/page.html" >`
|
||||
|
||||
* on the mobile page, add the `link rel="canonical"` tag pointing to the
|
||||
corresponding desktop URL, e.g.:
|
||||
|
||||
`<link rel="canonical" href="https://www.example.com/page.html">`
|
||||
|
||||
For more information please see:
|
||||
|
||||
* https://developers.google.com/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 `icon.png`
|
||||
and including:
|
||||
|
||||
```html
|
||||
<link rel="apple-touch-icon" href="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">
|
||||
```
|
||||
|
||||
### Theme Color
|
||||
|
||||
You can add the [`theme-color` meta extension](https://html.spec.whatwg.org/multipage/semantics.html#meta-theme-color)
|
||||
in the `<head>` of your pages to suggest the color that browsers and
|
||||
OSes should use if they customize the display of individual pages in
|
||||
their UIs with varying colors.
|
||||
|
||||
```html
|
||||
<meta name="theme-color" content="#ff69b4">
|
||||
```
|
||||
|
||||
The `content` attribute extension can take any valid CSS color.
|
||||
|
||||
Currently, the `theme-color` meta extension is supported by [Chrome 39+
|
||||
for Android Lollipop](https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android).
|
||||
47
dist/doc/faq.md
vendored
47
dist/doc/faq.md
vendored
@@ -1,47 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Frequently asked questions
|
||||
|
||||
* [Why is the Google Analytics code at the bottom? Google recommends it be
|
||||
placed in the `<head>`.](#why-is-the-google-analytics-code-at-the-bottom-google-recommends-it-be-placed-in-the-head)
|
||||
* [How can I integrate Bootstrap with HTML5
|
||||
Boilerplate?](#how-can-i-integrate-bootstrap-with-html5-boilerplate)
|
||||
* [Do I need to upgrade my site each time a new version of HTML5 Boilerplate is
|
||||
released?](#do-i-need-to-upgrade-my-site-each-time-a-new-version-of-html5-boilerplate-is-released)
|
||||
* [Where can I get help with support
|
||||
questions?](#where-can-i-get-help-with-support-questions)
|
||||
|
||||
---
|
||||
|
||||
### Why is the Google Analytics code at the bottom? Google recommends it be placed in the `<head>`.
|
||||
|
||||
The main advantage of placing it in the `<head>` is that you will track the
|
||||
user's `pageview` even if they leave the page before it has been fully loaded.
|
||||
|
||||
Here's a handy quote from [Mathias Bynens](https://mathiasbynens.be/notes/async-analytics-snippet#comment-50) about our placement choice.
|
||||
>I should point out that it’s Google — not me — recommending to place this
|
||||
script before all other scripts in the document. The only real advantage is to
|
||||
catch a pageView call if your page fails to load completely (for example, if
|
||||
the user aborts loading, or quickly closes the page, etc.). Personally, I
|
||||
wouldn’t count that as a page view, so I actually prefer to place this script
|
||||
at the bottom, after all other scripts. This keeps all the scripts together and
|
||||
reinforces that scripts at the bottom are the right move. (Usually I
|
||||
concatenate and minify all my scripts into one .js file — the GA snippet being
|
||||
the suffix.)
|
||||
|
||||
### How can I integrate [Bootstrap](https://getbootstrap.com/) with HTML5 Boilerplate?
|
||||
|
||||
Here's Nicolas Gallagher writing 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).
|
||||
250
dist/doc/html.md
vendored
250
dist/doc/html.md
vendored
@@ -1,250 +0,0 @@
|
||||
[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`](#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](https://www.paulirish.com/2009/avoiding-the-fouc-v3/).
|
||||
|
||||
|
||||
## Language Attribute
|
||||
|
||||
Please consider specifying the language of your content by adding a [value](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) to the `lang`
|
||||
attribute in the `<html>` as in this example:
|
||||
|
||||
```html
|
||||
<html class="no-js" lang="en">
|
||||
```
|
||||
|
||||
### The order of the `<title>` and `<meta>` tags
|
||||
|
||||
The 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](https://msdn.microsoft.com/en-us/library/cc288325.aspx)
|
||||
|
||||
|
||||
### `x-ua-compatible`
|
||||
|
||||
Internet Explorer 8/9/10 support [document compatibility
|
||||
modes](https://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](https://msdn.microsoft.com/library/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](https://blogs.msdn.microsoft.com/ie/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11/) throughout your company.
|
||||
|
||||
|
||||
## 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">
|
||||
```
|
||||
|
||||
|
||||
## 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">
|
||||
```
|
||||
|
||||
## Web App Manifest
|
||||
HTML5 Boilerplate includes a simple web app manifest file.
|
||||
|
||||
The web app manifest is a simple JSON file that allows you to control how your
|
||||
app appears on a device's home screen, what it looks like when it launches
|
||||
in that context and what happens when it is launched. This allows for much greater
|
||||
control over the UI of a saved site or web app on a mobile device.
|
||||
|
||||
It's linked to from the HTML as follows:
|
||||
|
||||
```html
|
||||
<link rel="manifest" href="site.webmanifest">
|
||||
```
|
||||
Our [site.webmanifest](https://github.com/h5bp/html5-boilerplate/blob/master/src/site.webmanifest) contains a very skeletal "app" definition, just to show the basic usage.
|
||||
You should fill this file out with [more information about your site or application](https://developer.mozilla.org/en-US/docs/Web/Manifest)
|
||||
|
||||
## Favicons and Touch Icon
|
||||
|
||||
The shortcut icons should be put in the root directory of your site. `favicon.ico`
|
||||
is automatically picked up by browsers if it's placed in the root. HTML5
|
||||
Boilerplate comes with a default set of icons (include favicon and one Apple
|
||||
Touch Icon) that you can use as a baseline to create your own.
|
||||
|
||||
Please refer to the more detailed description in the [Extend section](extend.md)
|
||||
of these docs.
|
||||
|
||||
## The Content Area
|
||||
|
||||
The central part of the boilerplate template is pretty much empty. This is
|
||||
intentional, in order to make the boilerplate suitable for both web page and
|
||||
web app development.
|
||||
|
||||
### Browser Upgrade Prompt
|
||||
|
||||
The main content area of the boilerplate includes a prompt to install an up to
|
||||
date browser for users of IE 8 and lower. If you intended to support IE 8, then you
|
||||
should remove the snippet of code.
|
||||
|
||||
## Modernizr
|
||||
|
||||
HTML5 Boilerplate uses a custom build of Modernizr.
|
||||
|
||||
[Modernizr](https://modernizr.com/) is a JavaScript library which adds classes to
|
||||
the `html` element based on the results of feature test and which ensures that
|
||||
all browsers can make use of HTML5 elements (as it includes the HTML5 Shiv).
|
||||
This allows you to target parts of your CSS and JavaScript based on the
|
||||
features supported by a browser.
|
||||
|
||||
Starting with version 3 Modernizr can be customized using the [modernizr-config.json](https://github.com/h5bp/html5-boilerplate/blob/master/modernizr-config.json) and the
|
||||
[Modernizr command line utility](https://www.npmjs.com/package/modernizr-cli).
|
||||
|
||||
## What About Polyfills?
|
||||
|
||||
If you need to include [polyfills](https://remysharp.com/2010/10/08/what-is-a-polyfill)
|
||||
in your project, you must make sure those load before any other JavaScript. If you're
|
||||
using some polyfill CDN service, like [cdn.polyfill.io](https://cdn.polyfill.io/),
|
||||
just put it before the other scripts in the bottom of the page:
|
||||
|
||||
```html
|
||||
<script src="js/vendor/modernizr-3.6.0.min.js"></script>
|
||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
</body>
|
||||
```
|
||||
|
||||
If you like to just include the polyfills yourself, you could include them in
|
||||
`js/plugins.js`. When you have a bunch of polyfills to load in, you could
|
||||
also create a `polyfills.js` file in the `js/vendor` directory or include the files
|
||||
individually and combine them using a build tool. Always ensure that the polyfills
|
||||
are all loaded before any other JavaScript.
|
||||
|
||||
There are some misconceptions about Modernizr and polyfills. It's important
|
||||
to understand that Modernizr just handles feature checking, not polyfilling
|
||||
itself. The only thing Modernizr does regarding polyfills is that the team
|
||||
maintains [a huge list of cross Browser polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills).
|
||||
|
||||
### jQuery CDN for jQuery
|
||||
|
||||
The jQuery CDN version of the jQuery JavaScript library is referenced towards
|
||||
the bottom of the page. A local fallback of jQuery is included for rare instances
|
||||
when the CDN version might not be available, and to facilitate offline
|
||||
development.
|
||||
|
||||
The jQuery CDN version was chosen over other potential candidates
|
||||
([like Google's Hosted Libraries](https://developers.google.com/speed/libraries/))
|
||||
because it's fast ([comparable or faster than Google by some
|
||||
measures](https://www.cdnperf.com/#jsdelivr,cdnjs,google,yandex,microsoft,jquery,bootstrapcdn/https/90))
|
||||
and, (unlike Google's CDN) is available to China's hundreds of millions of internet users.
|
||||
For many years we [chose](https://github.com/h5bp/html5-boilerplate/issues/1191)
|
||||
the Google Hosted version over the jQuery CDN because it was available
|
||||
over HTTPS (the jQuery CDN was not,) and it offered a better chance of
|
||||
hitting the cache lottery owing to the popularity of the Google CDN.
|
||||
The first issue is no longer valid and the second is far outweighed by
|
||||
being able to serve jQuery to Chinese users.
|
||||
|
||||
While the jQuery CDN is a strong default solution your site or application may
|
||||
require a different configuration. Testing your site with services like
|
||||
[WebPageTest](https://www.webpagetest.org/) and browser tools like
|
||||
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) will help you examine the real
|
||||
world performance of your site and can show where you can optimize your specific
|
||||
site or application.
|
||||
|
||||
### Google Universal Analytics Tracking Code
|
||||
|
||||
Finally, an optimized version of the Google Universal Analytics tracking code is
|
||||
included. 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!
|
||||
36
dist/doc/js.md
vendored
36
dist/doc/js.md
vendored
@@ -1,36 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# The JavaScript
|
||||
|
||||
Information about the default JavaScript included in the project.
|
||||
|
||||
## main.js
|
||||
|
||||
This file can be used to contain or reference your site/app JavaScript code.
|
||||
If you're working on something more advanced you might replace this file
|
||||
entirely. That's cool.
|
||||
|
||||
## plugins.js
|
||||
|
||||
This file can be used to contain all your plugins, such as jQuery plugins and
|
||||
other 3rd party scripts for a simple site.
|
||||
|
||||
One approach is to put jQuery plugins inside of a `(function($){ ...
|
||||
})(jQuery);` closure to make sure they're in the jQuery namespace safety
|
||||
blanket. Read more about [jQuery plugin
|
||||
authoring](https://learn.jquery.com/plugins/#Getting_Started).
|
||||
|
||||
By default the `plugins.js` file contains a small script to avoid `console`
|
||||
errors in browsers that lack a `console`. The script will make sure that, if
|
||||
a console method isn't available, that method will have the value of empty
|
||||
function, thus, preventing the browser from throwing an error.
|
||||
|
||||
## vendor
|
||||
|
||||
This directory can be used to contain all 3rd party library code.
|
||||
|
||||
Minified versions of the latest jQuery and Modernizr libraries are included by
|
||||
default. You may wish to create your own [custom Modernizr
|
||||
build with the online builder](https://www.modernizr.com/download/) or [command
|
||||
line tool](https://modernizr.com/docs#command-line-config).
|
||||
173
dist/doc/misc.md
vendored
173
dist/doc/misc.md
vendored
@@ -1,173 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
* [.gitignore](#gitignore)
|
||||
* [.editorconfig](#editorconfig)
|
||||
* [Server Configuration](#server-configuration)
|
||||
* [robots.txt](#robotstxt)
|
||||
* [humans.txt](#humanstxt)
|
||||
* [browserconfig.xml](#browserconfigxml)
|
||||
|
||||
--
|
||||
|
||||
## .gitignore
|
||||
|
||||
HTML5 Boilerplate includes a basic project-level `.gitignore`. This should
|
||||
primarily be used to avoid certain project-level files and directories from
|
||||
being kept under source control. Different development-environments will
|
||||
benefit from different collections of ignores.
|
||||
|
||||
OS-specific and editor-specific files should be ignored using a "global
|
||||
ignore" that applies to all repositories on your system.
|
||||
|
||||
For example, add the following to your `~/.gitconfig`, where the `.gitignore`
|
||||
in your HOME directory contains the files and directories you'd like to
|
||||
globally ignore:
|
||||
|
||||
```gitignore
|
||||
[core]
|
||||
excludesfile = ~/.gitignore
|
||||
```
|
||||
|
||||
* More on global ignores: https://help.github.com/articles/ignoring-files/
|
||||
* Comprehensive set of ignores on GitHub: https://github.com/github/gitignore
|
||||
|
||||
|
||||
## .editorconfig
|
||||
|
||||
The `.editorconfig` file is provided in order to encourage and help you and
|
||||
your team define and maintain consistent coding styles between different
|
||||
editors and IDEs.
|
||||
|
||||
By default, `.editorconfig` includes some basic
|
||||
[properties](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 may 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](https://httpd.apache.org/docs/). If you are not using Apache
|
||||
as your web server, then you are encouraged to download a
|
||||
[server configuration](https://github.com/h5bp/server-configs) that
|
||||
corresponds to your web server and environment.
|
||||
|
||||
A `.htaccess` (hypertext access) file is an [Apache HTTP server
|
||||
configuration file](https://github.com/h5bp/server-configs-apache).
|
||||
The `.htaccess` file is mostly used for:
|
||||
|
||||
* Rewriting URLs
|
||||
* Controlling cache
|
||||
* Authentication
|
||||
* Server-side includes
|
||||
* Redirects
|
||||
* Gzipping
|
||||
|
||||
If you have access to the main server configuration file (usually called
|
||||
`httpd.conf`), you should add the logic from the `.htaccess` file in, for
|
||||
example, a <Directory> section in the main configuration file. This is usually
|
||||
the recommended way, as using .htaccess files slows down Apache!
|
||||
|
||||
To enable Apache modules locally, please see:
|
||||
https://github.com/h5bp/server-configs-apache/wiki/How-to-enable-Apache-modules.
|
||||
|
||||
In the repo the `.htaccess` is used for:
|
||||
|
||||
* Allowing cross-origin access to web fonts
|
||||
* CORS header for images when browsers request it
|
||||
* Enable `404.html` as 404 error document
|
||||
* Making the website experience better for IE users better
|
||||
* Media UTF-8 as character encoding for `text/html` and `text/plain`
|
||||
* Enabling the rewrite URLs engine
|
||||
* Forcing or removing the `www.` at the begin of a URL
|
||||
* It blocks access to directories without a default document
|
||||
* It blocks access to files that can expose sensitive information.
|
||||
* It reduces MIME type security risks
|
||||
* It forces compressing (gzipping)
|
||||
* It tells the browser whether they should request a specific file from the
|
||||
server or whether they should grab it from the browser's cache
|
||||
|
||||
When using `.htaccess` we recommend reading all inline comments (the rules after
|
||||
a `#`) in the file once. There is a bunch of optional stuff in it.
|
||||
|
||||
If you want to know more about the `.htaccess` file check out the
|
||||
[Apache HTTP server docs](https://httpd.apache.org/docs/) or more
|
||||
specifically the [htaccess
|
||||
section](https://httpd.apache.org/docs/current/howto/htaccess.html).
|
||||
|
||||
Notice that the original repo for the `.htaccess` file is [this
|
||||
one](https://github.com/h5bp/server-configs-apache).
|
||||
|
||||
|
||||
## robots.txt
|
||||
|
||||
The `robots.txt` file is used to give instructions to web robots on what can
|
||||
be crawled from the website.
|
||||
|
||||
By default, the file provided by this project includes the next two lines:
|
||||
|
||||
* `User-agent: *` - the following rules apply to all web robots
|
||||
* `Disallow:` - everything on the website is allowed to be crawled
|
||||
|
||||
If you want to disallow certain pages you will need to specify the path in a
|
||||
`Disallow` directive (e.g.: `Disallow: /path`) or, if you want to disallow
|
||||
crawling of all content, use `Disallow: /`.
|
||||
|
||||
The `/robots.txt` file is not intended for access control, so don't try to
|
||||
use it as such. Think of it as a "No Entry" sign, rather than a locked door.
|
||||
URLs disallowed by the `robots.txt` file might still be indexed without being
|
||||
crawled, and the content from within the `robots.txt` file can be viewed by
|
||||
anyone, potentially disclosing the location of your private content! So, if
|
||||
you want to block access to private content, use proper authentication instead.
|
||||
|
||||
For more information about `robots.txt`, please see:
|
||||
|
||||
* [robotstxt.org](http://www.robotstxt.org/)
|
||||
* [How Google handles the `robots.txt` file](https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt)
|
||||
|
||||
## humans.txt
|
||||
|
||||
The `humans.txt` file is used to provide information about people involved with
|
||||
the website.
|
||||
|
||||
The provided file contains three sections:
|
||||
|
||||
* `TEAM` - this is intented to list the group of people responsible for the website
|
||||
* `THANKS` - this is intended to list the group of people that have contributed
|
||||
to the webste
|
||||
* `TECHNOLOGY COLOPHON` - the section lists technologies used to make the website
|
||||
|
||||
For more information about `humans.txt`, please see: http://humanstxt.org/
|
||||
|
||||
|
||||
## browserconfig.xml
|
||||
|
||||
The `browserconfig.xml` file is used to customize the tile displayed when users
|
||||
pin your site to the Windows 8.1 start screen. In there you can define custom
|
||||
tile colors, custom images or even [live tiles](https://msdn.microsoft.com/library/dn455106.aspx#CreatingLiveTiles).
|
||||
|
||||
By default, the file points to 2 placeholder tile images:
|
||||
|
||||
* `tile.png` (558x558px): used for `Small`, `Medium` and `Large` tiles.
|
||||
This image resizes automatically when necessary.
|
||||
* `tile-wide.png` (558x270px): user for `Wide` tiles.
|
||||
|
||||
Notice that IE11 uses the same images when adding a site to the `favorites`.
|
||||
|
||||
For more in-depth information about the `browserconfig.xml` file, please
|
||||
see [MSDN](https://msdn.microsoft.com/library/dn320426.aspx).
|
||||
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
|
||||
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
37
dist/index.html
vendored
37
dist/index.html
vendored
@@ -1,40 +1,33 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<html lang="">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<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="">
|
||||
|
||||
<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">
|
||||
|
||||
<link rel="manifest" href="site.webmanifest">
|
||||
<link rel="apple-touch-icon" href="icon.png">
|
||||
<!-- Place favicon.ico in the root directory -->
|
||||
|
||||
<link rel="stylesheet" href="css/normalize.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--[if lte IE 9]>
|
||||
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
|
||||
<![endif]-->
|
||||
|
||||
<!-- Add your site or application content here -->
|
||||
<p>Hello world! This is HTML5 Boilerplate.</p>
|
||||
<script src="js/vendor/modernizr-3.6.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
<script src="js/app.js"></script>
|
||||
|
||||
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
|
||||
<script>
|
||||
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
|
||||
ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')
|
||||
</script>
|
||||
<script src="https://www.google-analytics.com/analytics.js" async defer></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.
|
||||
2
dist/js/vendor/jquery-3.3.1.min.js
vendored
2
dist/js/vendor/jquery-3.3.1.min.js
vendored
File diff suppressed because one or more lines are too long
3
dist/js/vendor/modernizr-3.6.0.min.js
vendored
3
dist/js/vendor/modernizr-3.6.0.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: *
|
||||
|
||||
16
dist/site.webmanifest
vendored
16
dist/site.webmanifest
vendored
@@ -1,8 +1,12 @@
|
||||
{
|
||||
"icons": [{
|
||||
"src": "icon.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
}],
|
||||
"start_url": "/"
|
||||
"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.
|
||||
@@ -30,28 +30,24 @@ A basic HTML5 Boilerplate site initially looks something like this:
|
||||
```
|
||||
.
|
||||
├── css
|
||||
│ ├── main.css
|
||||
│ └── normalize.css
|
||||
│ └── style.css
|
||||
├── doc
|
||||
├── img
|
||||
├── js
|
||||
│ ├── main.js
|
||||
│ ├── plugins.js
|
||||
│ └── vendor
|
||||
│ ├── jquery.min.js
|
||||
│ └── modernizr.min.js
|
||||
│ ├── app.js
|
||||
└── vendor
|
||||
├── .editorconfig
|
||||
├── .htaccess
|
||||
├── 404.html
|
||||
├── browserconfig.xml
|
||||
├── favicon.ico
|
||||
├── humans.txt
|
||||
├── icon.png
|
||||
├── icon.svg
|
||||
├── index.html
|
||||
├── package.json
|
||||
├── robots.txt
|
||||
├── site.webmanifest
|
||||
├── tile.png
|
||||
└── tile-wide.png
|
||||
└── 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.
|
||||
@@ -73,32 +69,15 @@ This directory should contain all your project's JS files. Libraries, plugins,
|
||||
and custom code can all be included here. It includes some initial JS to help
|
||||
get you started. [About the JavaScript](js.md).
|
||||
|
||||
### .htaccess
|
||||
|
||||
The default web server configs are for Apache. For more information, please
|
||||
refer to the [Apache Server Configs
|
||||
repository](https://github.com/h5bp/server-configs-apache).
|
||||
|
||||
Host your site on a server other than Apache? You're likely to find the
|
||||
corresponding server configs project listed in our [Server Configs
|
||||
](https://github.com/h5bp/server-configs/blob/master/README.md) repository.
|
||||
|
||||
### 404.html
|
||||
|
||||
A helpful custom 404 to get you started.
|
||||
|
||||
### browserconfig.xml
|
||||
|
||||
This file contains all settings regarding custom tiles for IE11 and Edge.
|
||||
|
||||
For more info on this topic, please refer to
|
||||
[MSDN](https://msdn.microsoft.com/library/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).
|
||||
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
|
||||
|
||||
@@ -109,13 +88,10 @@ 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.
|
||||
### package.json
|
||||
|
||||
### humans.txt
|
||||
|
||||
Edit this file to include the team that worked on your site/app, and the
|
||||
technology powering it.
|
||||
Edit this file to describe your application, add dependencies, scripts and
|
||||
other properties related to node based development and the npm registry
|
||||
|
||||
### robots.txt
|
||||
|
||||
@@ -123,8 +99,62 @@ Edit this file to include any pages you need hidden from search engines.
|
||||
|
||||
### Icons
|
||||
|
||||
Replace the default `favicon.ico`, `tile.png`, `tile-wide.png` and Apple
|
||||
Touch Icon with your own.
|
||||
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'],
|
||||
},
|
||||
},
|
||||
]);
|
||||
@@ -1,195 +0,0 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import gulp from 'gulp';
|
||||
|
||||
// Load all gulp plugins automatically
|
||||
// and attach them to the `plugins` object
|
||||
import plugins from 'gulp-load-plugins';
|
||||
|
||||
// Temporary solution until gulp 4
|
||||
// https://github.com/gulpjs/gulp/issues/355
|
||||
import runSequence from 'run-sequence';
|
||||
|
||||
import archiver from 'archiver';
|
||||
import glob from 'glob';
|
||||
import del from 'del';
|
||||
import ssri from 'ssri';
|
||||
import modernizr from 'modernizr';
|
||||
|
||||
import pkg from './package.json';
|
||||
import modernizrConfig from './modernizr-config.json';
|
||||
|
||||
|
||||
const dirs = pkg['h5bp-configs'].directories;
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// | Helper tasks |
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
gulp.task('archive:create_archive_dir', () => {
|
||||
fs.mkdirSync(path.resolve(dirs.archive), '0755');
|
||||
});
|
||||
|
||||
gulp.task('archive:zip', (done) => {
|
||||
|
||||
const archiveName = path.resolve(dirs.archive, `${pkg.name}_v${pkg.version}.zip`);
|
||||
const zip = archiver('zip');
|
||||
const files = glob.sync('**/*.*', {
|
||||
'cwd': dirs.dist,
|
||||
'dot': true // include hidden files
|
||||
});
|
||||
const output = fs.createWriteStream(archiveName);
|
||||
|
||||
zip.on('error', (error) => {
|
||||
done();
|
||||
throw error;
|
||||
});
|
||||
|
||||
output.on('close', done);
|
||||
|
||||
files.forEach((file) => {
|
||||
|
||||
const filePath = path.resolve(dirs.dist, file);
|
||||
|
||||
// `zip.bulk` does not maintain the file
|
||||
// permissions, so we need to add files individually
|
||||
zip.append(fs.createReadStream(filePath), {
|
||||
'name': file,
|
||||
'mode': fs.statSync(filePath).mode
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
zip.pipe(output);
|
||||
zip.finalize();
|
||||
|
||||
});
|
||||
|
||||
gulp.task('clean', (done) => {
|
||||
del([
|
||||
dirs.archive,
|
||||
dirs.dist
|
||||
]).then(() => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('copy', [
|
||||
'copy:.htaccess',
|
||||
'copy:index.html',
|
||||
'copy:jquery',
|
||||
'copy:license',
|
||||
'copy:main.css',
|
||||
'copy:misc',
|
||||
'copy:normalize'
|
||||
]);
|
||||
|
||||
gulp.task('copy:.htaccess', () =>
|
||||
gulp.src('node_modules/apache-server-configs/dist/.htaccess')
|
||||
.pipe(plugins().replace(/# ErrorDocument/g, 'ErrorDocument'))
|
||||
.pipe(gulp.dest(dirs.dist))
|
||||
);
|
||||
|
||||
gulp.task('copy:index.html', () => {
|
||||
const hash = ssri.fromData(
|
||||
fs.readFileSync('node_modules/jquery/dist/jquery.min.js'),
|
||||
{algorithms: ['sha256']}
|
||||
);
|
||||
let version = pkg.devDependencies.jquery;
|
||||
let modernizrVersion = pkg.devDependencies.modernizr;
|
||||
|
||||
gulp.src(`${dirs.src}/index.html`)
|
||||
.pipe(plugins().replace(/{{JQUERY_VERSION}}/g, version))
|
||||
.pipe(plugins().replace(/{{MODERNIZR_VERSION}}/g, modernizrVersion))
|
||||
.pipe(plugins().replace(/{{JQUERY_SRI_HASH}}/g, hash.toString()))
|
||||
.pipe(gulp.dest(dirs.dist));
|
||||
});
|
||||
|
||||
gulp.task('copy:jquery', () =>
|
||||
gulp.src(['node_modules/jquery/dist/jquery.min.js'])
|
||||
.pipe(plugins().rename(`jquery-${pkg.devDependencies.jquery}.min.js`))
|
||||
.pipe(gulp.dest(`${dirs.dist}/js/vendor`))
|
||||
);
|
||||
|
||||
gulp.task('copy:license', () =>
|
||||
gulp.src('LICENSE.txt')
|
||||
.pipe(gulp.dest(dirs.dist))
|
||||
);
|
||||
|
||||
gulp.task('copy:main.css', () => {
|
||||
|
||||
const banner = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n\n`;
|
||||
|
||||
gulp.src(`${dirs.src}/css/main.css`)
|
||||
.pipe(plugins().header(banner))
|
||||
.pipe(plugins().autoprefixer({
|
||||
browsers: ['last 2 versions', 'ie >= 9', '> 1%'],
|
||||
cascade: false
|
||||
}))
|
||||
.pipe(gulp.dest(`${dirs.dist}/css`));
|
||||
});
|
||||
|
||||
gulp.task('copy:misc', () =>
|
||||
gulp.src([
|
||||
|
||||
// Copy all files
|
||||
`${dirs.src}/**/*`,
|
||||
|
||||
// Exclude the following files
|
||||
// (other tasks will handle the copying of these files)
|
||||
`!${dirs.src}/css/main.css`,
|
||||
`!${dirs.src}/index.html`
|
||||
|
||||
], {
|
||||
|
||||
// Include hidden files by default
|
||||
dot: true
|
||||
|
||||
}).pipe(gulp.dest(dirs.dist))
|
||||
);
|
||||
|
||||
gulp.task('copy:normalize', () =>
|
||||
gulp.src('node_modules/normalize.css/normalize.css')
|
||||
.pipe(gulp.dest(`${dirs.dist}/css`))
|
||||
);
|
||||
|
||||
gulp.task('modernizr', (done) =>{
|
||||
|
||||
modernizr.build(modernizrConfig, (code) => {
|
||||
fs.writeFile(`${dirs.dist}/js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`, code, done);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
gulp.task('lint:js', () =>
|
||||
gulp.src([
|
||||
'gulpfile.js',
|
||||
`${dirs.src}/js/*.js`,
|
||||
`${dirs.test}/*.js`
|
||||
]).pipe(plugins().jscs())
|
||||
.pipe(plugins().eslint())
|
||||
.pipe(plugins().eslint.failOnError())
|
||||
);
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// | Main tasks |
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
gulp.task('archive', (done) => {
|
||||
runSequence(
|
||||
'build',
|
||||
'archive:create_archive_dir',
|
||||
'archive:zip',
|
||||
done);
|
||||
});
|
||||
|
||||
gulp.task('build', (done) => {
|
||||
runSequence(
|
||||
['clean', 'lint:js'],
|
||||
'copy', 'modernizr',
|
||||
done);
|
||||
});
|
||||
|
||||
gulp.task('default', ['build']);
|
||||
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'));
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"minify": true,
|
||||
"options": [
|
||||
"domPrefixes",
|
||||
"prefixes",
|
||||
"addTest",
|
||||
"hasEvent",
|
||||
"mq",
|
||||
"prefixedCSSValue",
|
||||
"testAllProps",
|
||||
"testProp",
|
||||
"testStyles",
|
||||
"setClasses"
|
||||
],
|
||||
"feature-detects": [
|
||||
"test/custom-elements",
|
||||
"test/history",
|
||||
"test/pointerevents",
|
||||
"test/postmessage",
|
||||
"test/webgl",
|
||||
"test/websockets",
|
||||
"test/css/animations",
|
||||
"test/css/columns",
|
||||
"test/css/flexbox",
|
||||
"test/elem/picture",
|
||||
"test/img/sizes",
|
||||
"test/img/srcset",
|
||||
"test/workers/webworkers"
|
||||
]
|
||||
}
|
||||
10672
package-lock.json
generated
10672
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
101
package.json
101
package.json
@@ -1,41 +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": {
|
||||
"@alrra/travis-scripts": "^3.0.1",
|
||||
"apache-server-configs": "^3.0.0",
|
||||
"archiver": "^2.1.1",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-register": "^6.26.0",
|
||||
"del": "^3.0.0",
|
||||
"eslint": "^4.19.1",
|
||||
"eslint-config-recommended": "^2.0.0",
|
||||
"eslint-plugin-mocha": "^5.0.0",
|
||||
"glob": "^7.1.2",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-autoprefixer": "^5.0.0",
|
||||
"gulp-eslint": "^4.0.2",
|
||||
"gulp-header": "^2.0.5",
|
||||
"gulp-jscs": "^4.1.0",
|
||||
"gulp-load-plugins": "^1.5.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-replace": "^0.6.1",
|
||||
"jquery": "3.3.1",
|
||||
"mocha": "^5.1.1",
|
||||
"modernizr": "3.6.0",
|
||||
"normalize.css": "8.0.0",
|
||||
"run-sequence": "^2.2.1",
|
||||
"ssri": "^6.0.0",
|
||||
"strip-json-comments": "^2.0.1",
|
||||
"travis-after-all": "^1.4.5"
|
||||
"@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": ">=6",
|
||||
"npm": ">=3"
|
||||
"node": ">=20"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"env"
|
||||
]
|
||||
"volta": {
|
||||
"node": "20.19.1"
|
||||
},
|
||||
"h5bp-configs": {
|
||||
"directories": {
|
||||
@@ -44,26 +58,5 @@
|
||||
"src": "src",
|
||||
"test": "test"
|
||||
}
|
||||
},
|
||||
"homepage": "https://html5boilerplate.com/",
|
||||
"license": "MIT",
|
||||
"name": "html5-boilerplate",
|
||||
"scripts": {
|
||||
"build": "gulp build",
|
||||
"test": "gulp archive && mocha --require babel-core/register --reporter spec --timeout 5000"
|
||||
},
|
||||
"version": "6.1.0",
|
||||
"description": "A professional front-end template for building fast, robust, and adaptable web apps or sites.",
|
||||
"files": [
|
||||
"CHANGELOG.md",
|
||||
"LICENSE.txt",
|
||||
"package.json",
|
||||
"dist/",
|
||||
"modernizr-config.json",
|
||||
"README.md"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/h5bp/html5-boilerplate.git"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,8 @@ root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
3
src/.gitignore
vendored
3
src/.gitignore
vendored
@@ -1,3 +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: https://blogs.msdn.microsoft.com/ieinternals/2010/08/18/friendly-http-error-pages/ -->
|
||||
<!-- IE needs 512+ bytes: https://docs.microsoft.com/archive/blogs/ieinternals/friendly-http-error-pages -->
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Please read: https://msdn.microsoft.com/en-us/library/ie/dn455106.aspx -->
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="tile.png"/>
|
||||
<square150x150logo src="tile.png"/>
|
||||
<wide310x150logo src="tile-wide.png"/>
|
||||
<square310x310logo src="tile.png"/>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
278
src/css/main.css
278
src/css/main.css
@@ -1,278 +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
|
||||
*
|
||||
* Vendor-prefixed and regular ::selection selectors cannot be combined:
|
||||
* https://stackoverflow.com/a/16982510/7133471
|
||||
*
|
||||
* Customize the background color to match your design.
|
||||
*/
|
||||
|
||||
::selection {
|
||||
background: #b3d4fc;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* A better looking default horizontal rule
|
||||
*/
|
||||
|
||||
hr {
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid #ccc;
|
||||
margin: 1em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove the gap between audio, canvas, iframes,
|
||||
* images, videos and the bottom of their containers:
|
||||
* https://github.com/h5bp/html5-boilerplate/issues/440
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
iframe,
|
||||
img,
|
||||
svg,
|
||||
video {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove default fieldset styles.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow only vertical resizing of textareas.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Browser Upgrade Prompt
|
||||
========================================================================== */
|
||||
|
||||
.browserupgrade {
|
||||
margin: 0.2em 0;
|
||||
background: #ccc;
|
||||
color: #000;
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Author's custom styles
|
||||
========================================================================== */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
Helper classes
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers
|
||||
*/
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide only visually, but have it available for screen readers:
|
||||
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
|
||||
*
|
||||
* 1. For long content, line feeds are not interpreted as spaces and small width
|
||||
* causes content to wrap 1 word per line:
|
||||
* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
|
||||
*/
|
||||
|
||||
.visuallyhidden {
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
white-space: nowrap; /* 1 */
|
||||
}
|
||||
|
||||
/*
|
||||
* Extends the .visuallyhidden class to allow the element
|
||||
* to be focusable when navigated to via the keyboard:
|
||||
* https://www.drupal.org/node/897638
|
||||
*/
|
||||
|
||||
.visuallyhidden.focusable:active,
|
||||
.visuallyhidden.focusable:focus {
|
||||
clip: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: static;
|
||||
width: auto;
|
||||
white-space: inherit;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers, but maintain layout
|
||||
*/
|
||||
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clearfix: contain floats
|
||||
*
|
||||
* For modern browsers
|
||||
* 1. The space content is one way to avoid an Opera bug when the
|
||||
* `contenteditable` attribute is included anywhere else in the document.
|
||||
* Otherwise it causes space to appear at the top and bottom of elements
|
||||
* that receive the `clearfix` class.
|
||||
* 2. The use of `table` rather than `block` is only necessary if using
|
||||
* `:before` to contain the top-margins of child elements.
|
||||
*/
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
content: " "; /* 1 */
|
||||
display: table; /* 2 */
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
EXAMPLE Media Queries for Responsive Design.
|
||||
These examples override the primary ('mobile first') styles.
|
||||
Modify as content requires.
|
||||
========================================================================== */
|
||||
|
||||
@media only screen and (min-width: 35em) {
|
||||
/* Style adjustments for viewports that meet the condition */
|
||||
}
|
||||
|
||||
@media print,
|
||||
(min-resolution: 1.25dppx),
|
||||
(min-resolution: 120dpi) {
|
||||
/* Style adjustments for high resolution devices */
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Print styles.
|
||||
Inlined to avoid the additional HTTP request:
|
||||
https://www.phpied.com/delay-loading-your-print-css/
|
||||
========================================================================== */
|
||||
|
||||
@media print {
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
background: transparent !important;
|
||||
color: #000 !important; /* Black prints faster */
|
||||
box-shadow: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a[href]:after {
|
||||
content: " (" attr(href) ")";
|
||||
}
|
||||
|
||||
abbr[title]:after {
|
||||
content: " (" attr(title) ")";
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't show links that are fragment identifiers,
|
||||
* or use the `javascript:` pseudo protocol
|
||||
*/
|
||||
|
||||
a[href^="#"]:after,
|
||||
a[href^="javascript:"]:after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
pre,
|
||||
blockquote {
|
||||
border: 1px solid #999;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
/*
|
||||
* Printing Tables:
|
||||
* http://css-discuss.incutio.com/wiki/Printing_Tables
|
||||
*/
|
||||
|
||||
thead {
|
||||
display: table-header-group;
|
||||
}
|
||||
|
||||
tr,
|
||||
img {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
p,
|
||||
h2,
|
||||
h3 {
|
||||
orphans: 3;
|
||||
widows: 3;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
[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)
|
||||
* [Ant Build Script](https://github.com/h5bp/ant-build-script) — Apache
|
||||
Ant based build script.
|
||||
164
src/doc/css.md
164
src/doc/css.md
@@ -1,164 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# The CSS
|
||||
|
||||
HTML5 Boilerplate's CSS includes:
|
||||
|
||||
* [Normalize.css](#normalizecss)
|
||||
* [Useful defaults](#useful-defaults)
|
||||
* [Common helpers](#common-helpers)
|
||||
* [Placeholder media queries](#media-queries)
|
||||
* [Print styles](#print-styles)
|
||||
|
||||
This starting CSS does not rely on the presence of
|
||||
[conditional class names](https://www.paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/),
|
||||
[conditional style sheets](https://css-tricks.com/how-to-create-an-ie-only-stylesheet/),
|
||||
or [Modernizr](https://modernizr.com/), and it is ready to use no matter what
|
||||
your development preferences happen to be.
|
||||
|
||||
|
||||
## Normalize.css
|
||||
|
||||
In order to make browsers render all elements more consistently and in line
|
||||
with modern standards, we include
|
||||
[Normalize.css](https://necolas.github.io/normalize.css/) — a modern, HTML5-ready
|
||||
alternative to CSS resets.
|
||||
|
||||
As opposed to CSS resets, Normalize.css:
|
||||
|
||||
* targets only the styles that need normalizing
|
||||
* preserves useful browser defaults rather than erasing them
|
||||
* corrects bugs and common browser inconsistencies
|
||||
* improves usability with subtle improvements
|
||||
* doesn't clutter the debugging tools
|
||||
* has better documentation
|
||||
|
||||
For more information about Normalize.css, please refer to its [project
|
||||
page](https://necolas.github.com/normalize.css/), as well as this
|
||||
[blog post](http://nicolasgallagher.com/about-normalize-css/).
|
||||
|
||||
|
||||
## 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](https://webaim.org/techniques/css/invisiblecontent/)
|
||||
* [Hiding content for
|
||||
accessibility](https://snook.ca/archives/html_and_css/hiding-content-for-accessibility)
|
||||
* [HTML5 Boilerplate - Issue #194](https://github.com/h5bp/html5-boilerplate/issues/194).
|
||||
|
||||
__N.B.__ [The visuallyhidden class can be an accessibility issue for users using high contrast modes.](https://www.paciellogroup.com/blog/2012/08/notes-on-accessible-css-image-sprites/)
|
||||
|
||||
>Use JavaScript to detect when images are disabled and remove the CSS visually hidden display state of the text alternative.
|
||||
Use JavaScript to detect when Windows high contrast mode is enabled and remove the CSS visually hidden display state of the text alternative.
|
||||
|
||||
#### `.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_](https://www.lukew.com/presos/preso.asp?26) and [_responsive web
|
||||
design_](https://alistapart.com/article/responsive-web-design) approach to
|
||||
development. But it's worth remembering that there are [no silver
|
||||
bullets](https://cloudfour.com/thinks/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)`).
|
||||
|
||||
|
||||
## 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](https://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,669 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Extend and customise HTML5 Boilerplate
|
||||
|
||||
Here is some useful advice for how you can make your project with HTML5
|
||||
Boilerplate even better. We don't want to include it all by default, as
|
||||
not everything fits with everyone's needs.
|
||||
|
||||
|
||||
* [App Stores](#app-stores)
|
||||
* [DNS prefetching](#dns-prefetching)
|
||||
* [Google Universal Analytics](#google-universal-analytics)
|
||||
* [Internet Explorer](#internet-explorer)
|
||||
* [Miscellaneous](#miscellaneous)
|
||||
* [News Feeds](#news-feeds)
|
||||
* [Search](#search)
|
||||
* [Social Networks](#social-networks)
|
||||
* [URLs](#urls)
|
||||
* [Web Apps](#web-apps)
|
||||
|
||||
|
||||
## App Stores
|
||||
|
||||
### Smart App Banners in iOS 6+ Safari
|
||||
|
||||
Stop bothering everyone with gross modals advertising your entry in the
|
||||
App Store. Including the following [meta tag](https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html) will unobtrusively give the user the option to download your iOS app,or open it with some data about the user's current state on the website.
|
||||
|
||||
```html
|
||||
<meta name="apple-itunes-app" content="app-id=APP_ID,app-argument=SOME_TEXT">
|
||||
```
|
||||
|
||||
## DNS prefetching
|
||||
|
||||
In short, DNS Prefetching is a method of informing the browser of domain names
|
||||
referenced on a site so that the client can resolve the DNS for those hosts,
|
||||
cache them, and when it comes time to use them, have a faster turn around on
|
||||
the request.
|
||||
|
||||
### Implicit prefetches
|
||||
|
||||
There is a lot of prefetching done for you automatically by the browser. When
|
||||
the browser encounters an anchor in your html that does not share the same
|
||||
domain name as the current location the browser requests, from the client OS,
|
||||
the IP address for this new domain. The client first checks its cache and
|
||||
then, lacking a cached copy, makes a request from a DNS server. These requests
|
||||
happen in the background and are not meant to block the rendering of the
|
||||
page.
|
||||
|
||||
The goal of this is that when the foreign IP address is finally needed it will
|
||||
already be in the client cache and will not block the loading of the foreign
|
||||
content. Fewer requests result in faster page load times. The perception of this
|
||||
is increased on a mobile platform where DNS latency can be greater.
|
||||
|
||||
#### Disable implicit prefetching
|
||||
|
||||
```html
|
||||
<meta http-equiv="x-dns-prefetch-control" content="off">
|
||||
```
|
||||
|
||||
Even with X-DNS-Prefetch-Control meta tag (or http header) browsers will still
|
||||
prefetch any explicit dns-prefetch links.
|
||||
|
||||
**_WARNING:_** THIS MAY MAKE YOUR SITE SLOWER IF YOU RELY ON RESOURCES FROM
|
||||
FOREIGN DOMAINS.
|
||||
|
||||
### Explicit prefetches
|
||||
|
||||
Typically the browser only scans the HTML for foreign domains. If you have
|
||||
resources that are outside of your HTML (a javascript request to a remote
|
||||
server or a CDN that hosts content that may not be present on every page of
|
||||
your site, for example) then you can queue up a domain name to be prefetched.
|
||||
|
||||
```html
|
||||
<link rel="dns-prefetch" href="//example.com">
|
||||
<link rel="dns-prefetch" href="https://ajax.googleapis.com">
|
||||
```
|
||||
|
||||
You can use as many of these as you need, but it's best if they are all
|
||||
immediately after the [Meta
|
||||
Charset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset)
|
||||
element (which should go right at the top of the `head`), so the browser can
|
||||
act on them ASAP.
|
||||
|
||||
#### Common Prefetch Links
|
||||
|
||||
Amazon S3:
|
||||
|
||||
```html
|
||||
<link rel="dns-prefetch" href="//s3.amazonaws.com">
|
||||
```
|
||||
|
||||
Google APIs:
|
||||
|
||||
```html
|
||||
<link rel="dns-prefetch" href="https://ajax.googleapis.com">
|
||||
```
|
||||
|
||||
Microsoft Ajax Content Delivery Network:
|
||||
|
||||
```html
|
||||
<link rel="dns-prefetch" href="//ajax.microsoft.com">
|
||||
<link rel="dns-prefetch" href="//ajax.aspnetcdn.com">
|
||||
```
|
||||
|
||||
### Further reading about DNS prefetching
|
||||
|
||||
* https://developer.mozilla.org/en-US/docs/Controlling_DNS_prefetching
|
||||
* https://dev.chromium.org/developers/design-documents/dns-prefetching
|
||||
* https://blogs.msdn.microsoft.com/ie/2011/03/17/internet-explorer-9-network-performance-improvements/
|
||||
* 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](https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/).
|
||||
|
||||
Add this to `plugins.js`:
|
||||
|
||||
```js
|
||||
/*
|
||||
* Log all jQuery AJAX requests to Google Analytics
|
||||
* See: https://www.alfajango.com/blog/track-jquery-ajax-requests-in-google-analytics/
|
||||
*/
|
||||
if (typeof ga !== "undefined" && ga !== null) {
|
||||
$(document).ajaxSend(function(event, xhr, settings){
|
||||
ga('send', 'pageview', settings.url);
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
### Track JavaScript errors in Google Analytics
|
||||
|
||||
Add this function after `ga` is defined:
|
||||
|
||||
```js
|
||||
(function(window){
|
||||
var undefined,
|
||||
link = function (href) {
|
||||
var a = window.document.createElement('a');
|
||||
a.href = href;
|
||||
return a;
|
||||
};
|
||||
window.onerror = function (message, file, line, column) {
|
||||
var host = link(file).hostname;
|
||||
ga('send', {
|
||||
'hitType': 'event',
|
||||
'eventCategory': (host == window.location.hostname || host == undefined || host == '' ? '' : 'external ') + 'error',
|
||||
'eventAction': message,
|
||||
'eventLabel': (file + ' LINE: ' + line + (column ? ' COLUMN: ' + column : '')).trim(),
|
||||
'nonInteraction': 1
|
||||
});
|
||||
};
|
||||
}(window));
|
||||
```
|
||||
|
||||
### Track page scroll
|
||||
|
||||
Add this function after `ga` is defined:
|
||||
|
||||
```js
|
||||
$(function(){
|
||||
var isDuplicateScrollEvent,
|
||||
scrollTimeStart = new Date,
|
||||
$window = $(window),
|
||||
$document = $(document),
|
||||
scrollPercent;
|
||||
|
||||
$window.scroll(function() {
|
||||
scrollPercent = Math.round(100 * ($window.height() + $window.scrollTop())/$document.height());
|
||||
if (scrollPercent > 90 && !isDuplicateScrollEvent) { //page scrolled to 90%
|
||||
isDuplicateScrollEvent = 1;
|
||||
ga('send', 'event', 'scroll',
|
||||
'Window: ' + $window.height() + 'px; Document: ' + $document.height() + 'px; Time: ' + Math.round((new Date - scrollTimeStart )/1000,1) + 's'
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Internet Explorer
|
||||
|
||||
### IE Pinned Sites (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](https://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:
|
||||
`https://www.example.com/index.html?pinned=true`
|
||||
|
||||
```html
|
||||
<meta name="msapplication-starturl" content="https://www.example.com/index.html?pinned=true">
|
||||
```
|
||||
|
||||
### Recolor IE's controls manually for a Pinned Site
|
||||
|
||||
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](https://blogs.msdn.microsoft.com/ie/2012/06/08/high-quality-visuals-for-pinned-sites-in-windows-8/).
|
||||
|
||||
* Create a 144x144 image of your site icon, filling all of the canvas, and
|
||||
using a transparent background.
|
||||
* Save this image as a 32-bit PNG and optimize it without reducing
|
||||
colour-depth. It can be named whatever you want (e.g. `metro-tile.png`).
|
||||
* To reference the tile and its color, add the HTML `meta` elements described
|
||||
in the IE Blog post.
|
||||
|
||||
### (Windows 8) Badges for Pinned Sites
|
||||
|
||||
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](https://blogs.msdn.microsoft.com/ie/2012/04/03/pinned-sites-in-windows-8/)
|
||||
* [Available badge values](https://msdn.microsoft.com/en-us/library/ie/br212849.aspx)
|
||||
|
||||
```html
|
||||
<meta name="msapplication-badge" value="frequency=NUMBER_IN_MINUTES;polling-uri=https://www.example.com/path/to/file.xml">
|
||||
```
|
||||
|
||||
### Disable link highlighting upon tap in IE10
|
||||
|
||||
Similar to [-webkit-tap-highlight-color](https://davidwalsh.name/mobile-highlight-color)
|
||||
in iOS Safari. Unlike that CSS property, this is an HTML meta element, and its
|
||||
value is boolean rather than a color. It's all or nothing.
|
||||
|
||||
```html
|
||||
<meta name="msapplication-tap-highlight" content="no" />
|
||||
```
|
||||
|
||||
You can read about this useful element and more techniques in
|
||||
[Microsoft's documentation on adapting WebKit-oriented apps for IE10](https://blogs.windows.com/buildingapps/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10/)
|
||||
|
||||
## Search
|
||||
|
||||
### Direct search spiders to your sitemap
|
||||
|
||||
After creating a [sitemap](https://www.sitemaps.org/protocol.html)
|
||||
|
||||
Submit it to search engine tool:
|
||||
* [Google](https://www.google.com/webmasters/tools/sitemap-list)
|
||||
* [Bing](https://www.bing.com/toolbox/webmaster)
|
||||
* [Yandex](https://webmaster.yandex.com/)
|
||||
* [Baidu](https://zhanzhang.baidu.com/)
|
||||
OR
|
||||
Insert the following line anywhere in your robots.txt file, specifying the path to your sitemap:
|
||||
```
|
||||
Sitemap: https://example.com/sitemap_location.xml
|
||||
```
|
||||
|
||||
### Hide pages from search engines
|
||||
|
||||
According to Heather Champ, former community manager at Flickr, you should not
|
||||
allow search engines to index your "Contact Us" or "Complaints" page if you
|
||||
value your sanity. This is an HTML-centric way of achieving that.
|
||||
|
||||
```html
|
||||
<meta name="robots" content="noindex">
|
||||
```
|
||||
|
||||
**_WARNING:_** DO NOT INCLUDE ON PAGES THAT SHOULD APPEAR IN SEARCH ENGINES.
|
||||
|
||||
### Firefox and IE Search Plugins
|
||||
|
||||
Sites with in-site search functionality should be strongly considered for a
|
||||
browser search plugin. A "search plugin" is an XML file which defines how your
|
||||
plugin behaves in the browser. [How to make a browser search
|
||||
plugin](https://www.google.com/search?ie=UTF-8&q=how+to+make+browser+search+plugin).
|
||||
|
||||
```html
|
||||
<link rel="search" title="" type="application/opensearchdescription+xml" href="">
|
||||
```
|
||||
|
||||
|
||||
## Miscellaneous
|
||||
|
||||
* Use [polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills).
|
||||
|
||||
* Use [Microformats](http://microformats.org/wiki/Main_Page) (via
|
||||
[microdata](http://microformats.org/wiki/microdata)) for optimum search
|
||||
results
|
||||
[visibility](https://webmasters.googleblog.com/2009/05/introducing-rich-snippets.html).
|
||||
|
||||
* If you're building a web app you may want [native style momentum scrolling in
|
||||
iOS 5+](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).
|
||||
|
||||
|
||||
## News Feeds
|
||||
|
||||
### RSS
|
||||
|
||||
Have an RSS feed? Link to it here. Want to [learn how to write an RSS feed from
|
||||
scratch](http://www.rssboard.org/rss-specification)?
|
||||
|
||||
```html
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml">
|
||||
```
|
||||
|
||||
### Atom
|
||||
|
||||
Atom is similar to RSS, and you might prefer to use it instead of or in
|
||||
addition to it. [See what Atom's all
|
||||
about](https://en.wikipedia.org/wiki/Atom_(Web_standard)).
|
||||
|
||||
```html
|
||||
<link rel="alternate" type="application/atom+xml" title="Atom" href="/atom.xml">
|
||||
```
|
||||
|
||||
### Pingbacks
|
||||
|
||||
Your server may be notified when another site links to yours. The href
|
||||
attribute should contain the location of your pingback service.
|
||||
|
||||
```html
|
||||
<link rel="pingback" href="">
|
||||
```
|
||||
|
||||
* High-level explanation: https://codex.wordpress.org/Introduction_to_Blogging#Pingbacks
|
||||
* Step-by-step example case: 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/).
|
||||
|
||||
For a reference of Open Graph's markup and properties, you may check
|
||||
[Facebook's Open Graph Protocol reference](http://ogp.me/). Finally,
|
||||
you can validate your markup with the [Facebook Object
|
||||
Debugger](https://developers.facebook.com/tools/debug/) (needs
|
||||
registration to Facebook).
|
||||
|
||||
```html
|
||||
<meta property="fb:app_id" content="123456789">
|
||||
<meta property="og:url" content="https://www.example.com/path/to/page.html">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="">
|
||||
<meta property="og:image" content="https://www.example.com/path/to/image.jpg">
|
||||
<meta property="og:description" content="">
|
||||
<meta property="og:site_name" content="">
|
||||
<meta property="article:author" content="">
|
||||
```
|
||||
|
||||
### Twitter Cards
|
||||
|
||||
Twitter provides a snippet specification that serves a similar purpose to Open
|
||||
Graph. In fact, Twitter will use Open Graph when Cards is not available. 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), and you can validate
|
||||
your markup with the [Card validator](https://cards-dev.twitter.com/validator)
|
||||
(needs registration to Twitter).
|
||||
|
||||
```html
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:site" content="@site_account">
|
||||
<meta name="twitter:creator" content="@individual_account">
|
||||
<meta name="twitter:url" content="https://www.example.com/path/to/page.html">
|
||||
<meta name="twitter:title" content="">
|
||||
<meta name="twitter:description" content="">
|
||||
<meta name="twitter:image" content="https://www.example.com/path/to/image.jpg">
|
||||
```
|
||||
|
||||
### Google+ / Schema.org
|
||||
|
||||
Google also provides a snippet specification that serves a similar
|
||||
purpose to Facebook's Open Graph or Twitter Cards. While it helps you
|
||||
to control information displayed on Google+, this metadata is a subset
|
||||
of [schema.org's microdata vocabulary](https://schema.org/), which
|
||||
covers many other schemas that can describe the content of your pages
|
||||
to search engines. For this reason, this metadata is more generic for
|
||||
SEO, notably for Google's search-engine, although this vocabulary is
|
||||
also used by Microsoft, Pinterest or Yandex.
|
||||
|
||||
You can validate your markup with the [Structured Data Testing
|
||||
Tool](https://developers.google.com/structured-data/testing-tool/).
|
||||
Also, please note that this markup requires to add attributes to your
|
||||
top `html` tag.
|
||||
|
||||
```html
|
||||
<html class="no-js" lang="" itemscope itemtype="http://schema.org/Article">
|
||||
<head>
|
||||
|
||||
<link rel="author" href="">
|
||||
<link rel="publisher" href="">
|
||||
<meta itemprop="name" content="">
|
||||
<meta itemprop="description" content="">
|
||||
<meta itemprop="image" content="">
|
||||
```
|
||||
|
||||
## URLs
|
||||
|
||||
### Canonical URL
|
||||
|
||||
Signal to search engines and others "Use this URL for this page!" Useful when
|
||||
parameters after a `#` or `?` is used to control the display state of a page.
|
||||
`https://www.example.com/cart.html?shopping-cart-open=true` can be indexed as
|
||||
the cleaner, more accurate `https://www.example.com/cart.html`.
|
||||
|
||||
```html
|
||||
<link rel="canonical" href="">
|
||||
```
|
||||
|
||||
### 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="https://m.example.com/page.html" >`
|
||||
|
||||
* on the mobile page, add the `link rel="canonical"` tag pointing to the
|
||||
corresponding desktop URL, e.g.:
|
||||
|
||||
`<link rel="canonical" href="https://www.example.com/page.html">`
|
||||
|
||||
For more information please see:
|
||||
|
||||
* https://developers.google.com/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 `icon.png`
|
||||
and including:
|
||||
|
||||
```html
|
||||
<link rel="apple-touch-icon" href="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">
|
||||
```
|
||||
|
||||
### Theme Color
|
||||
|
||||
You can add the [`theme-color` meta extension](https://html.spec.whatwg.org/multipage/semantics.html#meta-theme-color)
|
||||
in the `<head>` of your pages to suggest the color that browsers and
|
||||
OSes should use if they customize the display of individual pages in
|
||||
their UIs with varying colors.
|
||||
|
||||
```html
|
||||
<meta name="theme-color" content="#ff69b4">
|
||||
```
|
||||
|
||||
The `content` attribute extension can take any valid CSS color.
|
||||
|
||||
Currently, the `theme-color` meta extension is supported by [Chrome 39+
|
||||
for Android Lollipop](https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android).
|
||||
@@ -1,47 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Frequently asked questions
|
||||
|
||||
* [Why is the Google Analytics code at the bottom? Google recommends it be
|
||||
placed in the `<head>`.](#why-is-the-google-analytics-code-at-the-bottom-google-recommends-it-be-placed-in-the-head)
|
||||
* [How can I integrate Bootstrap with HTML5
|
||||
Boilerplate?](#how-can-i-integrate-bootstrap-with-html5-boilerplate)
|
||||
* [Do I need to upgrade my site each time a new version of HTML5 Boilerplate is
|
||||
released?](#do-i-need-to-upgrade-my-site-each-time-a-new-version-of-html5-boilerplate-is-released)
|
||||
* [Where can I get help with support
|
||||
questions?](#where-can-i-get-help-with-support-questions)
|
||||
|
||||
---
|
||||
|
||||
### Why is the Google Analytics code at the bottom? Google recommends it be placed in the `<head>`.
|
||||
|
||||
The main advantage of placing it in the `<head>` is that you will track the
|
||||
user's `pageview` even if they leave the page before it has been fully loaded.
|
||||
|
||||
Here's a handy quote from [Mathias Bynens](https://mathiasbynens.be/notes/async-analytics-snippet#comment-50) about our placement choice.
|
||||
>I should point out that it’s Google — not me — recommending to place this
|
||||
script before all other scripts in the document. The only real advantage is to
|
||||
catch a pageView call if your page fails to load completely (for example, if
|
||||
the user aborts loading, or quickly closes the page, etc.). Personally, I
|
||||
wouldn’t count that as a page view, so I actually prefer to place this script
|
||||
at the bottom, after all other scripts. This keeps all the scripts together and
|
||||
reinforces that scripts at the bottom are the right move. (Usually I
|
||||
concatenate and minify all my scripts into one .js file — the GA snippet being
|
||||
the suffix.)
|
||||
|
||||
### How can I integrate [Bootstrap](https://getbootstrap.com/) with HTML5 Boilerplate?
|
||||
|
||||
Here's Nicolas Gallagher writing 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).
|
||||
250
src/doc/html.md
250
src/doc/html.md
@@ -1,250 +0,0 @@
|
||||
[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`](#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](https://www.paulirish.com/2009/avoiding-the-fouc-v3/).
|
||||
|
||||
|
||||
## Language Attribute
|
||||
|
||||
Please consider specifying the language of your content by adding a [value](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) to the `lang`
|
||||
attribute in the `<html>` as in this example:
|
||||
|
||||
```html
|
||||
<html class="no-js" lang="en">
|
||||
```
|
||||
|
||||
### The order of the `<title>` and `<meta>` tags
|
||||
|
||||
The 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](https://msdn.microsoft.com/en-us/library/cc288325.aspx)
|
||||
|
||||
|
||||
### `x-ua-compatible`
|
||||
|
||||
Internet Explorer 8/9/10 support [document compatibility
|
||||
modes](https://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](https://msdn.microsoft.com/library/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](https://blogs.msdn.microsoft.com/ie/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11/) throughout your company.
|
||||
|
||||
|
||||
## 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">
|
||||
```
|
||||
|
||||
|
||||
## 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">
|
||||
```
|
||||
|
||||
## Web App Manifest
|
||||
HTML5 Boilerplate includes a simple web app manifest file.
|
||||
|
||||
The web app manifest is a simple JSON file that allows you to control how your
|
||||
app appears on a device's home screen, what it looks like when it launches
|
||||
in that context and what happens when it is launched. This allows for much greater
|
||||
control over the UI of a saved site or web app on a mobile device.
|
||||
|
||||
It's linked to from the HTML as follows:
|
||||
|
||||
```html
|
||||
<link rel="manifest" href="site.webmanifest">
|
||||
```
|
||||
Our [site.webmanifest](https://github.com/h5bp/html5-boilerplate/blob/master/src/site.webmanifest) contains a very skeletal "app" definition, just to show the basic usage.
|
||||
You should fill this file out with [more information about your site or application](https://developer.mozilla.org/en-US/docs/Web/Manifest)
|
||||
|
||||
## Favicons and Touch Icon
|
||||
|
||||
The shortcut icons should be put in the root directory of your site. `favicon.ico`
|
||||
is automatically picked up by browsers if it's placed in the root. HTML5
|
||||
Boilerplate comes with a default set of icons (include favicon and one Apple
|
||||
Touch Icon) that you can use as a baseline to create your own.
|
||||
|
||||
Please refer to the more detailed description in the [Extend section](extend.md)
|
||||
of these docs.
|
||||
|
||||
## The Content Area
|
||||
|
||||
The central part of the boilerplate template is pretty much empty. This is
|
||||
intentional, in order to make the boilerplate suitable for both web page and
|
||||
web app development.
|
||||
|
||||
### Browser Upgrade Prompt
|
||||
|
||||
The main content area of the boilerplate includes a prompt to install an up to
|
||||
date browser for users of IE 8 and lower. If you intended to support IE 8, then you
|
||||
should remove the snippet of code.
|
||||
|
||||
## Modernizr
|
||||
|
||||
HTML5 Boilerplate uses a custom build of Modernizr.
|
||||
|
||||
[Modernizr](https://modernizr.com/) is a JavaScript library which adds classes to
|
||||
the `html` element based on the results of feature test and which ensures that
|
||||
all browsers can make use of HTML5 elements (as it includes the HTML5 Shiv).
|
||||
This allows you to target parts of your CSS and JavaScript based on the
|
||||
features supported by a browser.
|
||||
|
||||
Starting with version 3 Modernizr can be customized using the [modernizr-config.json](https://github.com/h5bp/html5-boilerplate/blob/master/modernizr-config.json) and the
|
||||
[Modernizr command line utility](https://www.npmjs.com/package/modernizr-cli).
|
||||
|
||||
## What About Polyfills?
|
||||
|
||||
If you need to include [polyfills](https://remysharp.com/2010/10/08/what-is-a-polyfill)
|
||||
in your project, you must make sure those load before any other JavaScript. If you're
|
||||
using some polyfill CDN service, like [cdn.polyfill.io](https://cdn.polyfill.io/),
|
||||
just put it before the other scripts in the bottom of the page:
|
||||
|
||||
```html
|
||||
<script src="js/vendor/modernizr-3.6.0.min.js"></script>
|
||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
</body>
|
||||
```
|
||||
|
||||
If you like to just include the polyfills yourself, you could include them in
|
||||
`js/plugins.js`. When you have a bunch of polyfills to load in, you could
|
||||
also create a `polyfills.js` file in the `js/vendor` directory or include the files
|
||||
individually and combine them using a build tool. Always ensure that the polyfills
|
||||
are all loaded before any other JavaScript.
|
||||
|
||||
There are some misconceptions about Modernizr and polyfills. It's important
|
||||
to understand that Modernizr just handles feature checking, not polyfilling
|
||||
itself. The only thing Modernizr does regarding polyfills is that the team
|
||||
maintains [a huge list of cross Browser polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills).
|
||||
|
||||
### jQuery CDN for jQuery
|
||||
|
||||
The jQuery CDN version of the jQuery JavaScript library is referenced towards
|
||||
the bottom of the page. A local fallback of jQuery is included for rare instances
|
||||
when the CDN version might not be available, and to facilitate offline
|
||||
development.
|
||||
|
||||
The jQuery CDN version was chosen over other potential candidates
|
||||
([like Google's Hosted Libraries](https://developers.google.com/speed/libraries/))
|
||||
because it's fast ([comparable or faster than Google by some
|
||||
measures](https://www.cdnperf.com/#jsdelivr,cdnjs,google,yandex,microsoft,jquery,bootstrapcdn/https/90))
|
||||
and, (unlike Google's CDN) is available to China's hundreds of millions of internet users.
|
||||
For many years we [chose](https://github.com/h5bp/html5-boilerplate/issues/1191)
|
||||
the Google Hosted version over the jQuery CDN because it was available
|
||||
over HTTPS (the jQuery CDN was not,) and it offered a better chance of
|
||||
hitting the cache lottery owing to the popularity of the Google CDN.
|
||||
The first issue is no longer valid and the second is far outweighed by
|
||||
being able to serve jQuery to Chinese users.
|
||||
|
||||
While the jQuery CDN is a strong default solution your site or application may
|
||||
require a different configuration. Testing your site with services like
|
||||
[WebPageTest](https://www.webpagetest.org/) and browser tools like
|
||||
[PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights/) will help you examine the real
|
||||
world performance of your site and can show where you can optimize your specific
|
||||
site or application.
|
||||
|
||||
### Google Universal Analytics Tracking Code
|
||||
|
||||
Finally, an optimized version of the Google Universal Analytics tracking code is
|
||||
included. 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,36 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# The JavaScript
|
||||
|
||||
Information about the default JavaScript included in the project.
|
||||
|
||||
## main.js
|
||||
|
||||
This file can be used to contain or reference your site/app JavaScript code.
|
||||
If you're working on something more advanced you might replace this file
|
||||
entirely. That's cool.
|
||||
|
||||
## plugins.js
|
||||
|
||||
This file can be used to contain all your plugins, such as jQuery plugins and
|
||||
other 3rd party scripts for a simple site.
|
||||
|
||||
One approach is to put jQuery plugins inside of a `(function($){ ...
|
||||
})(jQuery);` closure to make sure they're in the jQuery namespace safety
|
||||
blanket. Read more about [jQuery plugin
|
||||
authoring](https://learn.jquery.com/plugins/#Getting_Started).
|
||||
|
||||
By default the `plugins.js` file contains a small script to avoid `console`
|
||||
errors in browsers that lack a `console`. The script will make sure that, if
|
||||
a console method isn't available, that method will have the value of empty
|
||||
function, thus, preventing the browser from throwing an error.
|
||||
|
||||
## vendor
|
||||
|
||||
This directory can be used to contain all 3rd party library code.
|
||||
|
||||
Minified versions of the latest jQuery and Modernizr libraries are included by
|
||||
default. You may wish to create your own [custom Modernizr
|
||||
build with the online builder](https://www.modernizr.com/download/) or [command
|
||||
line tool](https://modernizr.com/docs#command-line-config).
|
||||
173
src/doc/misc.md
173
src/doc/misc.md
@@ -1,173 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
* [.gitignore](#gitignore)
|
||||
* [.editorconfig](#editorconfig)
|
||||
* [Server Configuration](#server-configuration)
|
||||
* [robots.txt](#robotstxt)
|
||||
* [humans.txt](#humanstxt)
|
||||
* [browserconfig.xml](#browserconfigxml)
|
||||
|
||||
--
|
||||
|
||||
## .gitignore
|
||||
|
||||
HTML5 Boilerplate includes a basic project-level `.gitignore`. This should
|
||||
primarily be used to avoid certain project-level files and directories from
|
||||
being kept under source control. Different development-environments will
|
||||
benefit from different collections of ignores.
|
||||
|
||||
OS-specific and editor-specific files should be ignored using a "global
|
||||
ignore" that applies to all repositories on your system.
|
||||
|
||||
For example, add the following to your `~/.gitconfig`, where the `.gitignore`
|
||||
in your HOME directory contains the files and directories you'd like to
|
||||
globally ignore:
|
||||
|
||||
```gitignore
|
||||
[core]
|
||||
excludesfile = ~/.gitignore
|
||||
```
|
||||
|
||||
* More on global ignores: https://help.github.com/articles/ignoring-files/
|
||||
* Comprehensive set of ignores on GitHub: https://github.com/github/gitignore
|
||||
|
||||
|
||||
## .editorconfig
|
||||
|
||||
The `.editorconfig` file is provided in order to encourage and help you and
|
||||
your team define and maintain consistent coding styles between different
|
||||
editors and IDEs.
|
||||
|
||||
By default, `.editorconfig` includes some basic
|
||||
[properties](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 may 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](https://httpd.apache.org/docs/). If you are not using Apache
|
||||
as your web server, then you are encouraged to download a
|
||||
[server configuration](https://github.com/h5bp/server-configs) that
|
||||
corresponds to your web server and environment.
|
||||
|
||||
A `.htaccess` (hypertext access) file is an [Apache HTTP server
|
||||
configuration file](https://github.com/h5bp/server-configs-apache).
|
||||
The `.htaccess` file is mostly used for:
|
||||
|
||||
* Rewriting URLs
|
||||
* Controlling cache
|
||||
* Authentication
|
||||
* Server-side includes
|
||||
* Redirects
|
||||
* Gzipping
|
||||
|
||||
If you have access to the main server configuration file (usually called
|
||||
`httpd.conf`), you should add the logic from the `.htaccess` file in, for
|
||||
example, a <Directory> section in the main configuration file. This is usually
|
||||
the recommended way, as using .htaccess files slows down Apache!
|
||||
|
||||
To enable Apache modules locally, please see:
|
||||
https://github.com/h5bp/server-configs-apache/wiki/How-to-enable-Apache-modules.
|
||||
|
||||
In the repo the `.htaccess` is used for:
|
||||
|
||||
* Allowing cross-origin access to web fonts
|
||||
* CORS header for images when browsers request it
|
||||
* Enable `404.html` as 404 error document
|
||||
* Making the website experience better for IE users better
|
||||
* Media UTF-8 as character encoding for `text/html` and `text/plain`
|
||||
* Enabling the rewrite URLs engine
|
||||
* Forcing or removing the `www.` at the begin of a URL
|
||||
* It blocks access to directories without a default document
|
||||
* It blocks access to files that can expose sensitive information.
|
||||
* It reduces MIME type security risks
|
||||
* It forces compressing (gzipping)
|
||||
* It tells the browser whether they should request a specific file from the
|
||||
server or whether they should grab it from the browser's cache
|
||||
|
||||
When using `.htaccess` we recommend reading all inline comments (the rules after
|
||||
a `#`) in the file once. There is a bunch of optional stuff in it.
|
||||
|
||||
If you want to know more about the `.htaccess` file check out the
|
||||
[Apache HTTP server docs](https://httpd.apache.org/docs/) or more
|
||||
specifically the [htaccess
|
||||
section](https://httpd.apache.org/docs/current/howto/htaccess.html).
|
||||
|
||||
Notice that the original repo for the `.htaccess` file is [this
|
||||
one](https://github.com/h5bp/server-configs-apache).
|
||||
|
||||
|
||||
## robots.txt
|
||||
|
||||
The `robots.txt` file is used to give instructions to web robots on what can
|
||||
be crawled from the website.
|
||||
|
||||
By default, the file provided by this project includes the next two lines:
|
||||
|
||||
* `User-agent: *` - the following rules apply to all web robots
|
||||
* `Disallow:` - everything on the website is allowed to be crawled
|
||||
|
||||
If you want to disallow certain pages you will need to specify the path in a
|
||||
`Disallow` directive (e.g.: `Disallow: /path`) or, if you want to disallow
|
||||
crawling of all content, use `Disallow: /`.
|
||||
|
||||
The `/robots.txt` file is not intended for access control, so don't try to
|
||||
use it as such. Think of it as a "No Entry" sign, rather than a locked door.
|
||||
URLs disallowed by the `robots.txt` file might still be indexed without being
|
||||
crawled, and the content from within the `robots.txt` file can be viewed by
|
||||
anyone, potentially disclosing the location of your private content! So, if
|
||||
you want to block access to private content, use proper authentication instead.
|
||||
|
||||
For more information about `robots.txt`, please see:
|
||||
|
||||
* [robotstxt.org](http://www.robotstxt.org/)
|
||||
* [How Google handles the `robots.txt` file](https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt)
|
||||
|
||||
## humans.txt
|
||||
|
||||
The `humans.txt` file is used to provide information about people involved with
|
||||
the website.
|
||||
|
||||
The provided file contains three sections:
|
||||
|
||||
* `TEAM` - this is intented to list the group of people responsible for the website
|
||||
* `THANKS` - this is intended to list the group of people that have contributed
|
||||
to the webste
|
||||
* `TECHNOLOGY COLOPHON` - the section lists technologies used to make the website
|
||||
|
||||
For more information about `humans.txt`, please see: http://humanstxt.org/
|
||||
|
||||
|
||||
## browserconfig.xml
|
||||
|
||||
The `browserconfig.xml` file is used to customize the tile displayed when users
|
||||
pin your site to the Windows 8.1 start screen. In there you can define custom
|
||||
tile colors, custom images or even [live tiles](https://msdn.microsoft.com/library/dn455106.aspx#CreatingLiveTiles).
|
||||
|
||||
By default, the file points to 2 placeholder tile images:
|
||||
|
||||
* `tile.png` (558x558px): used for `Small`, `Medium` and `Large` tiles.
|
||||
This image resizes automatically when necessary.
|
||||
* `tile-wide.png` (558x270px): user for `Wide` tiles.
|
||||
|
||||
Notice that IE11 uses the same images when adding a site to the `favorites`.
|
||||
|
||||
For more in-depth information about the `browserconfig.xml` file, please
|
||||
see [MSDN](https://msdn.microsoft.com/library/dn320426.aspx).
|
||||
130
src/doc/usage.md
130
src/doc/usage.md
@@ -1,130 +0,0 @@
|
||||
[HTML5 Boilerplate homepage](https://html5boilerplate.com/) | [Documentation
|
||||
table of contents](TOC.md)
|
||||
|
||||
# Usage
|
||||
|
||||
The most basic usage of HTML5 Boilerplate is to create a static site or simple
|
||||
app. Once you've downloaded or cloned the project, that process looks something
|
||||
like this:
|
||||
|
||||
1. Set up the basic structure of the site.
|
||||
2. Add some content, style, and functionality.
|
||||
3. Run your site locally to see how it looks.
|
||||
4. Deploy your site.
|
||||
|
||||
Cool, right? _It is_. That said, the smart defaults, baseline elements, default
|
||||
attribute values and various other utilities that HTML5 Boilerplate offers can
|
||||
serve as the foundation for whatever you're interested in building.
|
||||
|
||||
Even the basic use-case of a simple static site can be enhanced by manipulating
|
||||
the code through an automated build process. Moving up in complexity HTML5
|
||||
Boilerplate can be integrated with whatever front-end framework, CMS or
|
||||
e-commerce platform you're working with. Mix-and-match to your heart's content.
|
||||
Use what you need (toss it in a blender if you need to) and discard the rest.
|
||||
HTML5 Boilerplate is a starting point, not a destination.
|
||||
|
||||
## Basic structure
|
||||
|
||||
A basic HTML5 Boilerplate site initially looks something like this:
|
||||
|
||||
```
|
||||
.
|
||||
├── css
|
||||
│ ├── main.css
|
||||
│ └── normalize.css
|
||||
├── doc
|
||||
├── img
|
||||
├── js
|
||||
│ ├── main.js
|
||||
│ ├── plugins.js
|
||||
│ └── vendor
|
||||
│ ├── jquery.min.js
|
||||
│ └── modernizr.min.js
|
||||
├── .editorconfig
|
||||
├── .htaccess
|
||||
├── 404.html
|
||||
├── browserconfig.xml
|
||||
├── favicon.ico
|
||||
├── humans.txt
|
||||
├── icon.png
|
||||
├── index.html
|
||||
├── robots.txt
|
||||
├── site.webmanifest
|
||||
├── tile.png
|
||||
└── tile-wide.png
|
||||
```
|
||||
|
||||
What follows is a general overview of each major part and how to use them.
|
||||
|
||||
### css
|
||||
|
||||
This directory should contain all your project's CSS files. It includes some
|
||||
initial CSS to help get you started from a solid foundation. [About the
|
||||
CSS](css.md).
|
||||
|
||||
### doc
|
||||
|
||||
This directory contains all the HTML5 Boilerplate documentation. You can use it
|
||||
as the location and basis for your own project's documentation.
|
||||
|
||||
### js
|
||||
|
||||
This directory should contain all your project's JS files. Libraries, plugins,
|
||||
and custom code can all be included here. It includes some initial JS to help
|
||||
get you started. [About the JavaScript](js.md).
|
||||
|
||||
### .htaccess
|
||||
|
||||
The default web server configs are for Apache. For more information, please
|
||||
refer to the [Apache Server Configs
|
||||
repository](https://github.com/h5bp/server-configs-apache).
|
||||
|
||||
Host your site on a server other than Apache? You're likely to find the
|
||||
corresponding server configs project listed in our [Server Configs
|
||||
](https://github.com/h5bp/server-configs/blob/master/README.md) repository.
|
||||
|
||||
### 404.html
|
||||
|
||||
A helpful custom 404 to get you started.
|
||||
|
||||
### browserconfig.xml
|
||||
|
||||
This file contains all settings regarding custom tiles for IE11 and Edge.
|
||||
|
||||
For more info on this topic, please refer to
|
||||
[MSDN](https://msdn.microsoft.com/library/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.
|
||||
|
||||
### 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).
|
||||
@@ -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
|
||||
1
src/icon.svg
Normal file
1
src/icon.svg
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 |
@@ -1,40 +1,33 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<html lang="">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<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="">
|
||||
|
||||
<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">
|
||||
|
||||
<link rel="manifest" href="site.webmanifest">
|
||||
<link rel="apple-touch-icon" href="icon.png">
|
||||
<!-- Place favicon.ico in the root directory -->
|
||||
|
||||
<link rel="stylesheet" href="css/normalize.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
<meta name="theme-color" content="#fafafa">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--[if lte IE 9]>
|
||||
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
|
||||
<![endif]-->
|
||||
|
||||
<!-- Add your site or application content here -->
|
||||
<p>Hello world! This is HTML5 Boilerplate.</p>
|
||||
<script src="js/vendor/modernizr-{{MODERNIZR_VERSION}}.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-{{JQUERY_VERSION}}.min.js" integrity="{{JQUERY_SRI_HASH}}" crossorigin="anonymous"></script>
|
||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-{{JQUERY_VERSION}}.min.js"><\/script>')</script>
|
||||
<script src="js/plugins.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
<script src="js/app.js"></script>
|
||||
|
||||
<!-- Google Analytics: change UA-XXXXX-Y to be your site's ID. -->
|
||||
<script>
|
||||
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
|
||||
ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview')
|
||||
</script>
|
||||
<script src="https://www.google-analytics.com/analytics.js" async defer></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
0
src/js/app.js
Normal file
0
src/js/app.js
Normal file
@@ -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.
|
||||
0
src/js/vendor/.gitkeep
vendored
Normal file
0
src/js/vendor/.gitkeep
vendored
Normal file
24
src/package.json
Normal file
24
src/package.json
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"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user