hexo-theme-linen 1.0.54 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/languages/en.yml +5 -0
- package/languages/zh-CN.yml +5 -0
- package/layout/archive.ejs +22 -2
- package/layout/category.ejs +30 -3
- package/layout/partials/header.ejs +7 -2
- package/layout/partials/post-item.ejs +1 -1
- package/layout/partials/taxonomy-header.ejs +31 -0
- package/layout/partials/taxonomy-sidebar.ejs +56 -0
- package/layout/series.ejs +216 -75
- package/layout/tag.ejs +41 -3
- package/package.json +1 -1
- package/scripts/emoji.js +124 -0
- package/scripts/helpers/tools.js +16 -0
- package/scripts/index.js +1 -0
- package/source/linen-theme/css/_mediaquery.scss +21 -0
- package/source/linen-theme/css/linen.scss +367 -36
- package/source/linen-theme/css/vars.scss +1 -2
- package/source/linen-theme/img/emoji/1f004.svg +7 -0
- package/source/linen-theme/img/emoji/1f0cf.svg +11 -0
- package/source/linen-theme/img/emoji/1f192.svg +7 -0
- package/source/linen-theme/img/emoji/1f193.svg +7 -0
- package/source/linen-theme/img/emoji/1f195.svg +6 -0
- package/source/linen-theme/img/emoji/1f197.svg +5 -0
- package/source/linen-theme/img/emoji/1f199.svg +7 -0
- package/source/linen-theme/img/emoji/1f300.svg +3 -0
- package/source/linen-theme/img/emoji/1f303.svg +19 -0
- package/source/linen-theme/img/emoji/1f304.svg +8 -0
- package/source/linen-theme/img/emoji/1f305.svg +8 -0
- package/source/linen-theme/img/emoji/1f308.svg +8 -0
- package/source/linen-theme/img/emoji/1f309.svg +8 -0
- package/source/linen-theme/img/emoji/1f30a.svg +9 -0
- package/source/linen-theme/img/emoji/1f30b.svg +9 -0
- package/source/linen-theme/img/emoji/1f30c.svg +8 -0
- package/source/linen-theme/img/emoji/1f30d.svg +4 -0
- package/source/linen-theme/img/emoji/1f30e.svg +4 -0
- package/source/linen-theme/img/emoji/1f30f.svg +4 -0
- package/source/linen-theme/img/emoji/1f315.svg +9 -0
- package/source/linen-theme/img/emoji/1f319.svg +4 -0
- package/source/linen-theme/img/emoji/1f31f.svg +8 -0
- package/source/linen-theme/img/emoji/1f324.svg +6 -0
- package/source/linen-theme/img/emoji/1f327.svg +7 -0
- package/source/linen-theme/img/emoji/1f328.svg +6 -0
- package/source/linen-theme/img/emoji/1f329.svg +4 -0
- package/source/linen-theme/img/emoji/1f32a.svg +10 -0
- package/source/linen-theme/img/emoji/1f32b.svg +8 -0
- package/source/linen-theme/img/emoji/1f32c.svg +6 -0
- package/source/linen-theme/img/emoji/1f331.svg +4 -0
- package/source/linen-theme/img/emoji/1f332.svg +4 -0
- package/source/linen-theme/img/emoji/1f333.svg +4 -0
- package/source/linen-theme/img/emoji/1f334.svg +8 -0
- package/source/linen-theme/img/emoji/1f335.svg +19 -0
- package/source/linen-theme/img/emoji/1f337.svg +5 -0
- package/source/linen-theme/img/emoji/1f338.svg +4 -0
- package/source/linen-theme/img/emoji/1f33a.svg +12 -0
- package/source/linen-theme/img/emoji/1f33b.svg +6 -0
- package/source/linen-theme/img/emoji/1f33c.svg +5 -0
- package/source/linen-theme/img/emoji/1f340.svg +4 -0
- package/source/linen-theme/img/emoji/1f341.svg +4 -0
- package/source/linen-theme/img/emoji/1f342.svg +8 -0
- package/source/linen-theme/img/emoji/1f343.svg +9 -0
- package/source/linen-theme/img/emoji/1f345.svg +7 -0
- package/source/linen-theme/img/emoji/1f347.svg +10 -0
- package/source/linen-theme/img/emoji/1f349.svg +10 -0
- package/source/linen-theme/img/emoji/1f34a.svg +4 -0
- package/source/linen-theme/img/emoji/1f34b.svg +4 -0
- package/source/linen-theme/img/emoji/1f34c.svg +9 -0
- package/source/linen-theme/img/emoji/1f34d.svg +16 -0
- package/source/linen-theme/img/emoji/1f34e.svg +4 -0
- package/source/linen-theme/img/emoji/1f350.svg +4 -0
- package/source/linen-theme/img/emoji/1f351.svg +6 -0
- package/source/linen-theme/img/emoji/1f352.svg +4 -0
- package/source/linen-theme/img/emoji/1f353.svg +11 -0
- package/source/linen-theme/img/emoji/1f354.svg +13 -0
- package/source/linen-theme/img/emoji/1f355.svg +7 -0
- package/source/linen-theme/img/emoji/1f357.svg +9 -0
- package/source/linen-theme/img/emoji/1f358.svg +13 -0
- package/source/linen-theme/img/emoji/1f35a.svg +16 -0
- package/source/linen-theme/img/emoji/1f35c.svg +9 -0
- package/source/linen-theme/img/emoji/1f35d.svg +12 -0
- package/source/linen-theme/img/emoji/1f35e.svg +20 -0
- package/source/linen-theme/img/emoji/1f35f.svg +10 -0
- package/source/linen-theme/img/emoji/1f361.svg +7 -0
- package/source/linen-theme/img/emoji/1f362.svg +14 -0
- package/source/linen-theme/img/emoji/1f363.svg +14 -0
- package/source/linen-theme/img/emoji/1f366.svg +6 -0
- package/source/linen-theme/img/emoji/1f369.svg +15 -0
- package/source/linen-theme/img/emoji/1f36b.svg +8 -0
- package/source/linen-theme/img/emoji/1f36c.svg +8 -0
- package/source/linen-theme/img/emoji/1f36d.svg +15 -0
- package/source/linen-theme/img/emoji/1f370.svg +6 -0
- package/source/linen-theme/img/emoji/1f371.svg +18 -0
- package/source/linen-theme/img/emoji/1f372.svg +14 -0
- package/source/linen-theme/img/emoji/1f375.svg +9 -0
- package/source/linen-theme/img/emoji/1f377.svg +6 -0
- package/source/linen-theme/img/emoji/1f378.svg +8 -0
- package/source/linen-theme/img/emoji/1f379.svg +12 -0
- package/source/linen-theme/img/emoji/1f37a.svg +16 -0
- package/source/linen-theme/img/emoji/1f37b.svg +25 -0
- package/source/linen-theme/img/emoji/1f37e.svg +11 -0
- package/source/linen-theme/img/emoji/1f37f.svg +8 -0
- package/source/linen-theme/img/emoji/1f381.svg +6 -0
- package/source/linen-theme/img/emoji/1f382.svg +11 -0
- package/source/linen-theme/img/emoji/1f383.svg +7 -0
- package/source/linen-theme/img/emoji/1f384.svg +11 -0
- package/source/linen-theme/img/emoji/1f386.svg +26 -0
- package/source/linen-theme/img/emoji/1f387.svg +20 -0
- package/source/linen-theme/img/emoji/1f388.svg +7 -0
- package/source/linen-theme/img/emoji/1f389.svg +15 -0
- package/source/linen-theme/img/emoji/1f38a.svg +23 -0
- package/source/linen-theme/img/emoji/1f392.svg +8 -0
- package/source/linen-theme/img/emoji/1f393.svg +5 -0
- package/source/linen-theme/img/emoji/1f39e.svg +4 -0
- package/source/linen-theme/img/emoji/1f3a1.svg +7 -0
- package/source/linen-theme/img/emoji/1f3a2.svg +7 -0
- package/source/linen-theme/img/emoji/1f3a4.svg +5 -0
- package/source/linen-theme/img/emoji/1f3a5.svg +7 -0
- package/source/linen-theme/img/emoji/1f3a7.svg +7 -0
- package/source/linen-theme/img/emoji/1f3a8.svg +7 -0
- package/source/linen-theme/img/emoji/1f3a9.svg +5 -0
- package/source/linen-theme/img/emoji/1f3ac.svg +13 -0
- package/source/linen-theme/img/emoji/1f3af.svg +8 -0
- package/source/linen-theme/img/emoji/1f3b5.svg +3 -0
- package/source/linen-theme/img/emoji/1f3b6.svg +5 -0
- package/source/linen-theme/img/emoji/1f3b8.svg +9 -0
- package/source/linen-theme/img/emoji/1f3bb.svg +6 -0
- package/source/linen-theme/img/emoji/1f3be.svg +8 -0
- package/source/linen-theme/img/emoji/1f3bf.svg +7 -0
- package/source/linen-theme/img/emoji/1f3c0.svg +4 -0
- package/source/linen-theme/img/emoji/1f3c1.svg +5 -0
- package/source/linen-theme/img/emoji/1f3c2.svg +16 -0
- package/source/linen-theme/img/emoji/1f3c3.svg +20 -0
- package/source/linen-theme/img/emoji/1f3c6.svg +8 -0
- package/source/linen-theme/img/emoji/1f3ca.svg +18 -0
- package/source/linen-theme/img/emoji/1f3cd.svg +12 -0
- package/source/linen-theme/img/emoji/1f3d3.svg +7 -0
- package/source/linen-theme/img/emoji/1f3d4.svg +8 -0
- package/source/linen-theme/img/emoji/1f3d5.svg +12 -0
- package/source/linen-theme/img/emoji/1f3d6.svg +8 -0
- package/source/linen-theme/img/emoji/1f3db.svg +5 -0
- package/source/linen-theme/img/emoji/1f3dc.svg +10 -0
- package/source/linen-theme/img/emoji/1f3dd.svg +8 -0
- package/source/linen-theme/img/emoji/1f3de.svg +9 -0
- package/source/linen-theme/img/emoji/1f3df.svg +9 -0
- package/source/linen-theme/img/emoji/1f3e0.svg +9 -0
- package/source/linen-theme/img/emoji/1f3e1.svg +12 -0
- package/source/linen-theme/img/emoji/1f3e2.svg +8 -0
- package/source/linen-theme/img/emoji/1f3e5.svg +11 -0
- package/source/linen-theme/img/emoji/1f3e8.svg +22 -0
- package/source/linen-theme/img/emoji/1f3ea.svg +11 -0
- package/source/linen-theme/img/emoji/1f3eb.svg +10 -0
- package/source/linen-theme/img/emoji/1f3ec.svg +10 -0
- package/source/linen-theme/img/emoji/1f3ee.svg +10 -0
- package/source/linen-theme/img/emoji/1f3f0.svg +7 -0
- package/source/linen-theme/img/emoji/1f3f3-200d-1f308.svg +8 -0
- package/source/linen-theme/img/emoji/1f3f3.svg +4 -0
- package/source/linen-theme/img/emoji/1f3f4.svg +4 -0
- package/source/linen-theme/img/emoji/1f3f7.svg +6 -0
- package/source/linen-theme/img/emoji/1f3f8.svg +9 -0
- package/source/linen-theme/img/emoji/1f40c.svg +9 -0
- package/source/linen-theme/img/emoji/1f40d.svg +12 -0
- package/source/linen-theme/img/emoji/1f414.svg +9 -0
- package/source/linen-theme/img/emoji/1f419.svg +12 -0
- package/source/linen-theme/img/emoji/1f41b.svg +12 -0
- package/source/linen-theme/img/emoji/1f41d.svg +15 -0
- package/source/linen-theme/img/emoji/1f41e.svg +15 -0
- package/source/linen-theme/img/emoji/1f41f.svg +5 -0
- package/source/linen-theme/img/emoji/1f422.svg +7 -0
- package/source/linen-theme/img/emoji/1f426.svg +6 -0
- package/source/linen-theme/img/emoji/1f427.svg +8 -0
- package/source/linen-theme/img/emoji/1f428.svg +8 -0
- package/source/linen-theme/img/emoji/1f42c.svg +6 -0
- package/source/linen-theme/img/emoji/1f42d.svg +12 -0
- package/source/linen-theme/img/emoji/1f42e.svg +14 -0
- package/source/linen-theme/img/emoji/1f42f.svg +18 -0
- package/source/linen-theme/img/emoji/1f430.svg +14 -0
- package/source/linen-theme/img/emoji/1f431.svg +13 -0
- package/source/linen-theme/img/emoji/1f433.svg +9 -0
- package/source/linen-theme/img/emoji/1f434.svg +12 -0
- package/source/linen-theme/img/emoji/1f435.svg +12 -0
- package/source/linen-theme/img/emoji/1f436.svg +11 -0
- package/source/linen-theme/img/emoji/1f437.svg +10 -0
- package/source/linen-theme/img/emoji/1f438.svg +10 -0
- package/source/linen-theme/img/emoji/1f439.svg +9 -0
- package/source/linen-theme/img/emoji/1f43a.svg +10 -0
- package/source/linen-theme/img/emoji/1f43b.svg +12 -0
- package/source/linen-theme/img/emoji/1f43c.svg +10 -0
- package/source/linen-theme/img/emoji/1f440.svg +10 -0
- package/source/linen-theme/img/emoji/1f441.svg +7 -0
- package/source/linen-theme/img/emoji/1f446.svg +7 -0
- package/source/linen-theme/img/emoji/1f447.svg +6 -0
- package/source/linen-theme/img/emoji/1f448.svg +6 -0
- package/source/linen-theme/img/emoji/1f449.svg +6 -0
- package/source/linen-theme/img/emoji/1f44a.svg +8 -0
- package/source/linen-theme/img/emoji/1f44b.svg +11 -0
- package/source/linen-theme/img/emoji/1f44c.svg +6 -0
- package/source/linen-theme/img/emoji/1f44d.svg +4 -0
- package/source/linen-theme/img/emoji/1f44e.svg +4 -0
- package/source/linen-theme/img/emoji/1f44f.svg +17 -0
- package/source/linen-theme/img/emoji/1f450.svg +10 -0
- package/source/linen-theme/img/emoji/1f451.svg +7 -0
- package/source/linen-theme/img/emoji/1f453.svg +5 -0
- package/source/linen-theme/img/emoji/1f464.svg +6 -0
- package/source/linen-theme/img/emoji/1f465.svg +4 -0
- package/source/linen-theme/img/emoji/1f468-200d-1f4bb.svg +22 -0
- package/source/linen-theme/img/emoji/1f469-200d-1f4bb.svg +22 -0
- package/source/linen-theme/img/emoji/1f47b.svg +8 -0
- package/source/linen-theme/img/emoji/1f47d.svg +8 -0
- package/source/linen-theme/img/emoji/1f47e.svg +9 -0
- package/source/linen-theme/img/emoji/1f47f.svg +10 -0
- package/source/linen-theme/img/emoji/1f480.svg +7 -0
- package/source/linen-theme/img/emoji/1f483.svg +24 -0
- package/source/linen-theme/img/emoji/1f485.svg +12 -0
- package/source/linen-theme/img/emoji/1f48a.svg +5 -0
- package/source/linen-theme/img/emoji/1f48b.svg +3 -0
- package/source/linen-theme/img/emoji/1f48c.svg +5 -0
- package/source/linen-theme/img/emoji/1f48e.svg +8 -0
- package/source/linen-theme/img/emoji/1f493.svg +7 -0
- package/source/linen-theme/img/emoji/1f494.svg +4 -0
- package/source/linen-theme/img/emoji/1f495.svg +4 -0
- package/source/linen-theme/img/emoji/1f496.svg +5 -0
- package/source/linen-theme/img/emoji/1f497.svg +5 -0
- package/source/linen-theme/img/emoji/1f498.svg +8 -0
- package/source/linen-theme/img/emoji/1f499.svg +6 -0
- package/source/linen-theme/img/emoji/1f49a.svg +6 -0
- package/source/linen-theme/img/emoji/1f49b.svg +6 -0
- package/source/linen-theme/img/emoji/1f49c.svg +6 -0
- package/source/linen-theme/img/emoji/1f49d.svg +13 -0
- package/source/linen-theme/img/emoji/1f49e.svg +3 -0
- package/source/linen-theme/img/emoji/1f49f.svg +4 -0
- package/source/linen-theme/img/emoji/1f4a0.svg +7 -0
- package/source/linen-theme/img/emoji/1f4a1.svg +7 -0
- package/source/linen-theme/img/emoji/1f4a2.svg +6 -0
- package/source/linen-theme/img/emoji/1f4a4.svg +5 -0
- package/source/linen-theme/img/emoji/1f4a5.svg +4 -0
- package/source/linen-theme/img/emoji/1f4a6.svg +8 -0
- package/source/linen-theme/img/emoji/1f4a7.svg +3 -0
- package/source/linen-theme/img/emoji/1f4a8.svg +11 -0
- package/source/linen-theme/img/emoji/1f4a9.svg +6 -0
- package/source/linen-theme/img/emoji/1f4aa.svg +8 -0
- package/source/linen-theme/img/emoji/1f4ab.svg +4 -0
- package/source/linen-theme/img/emoji/1f4ac.svg +4 -0
- package/source/linen-theme/img/emoji/1f4ad.svg +4 -0
- package/source/linen-theme/img/emoji/1f4af.svg +3 -0
- package/source/linen-theme/img/emoji/1f4b0.svg +4 -0
- package/source/linen-theme/img/emoji/1f4b3.svg +7 -0
- package/source/linen-theme/img/emoji/1f4bb.svg +8 -0
- package/source/linen-theme/img/emoji/1f4be.svg +8 -0
- package/source/linen-theme/img/emoji/1f4bf.svg +4 -0
- package/source/linen-theme/img/emoji/1f4c1.svg +4 -0
- package/source/linen-theme/img/emoji/1f4c2.svg +4 -0
- package/source/linen-theme/img/emoji/1f4c4.svg +6 -0
- package/source/linen-theme/img/emoji/1f4c5.svg +14 -0
- package/source/linen-theme/img/emoji/1f4c6.svg +18 -0
- package/source/linen-theme/img/emoji/1f4c8.svg +5 -0
- package/source/linen-theme/img/emoji/1f4c9.svg +5 -0
- package/source/linen-theme/img/emoji/1f4ca.svg +7 -0
- package/source/linen-theme/img/emoji/1f4cc.svg +6 -0
- package/source/linen-theme/img/emoji/1f4cd.svg +5 -0
- package/source/linen-theme/img/emoji/1f4ce.svg +10 -0
- package/source/linen-theme/img/emoji/1f4d4.svg +9 -0
- package/source/linen-theme/img/emoji/1f4d5.svg +5 -0
- package/source/linen-theme/img/emoji/1f4d6.svg +8 -0
- package/source/linen-theme/img/emoji/1f4d7.svg +6 -0
- package/source/linen-theme/img/emoji/1f4d8.svg +6 -0
- package/source/linen-theme/img/emoji/1f4d9.svg +6 -0
- package/source/linen-theme/img/emoji/1f4da.svg +14 -0
- package/source/linen-theme/img/emoji/1f4dd.svg +11 -0
- package/source/linen-theme/img/emoji/1f4e1.svg +12 -0
- package/source/linen-theme/img/emoji/1f4e2.svg +6 -0
- package/source/linen-theme/img/emoji/1f4e3.svg +4 -0
- package/source/linen-theme/img/emoji/1f4e4.svg +6 -0
- package/source/linen-theme/img/emoji/1f4e5.svg +6 -0
- package/source/linen-theme/img/emoji/1f4e6.svg +8 -0
- package/source/linen-theme/img/emoji/1f4e7.svg +9 -0
- package/source/linen-theme/img/emoji/1f4e8.svg +17 -0
- package/source/linen-theme/img/emoji/1f4e9.svg +8 -0
- package/source/linen-theme/img/emoji/1f4eb.svg +8 -0
- package/source/linen-theme/img/emoji/1f4ee.svg +11 -0
- package/source/linen-theme/img/emoji/1f4f0.svg +5 -0
- package/source/linen-theme/img/emoji/1f4f1.svg +8 -0
- package/source/linen-theme/img/emoji/1f4f7.svg +10 -0
- package/source/linen-theme/img/emoji/1f4f8.svg +10 -0
- package/source/linen-theme/img/emoji/1f500.svg +6 -0
- package/source/linen-theme/img/emoji/1f501.svg +5 -0
- package/source/linen-theme/img/emoji/1f504.svg +5 -0
- package/source/linen-theme/img/emoji/1f505.svg +11 -0
- package/source/linen-theme/img/emoji/1f506.svg +11 -0
- package/source/linen-theme/img/emoji/1f507.svg +5 -0
- package/source/linen-theme/img/emoji/1f508.svg +4 -0
- package/source/linen-theme/img/emoji/1f509.svg +5 -0
- package/source/linen-theme/img/emoji/1f50a.svg +5 -0
- package/source/linen-theme/img/emoji/1f50b.svg +5 -0
- package/source/linen-theme/img/emoji/1f50c.svg +5 -0
- package/source/linen-theme/img/emoji/1f50d.svg +5 -0
- package/source/linen-theme/img/emoji/1f50e.svg +5 -0
- package/source/linen-theme/img/emoji/1f511.svg +3 -0
- package/source/linen-theme/img/emoji/1f512.svg +5 -0
- package/source/linen-theme/img/emoji/1f513.svg +5 -0
- package/source/linen-theme/img/emoji/1f514.svg +5 -0
- package/source/linen-theme/img/emoji/1f515.svg +6 -0
- package/source/linen-theme/img/emoji/1f516.svg +5 -0
- package/source/linen-theme/img/emoji/1f517.svg +4 -0
- package/source/linen-theme/img/emoji/1f519.svg +7 -0
- package/source/linen-theme/img/emoji/1f51a.svg +6 -0
- package/source/linen-theme/img/emoji/1f51c.svg +7 -0
- package/source/linen-theme/img/emoji/1f51d.svg +6 -0
- package/source/linen-theme/img/emoji/1f525.svg +4 -0
- package/source/linen-theme/img/emoji/1f526.svg +9 -0
- package/source/linen-theme/img/emoji/1f527.svg +3 -0
- package/source/linen-theme/img/emoji/1f528.svg +5 -0
- package/source/linen-theme/img/emoji/1f529.svg +14 -0
- package/source/linen-theme/img/emoji/1f52c.svg +7 -0
- package/source/linen-theme/img/emoji/1f52d.svg +8 -0
- package/source/linen-theme/img/emoji/1f52e.svg +7 -0
- package/source/linen-theme/img/emoji/1f534.svg +3 -0
- package/source/linen-theme/img/emoji/1f535.svg +3 -0
- package/source/linen-theme/img/emoji/1f536.svg +3 -0
- package/source/linen-theme/img/emoji/1f537.svg +3 -0
- package/source/linen-theme/img/emoji/1f538.svg +3 -0
- package/source/linen-theme/img/emoji/1f539.svg +3 -0
- package/source/linen-theme/img/emoji/1f53b.svg +3 -0
- package/source/linen-theme/img/emoji/1f54a.svg +7 -0
- package/source/linen-theme/img/emoji/1f54c.svg +6 -0
- package/source/linen-theme/img/emoji/1f550.svg +7 -0
- package/source/linen-theme/img/emoji/1f552.svg +7 -0
- package/source/linen-theme/img/emoji/1f555.svg +7 -0
- package/source/linen-theme/img/emoji/1f558.svg +7 -0
- package/source/linen-theme/img/emoji/1f55b.svg +7 -0
- package/source/linen-theme/img/emoji/1f56f.svg +7 -0
- package/source/linen-theme/img/emoji/1f576.svg +5 -0
- package/source/linen-theme/img/emoji/1f578.svg +3 -0
- package/source/linen-theme/img/emoji/1f579.svg +7 -0
- package/source/linen-theme/img/emoji/1f57a.svg +26 -0
- package/source/linen-theme/img/emoji/1f58a.svg +7 -0
- package/source/linen-theme/img/emoji/1f58c.svg +5 -0
- package/source/linen-theme/img/emoji/1f5a4.svg +7 -0
- package/source/linen-theme/img/emoji/1f5a5.svg +7 -0
- package/source/linen-theme/img/emoji/1f5a8.svg +10 -0
- package/source/linen-theme/img/emoji/1f5b1.svg +4 -0
- package/source/linen-theme/img/emoji/1f5c2.svg +8 -0
- package/source/linen-theme/img/emoji/1f5d1.svg +5 -0
- package/source/linen-theme/img/emoji/1f5d2.svg +11 -0
- package/source/linen-theme/img/emoji/1f5e3.svg +6 -0
- package/source/linen-theme/img/emoji/1f5fa.svg +7 -0
- package/source/linen-theme/img/emoji/1f5fb.svg +6 -0
- package/source/linen-theme/img/emoji/1f5fc.svg +9 -0
- package/source/linen-theme/img/emoji/1f5fd.svg +7 -0
- package/source/linen-theme/img/emoji/1f600.svg +9 -0
- package/source/linen-theme/img/emoji/1f601.svg +8 -0
- package/source/linen-theme/img/emoji/1f602.svg +9 -0
- package/source/linen-theme/img/emoji/1f603.svg +9 -0
- package/source/linen-theme/img/emoji/1f604.svg +7 -0
- package/source/linen-theme/img/emoji/1f605.svg +8 -0
- package/source/linen-theme/img/emoji/1f606.svg +7 -0
- package/source/linen-theme/img/emoji/1f607.svg +8 -0
- package/source/linen-theme/img/emoji/1f608.svg +10 -0
- package/source/linen-theme/img/emoji/1f609.svg +9 -0
- package/source/linen-theme/img/emoji/1f60a.svg +8 -0
- package/source/linen-theme/img/emoji/1f60b.svg +7 -0
- package/source/linen-theme/img/emoji/1f60c.svg +8 -0
- package/source/linen-theme/img/emoji/1f60d.svg +7 -0
- package/source/linen-theme/img/emoji/1f60e.svg +9 -0
- package/source/linen-theme/img/emoji/1f60f.svg +10 -0
- package/source/linen-theme/img/emoji/1f610.svg +8 -0
- package/source/linen-theme/img/emoji/1f611.svg +6 -0
- package/source/linen-theme/img/emoji/1f612.svg +10 -0
- package/source/linen-theme/img/emoji/1f613.svg +7 -0
- package/source/linen-theme/img/emoji/1f614.svg +8 -0
- package/source/linen-theme/img/emoji/1f615.svg +8 -0
- package/source/linen-theme/img/emoji/1f616.svg +6 -0
- package/source/linen-theme/img/emoji/1f617.svg +8 -0
- package/source/linen-theme/img/emoji/1f618.svg +10 -0
- package/source/linen-theme/img/emoji/1f619.svg +6 -0
- package/source/linen-theme/img/emoji/1f61a.svg +10 -0
- package/source/linen-theme/img/emoji/1f61b.svg +10 -0
- package/source/linen-theme/img/emoji/1f61c.svg +11 -0
- package/source/linen-theme/img/emoji/1f61d.svg +8 -0
- package/source/linen-theme/img/emoji/1f61e.svg +6 -0
- package/source/linen-theme/img/emoji/1f61f.svg +10 -0
- package/source/linen-theme/img/emoji/1f620.svg +10 -0
- package/source/linen-theme/img/emoji/1f621.svg +10 -0
- package/source/linen-theme/img/emoji/1f622.svg +11 -0
- package/source/linen-theme/img/emoji/1f623.svg +8 -0
- package/source/linen-theme/img/emoji/1f624.svg +20 -0
- package/source/linen-theme/img/emoji/1f625.svg +11 -0
- package/source/linen-theme/img/emoji/1f626.svg +8 -0
- package/source/linen-theme/img/emoji/1f627.svg +10 -0
- package/source/linen-theme/img/emoji/1f628.svg +11 -0
- package/source/linen-theme/img/emoji/1f629.svg +9 -0
- package/source/linen-theme/img/emoji/1f62a.svg +9 -0
- package/source/linen-theme/img/emoji/1f62b.svg +6 -0
- package/source/linen-theme/img/emoji/1f62c.svg +10 -0
- package/source/linen-theme/img/emoji/1f62d.svg +8 -0
- package/source/linen-theme/img/emoji/1f62e-200d-1f4a8.svg +20 -0
- package/source/linen-theme/img/emoji/1f62e.svg +8 -0
- package/source/linen-theme/img/emoji/1f62f.svg +10 -0
- package/source/linen-theme/img/emoji/1f630.svg +12 -0
- package/source/linen-theme/img/emoji/1f631.svg +9 -0
- package/source/linen-theme/img/emoji/1f632.svg +11 -0
- package/source/linen-theme/img/emoji/1f633.svg +12 -0
- package/source/linen-theme/img/emoji/1f634.svg +9 -0
- package/source/linen-theme/img/emoji/1f635-200d-1f4ab.svg +6 -0
- package/source/linen-theme/img/emoji/1f635.svg +6 -0
- package/source/linen-theme/img/emoji/1f636-200d-1f32b.svg +18 -0
- package/source/linen-theme/img/emoji/1f636.svg +7 -0
- package/source/linen-theme/img/emoji/1f637.svg +10 -0
- package/source/linen-theme/img/emoji/1f641.svg +11 -0
- package/source/linen-theme/img/emoji/1f642.svg +8 -0
- package/source/linen-theme/img/emoji/1f643.svg +8 -0
- package/source/linen-theme/img/emoji/1f644.svg +8 -0
- package/source/linen-theme/img/emoji/1f645.svg +25 -0
- package/source/linen-theme/img/emoji/1f646.svg +34 -0
- package/source/linen-theme/img/emoji/1f647.svg +25 -0
- package/source/linen-theme/img/emoji/1f648.svg +11 -0
- package/source/linen-theme/img/emoji/1f649.svg +16 -0
- package/source/linen-theme/img/emoji/1f64a.svg +13 -0
- package/source/linen-theme/img/emoji/1f64b.svg +22 -0
- package/source/linen-theme/img/emoji/1f64c.svg +15 -0
- package/source/linen-theme/img/emoji/1f64f.svg +10 -0
- package/source/linen-theme/img/emoji/1f680.svg +9 -0
- package/source/linen-theme/img/emoji/1f681.svg +11 -0
- package/source/linen-theme/img/emoji/1f682.svg +11 -0
- package/source/linen-theme/img/emoji/1f684.svg +9 -0
- package/source/linen-theme/img/emoji/1f686.svg +9 -0
- package/source/linen-theme/img/emoji/1f687.svg +9 -0
- package/source/linen-theme/img/emoji/1f689.svg +10 -0
- package/source/linen-theme/img/emoji/1f68a.svg +10 -0
- package/source/linen-theme/img/emoji/1f68c.svg +9 -0
- package/source/linen-theme/img/emoji/1f695.svg +10 -0
- package/source/linen-theme/img/emoji/1f697.svg +10 -0
- package/source/linen-theme/img/emoji/1f6a6.svg +12 -0
- package/source/linen-theme/img/emoji/1f6a7.svg +6 -0
- package/source/linen-theme/img/emoji/1f6a9.svg +4 -0
- package/source/linen-theme/img/emoji/1f6aa.svg +7 -0
- package/source/linen-theme/img/emoji/1f6ab.svg +4 -0
- package/source/linen-theme/img/emoji/1f6b2.svg +11 -0
- package/source/linen-theme/img/emoji/1f6b4.svg +31 -0
- package/source/linen-theme/img/emoji/1f6b6.svg +20 -0
- package/source/linen-theme/img/emoji/1f6cb.svg +11 -0
- package/source/linen-theme/img/emoji/1f6cf.svg +8 -0
- package/source/linen-theme/img/emoji/1f6d1.svg +4 -0
- package/source/linen-theme/img/emoji/1f6d2.svg +7 -0
- package/source/linen-theme/img/emoji/1f6d5.svg +9 -0
- package/source/linen-theme/img/emoji/1f6e0.svg +6 -0
- package/source/linen-theme/img/emoji/1f6f0.svg +7 -0
- package/source/linen-theme/img/emoji/1f6f3.svg +9 -0
- package/source/linen-theme/img/emoji/1f6f4.svg +4 -0
- package/source/linen-theme/img/emoji/1f6f5.svg +9 -0
- package/source/linen-theme/img/emoji/1f6f8.svg +8 -0
- package/source/linen-theme/img/emoji/1f7e0.svg +3 -0
- package/source/linen-theme/img/emoji/1f7e1.svg +3 -0
- package/source/linen-theme/img/emoji/1f7e2.svg +3 -0
- package/source/linen-theme/img/emoji/1f7e3.svg +3 -0
- package/source/linen-theme/img/emoji/1f90c.svg +5 -0
- package/source/linen-theme/img/emoji/1f90d.svg +7 -0
- package/source/linen-theme/img/emoji/1f90e.svg +6 -0
- package/source/linen-theme/img/emoji/1f90f.svg +5 -0
- package/source/linen-theme/img/emoji/1f910.svg +8 -0
- package/source/linen-theme/img/emoji/1f911.svg +9 -0
- package/source/linen-theme/img/emoji/1f912.svg +16 -0
- package/source/linen-theme/img/emoji/1f913.svg +10 -0
- package/source/linen-theme/img/emoji/1f914.svg +12 -0
- package/source/linen-theme/img/emoji/1f915.svg +11 -0
- package/source/linen-theme/img/emoji/1f916.svg +10 -0
- package/source/linen-theme/img/emoji/1f917.svg +10 -0
- package/source/linen-theme/img/emoji/1f918.svg +5 -0
- package/source/linen-theme/img/emoji/1f919.svg +4 -0
- package/source/linen-theme/img/emoji/1f91b.svg +4 -0
- package/source/linen-theme/img/emoji/1f91c.svg +4 -0
- package/source/linen-theme/img/emoji/1f91d.svg +15 -0
- package/source/linen-theme/img/emoji/1f91e.svg +6 -0
- package/source/linen-theme/img/emoji/1f91f.svg +4 -0
- package/source/linen-theme/img/emoji/1f920.svg +12 -0
- package/source/linen-theme/img/emoji/1f921.svg +14 -0
- package/source/linen-theme/img/emoji/1f922.svg +10 -0
- package/source/linen-theme/img/emoji/1f923.svg +9 -0
- package/source/linen-theme/img/emoji/1f924.svg +9 -0
- package/source/linen-theme/img/emoji/1f926.svg +15 -0
- package/source/linen-theme/img/emoji/1f927.svg +9 -0
- package/source/linen-theme/img/emoji/1f928.svg +10 -0
- package/source/linen-theme/img/emoji/1f929.svg +7 -0
- package/source/linen-theme/img/emoji/1f92a.svg +10 -0
- package/source/linen-theme/img/emoji/1f92b.svg +9 -0
- package/source/linen-theme/img/emoji/1f92c.svg +16 -0
- package/source/linen-theme/img/emoji/1f92d.svg +8 -0
- package/source/linen-theme/img/emoji/1f92e.svg +10 -0
- package/source/linen-theme/img/emoji/1f92f.svg +18 -0
- package/source/linen-theme/img/emoji/1f932.svg +12 -0
- package/source/linen-theme/img/emoji/1f937.svg +24 -0
- package/source/linen-theme/img/emoji/1f941.svg +9 -0
- package/source/linen-theme/img/emoji/1f942.svg +9 -0
- package/source/linen-theme/img/emoji/1f943.svg +7 -0
- package/source/linen-theme/img/emoji/1f947.svg +7 -0
- package/source/linen-theme/img/emoji/1f948.svg +7 -0
- package/source/linen-theme/img/emoji/1f949.svg +7 -0
- package/source/linen-theme/img/emoji/1f950.svg +8 -0
- package/source/linen-theme/img/emoji/1f951.svg +6 -0
- package/source/linen-theme/img/emoji/1f957.svg +13 -0
- package/source/linen-theme/img/emoji/1f958.svg +11 -0
- package/source/linen-theme/img/emoji/1f95b.svg +5 -0
- package/source/linen-theme/img/emoji/1f95f.svg +9 -0
- package/source/linen-theme/img/emoji/1f965.svg +6 -0
- package/source/linen-theme/img/emoji/1f96d.svg +4 -0
- package/source/linen-theme/img/emoji/1f970.svg +9 -0
- package/source/linen-theme/img/emoji/1f971.svg +6 -0
- package/source/linen-theme/img/emoji/1f972.svg +9 -0
- package/source/linen-theme/img/emoji/1f973.svg +15 -0
- package/source/linen-theme/img/emoji/1f974.svg +10 -0
- package/source/linen-theme/img/emoji/1f975.svg +14 -0
- package/source/linen-theme/img/emoji/1f976.svg +12 -0
- package/source/linen-theme/img/emoji/1f978.svg +12 -0
- package/source/linen-theme/img/emoji/1f979.svg +12 -0
- package/source/linen-theme/img/emoji/1f97a.svg +12 -0
- package/source/linen-theme/img/emoji/1f981.svg +11 -0
- package/source/linen-theme/img/emoji/1f984.svg +18 -0
- package/source/linen-theme/img/emoji/1f985.svg +10 -0
- package/source/linen-theme/img/emoji/1f986.svg +8 -0
- package/source/linen-theme/img/emoji/1f988.svg +7 -0
- package/source/linen-theme/img/emoji/1f989.svg +12 -0
- package/source/linen-theme/img/emoji/1f98a.svg +11 -0
- package/source/linen-theme/img/emoji/1f98b.svg +15 -0
- package/source/linen-theme/img/emoji/1f995.svg +6 -0
- package/source/linen-theme/img/emoji/1f996.svg +7 -0
- package/source/linen-theme/img/emoji/1f99a.svg +32 -0
- package/source/linen-theme/img/emoji/1f9a2.svg +6 -0
- package/source/linen-theme/img/emoji/1f9c1.svg +9 -0
- package/source/linen-theme/img/emoji/1f9c3.svg +9 -0
- package/source/linen-theme/img/emoji/1f9cb.svg +13 -0
- package/source/linen-theme/img/emoji/1f9d0.svg +11 -0
- package/source/linen-theme/img/emoji/1f9d1-200d-1f4bb.svg +22 -0
- package/source/linen-theme/img/emoji/1f9d7.svg +30 -0
- package/source/linen-theme/img/emoji/1f9e0.svg +5 -0
- package/source/linen-theme/img/emoji/1f9e1.svg +6 -0
- package/source/linen-theme/img/emoji/1f9e7.svg +8 -0
- package/source/linen-theme/img/emoji/1f9e8.svg +5 -0
- package/source/linen-theme/img/emoji/1f9e9.svg +4 -0
- package/source/linen-theme/img/emoji/1f9ed.svg +9 -0
- package/source/linen-theme/img/emoji/1f9f0.svg +9 -0
- package/source/linen-theme/img/emoji/1f9f2.svg +5 -0
- package/source/linen-theme/img/emoji/1f9f3.svg +7 -0
- package/source/linen-theme/img/emoji/1f9f8.svg +14 -0
- package/source/linen-theme/img/emoji/1fa75.svg +6 -0
- package/source/linen-theme/img/emoji/1fa76.svg +6 -0
- package/source/linen-theme/img/emoji/1fa77.svg +6 -0
- package/source/linen-theme/img/emoji/1fa79.svg +16 -0
- package/source/linen-theme/img/emoji/1fa7a.svg +9 -0
- package/source/linen-theme/img/emoji/1fa84.svg +5 -0
- package/source/linen-theme/img/emoji/1fa9b.svg +6 -0
- package/source/linen-theme/img/emoji/1fa9e.svg +5 -0
- package/source/linen-theme/img/emoji/1fa9f.svg +9 -0
- package/source/linen-theme/img/emoji/1fab2.svg +17 -0
- package/source/linen-theme/img/emoji/1fac2.svg +8 -0
- package/source/linen-theme/img/emoji/1fae0.svg +10 -0
- package/source/linen-theme/img/emoji/1fae1.svg +10 -0
- package/source/linen-theme/img/emoji/1fae2.svg +10 -0
- package/source/linen-theme/img/emoji/1fae3.svg +10 -0
- package/source/linen-theme/img/emoji/1fae4.svg +8 -0
- package/source/linen-theme/img/emoji/1fae5.svg +6 -0
- package/source/linen-theme/img/emoji/1fae8.svg +24 -0
- package/source/linen-theme/img/emoji/1faf0.svg +7 -0
- package/source/linen-theme/img/emoji/1faf5.svg +4 -0
- package/source/linen-theme/img/emoji/1faf6.svg +7 -0
- package/source/linen-theme/img/emoji/203c.svg +6 -0
- package/source/linen-theme/img/emoji/2049.svg +6 -0
- package/source/linen-theme/img/emoji/2139.svg +5 -0
- package/source/linen-theme/img/emoji/2194.svg +4 -0
- package/source/linen-theme/img/emoji/2195.svg +4 -0
- package/source/linen-theme/img/emoji/2197.svg +4 -0
- package/source/linen-theme/img/emoji/2198.svg +4 -0
- package/source/linen-theme/img/emoji/2199.svg +4 -0
- package/source/linen-theme/img/emoji/231a.svg +9 -0
- package/source/linen-theme/img/emoji/231b.svg +6 -0
- package/source/linen-theme/img/emoji/2328.svg +4 -0
- package/source/linen-theme/img/emoji/23e9.svg +4 -0
- package/source/linen-theme/img/emoji/23ea.svg +4 -0
- package/source/linen-theme/img/emoji/23f0.svg +9 -0
- package/source/linen-theme/img/emoji/23f1.svg +8 -0
- package/source/linen-theme/img/emoji/23f3.svg +8 -0
- package/source/linen-theme/img/emoji/23f8.svg +5 -0
- package/source/linen-theme/img/emoji/23f9.svg +4 -0
- package/source/linen-theme/img/emoji/25aa.svg +3 -0
- package/source/linen-theme/img/emoji/25ab.svg +4 -0
- package/source/linen-theme/img/emoji/25b6.svg +4 -0
- package/source/linen-theme/img/emoji/25fb.svg +4 -0
- package/source/linen-theme/img/emoji/25fc.svg +3 -0
- package/source/linen-theme/img/emoji/2600.svg +4 -0
- package/source/linen-theme/img/emoji/2601.svg +4 -0
- package/source/linen-theme/img/emoji/2602.svg +5 -0
- package/source/linen-theme/img/emoji/2603.svg +13 -0
- package/source/linen-theme/img/emoji/2604.svg +11 -0
- package/source/linen-theme/img/emoji/2611.svg +4 -0
- package/source/linen-theme/img/emoji/2614.svg +6 -0
- package/source/linen-theme/img/emoji/2615.svg +8 -0
- package/source/linen-theme/img/emoji/261d.svg +5 -0
- package/source/linen-theme/img/emoji/265f.svg +3 -0
- package/source/linen-theme/img/emoji/267b.svg +8 -0
- package/source/linen-theme/img/emoji/267e.svg +3 -0
- package/source/linen-theme/img/emoji/2696.svg +10 -0
- package/source/linen-theme/img/emoji/2699.svg +5 -0
- package/source/linen-theme/img/emoji/26a0.svg +5 -0
- package/source/linen-theme/img/emoji/26a1.svg +3 -0
- package/source/linen-theme/img/emoji/26aa.svg +4 -0
- package/source/linen-theme/img/emoji/26ab.svg +3 -0
- package/source/linen-theme/img/emoji/26bd.svg +24 -0
- package/source/linen-theme/img/emoji/26be.svg +7 -0
- package/source/linen-theme/img/emoji/26c4.svg +11 -0
- package/source/linen-theme/img/emoji/26c5.svg +6 -0
- package/source/linen-theme/img/emoji/26c8.svg +5 -0
- package/source/linen-theme/img/emoji/26d4.svg +4 -0
- package/source/linen-theme/img/emoji/26e9.svg +5 -0
- package/source/linen-theme/img/emoji/26ea.svg +6 -0
- package/source/linen-theme/img/emoji/26f0.svg +7 -0
- package/source/linen-theme/img/emoji/26f4.svg +18 -0
- package/source/linen-theme/img/emoji/26f5.svg +7 -0
- package/source/linen-theme/img/emoji/26f7.svg +24 -0
- package/source/linen-theme/img/emoji/26fa.svg +8 -0
- package/source/linen-theme/img/emoji/26fd.svg +6 -0
- package/source/linen-theme/img/emoji/2702.svg +6 -0
- package/source/linen-theme/img/emoji/2705.svg +4 -0
- package/source/linen-theme/img/emoji/2708.svg +6 -0
- package/source/linen-theme/img/emoji/2709.svg +7 -0
- package/source/linen-theme/img/emoji/270a.svg +4 -0
- package/source/linen-theme/img/emoji/270b.svg +11 -0
- package/source/linen-theme/img/emoji/270c.svg +7 -0
- package/source/linen-theme/img/emoji/270d.svg +8 -0
- package/source/linen-theme/img/emoji/270f.svg +7 -0
- package/source/linen-theme/img/emoji/2714.svg +3 -0
- package/source/linen-theme/img/emoji/2728.svg +5 -0
- package/source/linen-theme/img/emoji/2733.svg +4 -0
- package/source/linen-theme/img/emoji/2734.svg +4 -0
- package/source/linen-theme/img/emoji/2744.svg +3 -0
- package/source/linen-theme/img/emoji/2747.svg +4 -0
- package/source/linen-theme/img/emoji/274c.svg +3 -0
- package/source/linen-theme/img/emoji/274e.svg +4 -0
- package/source/linen-theme/img/emoji/2753.svg +4 -0
- package/source/linen-theme/img/emoji/2754.svg +4 -0
- package/source/linen-theme/img/emoji/2755.svg +4 -0
- package/source/linen-theme/img/emoji/2757.svg +4 -0
- package/source/linen-theme/img/emoji/2764-200d-1f525.svg +4 -0
- package/source/linen-theme/img/emoji/2764.svg +6 -0
- package/source/linen-theme/img/emoji/2795.svg +3 -0
- package/source/linen-theme/img/emoji/2796.svg +3 -0
- package/source/linen-theme/img/emoji/2797.svg +5 -0
- package/source/linen-theme/img/emoji/27a1.svg +4 -0
- package/source/linen-theme/img/emoji/2b05.svg +4 -0
- package/source/linen-theme/img/emoji/2b06.svg +4 -0
- package/source/linen-theme/img/emoji/2b07.svg +4 -0
- package/source/linen-theme/img/emoji/2b50.svg +3 -0
package/languages/en.yml
CHANGED
package/languages/zh-CN.yml
CHANGED
package/layout/archive.ejs
CHANGED
|
@@ -81,12 +81,32 @@ const archivesList = Object.entries(site.posts.filter(post=>!post?.hide?.archive
|
|
|
81
81
|
|
|
82
82
|
</div>
|
|
83
83
|
<% } else { %>
|
|
84
|
-
|
|
84
|
+
<%
|
|
85
|
+
const archiveTitle = page.year.toString().startsWith('1970') ? '__' : (page.month ? page.month + '/' : '') + page.year;
|
|
86
|
+
const archivePosts = site.posts.filter(post => {
|
|
87
|
+
if (post?.hide?.archive || !post?.date) return false;
|
|
88
|
+
if (post.date.year() !== Number(page.year)) return false;
|
|
89
|
+
if (page.month && post.date.month() + 1 !== Number(page.month)) return false;
|
|
90
|
+
return true;
|
|
91
|
+
});
|
|
92
|
+
%>
|
|
93
|
+
<%-partial('partials/taxonomy-header', {
|
|
94
|
+
type: 'archive',
|
|
95
|
+
title: archiveTitle,
|
|
96
|
+
count: archivePosts.length,
|
|
97
|
+
yearRange: '',
|
|
98
|
+
description: '',
|
|
99
|
+
kindLabel: __('common.archives'),
|
|
100
|
+
kindUrl: url_for('/archives/#archives')
|
|
101
|
+
})%>
|
|
85
102
|
<div class="posts-info-layout">
|
|
86
103
|
<div class="posts-wrap">
|
|
87
104
|
<%-partial('partials/recent-posts', { showHidden: true })%>
|
|
88
105
|
<%-partial('partials/paginator')%>
|
|
89
106
|
</div>
|
|
90
|
-
<div class="info-wrap"
|
|
107
|
+
<div class="info-wrap">
|
|
108
|
+
<%-partial('partials/site-info')%>
|
|
109
|
+
<%-partial('partials/taxonomy-sidebar', { type: 'archive', items: archivesList, current: page.year })%>
|
|
110
|
+
</div>
|
|
91
111
|
</div>
|
|
92
112
|
<% } %>
|
package/layout/category.ejs
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
<%
|
|
2
|
+
const currentCategory = site.categories.findOne({ name: page.category });
|
|
3
|
+
const allPosts = currentCategory ? currentCategory.posts.toArray() : (page.posts ? page.posts.toArray() : []);
|
|
4
|
+
const totalCount = allPosts.length;
|
|
5
|
+
const years = allPosts
|
|
6
|
+
.map(p => (p.date && p.date.year ? p.date.year() : null))
|
|
7
|
+
.filter(y => y && y > 1970);
|
|
8
|
+
const minYear = years.length ? Math.min(...years) : null;
|
|
9
|
+
const maxYear = years.length ? Math.max(...years) : null;
|
|
10
|
+
const yearRange = minYear && maxYear ? (minYear === maxYear ? `${minYear}` : `${minYear} — ${maxYear}`) : '';
|
|
11
|
+
const categoryInfo = getCategoryInfo(page.category);
|
|
12
|
+
const categoriesList = site.categories.toArray()
|
|
13
|
+
.map(cat => ({ name: cat.name, path: cat.path, count: cat.length }))
|
|
14
|
+
.filter(cat => cat.count > 0)
|
|
15
|
+
.sort((a, b) => b.count - a.count || a.name.localeCompare(b.name));
|
|
16
|
+
%>
|
|
17
|
+
<%-partial('partials/taxonomy-header', {
|
|
18
|
+
type: 'category',
|
|
19
|
+
title: page.category,
|
|
20
|
+
count: totalCount,
|
|
21
|
+
yearRange,
|
|
22
|
+
description: categoryInfo?.description || '',
|
|
23
|
+
kindLabel: __('common.category'),
|
|
24
|
+
kindUrl: url_for('/archives/#categories')
|
|
25
|
+
})%>
|
|
2
26
|
<div class="posts-info-layout">
|
|
3
27
|
<div class="posts-wrap">
|
|
4
28
|
<%-partial('partials/recent-posts', { showHidden: true })%>
|
|
5
29
|
<%-partial('partials/paginator')%>
|
|
6
30
|
</div>
|
|
7
|
-
<div class="info-wrap"
|
|
8
|
-
|
|
31
|
+
<div class="info-wrap">
|
|
32
|
+
<%-partial('partials/site-info')%>
|
|
33
|
+
<%-partial('partials/taxonomy-sidebar', { type: 'category', items: categoriesList, current: page.category })%>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
@@ -20,8 +20,13 @@ const rssPath = config?.feed?.path || theme?.feed?.path;
|
|
|
20
20
|
</div>
|
|
21
21
|
<div class="buttonSet">
|
|
22
22
|
<% if (page.hdrSwitch) { %>
|
|
23
|
-
<span class="button hdr-switch" title="Switch HDR/SDR content">
|
|
24
|
-
|
|
23
|
+
<span class="button hdr-switch" title="Switch HDR/SDR content"></span>
|
|
24
|
+
<script>
|
|
25
|
+
if (window.innerWidth >= 500 && window.matchMedia && window.matchMedia("(dynamic-range: high)").matches && typeof CSS !== "undefined" && CSS.supports && CSS.supports("dynamic-range-limit: no-limit")) {
|
|
26
|
+
var hdrBtn = document.currentScript && document.currentScript.previousElementSibling;
|
|
27
|
+
if (hdrBtn) hdrBtn.classList.add("hdr_on");
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
25
30
|
<% } %>
|
|
26
31
|
<% if (hasTranslatation) { %>
|
|
27
32
|
<a class="button language <%=targetLanguage%>" href="<%=targetLanguagePath%>" target="_self" title="switch language"></a>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<% if(post?.tags?.length) { %>
|
|
12
12
|
<div class="tags">
|
|
13
13
|
<% (post.tags || []).forEach(tag => { %>
|
|
14
|
-
<a class="tag-item" href="<%=url_for(`/${tag.path}`)%>" onclick="event.stopPropagation()"><%=tag.name%></a>
|
|
14
|
+
<a class="tag-item<%= is_tag() && page.tag === tag.name ? ' is-current' : '' %>" href="<%=url_for(`/${tag.path}`)%>" onclick="event.stopPropagation()"><%=tag.name%></a>
|
|
15
15
|
<% }) %>
|
|
16
16
|
</div>
|
|
17
17
|
<% } %>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<%
|
|
2
|
+
const isTagType = type === 'tag';
|
|
3
|
+
const pageProgress = page.total > 1 ? __('common.pageProgress', page.current, page.total) : '';
|
|
4
|
+
%>
|
|
5
|
+
<header class="taxonomy-header taxonomy-<%=type%>">
|
|
6
|
+
<div class="taxonomy-header-inner">
|
|
7
|
+
<span class="taxonomy-accent-bar" aria-hidden="true"></span>
|
|
8
|
+
<div class="taxonomy-header-main">
|
|
9
|
+
<div class="taxonomy-title-row">
|
|
10
|
+
<div class="taxonomy-title-group">
|
|
11
|
+
<h1 class="taxonomy-title"><% if (isTagType) { %><span class="taxonomy-hash" aria-hidden="true">#</span><% } %><%=title%></h1>
|
|
12
|
+
<a class="taxonomy-kind" href="<%=kindUrl%>">/ <%=kindLabel%></a>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="taxonomy-meta">
|
|
15
|
+
<span><%=count%> <%=__('common.seriesPostCountShort')%></span>
|
|
16
|
+
<% if (yearRange) { %>
|
|
17
|
+
<span class="meta-sep" aria-hidden="true">·</span>
|
|
18
|
+
<span><%=yearRange%></span>
|
|
19
|
+
<% } %>
|
|
20
|
+
<% if (pageProgress) { %>
|
|
21
|
+
<span class="meta-sep" aria-hidden="true">·</span>
|
|
22
|
+
<span class="meta-page"><%=pageProgress%></span>
|
|
23
|
+
<% } %>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<% if (description) { %>
|
|
27
|
+
<p class="taxonomy-desc"><%=description%></p>
|
|
28
|
+
<% } %>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</header>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<% if (type === 'category' && items && items.length) { %>
|
|
2
|
+
<aside class="taxonomy-sidebar" aria-label="<%=__('common.allCategories')%>">
|
|
3
|
+
<div class="taxonomy-sidebar-block">
|
|
4
|
+
<div class="taxonomy-sidebar-header">
|
|
5
|
+
<span class="taxonomy-sidebar-title"><%=__('common.allCategories')%></span>
|
|
6
|
+
<a class="taxonomy-sidebar-all" href="<%=url_for('/archives/#categories')%>"><%=__('common.archives')%> →</a>
|
|
7
|
+
</div>
|
|
8
|
+
<ul class="taxonomy-category-list">
|
|
9
|
+
<% items.forEach(item => { %>
|
|
10
|
+
<li>
|
|
11
|
+
<a class="taxonomy-category-link<%= item.name === current ? ' active' : '' %>" href="<%=url_for(`/${item.path}`)%>">
|
|
12
|
+
<span class="name"><%=item.name%></span>
|
|
13
|
+
<span class="count"><%=item.count%></span>
|
|
14
|
+
</a>
|
|
15
|
+
</li>
|
|
16
|
+
<% }) %>
|
|
17
|
+
</ul>
|
|
18
|
+
</div>
|
|
19
|
+
</aside>
|
|
20
|
+
<% } else if (type === 'tag' && items && items.length) { %>
|
|
21
|
+
<aside class="taxonomy-sidebar" aria-label="<%=__('common.relatedTags')%>">
|
|
22
|
+
<div class="taxonomy-sidebar-block">
|
|
23
|
+
<div class="taxonomy-sidebar-header">
|
|
24
|
+
<span class="taxonomy-sidebar-title"><%=__('common.relatedTags')%></span>
|
|
25
|
+
<a class="taxonomy-sidebar-all" href="<%=url_for('/archives/#tags')%>"><%=__('common.viewAll')%> →</a>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="taxonomy-related-tags">
|
|
28
|
+
<% items.forEach(item => { %>
|
|
29
|
+
<a class="taxonomy-tag-chip" href="<%=url_for(`/${item.path}`)%>">
|
|
30
|
+
<span class="name"><%=item.name%></span>
|
|
31
|
+
<span class="count"><%=item.count%></span>
|
|
32
|
+
</a>
|
|
33
|
+
<% }) %>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</aside>
|
|
37
|
+
<% } else if (type === 'archive' && items && items.length) { %>
|
|
38
|
+
<aside class="taxonomy-sidebar" aria-label="<%=__('common.allYears')%>">
|
|
39
|
+
<div class="taxonomy-sidebar-block">
|
|
40
|
+
<div class="taxonomy-sidebar-header">
|
|
41
|
+
<span class="taxonomy-sidebar-title"><%=__('common.allYears')%></span>
|
|
42
|
+
<a class="taxonomy-sidebar-all" href="<%=url_for('/archives/#archives')%>"><%=__('common.archives')%> →</a>
|
|
43
|
+
</div>
|
|
44
|
+
<ul class="taxonomy-category-list">
|
|
45
|
+
<% items.forEach(item => { %>
|
|
46
|
+
<li>
|
|
47
|
+
<a class="taxonomy-category-link<%= String(item.year) === String(current) ? ' active' : '' %>" href="<%=url_for(`/archives/${item.year}/`)%>">
|
|
48
|
+
<span class="name"><%=item.name%></span>
|
|
49
|
+
<span class="count"><%=item.count%></span>
|
|
50
|
+
</a>
|
|
51
|
+
</li>
|
|
52
|
+
<% }) %>
|
|
53
|
+
</ul>
|
|
54
|
+
</div>
|
|
55
|
+
</aside>
|
|
56
|
+
<% } %>
|
package/layout/series.ejs
CHANGED
|
@@ -120,8 +120,8 @@ const travelPlacesJson = encodeURIComponent(JSON.stringify(travelPlaces));
|
|
|
120
120
|
</div>
|
|
121
121
|
<div class="travel-place-list">
|
|
122
122
|
<% travelPlaces.forEach((place, index) => { %>
|
|
123
|
-
<article class="travel-place-card" data-travel-place="<%=place.id%>">
|
|
124
|
-
<a href="<%=place.path%>" class="travel-place-cover" aria-label="<%=place.title%>">
|
|
123
|
+
<article class="travel-place-card" data-travel-place="<%=place.id%>" href="<%=place.path%>" onclick="onclickPostItem(this)">
|
|
124
|
+
<a href="<%=place.path%>" class="travel-place-cover" aria-label="<%=place.title%>" onclick="event.stopPropagation()">
|
|
125
125
|
<span class="travel-place-index"><%=String(travelPlaces.length - index).padStart(2, '0')%></span>
|
|
126
126
|
<% if (place.cover) { %>
|
|
127
127
|
<div class="cover-img">
|
|
@@ -130,7 +130,7 @@ const travelPlacesJson = encodeURIComponent(JSON.stringify(travelPlaces));
|
|
|
130
130
|
<% } %>
|
|
131
131
|
</a>
|
|
132
132
|
<div class="travel-place-body">
|
|
133
|
-
<a class="travel-place-title" href="<%=place.path%>"><%=place.title%><% if (place.subTitle) { %><span class="sub-title"><%=place.subTitle%></span><% } %></a>
|
|
133
|
+
<a class="travel-place-title" href="<%=place.path%>" onclick="event.stopPropagation()"><%=place.title%><% if (place.subTitle) { %><span class="sub-title"><%=place.subTitle%></span><% } %></a>
|
|
134
134
|
<div class="travel-place-meta"><%=place.location%><% if (place.date) { %><span><%=place.date%></span><% } %></div>
|
|
135
135
|
<div class="travel-place-excerpt"><%-place.excerpt%></div>
|
|
136
136
|
</div>
|
|
@@ -145,23 +145,78 @@ const travelPlacesJson = encodeURIComponent(JSON.stringify(travelPlaces));
|
|
|
145
145
|
|
|
146
146
|
// Leaflet assets will be loaded asynchronously below.
|
|
147
147
|
|
|
148
|
-
const
|
|
148
|
+
const initMapData = () => {
|
|
149
149
|
const places = JSON.parse(decodeURIComponent(mapEl.dataset.places || '%5B%5D'));
|
|
150
150
|
const items = document.querySelectorAll('[data-travel-place]');
|
|
151
|
-
const markers = new Map();
|
|
152
151
|
const setActive = (id, active) => {
|
|
153
152
|
items.forEach((item) => {
|
|
154
153
|
if (item.dataset.travelPlace === id) item.classList.toggle('active', active);
|
|
155
154
|
});
|
|
156
155
|
};
|
|
157
156
|
|
|
157
|
+
const placeGroups = places.reduce((groups, place) => {
|
|
158
|
+
const key = `${place.lat.toFixed(3)},${place.lng.toFixed(3)}`;
|
|
159
|
+
if (!groups.has(key)) {
|
|
160
|
+
groups.set(key, {
|
|
161
|
+
lat: place.lat,
|
|
162
|
+
lng: place.lng,
|
|
163
|
+
places: [],
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
groups.get(key).places.push(place);
|
|
167
|
+
return groups;
|
|
168
|
+
}, new Map());
|
|
169
|
+
|
|
170
|
+
const escapeHtml = (value = '') => String(value)
|
|
171
|
+
.replace(/&/g, '&')
|
|
172
|
+
.replace(/</g, '<')
|
|
173
|
+
.replace(/>/g, '>')
|
|
174
|
+
.replace(/"/g, '"')
|
|
175
|
+
.replace(/'/g, ''');
|
|
176
|
+
|
|
177
|
+
const getPopupHtml = (group) => {
|
|
178
|
+
const listItems = group.places
|
|
179
|
+
.map((place) => {
|
|
180
|
+
const subTitle = place.subTitle ? `<small class="travel-map-popup-subtitle">${escapeHtml(place.subTitle)}</small>` : '';
|
|
181
|
+
const coverImg = place.cover ? `<img class="travel-map-popup-cover" src="${escapeHtml(place.cover)}" alt="" />` : '';
|
|
182
|
+
return `<a class="travel-map-popup-record" href="${escapeHtml(place.path)}">${coverImg}<div class="travel-map-popup-content"><span>${escapeHtml(place.title)}${subTitle}</span><small>${escapeHtml(place.date || place.location)}</small></div></a>`;
|
|
183
|
+
})
|
|
184
|
+
.join('');
|
|
185
|
+
return `<div class="travel-map-popup-list">${listItems}</div>`;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const bindCardEvents = (markers) => {
|
|
189
|
+
items.forEach((item) => {
|
|
190
|
+
const id = item.dataset.travelPlace;
|
|
191
|
+
const getEl = markers.get(id);
|
|
192
|
+
const toggle = (active) => {
|
|
193
|
+
setActive(id, active);
|
|
194
|
+
const el = getEl ? getEl() : null;
|
|
195
|
+
if (el) el.classList.toggle('active', active);
|
|
196
|
+
};
|
|
197
|
+
item.addEventListener('mouseenter', () => toggle(true));
|
|
198
|
+
item.addEventListener('mouseleave', () => toggle(false));
|
|
199
|
+
item.addEventListener('focus', () => toggle(true));
|
|
200
|
+
item.addEventListener('blur', () => toggle(false));
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
return { placeGroups, setActive, getPopupHtml, bindCardEvents };
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const mapLanguage = '<%=String(page.language || config.language || "").startsWith("zh") ? "zh" : "en"%>';
|
|
208
|
+
let fallbackTriggered = false;
|
|
209
|
+
|
|
210
|
+
const initLeafletMap = () => {
|
|
158
211
|
if (!window.L) {
|
|
159
212
|
mapEl.innerHTML = '<div class="travel-map-loading"><%=page.series === "Travel" ? "Map failed to load." : "地图加载失败。"%></div>';
|
|
160
213
|
return;
|
|
161
214
|
}
|
|
162
215
|
|
|
216
|
+
const { placeGroups, setActive, getPopupHtml, bindCardEvents } = initMapData();
|
|
217
|
+
const markers = new Map();
|
|
163
218
|
mapEl.innerHTML = '';
|
|
164
|
-
|
|
219
|
+
|
|
165
220
|
const tileConfig = mapLanguage === 'zh'
|
|
166
221
|
? {
|
|
167
222
|
url: 'https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
|
|
@@ -193,44 +248,13 @@ const travelPlacesJson = encodeURIComponent(JSON.stringify(travelPlaces));
|
|
|
193
248
|
popupAnchor: [0, -10],
|
|
194
249
|
});
|
|
195
250
|
const bounds = [];
|
|
196
|
-
const placeGroups = places.reduce((groups, place) => {
|
|
197
|
-
const key = `${place.lat.toFixed(3)},${place.lng.toFixed(3)}`;
|
|
198
|
-
if (!groups.has(key)) {
|
|
199
|
-
groups.set(key, {
|
|
200
|
-
lat: place.lat,
|
|
201
|
-
lng: place.lng,
|
|
202
|
-
places: [],
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
groups.get(key).places.push(place);
|
|
206
|
-
return groups;
|
|
207
|
-
}, new Map());
|
|
208
|
-
|
|
209
|
-
const escapeHtml = (value = '') => String(value)
|
|
210
|
-
.replace(/&/g, '&')
|
|
211
|
-
.replace(/</g, '<')
|
|
212
|
-
.replace(/>/g, '>')
|
|
213
|
-
.replace(/"/g, '"')
|
|
214
|
-
.replace(/'/g, ''');
|
|
215
|
-
|
|
216
|
-
const getPopupHtml = (group) => {
|
|
217
|
-
const items = group.places
|
|
218
|
-
.map((place) => {
|
|
219
|
-
const subTitle = place.subTitle ? `<small class="travel-map-popup-subtitle">${escapeHtml(place.subTitle)}</small>` : '';
|
|
220
|
-
const coverImg = place.cover ? `<img class="travel-map-popup-cover" src="${escapeHtml(place.cover)}" alt="" />` : '';
|
|
221
|
-
return `<a class="travel-map-popup-record" href="${escapeHtml(place.path)}">${coverImg}<div class="travel-map-popup-content"><span>${escapeHtml(place.title)}${subTitle}</span><small>${escapeHtml(place.date || place.location)}</small></div></a>`;
|
|
222
|
-
})
|
|
223
|
-
.join('');
|
|
224
|
-
return `<div class="travel-map-popup-list">${items}</div>`;
|
|
225
|
-
};
|
|
226
251
|
|
|
227
252
|
placeGroups.forEach((group) => {
|
|
228
253
|
const placeCount = group.places.length;
|
|
229
254
|
const marker = L.marker([group.lat, group.lng], { icon: createMarkerIcon(placeCount) })
|
|
230
255
|
.addTo(map)
|
|
231
256
|
.bindPopup(getPopupHtml(group));
|
|
232
|
-
|
|
233
|
-
group.places.forEach((place) => markers.set(place.id, marker));
|
|
257
|
+
group.places.forEach((place) => markers.set(place.id, () => marker.getElement()));
|
|
234
258
|
bounds.push([group.lat, group.lng]);
|
|
235
259
|
|
|
236
260
|
marker.on('mouseover', () => {
|
|
@@ -250,42 +274,13 @@ const travelPlacesJson = encodeURIComponent(JSON.stringify(travelPlaces));
|
|
|
250
274
|
map.setMinZoom(map.getZoom());
|
|
251
275
|
}
|
|
252
276
|
|
|
253
|
-
|
|
254
|
-
const id = item.dataset.travelPlace;
|
|
255
|
-
const marker = markers.get(id);
|
|
256
|
-
item.addEventListener('mouseenter', () => {
|
|
257
|
-
setActive(id, true);
|
|
258
|
-
if (marker) {
|
|
259
|
-
const el = marker.getElement();
|
|
260
|
-
if (el) el.classList.add('active');
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
item.addEventListener('mouseleave', () => {
|
|
264
|
-
setActive(id, false);
|
|
265
|
-
if (marker) {
|
|
266
|
-
const el = marker.getElement();
|
|
267
|
-
if (el) el.classList.remove('active');
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
item.addEventListener('focus', () => {
|
|
271
|
-
setActive(id, true);
|
|
272
|
-
if (marker) {
|
|
273
|
-
const el = marker.getElement();
|
|
274
|
-
if (el) el.classList.add('active');
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
item.addEventListener('blur', () => {
|
|
278
|
-
setActive(id, false);
|
|
279
|
-
if (marker) {
|
|
280
|
-
const el = marker.getElement();
|
|
281
|
-
if (el) el.classList.remove('active');
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
});
|
|
277
|
+
bindCardEvents(markers);
|
|
285
278
|
};
|
|
286
279
|
|
|
287
|
-
const
|
|
288
|
-
|
|
280
|
+
const loadLeafletFallback = () => {
|
|
281
|
+
if (fallbackTriggered) return;
|
|
282
|
+
fallbackTriggered = true;
|
|
283
|
+
|
|
289
284
|
if (!document.querySelector('link[href*="leaflet.css"]')) {
|
|
290
285
|
const link = document.createElement('link');
|
|
291
286
|
link.rel = 'stylesheet';
|
|
@@ -293,14 +288,13 @@ const travelPlacesJson = encodeURIComponent(JSON.stringify(travelPlaces));
|
|
|
293
288
|
document.head.appendChild(link);
|
|
294
289
|
}
|
|
295
290
|
|
|
296
|
-
// 2. Load Leaflet script dynamically
|
|
297
291
|
if (window.L) {
|
|
298
|
-
|
|
292
|
+
initLeafletMap();
|
|
299
293
|
} else {
|
|
300
294
|
const script = document.createElement('script');
|
|
301
295
|
script.src = '<%-url_for("/linen-theme/js/leaflet.js")%>';
|
|
302
296
|
script.async = true;
|
|
303
|
-
script.onload =
|
|
297
|
+
script.onload = initLeafletMap;
|
|
304
298
|
script.onerror = () => {
|
|
305
299
|
mapEl.innerHTML = '<div class="travel-map-loading"><%=page.series === "Travel" ? "Map failed to load." : "地图加载失败。"%></div>';
|
|
306
300
|
};
|
|
@@ -308,6 +302,153 @@ const travelPlacesJson = encodeURIComponent(JSON.stringify(travelPlaces));
|
|
|
308
302
|
}
|
|
309
303
|
};
|
|
310
304
|
|
|
305
|
+
const initMapLibreMap = () => {
|
|
306
|
+
if (!window.maplibregl) {
|
|
307
|
+
loadLeafletFallback();
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const { placeGroups, setActive, getPopupHtml, bindCardEvents } = initMapData();
|
|
312
|
+
const markers = new Map();
|
|
313
|
+
mapEl.innerHTML = '';
|
|
314
|
+
|
|
315
|
+
let styleLoaded = false;
|
|
316
|
+
let map;
|
|
317
|
+
try {
|
|
318
|
+
map = new window.maplibregl.Map({
|
|
319
|
+
container: mapEl,
|
|
320
|
+
style: 'https://tiles.openfreemap.org/styles/liberty',
|
|
321
|
+
center: [108, 34],
|
|
322
|
+
zoom: 3.2,
|
|
323
|
+
scrollZoom: false,
|
|
324
|
+
dragRotate: false,
|
|
325
|
+
pitchWithRotate: false,
|
|
326
|
+
attributionControl: false,
|
|
327
|
+
});
|
|
328
|
+
} catch (error) {
|
|
329
|
+
loadLeafletFallback();
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
map.addControl(new window.maplibregl.NavigationControl({ showCompass: false }), 'top-right');
|
|
334
|
+
map.addControl(new window.maplibregl.AttributionControl({ compact: true }), 'bottom-right');
|
|
335
|
+
|
|
336
|
+
const fallbackTimer = setTimeout(() => {
|
|
337
|
+
if (!styleLoaded) {
|
|
338
|
+
try { map.remove(); } catch (e) {}
|
|
339
|
+
loadLeafletFallback();
|
|
340
|
+
}
|
|
341
|
+
}, 8000);
|
|
342
|
+
|
|
343
|
+
map.on('error', () => {
|
|
344
|
+
if (!styleLoaded) {
|
|
345
|
+
clearTimeout(fallbackTimer);
|
|
346
|
+
try { map.remove(); } catch (e) {}
|
|
347
|
+
loadLeafletFallback();
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
map.on('style.load', () => {
|
|
352
|
+
styleLoaded = true;
|
|
353
|
+
clearTimeout(fallbackTimer);
|
|
354
|
+
|
|
355
|
+
const labelExpr = mapLanguage === 'zh'
|
|
356
|
+
? ['coalesce', ['get', 'name:zh'], ['get', 'name:zh-Hans'], ['get', 'name']]
|
|
357
|
+
: ['coalesce', ['get', 'name:en'], ['get', 'name:latin'], ['get', 'name']];
|
|
358
|
+
|
|
359
|
+
const layers = map.getStyle().layers || [];
|
|
360
|
+
layers.forEach((layer) => {
|
|
361
|
+
if (layer.type !== 'symbol' || !layer.layout || !layer.layout['text-field']) return;
|
|
362
|
+
const fieldStr = JSON.stringify(layer.layout['text-field']);
|
|
363
|
+
if (fieldStr.includes('name')) {
|
|
364
|
+
try {
|
|
365
|
+
map.setLayoutProperty(layer.id, 'text-field', labelExpr);
|
|
366
|
+
} catch (e) {}
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
const bounds = new window.maplibregl.LngLatBounds();
|
|
372
|
+
|
|
373
|
+
placeGroups.forEach((group) => {
|
|
374
|
+
const placeCount = group.places.length;
|
|
375
|
+
const markerEl = document.createElement('div');
|
|
376
|
+
markerEl.className = 'travel-leaflet-marker';
|
|
377
|
+
markerEl.innerHTML = `<span data-place-count="${placeCount}">${placeCount > 1 ? `<strong>${placeCount}</strong>` : ''}</span>`;
|
|
378
|
+
|
|
379
|
+
const popup = new window.maplibregl.Popup({
|
|
380
|
+
offset: 14,
|
|
381
|
+
closeButton: true,
|
|
382
|
+
maxWidth: '260px',
|
|
383
|
+
}).setHTML(getPopupHtml(group));
|
|
384
|
+
|
|
385
|
+
new window.maplibregl.Marker({ element: markerEl, anchor: 'center' })
|
|
386
|
+
.setLngLat([group.lng, group.lat])
|
|
387
|
+
.setPopup(popup)
|
|
388
|
+
.addTo(map);
|
|
389
|
+
|
|
390
|
+
group.places.forEach((place) => markers.set(place.id, () => markerEl));
|
|
391
|
+
bounds.extend([group.lng, group.lat]);
|
|
392
|
+
|
|
393
|
+
markerEl.addEventListener('mouseenter', () => {
|
|
394
|
+
markerEl.classList.add('active');
|
|
395
|
+
group.places.forEach((place) => setActive(place.id, true));
|
|
396
|
+
});
|
|
397
|
+
markerEl.addEventListener('mouseleave', () => {
|
|
398
|
+
markerEl.classList.remove('active');
|
|
399
|
+
group.places.forEach((place) => setActive(place.id, false));
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
if (!bounds.isEmpty()) {
|
|
404
|
+
map.fitBounds(bounds, {
|
|
405
|
+
padding: 40,
|
|
406
|
+
maxZoom: 11,
|
|
407
|
+
duration: 0,
|
|
408
|
+
});
|
|
409
|
+
map.setMinZoom(Math.max(1, map.getZoom() - 0.5));
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
bindCardEvents(markers);
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
const hasWebGL = (() => {
|
|
416
|
+
try {
|
|
417
|
+
const canvas = document.createElement('canvas');
|
|
418
|
+
return !!(window.WebGLRenderingContext && (canvas.getContext('webgl2') || canvas.getContext('webgl')));
|
|
419
|
+
} catch (e) {
|
|
420
|
+
return false;
|
|
421
|
+
}
|
|
422
|
+
})();
|
|
423
|
+
|
|
424
|
+
const loadResources = () => {
|
|
425
|
+
if (!hasWebGL) {
|
|
426
|
+
loadLeafletFallback();
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
const mapLibreCss = 'https://cdn.jsdelivr.net/npm/maplibre-gl@4.7.1/dist/maplibre-gl.css';
|
|
431
|
+
const mapLibreJs = 'https://cdn.jsdelivr.net/npm/maplibre-gl@4.7.1/dist/maplibre-gl.js';
|
|
432
|
+
|
|
433
|
+
if (!document.querySelector('link[href*="maplibre-gl.css"]')) {
|
|
434
|
+
const link = document.createElement('link');
|
|
435
|
+
link.rel = 'stylesheet';
|
|
436
|
+
link.href = mapLibreCss;
|
|
437
|
+
document.head.appendChild(link);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
if (window.maplibregl) {
|
|
441
|
+
initMapLibreMap();
|
|
442
|
+
} else {
|
|
443
|
+
const script = document.createElement('script');
|
|
444
|
+
script.src = mapLibreJs;
|
|
445
|
+
script.async = true;
|
|
446
|
+
script.onload = initMapLibreMap;
|
|
447
|
+
script.onerror = loadLeafletFallback;
|
|
448
|
+
document.body.appendChild(script);
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
|
|
311
452
|
// Use requestIdleCallback or setTimeout to yield the main thread and prevent blocking initial paint/layout of the place list
|
|
312
453
|
if (window.requestIdleCallback) {
|
|
313
454
|
window.requestIdleCallback(() => loadResources());
|
package/layout/tag.ejs
CHANGED
|
@@ -1,8 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
<%
|
|
2
|
+
const currentTag = site.tags.findOne({ name: page.tag });
|
|
3
|
+
const allPosts = currentTag ? currentTag.posts.toArray() : (page.posts ? page.posts.toArray() : []);
|
|
4
|
+
const totalCount = allPosts.length;
|
|
5
|
+
const years = allPosts
|
|
6
|
+
.map(p => (p.date && p.date.year ? p.date.year() : null))
|
|
7
|
+
.filter(y => y && y > 1970);
|
|
8
|
+
const minYear = years.length ? Math.min(...years) : null;
|
|
9
|
+
const maxYear = years.length ? Math.max(...years) : null;
|
|
10
|
+
const yearRange = minYear && maxYear ? (minYear === maxYear ? `${minYear}` : `${minYear} — ${maxYear}`) : '';
|
|
11
|
+
const tagInfo = getTagInfo(page.tag);
|
|
12
|
+
const relatedMap = new Map();
|
|
13
|
+
allPosts.forEach(post => {
|
|
14
|
+
(post.tags ? post.tags.toArray() : []).forEach(t => {
|
|
15
|
+
if (t.name === page.tag) return;
|
|
16
|
+
const existing = relatedMap.get(t.name);
|
|
17
|
+
if (existing) {
|
|
18
|
+
existing.count += 1;
|
|
19
|
+
} else {
|
|
20
|
+
relatedMap.set(t.name, { name: t.name, path: t.path, count: 1 });
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
const relatedTags = Array.from(relatedMap.values())
|
|
25
|
+
.sort((a, b) => b.count - a.count || a.name.localeCompare(b.name))
|
|
26
|
+
.slice(0, 10);
|
|
27
|
+
%>
|
|
28
|
+
<%-partial('partials/taxonomy-header', {
|
|
29
|
+
type: 'tag',
|
|
30
|
+
title: page.tag,
|
|
31
|
+
count: totalCount,
|
|
32
|
+
yearRange,
|
|
33
|
+
description: tagInfo?.description || '',
|
|
34
|
+
kindLabel: __('common.tag'),
|
|
35
|
+
kindUrl: url_for('/archives/#tags')
|
|
36
|
+
})%>
|
|
2
37
|
<div class="posts-info-layout">
|
|
3
38
|
<div class="posts-wrap">
|
|
4
39
|
<%-partial('partials/recent-posts', { showHidden: true })%>
|
|
5
40
|
<%-partial('partials/paginator')%>
|
|
6
41
|
</div>
|
|
7
|
-
<div class="info-wrap"
|
|
8
|
-
|
|
42
|
+
<div class="info-wrap">
|
|
43
|
+
<%-partial('partials/site-info')%>
|
|
44
|
+
<%-partial('partials/taxonomy-sidebar', { type: 'tag', items: relatedTags, current: page.tag })%>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|